Skip to content
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

Backport FastSim refiner network for NANO (DeepJet for AK4 CHS Jets) #40828

Merged
merged 7 commits into from
Jun 19, 2023

Conversation

sbein
Copy link
Contributor

@sbein sbein commented Feb 20, 2023

PR description:

The main thing here is to backport the FastSim refinement network applied as part of the NANO step (#40553). This feature modifies AK4 CHS jets relevant for Run 2 UltraLegacy MC (NANOv9 and greater). This BP is different from the original PR in that the default meanings of the DeepJet observables don't change, and a new separate set of variables are added to NANO with suffix refined. A cms-data backport will also accompany this PR to support https://github.com/sbein/cmssw/blob/b32450010a0ed20cf00cfc9ba2e5626d329f1f5a/PhysicsTools/NanoAOD/python/jets_cff.py#L555.

This PR backports the ONNX RunTime library additions, 3152213, as they are needed to run the refinement network. This in turn requires a couple of restructuring changes implemented here in order for PhysicsTools/NanoAOD to not trip on changes in the PhysicsTools/PatAlgos/plugins buildfile.

The following commands were used to test the workflow

cmsDriver.py TTbar_13TeV_TuneCUETP8M1_cfi --conditions auto:run2_mc --fast -n 10 --era Run2_2016 --eventcontent FEVTDEBUGHLT,DQM --relval 100000,1000 -s GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,EI,VALIDATION:@standardValidation,DQM:@standardDQM --datatier GEN-SIM-DIGI-RECO,DQMIO --beamspot Realistic25ns13TeV2016Collision

cmsDriver.py step3 --conditions auto:run2_mc --fast -n 100 --era Run2_2016 --eventcontent MINIAODSIM --runUnscheduled --filein file:step1.root -s PAT --datatier MINIAODSIM --mc

cmsDriver.py step4 --conditions auto:run2_mc --fast -n 1000 --era Run2_2016 --eventcontent NANOAODSIM --filein file:step3_PAT.root -s NANO --datatier NANOAODSIM --customise PhysicsTools/NanoAOD/jets_cff.nanoAOD_refineFastSim_bTagDeepFlav --mc

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 20, 2023

A new Pull Request was created by @sbein (Sam Bein) for CMSSW_10_6_X.

It involves the following packages:

  • PhysicsTools/NanoAOD (xpog)
  • PhysicsTools/ONNXRuntime (reconstruction)
  • PhysicsTools/PatAlgos (xpog, reconstruction)

@cmsbuild, @mandrenguyen, @clacaputo, @swertz, @vlimant can you please review it and eventually sign? Thanks.
@rappoccio, @gouskos, @hatakeyamak, @emilbols, @mbluj, @demuller, @seemasharmafnal, @mmarionncern, @ahinzmann, @jdolen, @azotz, @jdamgov, @nhanvtran, @gkasieczka, @schoef, @andrzejnovak, @AlexDeMoor, @AnnikaStein, @riga, @JyothsnaKomaragiri, @gpetruc, @mariadalfonso this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@sbein sbein changed the title Backport onnx cmssw12 1 x Backport FastSim refiner network for NANO collections (AK4 CHS Jets) Feb 20, 2023
@sbein sbein changed the title Backport FastSim refiner network for NANO collections (AK4 CHS Jets) Backport FastSim refiner network for NANO (DeepJet for AK4 CHS Jets) Feb 20, 2023
@swertz
Copy link
Contributor

swertz commented Feb 21, 2023

Hi @sbein , could you please also add the new refined variables to the nanoDQM, for the fastsim modifier, here: https://github.com/cms-sw/cmssw/blob/master/PhysicsTools/NanoAOD/python/nanoDQM_cff.py

…efined variables will carry the normal names in NANO.
@cmsbuild
Copy link
Contributor

Pull request #40828 was updated. @cmsbuild, @mandrenguyen, @clacaputo, @swertz, @vlimant can you please check and sign again.

@sbein
Copy link
Contributor Author

sbein commented Feb 24, 2023

@swertz, I've updated the last commit to implement the chosen naming scheme https://github.com/cms-sw/cmssw/pull/40828/files#diff-377770d6a7d4705da48aa96709bdedefcb42d5b5497c85ba41a3f11074c148a0R541-R560. For reference, we decided to assign the refined variables to take the normal variable names in NANO, and for now preserve the original values as new variables with suffix "unrefined". This will not complicate ongoing campaigns because the refinement will only be triggered by the cmsDriver customize function in the NANO step.

@swertz
Copy link
Contributor

swertz commented Feb 27, 2023

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ce01b2/30923/summary.html
COMMIT: 64d138d
CMSSW: CMSSW_10_6_X_2023-02-26-0000/slc7_amd64_gcc700
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/40828/30923/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 3215686
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3215351
  • DQMHistoTests: Total skipped: 334
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 34 files compared)
  • Checked 143 log files, 102 edm output root files, 35 DQM output files
  • TriggerResults: no differences found

@swertz
Copy link
Contributor

swertz commented Feb 28, 2023

+1

No differences in existing workflows as expected.

@mandrenguyen
Copy link
Contributor

+1

@smuzaffar
Copy link
Contributor

@smuzaffar is there some way for the bot to realize when a PR in "The following merge commits were also included on top of IB + this PR" requires a separate external update? (this is probably a hard problem to solve in the general case, but it would prevent spurious failures like this...)

@kpedro88 , though it is possible but will consume few github api calls per extra PR which I would like to avoid. As this type of updates are not frequent any way :-)

@srimanob
Copy link
Contributor

@cmsbuild please test workflow 135.14

Re-test after 3 weeks.

@srimanob
Copy link
Contributor

@sbein Do I understand correctly that we still need this PR? Thx.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ce01b2/33176/summary.html
COMMIT: 843898a
CMSSW: CMSSW_10_6_X_2023-06-11-0000/slc7_amd64_gcc700
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/40828/33176/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 5 lines from the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 3170438
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3170102
  • DQMHistoTests: Total skipped: 334
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 140 log files, 100 edm output root files, 35 DQM output files
  • TriggerResults: no differences found

@sbein
Copy link
Contributor Author

sbein commented Jun 15, 2023

@srimanob yes we do. It should be merged, thanks! +1

@srimanob
Copy link
Contributor

+Upgrade

@srimanob
Copy link
Contributor

Kindly ping @cms-sw/xpog-l2 @cms-sw/pdmv-l2

@sunilUIET
Copy link
Contributor

+pdmv

@vlimant
Copy link
Contributor

vlimant commented Jun 16, 2023

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_10_6_X IBs (tests are also fine) and once validation in the development release cycle CMSSW_13_2_X is complete. This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@rappoccio
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 6412fce into cms-sw:CMSSW_10_6_X Jun 19, 2023
11 checks passed
perrotta added a commit to cms-sw/cmsdist that referenced this pull request Jul 10, 2023
Tag for Update tag for PhysicsTools-NanoAOD to V01-01-00-01-00
Needed by cms-sw/cmssw#40828 (already merged)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet