Skip to content
This repository was archived by the owner on Jul 13, 2025. It is now read-only.
This repository was archived by the owner on Jul 13, 2025. It is now read-only.

Specify scikit-learn version  #206

@aliinreallife

Description

@aliinreallife

Intro

I had some issues when running fastAPI with this docker command

docker exec -it "CONTAINER_NAME" mamba run --no-capture-output -n viz-inf-cpu python -m api.main --experiment_name "YOUR_DESIRED_NAME" --run_id "THE_RUN_ID_ASSOCIATED_WITH_A_REGISTERED_MLFLOW_MODEL" --bind 0.0.0.0 --gunicorn_port 8000 --mlflow_port 5000 --verbose debug --workers 1

the error message was something like this

https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
Trying to unpickle estimator ExtraTreeClassifier from version 1.3.2 when using version 1.4.1.post1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations

And it took me some time to realize that what was wrong because in the Dockerfile we didn't install scikit-learn and I didn't recognize any packages that required scikit-learn, but it was right in front of my eye snorkel and in its requirement file was.

scikit-learn>=0.20.2

for a better solution I have to see to the new standard for pickle files but for a quick solution I change the required version to

scikit-learn==1.3.2

Caution

in the feauture we need to do it insted of evading the problem

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority=HIGHNeeds most of the attention!

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions