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

Feature: Improving Context to handle Assertions and Logging differently depending on the context. #483

Closed guillaume-chevalier closed 2 years ago

guillaume-chevalier commented 3 years ago

Is your feature request related to a problem? Please describe. Problems:

Describe the solution you'd like

Note that upon failing an assertion, the Asserter would need to get the logger in the context to log the failure as well. This means that despite the Asserter is in the Context, the Asserter needs to be passed the context when asserting so as to be able to fetch the Logger of the context. This means that the Logger is probably a service with a predefined service Key string (e.g.: context.get_service("logger").

Overall, the context seems to need some basic services at all times, and for ensuring consistency of the code and proper interdependency of the services, some services seem to require some predefined keys. I do not have ideas of alternatives for this idea, and I would like to find a better solution than to use predefined reserved keys.

FYI @vincent-antaki

vincent-antaki commented 3 years ago

I agree with this except the part where we use keys to access services which are there by default. I'd rather have these services as attribute of the context since they are not optional anyway.

guillaume-chevalier commented 3 years ago