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

[PF] Add fillDescription to RecoParticleFlow producers #45212

Merged
merged 7 commits into from
Jun 21, 2024

Conversation

stahlleiton
Copy link
Contributor

PR description:

This PR add the fillDescription to the producers in the RecoParticleFlow directory that were missing it. In addition, it also replaces the getByLabel with getByToken. This PR is related to the issue #43169 .

PR validation:

Tested that it compiles and ran 5 relvals locally.

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

@swagata87

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 13, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45212/40564

  • This PR adds an extra 100KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @stahlleiton for master.

It involves the following packages:

  • RecoParticleFlow/Configuration (reconstruction)
  • RecoParticleFlow/PFClusterProducer (reconstruction)
  • RecoParticleFlow/PFProducer (reconstruction)
  • RecoParticleFlow/PFSimProducer (reconstruction)
  • RecoParticleFlow/PFTracking (reconstruction)

@jfernan2, @cmsbuild, @mandrenguyen can you please review it and eventually sign? Thanks.
@sameasy, @lgray, @argiro, @wang0jin, @rchatter, @missirol, @hatakeyamak, @ReyerBand, @thomreis, @rovere, @felicepantaleo, @seemasharmafnal, @mmarionncern this is something you requested to watch as well.
@sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@swagata87
Copy link
Contributor

type pf

@swagata87
Copy link
Contributor

@cmsbuild please test

@mmusich
Copy link
Contributor

mmusich commented Jun 13, 2024

@cms-sw/hlt-l2 FYI

@mmusich
Copy link
Contributor

mmusich commented Jun 13, 2024

quoting from the originating issue:

In #43025 (comment), it was also noted that some of the plugins touched by #43025 do not have a fillDescriptions method (e.g. PFClusterProducer). Maybe as a result of this, I see PF code using calls to (edm::ParameterSet).exists and (edm::ParameterSet).existsAs (e.g. here), which should be dropped in favour of fillDescriptions wherever possible. Overall, the lack of fillDescriptions makes it harder to understand what is actually needed in all these (nested) PSets.

Was the removal of exists and existsAs implemented here? I don't seem to be able to find it.

@mmusich
Copy link
Contributor

mmusich commented Jun 13, 2024

was this tested with addOnTests.py?
I see failures in HI related workflows (namely [hlt_mc_HIon:3] and [hlt_data_HIon:3]):

----- Begin Fatal Exception 13-Jun-2024 10:48:34 CEST-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PFBlockProducer label='particleFlowBlock'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'useNuclear'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------

@mmusich
Copy link
Contributor

mmusich commented Jun 13, 2024

I see failures in HI related workflows (namely [hlt_mc_HIon:3] and [hlt_data_HIon:3]):

I think the problem is here:

e.toModify(particleFlowBlock, useNuclear = cms.bool(False))

which makes me also doubt about:

process.particleFlowBlock.useNuclear = cms.bool(True)

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals RelVals-INPUT AddOn
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f69da3/39866/summary.html
COMMIT: 41f08d0
CMSSW: CMSSW_14_1_X_2024-06-12-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/45212/39866/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals

----- Begin Fatal Exception 13-Jun-2024 10:50:26 CEST-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PFBlockProducer label='particleFlowBlock'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'useNuclear'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 13-Jun-2024 11:00:35 CEST-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PFBlockProducer label='particleFlowBlock'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'useNuclear'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------

RelVals-INPUT

  • 140.61140.61_RunHI2022/step2_RunHI2022.log
  • 140.57140.57_RunHI2018Reduced/step2_RunHI2018Reduced.log
  • 140.56140.56_RunHI2018/step2_RunHI2018.log

AddOn Tests

----- Begin Fatal Exception 13-Jun-2024 10:48:19 CEST-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PFBlockProducer label='particleFlowBlock'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'useNuclear'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------
----- Begin Fatal Exception 13-Jun-2024 10:48:00 CEST-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PFBlockProducer label='particleFlowBlock'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'useNuclear'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------

desc.setUnknown();
descriptions.addDefault(desc);
edm::ParameterSetDescription psd;
psd.setUnknown();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using setUknown really defeats the purpose of the fillDescriptions.

Copy link
Contributor Author

@stahlleiton stahlleiton Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue I had in this particular class was that there were so many variations of this parameter set (in different python configuration files scattered across CMSSW), that failed to find a super set that cover all (so end up declaring it as unknown). Same with PFClusterProducer. I would have to think if there is a way to avoid having a long list of optional parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unknown parameter set descriptions are removed in 2da72f0

Copy link
Contributor

@mmusich mmusich Jun 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stahlleiton just a word of caution about the (many) addOptional added in 2da72f0. Currently the ConfDB parsing skips any cms.optional in the resulting cfi files, so if at some point any of these need to be configured at HLT it won't be possible (unless a default is provided in the C++ source code).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made them optional because there were parameter sets with different content used in different parts of CMSSW. So I only used add for those parameters that were common among all parameter sets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the optional condition from all the parameters I added in the fillDescription in c85415b

@stahlleiton
Copy link
Contributor Author

stahlleiton commented Jun 13, 2024

quoting from the originating issue:

In #43025 (comment), it was also noted that some of the plugins touched by #43025 do not have a fillDescriptions method (e.g. PFClusterProducer). Maybe as a result of this, I see PF code using calls to (edm::ParameterSet).exists and (edm::ParameterSet).existsAs (e.g. here), which should be dropped in favour of fillDescriptions wherever possible. Overall, the lack of fillDescriptions makes it harder to understand what is actually needed in all these (nested) PSets.

Was the removal of exists and existsAs implemented here? I don't seem to be able to find it.

Not yet, and in this PR I only added the fill descriptions and was planning to fix the "exist" and "existAs" in another PR.

@stahlleiton
Copy link
Contributor Author

was this tested with addOnTests.py?
I see failures in HI related workflows (namely [hlt_mc_HIon:3] and [hlt_data_HIon:3]):

----- Begin Fatal Exception 13-Jun-2024 10:48:34 CEST-----------------------
An exception of category 'Configuration' occurred while
   [0] Constructing the EventProcessor
   [1] Validating configuration of module: class=PFBlockProducer label='particleFlowBlock'
Exception Message:
Illegal parameter found in configuration.  The parameter is named:
 'useNuclear'
You could be trying to use a parameter name that is not
allowed for this plugin or it could be misspelled.
----- End Fatal Exception -------------------------------------------------

I tested it with pp and UPC relvals, forgot to also include HI relvals. Will fix and test again

@cmsbuild
Copy link
Contributor

Pull request #45212 was updated. @mandrenguyen, @Martin-Grunewald, @cmsbuild, @jfernan2, @mmusich can you please check and sign again.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45212/40644

@cmsbuild
Copy link
Contributor

Pull request #45212 was updated. @mandrenguyen, @cmsbuild, @jfernan2 can you please check and sign again.

@mmusich
Copy link
Contributor

mmusich commented Jun 19, 2024

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f69da3/39965/summary.html
COMMIT: 9fee0bb
CMSSW: CMSSW_14_1_X_2024-06-18-1800/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45212/39965/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 2 lines to the logs
  • Reco comparison results: 1 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3345018
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3344995
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@stahlleiton
Copy link
Contributor Author

Are there further comments on this PR?

@mandrenguyen
Copy link
Contributor

+1

@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. @antoniovilela, @sextonkennedy, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@antoniovilela
Copy link
Contributor

+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.

9 participants