Skip to content

Commit

Permalink
Delegate to pipe_base for config and Packages dataset types.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Jun 18, 2021
1 parent 1dfc228 commit b888469
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions python/lsst/ctrl/mpexec/preExecInit.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,10 @@ def initializeDatasetTypes(self, graph, registerDatasetTypes=False):
does not exist in registry.
"""
pipeline = graph.taskGraph

# Make dataset types for configurations
configDatasetTypes = [DatasetType(taskDef.configDatasetName, {},
storageClass="Config",
universe=self.butler.registry.dimensions)
for taskDef in pipeline]

# And one dataset type for package versions
packagesDatasetType = DatasetType("packages", {},
storageClass="Packages",
universe=self.butler.registry.dimensions)

datasetTypes = PipelineDatasetTypes.fromPipeline(pipeline, registry=self.butler.registry)
datasetTypes = PipelineDatasetTypes.fromPipeline(pipeline, registry=self.butler.registry,
include_configs=True, include_packages=True)
for datasetType in itertools.chain(datasetTypes.initIntermediates, datasetTypes.initOutputs,
datasetTypes.intermediates, datasetTypes.outputs,
configDatasetTypes, [packagesDatasetType]):
datasetTypes.intermediates, datasetTypes.outputs):
# Only composites are registered, no components, and by this point
# the composite should already exist.
if registerDatasetTypes and not datasetType.isComponent():
Expand Down

0 comments on commit b888469

Please sign in to comment.