Exemple #1
0
    def register_analysis(self, analysis: ExperimentAnalysis):
        """Integrate the given analysis into the gaussian process.

        Args:
            analysis (ExperimentAnalysis): Optionally, the previous analysis
                to integrate.
        """
        for (_, report), params in zip(
                analysis.dataframe(metric=self._metric,
                                   mode=self._mode).iterrows(),
                analysis.get_all_configs().values()):
            # We add the obtained results to the
            # gaussian process optimizer
            self._register_result(params, report)
 def testBestConfigIsLogdir(self):
     analysis = ExperimentAnalysis(self.test_dir)
     for metric, mode in [(self.metric, "min"), (self.metric, "max")]:
         logdir = analysis.get_best_logdir(metric, mode=mode)
         best_config = analysis.get_best_config(metric, mode=mode)
         self.assertEqual(analysis.get_all_configs()[logdir], best_config)