https-deeplearning-ai / machine-learning-engineering-for-production-public

Public repo for DeepLearning.AI MLEP Specialization
Apache License 2.0
1.85k stars 2.36k forks source link

Course 4 : error collecting test_clf.py #104

Closed chris-caballero closed 11 months ago

chris-caballero commented 1 year ago

There seems to be an error with the scikit-learn version interaction with pickle load.

This was encountered when trying to apply the unit test 'test_clf.py' on commit. sklearn is downloaded with requirements.txt, this may be the problem, a specific version would likely fix this issue.

Vadym-Hadetskyi commented 1 year ago

Greetings! @chris-caballero, you are absolutely right. To fix the problem one can change scikit-learn to scikit-learn==1.2.2 in the requirements.txt.

Note, that after that there will most likely be an error with conlist() in main.py. It can be solved either by changing min_items and max_items parameters to min_length and max_length respectively, or by removing those altogether.

mmitrou commented 11 months ago

Hi! This change of scikit-learn version created issue with cython3 compatibility. Personally, I limited python to 3.10 (and in turn update .github/workflows/course4-week3-lab.yml so that: `on: push: paths:

cfav-dev commented 11 months ago

Hi everyone! Thank you for reporting, and sorry for the delay! The problematic files are now updated, so the learners shouldn't run into the issues anymore.