Neuraxio / Neuraxle

The world's cleanest AutoML library ✨ - Do hyperparameter tuning with the right pipeline abstractions to write clean deep learning production pipelines. Let your pipeline steps have hyperparameter spaces. Design steps in your pipeline like components. Compatible with Scikit-Learn, TensorFlow, and most other libraries, frameworks and MLOps environments.
https://www.neuraxle.org/
Apache License 2.0
608 stars 62 forks source link

Fix: _WithContextSaver load function #446

Closed vincent-antaki closed 3 years ago

vincent-antaki commented 3 years ago

This fix solves the problem mentionned in #445.

It seems like there was a bug in the _WithContextSaver load function. The bug originated from an apply call to "_assert_has_service". While it is understandable that one may want to check the presence of service at loading, it is not possible to do so before the loading of the rest of the pipeline (_WithContextSaver is executed before MetaStepJoblibsaver).

The current assertion interface checks services before the execution of the pipeline, and before the execution of a given step. I believe it is sufficient and performing service assertion at loading is a bit over-zealous and too restrictive.

vincent-antaki commented 3 years ago

Furthermore, issue #325 is somewhat linked. I don't know if its worth closing the issue, but the bug I've just fixed seems to indicate that using apply within a loading procedure is tricky - the order in which we call the savers is of great importance, calling apply may have unforeseen consequences - or simply crash to whole thing.