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

Integration of the ML based online Ecal DQM using autoencoder network #35990

Merged
merged 6 commits into from Nov 11, 2021

Conversation

abhih1
Copy link
Contributor

@abhih1 abhih1 commented Nov 4, 2021

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:

N/A

@cmsbuild cmsbuild added this to the CMSSW_12_2_X milestone Nov 4, 2021
@abhih1 abhih1 changed the title Integration of the ML based online Ecal DQM with autoencoder network Integration of the ML based online Ecal DQM using autoencoder network Nov 4, 2021
@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35990/26420

  • This PR adds an extra 3364KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2021

A new Pull Request was created by @abhih1 (Abhirami Harilal) for master.

It involves the following packages:

  • DQM/EcalMonitorClient (dqm)
  • DQM/EcalMonitorTasks (dqm)
  • DQM/Integration (dqm)

@emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please review it and eventually sign? Thanks.
@batinkov, @battibass, @rchatter, @argiro, @thomreis, @simonepigazzini, @threus, @francescobrivio this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@abhih1 abhih1 force-pushed the ML4DQM_EB_integration_master branch from f8b7e2d to 33d1175 Compare November 5, 2021 11:04
@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 5, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35990/26442

  • This PR adds an extra 40KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 5, 2021

Pull request #35990 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 5, 2021

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35990/26443

  • This PR adds an extra 40KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 9, 2021

Pull request #35990 was updated. @emanueleusai, @ahmad3213, @cmsbuild, @jfernan2, @pmandrik, @pbo0, @rvenditti can you please check and sign again.

@jfernan2
Copy link
Contributor

jfernan2 commented Nov 9, 2021

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 9, 2021

-1

Failed Tests: RelVals
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1461c9/20391/summary.html
COMMIT: 61c60ff
CMSSW: CMSSW_12_2_X_2021-11-08-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/35990/20391/install.sh to create a dev area with all the needed externals and cmssw changes.

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:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1461c9/20391/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1461c9/20391/git-merge-result

RelVals

----- Begin Fatal Exception 09-Nov-2021 18:14:40 CET-----------------------
An exception of category 'PluginNotFound' occurred while
   [0] Constructing the EventProcessor
Exception Message:
Unable to find plugin 'EcalBarrelGeometryEPdd4hep' in category 'CMS EDM Framework ParameterSet Description'. Please check spelling of name.
----- End Fatal Exception -------------------------------------------------

@jfernan2
Copy link
Contributor

jfernan2 commented Nov 9, 2021

@cmsbuild please test with #36021

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 9, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1461c9/20412/summary.html
COMMIT: 61c60ff
CMSSW: CMSSW_12_2_X_2021-11-09-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/35990/20412/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: 42
  • DQMHistoTests: Total histograms compared: 2901890
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2901868
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 41 files compared)
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

@jfernan2
Copy link
Contributor

+1
Backport 12_0_X Tested in Online DQM at P5

@cmsbuild
Copy link
Contributor

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)

@qliphy
Copy link
Contributor

qliphy commented Nov 11, 2021

+1

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

5 participants