Skip to content

Commit 8c27c2c

Browse files
committed
fix arima tests
1 parent 6d0fe48 commit 8c27c2c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/system/small/ml/test_forecasting.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,10 @@ def test_arima_plus_detect_anomalies_params(
432432
},
433433
)
434434
pd.testing.assert_frame_equal(
435-
anomalies[["is_anomaly", "lower_bound", "upper_bound", "anomaly_probability"]],
436-
expected,
435+
anomalies[["is_anomaly", "lower_bound", "upper_bound", "anomaly_probability"]]
436+
.sort_values("anomaly_probability")
437+
.reset_index(),
438+
expected.sort_values("anomaly_probability").reset_index(),
437439
rtol=0.1,
438440
check_index_type=False,
439441
check_dtype=False,
@@ -484,8 +486,8 @@ def test_arima_plus_score(
484486
dtype="Float64",
485487
)
486488
pd.testing.assert_frame_equal(
487-
result,
488-
expected,
489+
result.sort_values("id").reset_index(),
490+
expected.sort_values("id").reset_index(),
489491
rtol=0.1,
490492
check_index_type=False,
491493
)
@@ -577,8 +579,8 @@ def test_arima_plus_score_series(
577579
dtype="Float64",
578580
)
579581
pd.testing.assert_frame_equal(
580-
result,
581-
expected,
582+
result.sort_values("id").reset_index(),
583+
expected.sort_values("id").reset_index(),
582584
rtol=0.1,
583585
check_index_type=False,
584586
)

0 commit comments

Comments
 (0)