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

Fix un-pickling of qgraph (DM-21724). #28

Merged
merged 1 commit into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions python/lsst/ctrl/mpexec/cmdLineFwk.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ def makeGraph(self, pipeline, taskFactory, args):
"""
if args.qgraph:

# Un-pickling QGraph needs a dimensions universe defined in
# registry. Easiest way to do it now is to initialize whole data
# butler. Butler requires run or collection provided in
# constructor but in this case we do not care about (or do not
# know) what collection to use so give it an empty name.
butler = Butler(config=args.butler_config, collection="")

with open(args.qgraph, 'rb') as pickleFile:
qgraph = pickle.load(pickleFile)
if not isinstance(qgraph, QuantumGraph):
Expand Down
1 change: 1 addition & 0 deletions tests/test_cmdLineFwk.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def _makeArgs(pipeline=None, qgraph=None, pipeline_actions=(), order_pipeline=Fa
Name of the DOT file to write QGrpah representation.
"""
args = argparse.Namespace()
args.butler_config = None
args.pipeline = pipeline
args.qgraph = qgraph
args.pipeline_actions = pipeline_actions
Expand Down