GitHub user gidhubuser255 added a comment to the discussion: APIs for updating underlying function of a node (2 part question)
> @path.passes_through(B, name=X) # could we do references? I think using a reference to the function could cause problems because if B is replaced with B_prime under the hood this path decorator would not trigger, when it actually should. Regarding your edge cases: (1) I would imagine this would look similar to the viz of config.when in driver.visualize_execution, where there is some suffix on the node name. So something like this: <img width="530" height="277" alt="image" src="https://github.com/user-attachments/assets/87218cdf-82ed-4ad5-8cbe-28635d4fb939" /> (2) The way I see it being used is mostly ephemeral replacements for things like my UI stuff I mentioned as well as sensitivity analysis in computational models. Although I have seen static logic replacements like this (not using Hamilton) used in large models where the complexity would have been prohibitive to manually code the unraveled paths (but many of those cases could probably have been considered bad design anyway). (3) Can't speak to this atm, as I'm unfamiliar with the capabilities and requirements of LSP servers Personally I do prefer the driver.update method as it makes the ephemeral cases easier to work with, but I realize that is a bit more complicated to implement given the module based architecture. Plus I think I have some dynamic module magic (using types.ModuleType) I can mess with to get it to work closer to driver.update. GitHub link: https://github.com/apache/hamilton/discussions/1397#discussioncomment-14590108 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
