-
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
Integration of the ML based online Ecal DQM using autoencoder network [CMSSW_12_0_X] #35991
Integration of the ML based online Ecal DQM using autoencoder network [CMSSW_12_0_X] #35991
Conversation
A new Pull Request was created by @abhih1 (Abhirami Harilal) for CMSSW_12_0_X. It involves the following packages:
@emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
PUcorr_slope = 8625.62354249 | ||
PUcorr_intercept= 354776.97564344 | ||
#Avg Occupancy of 2018 data | ||
avgOcc = (1.4228867,1.4111477,1.4235557,1.403253 ,1.2926203,1.3110067,1.4317631, |
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 the onnx file, I am afraid that normally for data files we have a dedicated package in https://github.com/cms-data corresponding to the cmssw package. For DQM there is for instance https://github.com/cms-data/DQM-SiStripMonitorClient and https://github.com/cms-data/DQM-DTMonitorClient . So i suggest to have a cms-data DQM-EcalMonitorClient package where the data files are moved. @smuzaffar What else should we add to get it working? A corresponding entry in CMSDIST, as https://github.com/cms-sw/cmsdist/blob/IB/CMSSW_10_2_X/gcc630/data-DQM-SiStripMonitorClient.spec right? |
@jfernan2 , just a data repo with a PR enough to test ( bot takes care of adding the new data package in cmsdist). |
Thanks @smuzaffar |
I can take care of it, are you happy with the new package name a |
I think so, it goes in consonance with previous DQM package names, since at the end the Client is making use of this onnx file. |
https://github.com/cms-data/DQM-EcalMonitorClient is now available, please open a PR there for the new data file. cleanup this PR and remove the data file from the history |
Pull request #35991 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please check and sign again. |
@abhih1 , squash your two commits (to get rid of data file from git history) and force push your changes |
3d15aa6
to
a8336cb
Compare
Pull request #35991 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please check and sign again. |
@smuzaffar Thanks. I have done this now, and made a PR to https://github.com/cms-data/DQM-EcalMonitorClient. |
@abhih1 , yes path should be |
Thanks. I'll update this as well. |
Pull request #35991 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please check and sign again. |
This PR is related to cms-data/DQM-EcalMonitorClient#1 |
@smuzaffar it is not clear to me in which point we can trigger the tests, I do not see yet the cmsdist file created by the bot. Please let us know. Thanks |
please test with cms-data/DQM-EcalMonitorClient#1 |
bot automatically creates the cmsdist files, so once data pr is ready then one can already start testing |
Maybe because PU is -1 and this condition is not satisfied? : https://github.com/cms-sw/cmssw/pull/35991/files#diff-f6322d83172da74a703f6d7f55b6c0ee7950037ff3c3d56d89e2196d317d3595R49-R51 |
OK, I see, in that case it will be difficult to test that plot until real collisions arrive.... |
yes unfortunately |
Pull request #35991 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please check and sign again. |
please test |
-1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f72a6e/20343/summary.html External BuildI found compilation error when building: Generated cache: external+classlib+3.1.3-fa415b2061ef54fdf7db6d6fb07f0a50 FATAL: malformed spec found while quering it. Command: source /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/slc7_amd64_gcc900/rpm-env.sh ; rpm -q --specfile /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/tmp/tmpspec-coral --info --define "cmsdist_directory /data/cmsbld/jenkins/workspace/ib-run-pr-tests/cmsdist" --define "compilerv 930" --define "cmscompilerv 900" --define "cmsos slc7_amd64" --define "package_vectorization %{nil}" --define 'buildroot /foo' Resulted in: error: line 424: Unknown tag: <<<<<<< HEAD error: query of specfile /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/tmp/tmpspec-coral failed, can't parse Traceback (most recent call last): File "./pkgtools/cmsBuild", line 4594, in build(opts, args[1:], PKGFactory) File "./pkgtools/cmsBuild", line 3871, in build |
please test |
@jfernan2 , please use cms-sw/cmsdist#7434 for 12.0.X testing |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f72a6e/20349/summary.html Comparison SummarySummary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_12_0_X IBs (tests are also fine) and once validation in the development release cycle CMSSW_12_2_X is complete. 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) |
+1 |
PR description:
This PR introduces a machine learning based anomaly detection feature to the online ECAL DQM for the Ecal Barrel through a new DQM Client
MLClient
. An Autoencoder (AE) model with a ResNet architecture is trained on certified good data (EB digi occupancy) from 2018 runs.On giving an input occupancy map to the AE, the encoder part of the AE encodes and learns the features and the decoder reconstructs the data from the encoded latent space to match the input as closely as possible. The reconstruction loss is then calculated, which is a mean squared error (MSE) between the input and output images at a tower level. Thus given an anomalous tower, the AE which has learnt the features of the good data will have a hard time reconstructing it and give a higher loss on the anomaly than on the good towers. A quality threshold is then applied on this loss map which marks it as Good or Bad, which is then stored as an ML quality summary plot.
We also do some pre processing and post processing steps to have a uniform, robust anomaly detection with fewer false positives over the changing detector conditions. The details of this are included in the comments throughout the code, and also can be found in this talk presented at a central DQM meeting [1]
Please note that the ML quality summary plot is a complimentary plot in addition to the existing DQM plots, and will be used for ECAL internal consumption only pending successful commissioning.
Along with the main ML quality summary plot, we also introduce a few monitoring plots to monitor the trends in Pileup (PU) per lumisection, no.of events processed in a lumisection and no.of events per input image to the ML model. This is in anticipation of the low luminosity expected during the start of Run 3. A few hyper parameters of our pre and post processing steps will also have to be tuned according to these trends, as currently they are derived from the conditions of Run 2.
Please also note that this version of the PR is only meant for code integrations tests during the November 2021 MWGR. The plots will only be meaningful when we have real collisions, and modifications are foreseen after gathering data from the beginning of Run 3.
[1] https://indico.cern.ch/event/1042141/contributions/4377869/attachments/2254007/3824216/ML4DQM_AbhiramiHarilal_May28.pdf
PR validation:
The code was validated by running the modified online Ecal DQM configuration with the new client enabled and the resultant plots were examined by uploading the output file to a DQM test gui.
The new plots are confirmed and look reasonable.
if this PR is a backport please specify the original PR and why you need to backport that PR:
This is a backport of #35990.
This is made to ensure that these changes are available for data taking during the November 2021 MWGR, which uses 12_0_X for production.