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
Allow edmodule.clone(pset) for PSet to override parameters #33673
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33673/22574
|
A new Pull Request was created by @makortel (Matti Kortelainen) for master. It involves the following packages: FWCore/ParameterSet @makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild, please test |
@perrotta Here is what we discussed in #33354 (comment) (sorry it took a bit more than "few days in wall clock time") |
As a side note, do you think we should support unnamed |
We kind of do already with |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-040d54/14963/summary.html Comparison SummarySummary:
|
Thank you @makortel |
+1 |
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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR allows
edmodule.clone(pset)
to work in the python configuration (previously it could lead to "duplicate parameter" errors ifpset
had parameters already defined inedmodule
). Motivation to allow it is thatclone()
is (similar to) a constructor call with defaults taken from the cloned-from module. Semantics is that the parameters inpset
override those inedmodule
. Passing multiple PSets alongedmodule.clone(pset1, pset2)
is allowed as long aspset1
andpset2
have distinct parameters, similar toEDModule
constructors.Original discussion was in #33354 (comment).
Resolves cms-sw/framework-team#124
PR validation:
Framework unit tests pass.