Skip to content

Commit f37ebbe

Browse files
authored
Remove dtype checking for prediction comparison (#1177)
It looks like the predictions loaded from an arff file are read as floats by the arff reader, which results in a different type (float v int). Because "equality" of values is already checked, I figured dtype is not as imported. That said, I am not sure why there are so many redundant comparisons in the first place? Anyway, the difference should be due to pandas inference behavior, and if that is what we want to test, then we should make a small isolated test case instead of integrating it into every prediction unit test. Finally, over the next year we should move away from ARFF.
1 parent 75fed8a commit f37ebbe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_runs/test_run_functions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,11 @@ def _rerun_model_and_compare_predictions(self, run_id, model_prime, seed, create
183183
predictions_prime = run_prime._generate_arff_dict()
184184

185185
self._compare_predictions(predictions, predictions_prime)
186-
pd.testing.assert_frame_equal(run.predictions, run_prime.predictions)
186+
pd.testing.assert_frame_equal(
187+
run.predictions,
188+
run_prime.predictions,
189+
check_dtype=False, # Loaded ARFF reads NUMERIC as float, even if integer.
190+
)
187191

188192
def _perform_run(
189193
self,

0 commit comments

Comments
 (0)