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 [CMSSW_12_1_X] #35992

Merged
merged 5 commits into from Nov 12, 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:

This is a backport of #35990.
This is made to ensure that the versions are in sync.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 4, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35992/26421

@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 changed the base branch from master to CMSSW_12_1_X November 4, 2021 19:33
@cmsbuild cmsbuild modified the milestones: CMSSW_12_2_X, CMSSW_12_1_X Nov 4, 2021
@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 5, 2021

Pull request #35992 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

Pull request #35992 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

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

@jfernan2
Copy link
Contributor

jfernan2 commented Nov 5, 2021

This PR is related to cms-data/DQM-EcalMonitorClient#1

@smuzaffar
Copy link
Contributor

please test with cms-data/DQM-EcalMonitorClient#1

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 7, 2021

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

@smuzaffar
Copy link
Contributor

test parameters:

@smuzaffar
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 9, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-46f19e/20354/summary.html
COMMIT: ab48878
CMSSW: CMSSW_12_1_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/35992/20354/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: 22 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 2901440
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2901417
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 901.563 KiB( 41 files compared)
  • DQMHistoSizes: changed ( 1000.0,... ): 10.455 KiB EcalBarrel/EBSummaryClient
  • DQMHistoSizes: changed ( 1000.0,... ): 10.444 KiB EcalBarrel/EBOccupancyTask
  • DQMHistoSizes: changed ( 1000.0,... ): 4.852 KiB Ecal/Trends
  • DQMHistoSizes: changed ( 1000.0,... ): 3.889 KiB EcalEndcap/EESummaryClient
  • DQMHistoSizes: changed ( 1000.0,... ): 1.929 KiB EcalEndcap/EEOccupancyTask
  • DQMHistoSizes: changed ( 1000.0,... ): 0.090 KiB Ecal/EventInfo
  • DQMHistoSizes: changed ( 23234.0,... ): 3.229 KiB Ecal/Trends
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 9, 2021

Pull request #35992 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

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-46f19e/20390/summary.html
COMMIT: 13ac29b
CMSSW: CMSSW_12_1_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/35992/20390/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: 20 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 2901440
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2901412
  • 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 CMSSW_12_1_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)

@qliphy
Copy link
Contributor

qliphy commented Nov 12, 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