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-35082 Save DimensionUniverse in QuantumGraph #259
Conversation
Codecov Report
@@ Coverage Diff @@
## main #259 +/- ##
==========================================
+ Coverage 72.20% 72.29% +0.09%
==========================================
Files 60 60
Lines 6734 6768 +34
Branches 1387 1393 +6
==========================================
+ Hits 4862 4893 +31
- Misses 1649 1651 +2
- Partials 223 224 +1
Continue to review full report at Codecov.
|
Save the DimensionUniverse used to create the graph in the graphs header data. This removes the need to pass the Universe as an argument to load, and ensures that things are properly reconstructed, if the DimensionUniverse changes with a schema migration.
9146a52
to
7f0195c
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.
Looks good, couple of minor comments.
48aaf2d
to
a1b8312
Compare
If a DimensionUniverse is supplied, check that it is compatible with the one saved in the graph.
a1b8312
to
d915d8a
Compare
if (universeConfig := infoMap.get("universe")) is not None: | ||
universe = DimensionUniverse(config=DimensionConfig(universeConfig)) | ||
else: | ||
universe = DimensionUniverse() |
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 worry a bit that we should be using a universe that was passed into the loader if such a universe exists, although I imagine this code path is never going to trigger because historically people haven't been persisting their graph so that they can load it again 6 months later.
Save the
DimensionUniverse
used to create the graph in the graphs header data. This removes the need to pass the Universe as an argument to load, and ensures that things are properly reconstructed, if theDimensionUniverse
changes with a schema migration.Requires lsst/daf_butler#711
Checklist
doc/changes