Esempio n. 1
0
 def test_hard_delete_run(self):
     fs = FileStore(self.test_root)
     exp_id = self.experiments[random_int(0, len(self.experiments) - 1)]
     run_id = self.exp_data[exp_id]["runs"][0]
     fs._hard_delete_run(run_id)
     with self.assertRaises(MlflowException):
         fs.get_run(run_id)
     with self.assertRaises(MlflowException):
         fs.get_all_tags(run_id)
     with self.assertRaises(MlflowException):
         fs.get_all_metrics(run_id)
     with self.assertRaises(MlflowException):
         fs.get_all_params(run_id)
Esempio n. 2
0
 def test_get_all_metrics(self):
     fs = FileStore(self.test_root)
     for exp_id in self.experiments:
         runs = self.exp_data[exp_id]["runs"]
         for run_id in runs:
             run_info = self.run_data[run_id]
             metrics = fs.get_all_metrics(run_id)
             metrics_dict = run_info.pop("metrics")
             for metric in metrics:
                 expected_timestamp, expected_value = max(metrics_dict[metric.key])
                 self.assertEqual(metric.timestamp, expected_timestamp)
                 self.assertEqual(metric.value, expected_value)