-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Changing tensorflow implementation in RecoHGCal/TICL #36724
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36724/27825
|
A new Pull Request was created by @dr-stringfellow for master. It involves the following packages:
@clacaputo, @cmsbuild, @AdrianoDee, @srimanob, @slava77, @jpata can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
Thanks a lot, @dr-stringfellow for this nice piece of work! |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-95bd10/21763/summary.html Comparison SummarySummary:
|
-1 Failed Tests: RelVals-INPUT RelVals-INPUT
Comparison SummarySummary:
|
Note that the static checker complains about the const_cast (also an issue for the trackDNN), related to #32529. It's not something that can be fixed in this PR, but to be kept in mind.
I agree that in a follow-up (not necessarily by the HGCAL team), the |
enable profiling |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-95bd10/21972/summary.html Comparison SummarySummary:
|
+reconstruction
|
+upgrade |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
@@ -446,7 +436,7 @@ void PatternRecognitionbyCA<TILES>::energyRegressionAndID(const std::vector<reco | |||
} | |||
|
|||
// run the inference (7) | |||
tensorflow::run(eidSession_, inputList, outputNames, &outputs); | |||
tensorflow::run(const_cast<tensorflow::Session *>(eidSession), inputList, outputNames, &outputs); |
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.
eidSession
is already a const tensorflow::Session *
: why do you need the const_cast
?
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 is removing the const (OK since tensorflow::run is known to be thread-safe), to fit the the tensorflow interface.
related to #35541
@@ -410,7 +400,7 @@ void PatternRecognitionbyCLUE3D<TILES>::energyRegressionAndID(const std::vector< | |||
} | |||
|
|||
// run the inference (7) | |||
tensorflow::run(eidSession_, inputList, outputNames, &outputs); | |||
tensorflow::run(const_cast<tensorflow::Session *>(eidSession), inputList, outputNames, &outputs); |
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.
eidSession
is already a const tensorflow::Session *
: why do you need the const_cast
?
@@ -278,7 +269,7 @@ void PatternRecognitionbyFastJet<TILES>::energyRegressionAndID(const std::vector | |||
} | |||
|
|||
// run the inference (7) | |||
tensorflow::run(eidSession_, inputList, outputNames, &outputs); | |||
tensorflow::run(const_cast<tensorflow::Session *>(eidSession), inputList, outputNames, &outputs); |
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.
eidSession
is already a const tensorflow::Session *
: why do you need the const_cast
?
@@ -655,7 +659,7 @@ void TrackstersMergeProducer::energyRegressionAndID(const std::vector<reco::Calo | |||
} | |||
|
|||
// run the inference (7) | |||
tensorflow::run(eidSession_, inputList, outputNames, &outputs); | |||
tensorflow::run(const_cast<tensorflow::Session *>(eidSession), inputList, outputNames, &outputs); |
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.
eidSession
is already a const tensorflow::Session *
: why do you need the const_cast
?
+1 |
PR description:
The tensorflow model used to regress energy and ID of TICL objects ("tracksters") has been moved from an ED-based implementation to an ES setup. All plugins (CA, CLUE3D, FastJet, ...) will now access the same cached model, instead of caching one model for each plugin as was the case in the EDProducer setup.
This is now in line with the RecoTracker tensorflow implementation. In this first step, we are pointing also to their tensorflow producer. Eventually, in a pull request that would follow soon, this should be harmonised and moved to a central, neutral place that both RecoTracker and RecoHGCal use.
PR validation:
It saves about 5% in memory on upgrade workflow
39034.202
:https://bmaier.web.cern.ch/bmaier/view.php?dir=figs/hgcal/ticltf/new
(The more plugins are run in the same job, the higher the savings.)