Details
-
Type:
Story
-
Status: To Do
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Epic Link:
-
Team:Data Release Production
-
Urgent?:No
Description
The contract checker doesn't expand out the connection templates before checking them. How to reproduce.
Running this pipeline:
instrument: lsst.obs.lsst.LsstCamImSim
|
description: Run Transform
|
tasks:
|
imageDifference:
|
class: lsst.pipe.tasks.imageDifference.ImageDifferenceTask
|
config:
|
doSelectSources: False
|
coaddName: goodSeeing
|
getTemplate.coaddName: goodSeeing
|
getTemplate.warpType: direct
|
connections.coaddName: goodSeeing
|
# Setting template 'coaddName' is not sufficient to satisfy contract
|
connections.coaddExposures: goodSeeingCoadd
|
connections.subtractedExposure: goodSeeingDiff_differenceExp
|
transformDiaSourceCat:
|
class: lsst.ap.association.TransformDiaSourceCatalogTask
|
config:
|
connections.coaddName: goodSeeing
|
#connections.diffIm: goodSeeingDiff_differenceExp
|
|
contracts:
|
- imageDifference.connections.subtractedExposure == transformDiaSourceCat.connections.diffIm
|
with e.g. this command:
pipetask run -b /repo/dc2 -p transform.yaml -i 2.2i/runs/test-med-1/w_2021_16/DM-29899 -o u/yusra/transform -d "instrument='LSSTCam-imSim' AND visit=416955 AND detector=9" --register-dataset-types
|
will fail with:
raise pipelineIR.ContractError(f"Contract(s) '{contract.contract}' were not "
|
lsst.pipe.base.pipelineIR.ContractError: Contract(s) 'imageDifference.connections.subtractedExposure == transformDiaSourceCat.connections.diffIm' were not satisfied
|
unless you either uncomment out the last line on of the configs OR remove the contract line in the pipeline file. This means that the template coaddName is expanding out "goodSeeing" in the connections just fine, even though the contract checker complains.
Attachments
Issue Links
- relates to
-
DM-30563 ap_verify failing to find dataset type fakes_deepDiff_warpedExp
- Done
I am going to need to think about this one a little bit, because it is actually working as intended. The configuration values are being set on the config object, which is later used to format a connections class. You are not actually looking at the connections class, just the info that goes into constructing one. In other words, someone might change the the connections name to a different format template, and want to validate the template before substitution (though of course that would be less frequent, and so we should probably angle toward the least surprise even if it makes for different execution paths)