amosproj / amos2023ws06-sales-lead-qualifier

MIT License
4 stars 0 forks source link

Feature/154 train ml model #201

Closed felix-zailskas closed 5 months ago

felix-zailskas commented 5 months ago

New EVP demo has been created. Currently, a Random Forest model can be used to test the way the predictors work now.

To add a new model and test it:

  1. Add it to the predictors.py::Predictors Enum
  2. Create a new class extending the predictors.py::Classifier class and implement the needed methods
  3. Add it to the evp.py::EstimatedValuePredictor.__init__ method to allow for initialization of the new predictor

This intermediate code state should make it easy to add new model types, test them, save and load them in a streamlined process so that the best model can easily be used in the end.

Note this does not include final results for the prediction model.

luccalb commented 5 months ago

I tried running the demo on my machine, using S3 repository. I passed randomforestclassifier_epochs(20)_f1(0.6259)_model.joblib as a model file name but got the error Error loading model 'randomforestclassifier_epochs(20)_f1(0.6259)_model.joblib': An error occurred (404) when calling the HeadObject operation: Not Found

luccalb commented 5 months ago

When I'm not loading the model from a file, everything works perfectly :)

felix-zailskas commented 5 months ago

I tried running the demo on my machine, using S3 repository. I passed randomforestclassifier_epochs(20)_f1(0.6259)_model.joblib as a model file name but got the error Error loading model 'randomforestclassifier_epochs(20)_f1(0.6259)_model.joblib': An error occurred (404) when calling the HeadObject operation: Not Found

Could you try loading the .pkl model. There was some shuffling around with file extensions and that one was the one I tried. I will look into it otherwise.

felix-zailskas commented 5 months ago

I tried running the demo on my machine, using S3 repository. I passed randomforestclassifier_epochs(20)_f1(0.6259)_model.joblib as a model file name but got the error Error loading model 'randomforestclassifier_epochs(20)_f1(0.6259)_model.joblib': An error occurred (404) when calling the HeadObject operation: Not Found

Also could not reproduce this. There was however a compatibility issue with the .joblib models. I moved all incompatible models into the old_models folder on s3 to easily identify them.