Closed guillaume-chevalier closed 1 year ago
Related: #485 so as to dig into contexts with apply and stuff like that to get the services.
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.
Is your feature request related to a problem? Please describe. As the context acts like a stack of function calls with each level having its own "variables"-like saving in the context (e.g.: Memory (as per #443 ), it might be good that if adding a service at the middle of the pipeline, that the service is scoped and local to just this
context.push
ed level (like a programming language stack / Assembly CPU Stack that is cleared upon stack push).Describe the solution you'd like When pushing and popping to context, use a recursive context data structure instead of lists of parents and a single service dict. This was done originally in the first releases of Neuraxle ever, but that was change for some reasons I don't know. It seems that the original intuition was possibly better.
Describe alternatives you've considered Singly-linked list (stack data structure / design pattern) for the context's parents, and services. Could set global v.s. local services as well (like programming languages' global v.s. local scopes when declaring/using variables).
Additional context None