-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Avoid sequence expansion in customizeHLTTrackingForPhaseI2017 #17406
Conversation
Expanding sequences containing the modules/sequences modified here causes the changes not to propagate everywhere (the expansion is done before the modification).
@cmsbuild, please test |
The tests are being triggered in jenkins. |
A new Pull Request was created by @makortel (Matti Kortelainen) for CMSSW_9_0_X. It involves the following packages: HLTrigger/Configuration @perrotta, @cmsbuild, @silviodonato, @Martin-Grunewald, @fwyzard, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here #13028 |
@@ -286,10 +295,10 @@ def _copy(old, new, skip=[]): | |||
if key not in skipSet: | |||
setattr(new, key, getattr(old, key)) | |||
from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cfi import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer | |||
process.hltIter2PFlowPixelSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(seedingHitSets="hltIter2PFlowPixelHitTriplets") | |||
modifier.toReplaceWith(process.hltIter2PFlowPixelSeeds, _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(seedingHitSets="hltIter2PFlowPixelHitTriplets")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change alone would be sufficient to fix the @silviodonato's recipe, but I implemented/tested the wider solution first and it doesn't hurt (and IMHO makes edmConfigDumps easier to understand/correlate with configuration files/snippets as less sequences get expanded).
type bugfix |
I tested again the full HLT menu using phase1 era in 900pre4. So I strongly suspect that the RelVals Phase1 900pre4 will crash because of HLT and we will need to include this PR to fix the issue. |
(as I mentioned in the private e-mail thread) I'm puzzled how the "full menu" gives errors, 2017 workflows in IB/PR tests work fine. |
me too…
.
… On Feb 3, 2017, at 10:45 AM, Matti Kortelainen ***@***.***> wrote:
(as I mentioned in the private e-mail thread) I'm puzzled how the "full menu" gives errors, 2017 workflows in IB/PR tests work fine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Me too. Among PR tests we have 10021.0, running: And it should catch the error, as HLT:@relval2016 is GRun (see 1) and GRun is /dev/CMSSW_9_0_0/GRun/V4, including the "modifyForEras" see 2 The only possible reason that I see is that the PR test run only in 10 events and we don't run the HLT PF tracking in none of them. I'm trying to understand it. |
I've printed out the HLTTrackReconstructionForPF sequence (included in all HLT paths with PF) from the step2 configuration of 10021.0, used in the PR tests (see above). The iter2 modules are: [...] + hltIter1TrackRefsForJets4Iter2 + hltAK4Iter1TrackJets4Iter2 + hltIter1TrackAndTauJets4Iter2 + hltIter2ClustersRefRemoval + hltIter2MaskedMeasurementTrackerEvent + hltIter2PixelLayerPairs + hltIter2PFlowPixelTrackingRegions + hltIter2PFlowPixelClusterCheck + hltIter2PFlowPixelHitDoublets + hltIter2PFlowPixelSeeds + hltIter2PFlowCkfTrackCandidates + hltIter2PFlowCtfWithMaterialTracks + hltIter2PFlowTrackCutClassifier + hltIter2PFlowTrackSelectionHighPurity + hltIter2Merged + [...]. As "hltIter2PFlowPixelHitDoublets" takes as InputTag "hltIter2PixelLayerTriplets" - but it is not run - the IB/PR tests should fail. |
Comparison job queued. |
what happens if you run more events? does it eventually crash?
… On Feb 3, 2017, at 11:40 AM, Silvio Donato ***@***.***> wrote:
I've printed out the HLTTrackReconstructionForPF sequence (included in all HLT paths with PF) from the step2 configuration of 10021.0, used in the PR tests (see above).
The iter2 modules are: [...] + hltIter1TrackRefsForJets4Iter2 + hltAK4Iter1TrackJets4Iter2 + hltIter1TrackAndTauJets4Iter2 + hltIter2ClustersRefRemoval + hltIter2MaskedMeasurementTrackerEvent + hltIter2PixelLayerPairs + hltIter2PFlowPixelTrackingRegions + hltIter2PFlowPixelClusterCheck + hltIter2PFlowPixelHitDoublets + hltIter2PFlowPixelSeeds + hltIter2PFlowCkfTrackCandidates + hltIter2PFlowCtfWithMaterialTracks + hltIter2PFlowTrackCutClassifier + hltIter2PFlowTrackSelectionHighPurity + hltIter2Merged + [...].
As "hltIter2PFlowPixelHitDoublets" takes as InputTag "hltIter2PixelLayerTriplets" - but it is not run - the IB/PR tests should fail.
The only possible reason why it does not happen is that none of the 10 events generated pass the HLT cuts before HLT PF (I will check it).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The problem (or part of it) is that the There seems to be also |
I ran 100 events in 10024 (with re-generated GEN-SIM), no crash. TrigReport shows that |
Hi Matti, |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_9_0_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar |
Thanks Silvio. Maybe part of the problem in your recipe is the use of 900pre2 RAW in a release where the auto-GT has an updated pixel cabling map, and HCAL geometry has changed. And by using only So maybe with 900pre2 RAW these paths fail before running the tracking? E.g. I'm still not sure though if we can really guarantee that all RelVals would succeed. |
# In principle setattr(process) can be used to replace a | ||
# module/sequence too, but it expands the sequences making life | ||
# more complex | ||
modifier = cms.Modifier() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @makortel - i really don't understand the role of modifier here. Its not the way they were designed to be used (but thats not to say we shouldn't use them this way - rather its hard to naively understand what happens..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fully agree this is a hack. But this is the simplest way I'm aware of to replace a module/sequence in a cms.Process
without causing an expansion of all sequences including the module/sequence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ok, not so sure of "all", but at least some sequences get expanded)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess I'll need to understand more - but what is the lifetime of these customize functions rather than a contained menu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidlange6 The discussion in these two issues #15425 and #15792 is related to automatic sequence expansion.
hold |
give me a couple of hours to underastand the issue... |
Pull request has been put on hold by @fwyzard |
(not) OK, I did not understand why one approach results in expanding the sequences and the other does not, so I simply reimplemented the Modifer.toModifyWith outside of Eras - see #17410 . The logic is the same, the code is almost the same, the aim is to avoid confusion about the tools. |
(still not) OK, I had even less expansion of Sequences after some more cleanup of HLTrigger/Configuration/python/customizeHLTTrackingForPhaseI2017.py - see #17412 . @makortel what do you think ? @silviodonato can you run the usual checks for those PRs ? |
@fwyzard Do I understand correctly that the only change (wrt. this PR) relevant to the sequence expansion is at the end (loop over sequences and paths)? My first (unsuccessful) fix attempt (to reduce expansion) was actually on that loop but in different direction 7ddd285. To my understanding the |
Otherwise I'm not sure how beneficial it is copy the implementation of |
The I did not try to make the change at the end without the one about
I see. Probably the best approach would be check the Sequences "by hand" instead of using the visitor. In the early years of CMSSW using a visitor made senza, because the Sequence was implemented via recursion. Not it is implemented as a list, so IMHO a loop is a better interface.
Ideally one would move |
The automatic expansion of sequences in
customizeHLTTrackingForPhaseI2017.py
after #17170 can, in some cases, lead to necessary modules missing in the sequences. While the full menu apparently works (since the 2017 workflows have run successfully after the integration of #17170), a recipe provided by @silviodonato failsThis PR fixes the problem by avoiding the expansion of sequences caused by
setattr(process, ...)
by using a acms.Modifier
to replace modules/sequences "in place".Tested in 9_0_0_pre3 (and CMSSW_9_0_X_2017-01-25-1100+#17170), the recipe above works again (as well as limited matrix, add addOnTests).
@silviodonato @Martin-Grunewald @mtosi @JanFSchulte