Skip to content
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-25016: Add save/restore methods to QuantumGraph #133

Merged
merged 1 commit into from May 24, 2020

Conversation

andy-slac
Copy link
Contributor

Restoring QuantumGraph from pickle requires that DimensionUniverse
instance exists, restore method ensures that this is true by accepting a
dummy argument.

@@ -155,6 +156,54 @@ def __init__(self, iterable=None):
This is disjoint from both `initInputs` and `initIntermediates`.
"""

@classmethod
def restore(cls, file, universe):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have any formal conventions for this, as far as I know, but I think load is a more common name for a method like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 OK, will rename it to load

Restoring QuantumGraph from pickle requires that DimensionUniverse
instance exists, restore method ensures that this is true by accepting a
dummy argument.
@andy-slac andy-slac merged commit dc29a50 into master May 24, 2020
@andy-slac andy-slac deleted the tickets/DM-25016 branch July 10, 2022 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants