Skip to content

Commit

Permalink
change pickle test
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyBagnall committed Feb 3, 2025
1 parent 84bec87 commit 87b6544
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions aeon/testing/estimator_checking/_yield_estimator_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import joblib
import numpy as np
import pandas as pd
from numpy.testing import assert_array_almost_equal
from sklearn.exceptions import NotFittedError

from aeon.anomaly_detection.base import BaseAnomalyDetector
Expand Down Expand Up @@ -668,12 +667,11 @@ def check_persistence_via_pickle(estimator, datatype):
for method in NON_STATE_CHANGING_METHODS_ARRAYLIKE:
if hasattr(estimator, method) and callable(getattr(estimator, method)):
output = _run_estimator_method(estimator, method, datatype, "test")
assert_array_almost_equal(
output,
results[i],
err_msg=f"Running {method} after fit twice with test "
f"parameters gives different results.",
)
if not _equal_outputs(output, results[i]):
raise ValueError(
f"Running {method} after serialisation parameters gives "
f"different results."
)
i += 1


Expand Down

0 comments on commit 87b6544

Please sign in to comment.