Skip to content

Commit

Permalink
Update test_reduce_global.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fkiraly committed May 20, 2024
1 parent 54d1fa1 commit 4cd3a35
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions sktime/forecasting/compose/tests/test_reduce_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
from sktime.tests.test_switch import run_test_for_class
from sktime.utils.validation._dependencies import _check_soft_dependencies

# HistGradientBoostingRegressor requires experimental flag in old sklearn versions
sklearn_zero_x = _check_soft_dependencies(
"scikit-learn<1.4",
severity="none",
package_import_alias={"scikit-learn": "sklearn"},
)

if _check_soft_dependencies(
"scikit-learn<1.0",
severity="none",
package_import_alias={"scikit-learn": "sklearn"},
):
from sklearn.experimental import enable_hist_gradient_boosting # noqa

import random

import numpy as np
Expand All @@ -42,6 +28,21 @@
from sktime.utils._testing.hierarchical import _make_hierarchical


# HistGradientBoostingRegressor requires experimental flag in old sklearn versions
sklearn_zero_x = _check_soft_dependencies(
"scikit-learn<1.4",
severity="none",
package_import_alias={"scikit-learn": "sklearn"},
)

if _check_soft_dependencies(
"scikit-learn<1.0",
severity="none",
package_import_alias={"scikit-learn": "sklearn"},
):
from sklearn.experimental import enable_hist_gradient_boosting # noqa


@pytest.fixture
def y_dict():
"""Dictionary of dataframes for tests."""
Expand Down

0 comments on commit 4cd3a35

Please sign in to comment.