Skip to content

Commit

Permalink
✅🐛Fixed test_recover
Browse files Browse the repository at this point in the history
  • Loading branch information
carefree0910 committed Nov 22, 2024
1 parent acba190 commit 805973e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_learn/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ def forward(self, batch):
self.assertAlmostEqual(outputs.metric_outputs.final_score, 0.0)
predictions = outputs.forward_results[cflearn.PREDICTIONS_KEY]
np.testing.assert_allclose(predictions, np.ones_like(predictions))
outputs = p.evaluate(loader, return_outputs=True, recover_labels=False)
raw_kw = dict(recover_labels=False, recover_predictions=False)
outputs = p.evaluate(loader, return_outputs=True, **raw_kw)
self.assertAlmostEqual(outputs.metric_outputs.final_score, 0.0)
predictions = outputs.forward_results[cflearn.PREDICTIONS_KEY]
np.testing.assert_allclose(predictions, np.zeros_like(predictions))
Expand All @@ -190,7 +191,7 @@ def forward(self, batch):
self.assertAlmostEqual(outputs.metric_outputs.final_score, 0.0)
predictions = outputs.forward_results[cflearn.PREDICTIONS_KEY]
np.testing.assert_allclose(predictions, np.ones_like(predictions))
outputs = p.evaluate(loader, return_outputs=True, recover_labels=False)
outputs = p.evaluate(loader, return_outputs=True, **raw_kw)
self.assertAlmostEqual(outputs.metric_outputs.final_score, 0.0)
predictions = outputs.forward_results[cflearn.PREDICTIONS_KEY]
np.testing.assert_allclose(predictions, np.zeros_like(predictions))
Expand Down

0 comments on commit 805973e

Please sign in to comment.