DataTalksClub / mlops-zoomcamp

Free MLOps course from DataTalks.Club
11.16k stars 2.15k forks source link

Fixes problems with passing parameters week 2 #287

Closed alex-kolmakov closed 5 months ago

alex-kolmakov commented 5 months ago

Based on the problem - https://datatalks-club.slack.com/archives/C02R98X7DS9/p1685203191371579

When used without any modifications register_model crashes with: sklearn.utils._param_validation.InvalidParameterError: The 'bootstrap' parameter of RandomForestRegressor must be an instance of 'bool' or an instance of 'numpy.bool_'. Got 'True' instead.

And as was stated in the thread - there are more broken parameters being passed, which denies ability to just fix for this specific bool conversion('ccp_alpha','max_features', etc)

Current change definetely works and fixes the problem - but if there are more elegant ways to fix it - I`m all ears.

Credit goes to Shubhdeep Singh in the slack thread.

divakaivan commented 5 months ago

Thanks ^^

alexeygrigorev commented 5 months ago

THank you!