Skip to content

Conversation

@yMorakkam
Copy link

Fix fit_ensemble(): Save models and ensemble

@mfeurer
Copy link
Contributor

mfeurer commented Apr 10, 2018

Thanks for your pull request. Could you please describe in more detail which problem it fixes and how it does so?

@yMorakkam
Copy link
Author

By using fit_ensemble method, models was not saved in the AutomlClassifier object ( self.models[] was empty). By adding _load_models() at the end of this method, i fixed this small issue.

@mfeurer
Copy link
Contributor

mfeurer commented Apr 11, 2018

I don't think that's a mistake but not loading them at the end of the fit() method is by design. Instead, models are loaded at predict time. Could you please explain why the current situation is problematic?

@yMorakkam
Copy link
Author

After calling fit_ensemble(), i dump my model using joblib: joblib.dump(automl, 'model.pkl'). Therefore, my model was empty.

I thought it was a mistake because models are loaded in _fit () in automl.py.

    # while the ensemble builder tries to access the data
    if self._proc_ensemble is not None and self._ensemble_size > 0:
        self._proc_ensemble.join()

    self._proc_ensemble = None
    self._load_models()

    return self

@mfeurer
Copy link
Contributor

mfeurer commented Apr 19, 2018

Okay, I think I got it now. Your solution makes total sense, thank you very much for this contribution.

@mfeurer mfeurer merged commit 5025819 into automl:development Apr 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants