refactor: introduce extension manager to replace monkey-patching
- Lenguaje dominante
- Python
- Estrellas
- 712
- Forks
- 96
- Merge medio
- 3 d 1 h
- PR fusionados (30 d)
- 10
Descripción
## Summary
Replace the current `setattr()`-based monkey patching in `fedot.industrial` with a clean `ExtensionManager` or `ExecutionContext` (`backend`) system.
## Motivation
The current use of `setattr()` in `fedot_ind` is fragile, hard to debug, and not scalable. A context-based extension system will make the framework more modular, testable, and maintainable.
https://github.com/aimclub/Fedot.Industrial/blob/80e9d295c27b774d53e5c734b252168998537680/fedot_ind/core/repository/initializer_industrial_models.py#L140
## Guide-level explanation
* Introduce an `ExecutionContext` class may hold (operation registry, pipeline building rules, data splitter, merger, tuner, loss calculator)
* Ensure no global side effects; context is passed explicitly
## Reference-level explanation
* Create a new module `fedot/core/context.py`
* (Maybe) Define a `Protocol` for each extendable component
* Update `fedot.industrial` to register extensions via the context instead of patching
## Drawbacks
Could introduce performance overhead if not designed carefully!
## Unresolved Questions
Should the context be serializable for pipeline persistence? - Yes
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.