-
Notifications
You must be signed in to change notification settings - Fork 4.7k
GNN Track-Tracksters Linking in TICLv5 #49652
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
Changes from 2 commits
7c1112d
d9b6b73
20e27a6
99236ee
6ddbf85
777302a
9f2c67c
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,7 @@ | ||
| import FWCore.ParameterSet.Config as cms | ||
|
|
||
| from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5 | ||
|
|
||
| # This modifier is for running TICL v5 with GNN track-trackster linking. | ||
| ticlv5TrackLinkingGNN = cms.Modifier() | ||
| ticlv5_TrackLinkingGNN = cms.ModifierChain(ticl_v5, ticlv5TrackLinkingGNN) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,3 +47,17 @@ | |
| useTimingAverage = cms.bool(False) | ||
| ) | ||
|
|
||
| from Configuration.ProcessModifiers.ticlv5_TrackLinkingGNN_cff import ticlv5TrackLinkingGNN | ||
| ticlv5TrackLinkingGNN.toModify( | ||
| hltTiclCandidate, interpretationDescPSet = cms.PSet( | ||
| algo_verbosity = cms.int32(0), | ||
|
Contributor
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. please drop cms type specification where possible.
Contributor
Author
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. I checked this, but removing cms.* here causes a configuration error since the parameter is defined at module level and must retain its CMS type, right ? or I may missing something?
Contributor
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.
wrong. Some of the parameters of so at least for those you can drop the cms specification. diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py
index 94c123436f3..8433b11c034 100644
--- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py
+++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py
@@ -48,16 +48,15 @@ hltTiclCandidate = cms.EDProducer("TICLCandidateProducer",
)
from Configuration.ProcessModifiers.ticlv5_TrackLinkingGNN_cff import ticlv5TrackLinkingGNN
-ticlv5TrackLinkingGNN.toModify(
- hltTiclCandidate, interpretationDescPSet = cms.PSet(
- algo_verbosity = cms.int32(0),
- cutTk = cms.string('1.48 < abs(eta) < 3.0 && pt > 1. && quality("highPurity") && hitPattern().numberOfLostHits("MISSING_OUTER_HITS") < 5'),
- onnxTrkLinkingModelFirstDisk = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/TrackLinking_GNN/FirstDiskPropGNN_v0.onnx'),
- onnxTrkLinkingModelInterfaceDisk = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/TrackLinking_GNN/InterfaceDiskPropGNN_v0.onnx'),
- inputNames = cms.vstring('x', 'edge_index', 'edge_attr'),
- output = cms.vstring('output'),
- delta_tk_ts = cms.double(0.1),
- thr_gnn = cms.double(0.5),
- type = cms.string('GNNLink')
- )
-)
+ticlv5TrackLinkingGNN.toModify(hltTiclCandidate,
+ interpretationDescPSet = dict(
+ algo_verbosity = 0,
+ cutTk = '1.48 < abs(eta) < 3.0 && pt > 1. && quality("highPurity") && hitPattern().numberOfLostHits("MISSING_OUTER_HITS") < 5',
+ onnxTrkLinkingModelFirstDisk = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/TrackLinking_GNN/FirstDiskPropGNN_v0.onnx'),
+ onnxTrkLinkingModelInterfaceDisk = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/TrackLinking_GNN/InterfaceDiskPropGNN_v0.onnx'),
+ inputNames = cms.vstring('x', 'edge_index', 'edge_attr'),
+ output = cms.vstring('output'),
+ delta_tk_ts = cms.double(0.1),
+ thr_gnn = cms.double(0.5),
+ type = 'GNNLink')
+ )
Contributor
Author
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. I don’t think this will work. Yes, it may compile, but when running cmsRun it will likely raise an error. From what I can see, the cms.PSet was replaced with a dict, which, as far as I understand, replaces the entire PSet rather than just overriding specific parameters. The original PSet likely contains additional keys that are expected by the plugin. By replacing it with a dict, cmssw then sees parameters that are unknown or unused by the plugin, which leads to configuration errors. Of course, I may be missing something, and thank you for explaining and helping on this. In any case, I also realized that I don’t use algo_verbosity in the GNN plugin, so I removed it from the parameters.
Contributor
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.
No,
Contributor
Author
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. Sorry, I’m having issues accessing the TWiki today-I’m not sure why. [1] Validating configuration of module: class=TICLCandidateProducer label='hltTiclCandidate'
Contributor
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. Ah, I see, thanks for the clarification. Since the plugin gets changed, and presumably any similarity of parameter names is accidental, I agree using a Technically the
Contributor
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.
I think something is being abused by the new plugin. If it cannot use the same structure of the input
Contributor
Author
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. Well, I wouldn’t say it’s being “abused.” Technically, both plugins have input parameters-one is based on selection cuts, and the other on the GNN model-but in the end, both produce the same kind of output. Having them share the same structure is mostly for simplicity, though it’s not strictly necessary for them to receive exactly the same parameters. |
||
| cutTk = cms.string('1.48 < abs(eta) < 3.0 && pt > 1. && quality("highPurity") && hitPattern().numberOfLostHits("MISSING_OUTER_HITS") < 5'), | ||
| onnxTrkLinkingModelFirstDisk = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/TrackLinking_GNN/FirstDiskPropGNN_v0.onnx'), | ||
| onnxTrkLinkingModelInterfaceDisk = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/TrackLinking_GNN/InterfaceDiskPropGNN_v0.onnx'), | ||
| inputNames = cms.vstring('x', 'edge_index', 'edge_attr'), | ||
| output = cms.vstring('output'), | ||
| delta_tk_ts = cms.double(0.1), | ||
| thr_gnn = cms.double(0.5), | ||
| type = cms.string('GNNLink') | ||
|
Contributor
Author
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. The choice of the name "type" is intentional to be the same, as it determines whether the old plugin or the new GNN-based plugin is used. However, I’m wondering if this should compile. I tried quickly and got the following error: TypeError: type does not already exist, so it can only be set to a CMS Python configuration type Did it compile successfully on your side?
Contributor
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. It did for me. @Moanwar you have to replace
Contributor
Author
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. Hmm, that’s strange. I have tried compiling and running a few times to make sure it works:
Contributor
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. runs fine for me. [*] diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py
index 307af675b8e..03efda78c33 100644
--- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py
+++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py
@@ -49,13 +49,13 @@ hltTiclCandidate = cms.EDProducer("TICLCandidateProducer",
from Configuration.ProcessModifiers.ticlv5_TrackLinkingGNN_cff import ticlv5TrackLinkingGNN
ticlv5TrackLinkingGNN.toModify(hltTiclCandidate,
- interpretationDescPSet = cms.PSet(
+ interpretationDescPSet = dict(
onnxTrkLinkingModelFirstDisk = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/TrackLinking_GNN/FirstDiskPropGNN_v0.onnx'),
onnxTrkLinkingModelInterfaceDisk = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/TrackLinking_GNN/InterfaceDiskPropGNN_v0.onnx'),
inputNames = cms.vstring('x', 'edge_index', 'edge_attr'),
output = cms.vstring('output'),
delta_tk_ts = cms.double(0.1),
thr_gnn = cms.double(0.5),
- type = cms.string('GNNLink')
+ type = 'GNNLink'
)
)
Contributor
Author
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. |
||
| ) | ||
| ) | ||
Uh oh!
There was an error while loading. Please reload this page.