First, it allows a ParameterizedNode to access attributes with arbitrary names from other ParameterizedNodes. Previously it was assumed the attribute would have the same name in both ParameterizedNodes. This extension is done by allowing a parameter to take a (ParameterizedNode, str) tuple indicating which attribute to access.
For example:
my_model = MyModel(arg1=(other_model, `arg9`))
will set my_model.arg1 = other_model.arg9.
Second, arguments natively handle FunctionNodes so the user does not need to pass compute each time.
This PR makes two changes to the API.
First, it allows a
ParameterizedNode
to access attributes with arbitrary names from otherParameterizedNode
s. Previously it was assumed the attribute would have the same name in bothParameterizedNode
s. This extension is done by allowing a parameter to take a(ParameterizedNode, str)
tuple indicating which attribute to access.For example:
will set
my_model.arg1 = other_model.arg9
.Second, arguments natively handle
FunctionNode
s so the user does not need to passcompute
each time.