-
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
Introduce Unified Particle Transformer v2 #47173
base: master
Are you sure you want to change the base?
Conversation
adjust the LT fix for v2 model
cms-bot internal usage |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47173/43412 Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47173/43413 |
A new Pull Request was created by @AlexDeMoor for master. It involves the following packages:
@cmsbuild, @jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
test parameters:
|
please test |
+1 Size: This PR adds an extra 28KB to repository The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: You can see more details here: Comparison SummarySummary:
NANO Comparison SummarySummary:
Nano size comparison Summary:
|
@AlexDeMoor do I understand correctly from your PR description that performance should be improved with this PR? The rate ev/s/thd is decreased for all the NANO workflows tested |
assign xpog |
New categories assigned: xpog @ftorrresd,@hqucms you have been requested to review this Pull request/Issue and eventually sign? Thanks |
I think there are some fluctuations in the NANO tests -- let's run again and see. |
please test |
@hqucms Just to add that the changes in this PR should not directly affect NanoAOD workflows computing time because the inference is done at PAT level. |
+1 Size: This PR adds an extra 16KB to repository The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
You can see more details here: Comparison SummarySummary:
NANO Comparison SummarySummary:
Nano size comparison Summary:
|
unsigned int n_vtx = features.sv_features.size(); | ||
|
||
// Use actual sizes for dynamic axes version | ||
n_cpf_ = std::max((unsigned int)1, n_cpf); |
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.
The part could be simplified using std::clamp
, e.g.,
n_cpf_ = std::clamp(features.c_pf_features.size(), 1, 29);
@@ -76,6 +77,8 @@ UnifiedParticleTransformerAK4ONNXJetTagsProducer::UnifiedParticleTransformerAK4O | |||
: src_(consumes<TagInfoCollection>(iConfig.getParameter<edm::InputTag>("src"))), | |||
flav_names_(iConfig.getParameter<std::vector<std::string>>("flav_names")), | |||
input_names_(iConfig.getParameter<std::vector<std::string>>("input_names")), | |||
use_dynamic_axes_(iConfig.getParameter<edm::FileInPath>("model_path").fullPath().find("v2.onnx") != | |||
std::string::npos), |
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 would suggest adding a configurable parameter for use_dynamic_axes
(with a default value to true
), otherwise we are stuck with the naming of v2.onnx
.
@@ -89,7 +92,7 @@ void UnifiedParticleTransformerAK4ONNXJetTagsProducer::fillDescriptions(edm::Con | |||
desc.add<edm::InputTag>("src", edm::InputTag("pfUnifiedParticleTransformerAK4TagInfos")); | |||
desc.add<std::vector<std::string>>( | |||
"input_names", {"input_1", "input_2", "input_3", "input_4", "input_5", "input_6", "input_7", "input_8"}); | |||
desc.add<edm::FileInPath>("model_path", edm::FileInPath("RecoBTag/Combined/data/UParTAK4/PUPPI/V00/UParTAK4.onnx")); | |||
desc.add<edm::FileInPath>("model_path", edm::FileInPath("RecoBTag/Combined/data/UParTAK4/PUPPI/V1/UParTAK4_v2.onnx")); |
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.
For consistency, I suggest to rename V1
to V01
.
@AlexDeMoor It seems |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47173/43463 |
Pull request #47173 was updated. @cmsbuild, @ftorrresd, @hqucms, @jfernan2, @mandrenguyen can you please check and sign again. |
PR description:
This PR opens the update of the Unified Particle Transformer bringing substantial performance improvement for flavour tagging performance and model inference time. Link of the XPOG meeting : https://indico.cern.ch/event/1504557/#3-upart-training-updates
This PR has to be tested with the following PR of the model :cms-data/RecoBTag-Combined#64
Please note the final model is being finalized for training and validation.