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: get_steps_by_class #461

Closed vincent-antaki closed 1 year ago

vincent-antaki commented 3 years ago

Sometimes, I need to fetch all steps within a pipeline which are instances of a given class (e.g. some featurizer class which I use in multiple place). Usually, this happen when I want compute something based on the settings of all instances of this class in the pipeline (e.g. each of the Featurizer have a "dimension" attribute).

So far, I manage this by creating a function with a unique name, then use the method apply(method_name) on the root of the pipeline to retrieve the information/the steps I want. This workaround seems problematic to me for many reason. Mainly:

To fix this, we should add a method, like get_step_by_name, which returns all steps which are instance of a given class.

guillaume-chevalier commented 3 years ago

Related: #329

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in the next 180 days. Thank you for your contributions.