Beispiel #1
0
 def summary(self):
     display.section('Trial summary')
     if self.hyperparameters.values:
         display.subsection('Hp values:')
         value_need_display = {k: v for k, v in self.hyperparameters.values.items()
                               if k in self.hyperparameters._space and
                               self.hyperparameters._space[k].__class__.__name__ != 'Fixed'}
         display.display_settings(value_need_display)
     else:
         display.subsection('Hp values: default configuration.')
     if self.score is not None:
         display.display_setting('Score: {}'.format(self.score))
     if self.best_step is not None:
         display.display_setting('Best step: {}'.format(self.best_step))
Beispiel #2
0
 def results_summary(self, num_trials=10):
     """Display tuning results summary.
     Args:
         num_trials (int, optional): Number of trials to display.
             Defaults to 10.
         sort_metric (str, optional): Sorting metric, when not specified
             sort models by objective value. Defaults to None.
     """
     display.section('Results summary')
     display.display_setting('Results in %s' % self.project_dir)
     best_trials = self.oracle.get_best_trials(num_trials)
     display.display_setting('Showing %d best trials' % num_trials)
     for trial in best_trials:
         display.display_setting('Objective: {} Score: {}'.format(
             self.oracle.objective, trial.score))
Beispiel #3
0
 def search_space_summary(self, extended=False):
     """Print search space summary.
     Args:
         extended: Bool, optional. Display extended summary.
             Defaults to False.
     """
     display.section('Search space summary')
     hp = self.oracle.get_space()
     display.display_setting('Default search space size: %d' %
                             len(hp.space))
     for p in hp.space:
         config = p.get_config()
         name = config.pop('name')
         if p.__class__.__name__ == 'Fixed':
             continue
         display.subsection('%s (%s)' % (name, p.__class__.__name__))
         display.display_settings(config)
Beispiel #4
0
 def on_trial_end(trial):
     display.section('Trial complete')
     trial.summary()
Beispiel #5
0
 def on_trial_begin(trial):
     display.section('New model')
     trial.summary()