Skip to content

Commit

Permalink
Merge branch 'tickets/DM-27888'
Browse files Browse the repository at this point in the history
  • Loading branch information
mxk62 committed Dec 8, 2020
2 parents 7fa0b78 + aa091e4 commit f41c984
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
16 changes: 9 additions & 7 deletions doc/lsst.ctrl.bps/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ file (recommended)
pipelineYaml: "${OBS_SUBARU_DIR}/pipelines/DRP.yaml:processCcd"
or a pre-made pickle file with a quantum graph, for example
or a pre-made file containing a serialized QuantumGraph, for example

.. code-block:: YAML
qgraphFile: pipelines_check_w_2020_45.pickle
qgraphFile: pipelines_check_w_2020_45.qgraph
.. warning::

The pickle file with a quantum graph are not portable. The file must be
The file with a serialized QuantumGraph is not portable. The file must be
crated by the same stack being used when running BPS *and* it can be only
used on the machine with the same environment.

Expand Down Expand Up @@ -255,8 +255,9 @@ order from most specific to general is: ``payload``, ``pipetask``, and ``site``.
which are matched to ``computeSite``. The following are examples for
specifying values needed to match jobs to glideins.

HTCondor plugin example:

.. code-block:: YAML
:caption: HTCondor plugin example
site:
acsws02:
Expand All @@ -265,8 +266,9 @@ order from most specific to general is: ``payload``, ``pipetask``, and ``site``.
requirements: "(GLIDEIN_NAME == "test_gname")"
+GLIDEIN_NAME: "test_gname"
Pegasus plugin example:

.. code-block:: YAML
:caption: Pegasus plugin example
site:
acsws02:
Expand Down Expand Up @@ -315,7 +317,7 @@ Supported settings
settings to use in ``bps prepare``).

**createQuantumGraph**
The command line specifiction for generating Quantum Graphs.
The command line specification for generating QuantumGraphs.

**operator**
Name of the Operator who made a submission. Displayed in ``bps report``
Expand Down Expand Up @@ -383,7 +385,7 @@ Reserved keywords
^^^^^^^^^^^^^^^^^

**gqraphFile**
Name of the file with a pre-made pickled Quantum Graph.
Name of the file with a pre-made, serialized QuantumGraph.

Such a file is an alternative way to describe a science pipeline.
However, contrary to YAML specification, it is currently not portable.
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/ctrl/bps/bps_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def create_job_quantum_graph_filename(job, out_prefix=None):
name_parts.append("inputs")
if job.label is not None:
name_parts.append(job.label)
name_parts.append(f"quantum_{job.name}.pickle")
name_parts.append(f"quantum_{job.name}.qgraph")
full_filename = os.path.join("", *name_parts)
return full_filename

Expand Down
2 changes: 1 addition & 1 deletion python/lsst/ctrl/bps/pre_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def create_quantum_graph(config, out_prefix=None):
Name of file containing generated QuantumGraph
"""
# Create name of file to store QuantumGraph.
qgraph_filename = f"{config['uniqProcName']}.pickle"
qgraph_filename = f"{config['uniqProcName']}.qgraph"
if out_prefix is not None:
qgraph_filename = os.path.join(out_prefix, qgraph_filename)

Expand Down
6 changes: 3 additions & 3 deletions tests/test_pre_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ def tearDown(self):
shutil.rmtree(self.tmpdir, ignore_errors=True)

def testCreatingQuantumGraph(self):
"""Test if a config command creates appropriately named pickle file."""
"""Test if a config command creates appropriately named qgraph file."""
settings = {
"createQuantumGraph": "touch {qgraphFile}",
"submitPath": self.tmpdir,
}
config = BpsConfig(settings, search_order=[])
create_quantum_graph(config, self.tmpdir)
self.assertTrue(os.path.exists(os.path.join(self.tmpdir, ".pickle")))
self.assertTrue(os.path.exists(os.path.join(self.tmpdir, ".qgraph")))

def testCreatingQuantumGraphFailure(self):
"""Test if an exception is raised when creating quantum graph fails."""
"""Test if an exception is raised when creating qgraph file fails."""
settings = {
"createQuantumGraph": "false",
"submitPath": self.tmpdir,
Expand Down

0 comments on commit f41c984

Please sign in to comment.