New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-33492: Enable store of resolved DatasetRefs in QuantumGraph #262
Conversation
97f3967
to
6c65bf8
Compare
Codecov Report
@@ Coverage Diff @@
## main #262 +/- ##
==========================================
- Coverage 81.97% 81.97% -0.01%
==========================================
Files 59 59
Lines 6075 6074 -1
Branches 1237 1237
==========================================
- Hits 4980 4979 -1
Misses 869 869
Partials 226 226
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
8a23226
to
d19595a
Compare
5689190
to
0da1cfa
Compare
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.
I took a quick look at this too, but while I know my way around GraphBuilder
I'm not really a substitute for @natelust looking at the QuantumGraph
changes.
118a0cb
to
6eac3ac
Compare
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.
One minor comment
@@ -845,6 +881,11 @@ def resolveDatasetRefs( | |||
collectionTypes=CollectionType.RUN, | |||
) | |||
|
|||
idMaker: Optional[_DatasetIdMaker] = None | |||
if resolveRefs: | |||
assert run is not None, "run cannot be None when resolveRefs is True" |
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.
Is assert really the right kind of exception to raise here?
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.
I think it's fine here, it is internal code only called from makeGraph()
. makeGraph()
has an explicit check that raises ValueError
, here assert is mostly to keep mypy
happy.
GraphBuilder adds an option to generate UUIDs for all unresolved references. For consistency we need to save resolved InitOutputs in the graph, so the graph is also extended to keep per-task refs for InitInputs and InitOutputs. InitInputs refs are also duplicated in each Quantum, we may consider dropping them later.
e607be4
to
7c7412a
Compare
GraphBuilder adds an option to generate UUIDs for all unresolved
references. For consistency we need to save resolved InitOutputs
in the graph, so the graph is also extended to keep per-task refs for
InitInputs and InitOutputs. InitInputs refs are also duplicated in each
Quantum, we may consider dropping them later.
Checklist
doc/changes