Skip to content

Commit

Permalink
[MNT] fix isolation of mlflow soft dependencies (#6285)
Browse files Browse the repository at this point in the history
It seems the fix #6282 caused another issue - I believe the reason is
that `dask` removed `pyyaml` as a dependency.

Consequently, the `import yaml` statement in the mlflow module now
fails, post #6282. Unclear why the tests did not recognize this.

The fix should be this: import `yaml` only if `mlflow` is present.
  • Loading branch information
fkiraly committed Apr 11, 2024
1 parent bab0b84 commit db8d4b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sktime/utils/mlflow_sktime.py
Expand Up @@ -47,7 +47,6 @@
import os

import pandas as pd
import yaml

import sktime
from sktime import utils
Expand All @@ -56,6 +55,7 @@
from sktime.utils.validation._dependencies import _check_mlflow_dependencies

if _check_mlflow_dependencies(severity="warning"):
import yaml
from mlflow import pyfunc

FLAVOR_NAME = "mlflow_sktime"
Expand Down

0 comments on commit db8d4b1

Please sign in to comment.