Example #1
0
 def testComputePosteriorParetoFrontierByData(self):
     # Experiments with batch trials must specify trial_index or data
     compute_posterior_pareto_frontier(
         self.experiment,
         self.metrics[0],
         self.metrics[1],
         data=self.experiment.fetch_data(),
         absolute_metrics=[m.name for m in self.metrics],
         num_points=2,
     )
Example #2
0
 def testComputePosteriorParetoFrontierByTrial(self):
     # Experiments with batch trials must specify trial_index or data
     with self.assertRaises(UnsupportedError):
         compute_posterior_pareto_frontier(
             self.experiment,
             self.metrics[0],
             self.metrics[1],
             absolute_metrics=[m.name for m in self.metrics],
         )
     pfr = compute_posterior_pareto_frontier(
         self.experiment,
         self.metrics[0],
         self.metrics[1],
         trial_index=0,
         absolute_metrics=[m.name for m in self.metrics],
         num_points=2,
     )
     self.assertIsNone(pfr.arm_names)