-
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
Dynamic Reduction Network for photon energy regression in miniAOD using the SonicTriton service #37134
Dynamic Reduction Network for photon energy regression in miniAOD using the SonicTriton service #37134
Changes from 5 commits
f3fee7c
32c5854
2da29a3
616831b
3cdd06c
0bf9e99
da3c714
5af31a1
fe1ee8e
c65a63d
e36b116
26dfae6
30e291e
82ced8d
2f80e2f
d357aa7
9556a83
2637202
1a5de2f
f994140
e5db2ac
ec15ac7
cc93d65
c3927d0
722602b
c658fab
509d4a1
84c52f2
0e55eb0
c99da3c
8a69393
fa89ab1
bb7c727
bccd830
8c0bd7c
1ab9afd
fc9c472
78558dc
7ecb877
a8702fa
5977c4b
c8484f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask | ||
|
||
def enableDRN(process): | ||
process.load("PhysicsTools.PatAlgos.slimming.patPhotonDRNCorrector_cfi") | ||
process.DRNTask = cms.Task(process.patPhotonsDRN) | ||
process.schedule.associate(process.DRNTask) | ||
process.slimmedPhotons.modifierConfig.modifications.append( | ||
cms.PSet( modifierName = cms.string("EGRegressionModifierDRN"), | ||
patPhotons = cms.PSet( | ||
source = cms.InputTag('selectedPatPhotons'), | ||
correctionsSource = cms.InputTag('patPhotonsDRN') | ||
) | ||
) | ||
) | ||
|
||
return process |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
patElectronsDRN = cms.EDProducer("PatElectronDRNCorrectionProducer", | ||
particleSource = cms.InputTag("selectedPatElectrons"), | ||
rhoName = cms.InputTag("fixedGridRhoFastjetAll"), | ||
reducedEcalRecHitsEB = cms.InputTag("reducedEcalRecHitsEB"), | ||
reducedEcalRecHitsEE = cms.InputTag("reducedEcalRecHitsEE"), | ||
reducedEcalRecHitsES = cms.InputTag("reducedEcalRecHitsES"), | ||
|
||
Client = cms.PSet( | ||
mode = cms.string("Async"), | ||
modelName = cms.string("electronObjectEnsemble"), | ||
modelConfigPath = cms.FileInPath("RecoEgamma/EgammaElectronProducers/data/models/electronObjectEnsemble/config.pbtxt"), | ||
ssrothman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
allowedTries = cms.untracked.uint32(1), | ||
timeout = cms.untracked.uint32(10), | ||
useSharedMemory = cms.untracked.bool(False), | ||
verbose = cms.untracked.bool(True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is verbose=True intentional? I still have the feeling that each physics model having their own version of technical Triton/Sonic config values (e.g. timeout, shared mem, retries) is not optimal. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general, this is unavoidable. Different models have different execution times, therefore they cannot all share a single timeout. Some models might need to have shared memory disabled for a variety of reasons, etc. However, I agree that verbose=True should be disabled in the PR (it's mainly for testing/profiling). |
||
) | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
patPhotonsDRN = cms.EDProducer("PatPhotonDRNCorrectionProducer", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment here regarding cloning the producer config |
||
particleSource = cms.InputTag("selectedPatPhotons"), | ||
rhoName = cms.InputTag("fixedGridRhoFastjetAll"), | ||
reducedEcalRecHitsEB = cms.InputTag("reducedEcalRecHitsEB"), | ||
reducedEcalRecHitsEE = cms.InputTag("reducedEcalRecHitsEE"), | ||
reducedEcalRecHitsES = cms.InputTag("reducedEcalRecHitsES"), | ||
|
||
Client = cms.PSet( | ||
mode = cms.string("Async"), | ||
modelName = cms.string("photonObjectBothEnsemble"), | ||
modelConfigPath = cms.FileInPath("RecoEgamma/EgammaPhotonProducers/data/models/photonObjectEnsemble/config.pbtxt"), | ||
ssrothman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
allowedTries = cms.untracked.uint32(1), | ||
timeout = cms.untracked.uint32(10), | ||
useSharedMemory = cms.untracked.bool(False), | ||
verbose = cms.untracked.bool(True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment here. |
||
) | ||
) |
Large diffs are not rendered by default.
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.
it would be better to clone the existing config from the one provided by fillDescriptions (I recall a similar comment on the previous DRN PR)
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.
Do you just mean to use the fillDescriptions defaults for more parameters, or is there something more I should do here? I have updated it to use default values for the RecHit collections; should I add more defaults?
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 mean using
.clone
to avoid specifying the config options (and the types) that are already known.3cb2459#diff-2d4d8dba5a6cd14974d0d42a9896706879c369b9ca833acca0f8e9f1883b1500R3
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'm a little confused about how to do this. If I try to import
RecoEgamma.EgammaTools.PatPhotonDRNCorrectionProducer_cfi
I get aModuleNotFoundError
. Where is this default config produced by fillDescriptions()? How (if at all) does it interact with class templating?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.
In your working area, you can look at
$CMSSW_BASE/cfipython
to find the default configs.To ensure distinct cfi files are generated for different instances of the same class template, see this example:
cmssw/HeterogeneousCore/SonicTriton/test/TritonGraphModules.cc
Lines 107 to 108 in f6c204b