Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ctrl_mpexec
-
Labels:
-
Story Points:2
-
Epic Link:
-
Sprint:DB_S20_02
-
Team:Data Access and Database
-
Urgent?:No
Description
Saving a QuantumGraph and run it with pipetask doesn't work. This is the same problem as DM-21724 but the fix got unfixed.
When trying to run a stored QuantumGraph pickle with
pipetask run --qgraph name.pickle -b butler.yaml the error is
_pickle.UnpicklingError: DimensionUniverse with version '0' not found. Note that DimensionUniverse objects are not truly serialized; when using pickle to transfer them between processes, an equivalent instance with the same version must already exist in the receiving process.
|
Slack: https://lsstc.slack.com/archives/C2JPT1KB7/p1590018536265400
Looks good; only comment on the PR is about naming.
In case you're curious, part of the reason dimension-related things are this way w.r.t. pickling is because of the way Python's multiprocessing module uses pickling to pass objects between processes - it doesn't provide any way to use one shared object (like a DimensionUniverse) when unpickling others (pickle itself has this functionality, but multiprocessing doesn't provide any way to use it). So while DimensionUniverse isn't directly a singleton, and it isn't used at all as a singleton in most other contexts, there is a global dict containing all instances, and the unpickling code for all dimension-based objects ultimately looks in that.