-
Notifications
You must be signed in to change notification settings - Fork 38
Changes the way drivers handle parameters #56
Conversation
69ab3f0
to
7eae784
Compare
hamilton/graph.py
Outdated
return FunctionGraph.execute_static( | ||
nodes=nodes, | ||
inputs=self.config, | ||
inputs={**inputs, **self.config}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should make this a function, have it check for overlap and log/warn, and then unit test it.
Also this seems like it's the invariant approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep will do. And by that you mean backwards compatible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invariant -- that the config takes precedence over any inputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yeah. So conflicts are not allowed as it doesn't make sense (for now). So yes, invariant, but more just mutually disjoint.
ef9501a
to
c6cfeae
Compare
58760ca
to
94bc686
Compare
94bc686
to
5041770
Compare
c6cfeae
to
7495b00
Compare
5041770
to
957873a
Compare
7495b00
to
60f6415
Compare
957873a
to
e169c3d
Compare
e169c3d
to
4d678da
Compare
hamilton/driver.py
Outdated
Don't rely on it too much. This might produce an extra error, but this is the first one that the user | ||
should deal with. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im confused, why would this be true? You just said that they're disjoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no errors are returned from this function they're disjoint. If errors are returned, then you don't want to trust the result that's also returned. but as we want to get all errors at once its good not to short-circuit.
4d678da
to
319577e
Compare
tests/test_graph.py
Outdated
|
||
def test_combine_inputs_collision_2(): | ||
"""Tests the combine_and_validate_inputs functionality | ||
when there are collisions of keys but not values""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy pasta :(
See #52 Note: this is backwards compatible. The changes are that we've added the "inputs" parameter to the driver, as well as the function_graph executor. This allows external inputs to the DAG at runtime, not just construction time.
319577e
to
39dd55a
Compare
See #52
Note: this is backwards compatible. The changes are that
we've added the "inputs" parameter to the driver, as well as the
function_graph executor. This allows external inputs to the DAG
at runtime, not just construction time.
[Short description explaining the high-level reason for the pull request]
Additions
Removals
Changes
Testing
Screenshots
If applicable
Notes
Todos
Checklist
Testing checklist
Python