You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sir, I want to point out one significant point about the saved model.pkl file.
In the utils.py file, we never returned the best model object itself, just the score.
And then in model_trainer.py we sort the best max score and then initialize a totally new model based on the name of the highest score model. And in the save_object we are actually saving the newly initialized model which is untrained.
The model is trained with the best parameters in utils.py itself. See where model.set_params(**gs.best_params_) is done. It sets the parameters to all the model objects one by one and then we do fit, which means it has trained.
I hope you got your point cleared since its been two weeks now.
Sir, I want to point out one significant point about the saved model.pkl file.
In the utils.py file, we never returned the best model object itself, just the score.
mlproject/src/utils.py
Line 50 in 6d24fc7
And then in model_trainer.py we sort the best max score and then initialize a totally new model based on the name of the highest score model. And in the save_object we are actually saving the newly initialized model which is untrained.
mlproject/src/components/model_trainer.py
Line 98 in 6d24fc7
What's strange is how it gave a prediction.
Mine didn't and I had to edit the code.
https://github.com/svkadhikary/student_perfomance/blob/45ba9818eb3ab7fb681da7c70d425ed0c70fc0a0/src/utils.py#L66
https://github.com/svkadhikary/student_perfomance/blob/45ba9818eb3ab7fb681da7c70d425ed0c70fc0a0/src/components/model_trainer.py#L100
The text was updated successfully, but these errors were encountered: