Exemple #1
0
 def test_get_all_metrics_scaffold(self):
     metrics = get_all_metrics(self.test,
                               self.gen,
                               test_scaffolds=self.test_sf,
                               k=3,
                               n_jobs=2)
     print(metrics)
Exemple #2
0
 def test_get_all_metrics_multiprocess(self):
     metrics = get_all_metrics(self.ref, self.gen, k=3, n_jobs=2)
     for metric in self.target:
         assert np.allclose(metrics[metric], self.target[metric]), \
             ("Metric `{}` value does not match expected "
              "value. Got {}, expected {}".format(metric,
                                                  metrics[metric],
                                                  self.target[metric]))
Exemple #3
0
 def test_get_all_metrics_multiprocess(self):
     metrics = get_all_metrics(gen=self.gen, test=self.test, k=3, n_jobs=2)
     fail = set()
     for metric in self.target:
         if not np.allclose(metrics[metric], self.target[metric]):
             warnings.warn("Metric `{}` value does not match expected "
                           "value. Got {}, expected {}".format(
                               metric, metrics[metric],
                               self.target[metric]))
             fail.add(metric)
     assert len(fail) == 0, f"Some metrics didn't pass tests: {fail}"
Exemple #4
0
 def test_get_all_metrics_scaffold(self):
     get_all_metrics(gen=self.gen,
                     test=self.test,
                     test_scaffolds=self.test_sf,
                     k=3,
                     n_jobs=2)