Closed barmanroys closed 2 months ago
This is very strange, as it only seems to be happening when running from a docker container (see #2188).
We actually already fixed the import error (from sklearn == 1.4.0) in darts==0.27.2 for both PyPi and conda. The fix is here: https://github.com/unit8co/darts/blob/8cb04f67982bd3c77016bdd5fbdd928bf7d11bf7/darts/utils/multioutput.py#L8
Can you run the following from inside the container and show us the output?
from sklearn import __version__ as sklearn_version
print(sklearn_version)
if sklearn_version >= "1.4":
print("works fine")
else:
print("does not work")
Looking at your error message again, the line where it fails is from an older darts version <0.27.2.
Can you verify that indeed darts==0.27.2 is installed?
From python:
import darts
print(darts.__version__)
Describe the bug Using the catboost model with darts. When building the virtual environment for my inference pipeline, I run this command inside my docker container
python3 -m pip install --user darts==0.27.2 # Latest as of this report
This installs scikit-learn 1.4.0 as a dependency, which it cannot work with.To Reproduce Try this in your sandbox pip environment
python3 -m pip install --user darts==0.27.2 # Latest as of this question
Then try using the models like this
from darts.models.forecasting.linear_regression_model import LinearRegressionModel
Expected behavior I expect the models to be imported as expected.
System (please complete the following information):
Traceback