-
Notifications
You must be signed in to change notification settings - Fork 2k
PUBDEV-8047: AutoML Save/Load implementation #6437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| protected static AutoML readAutoML(AutoBuffer ab, Futures fs) { | ||
| try (PersistenceContext pc = PersistenceContext.begin()) { | ||
| AutoML aml = new AutoML(ab.get(), null, ab.get(), false); | ||
| aml._leaderboard = (Leaderboard) ab.getKey(fs); | ||
| aml._eventLog = (EventLog) ab.getKey(fs); | ||
| // aml._trainingFrame = (Frame) ab.getKey(fs); | ||
| fs.blockForPending(); | ||
| for (Key mk : aml.leaderboard().getModelKeys()) { | ||
| Model m = (Model) PersistenceContext.getKey(ab, fs, mk); | ||
| if (aml._buildSpec.build_control.keep_cross_validation_predictions) | ||
| for (Key k : m._output._cross_validation_predictions) | ||
| PersistenceContext.loadKey(ab, fs, k); | ||
| if (aml._buildSpec.build_control.keep_cross_validation_models) | ||
| for (Key k : m._output._cross_validation_models) | ||
| PersistenceContext.loadKey(ab, fs, k); | ||
| if (aml._buildSpec.build_control.keep_cross_validation_fold_assignment) | ||
| PersistenceContext.loadKey(ab,fs ,m._output._cross_validation_fold_assignment_frame_id); | ||
| // if (m instanceof StackedEnsembleModel) | ||
| // PersistenceContext.loadKey(ab, fs, ((StackedEnsembleModel)m)._output._metalearner._parms._train); | ||
| } | ||
| DKV.put(aml); | ||
| return aml; | ||
| } catch (Exception e) { | ||
| throw new RuntimeException(e); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The objects have to be deserialized exactly in the same order as they were serialized => we need to keep track of what was already loaded and in that case skip the loading of that object.
d4fb774 to
5ba924b
Compare
5ba924b to
74490f2
Compare
ledell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you!
|
. |
https://h2oai.atlassian.net/browse/PUBDEV-8047
Known issues:
automl_training_frameget_leaderboard("ALL")on loaded object producesNAs forpredict_time_per_row_mson loaded modelspredict_time_per_row_msis successfully saved and loaded.make_leaderboard("ALL")on loaded object without providedleaderboard_framefails onpredict_time_per_row_ms