here's a question: should there be a deep arg to get_config, like get_params? That way, we could avoid changes to _clone, as then we just need to add the deep arg in clone, once. It would be "cleaner" imo since it completely decouples the param logic from the config logic (coupling/cohesion improvement).
That is, should get_config, set_config of the top node object support getting/setting of component node configs - like get_params, set_params - or do you have to address the components directly.
I.e., compare
# how it would work right now
composite = Composite(comp1=Component1(), comp2=Component2().set_config(foo="bar"))
# vs how it could also work
composite = Composite(comp1=Component1(), comp2=Component2())
composite.set_config(comp2__foo="bar")
Both ways are already making the assumption that clone should keep configs across all nodes.
Originally posted by @fkiraly in #276 (comment), moved here for discussion.
here's a question: should there be a
deeparg toget_config, likeget_params? That way, we could avoid changes to_clone, as then we just need to add thedeeparg inclone, once. It would be "cleaner" imo since it completely decouples the param logic from the config logic (coupling/cohesion improvement).That is, should
get_config,set_configof the top node object support getting/setting of component node configs - likeget_params,set_params- or do you have to address the components directly.I.e., compare
Both ways are already making the assumption that
cloneshould keep configs across all nodes.Originally posted by @fkiraly in #276 (comment), moved here for discussion.