-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Fix small typo in makePileupJSON.py
: runNumber
→ run
#45989
Conversation
cms-bot internal usage |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45989/41757 |
A new Pull Request was created by @IzaakWN for master. It involves the following packages:
@cmsbuild, @consuegs, @francescobrivio, @perrotta, @saumyaphor4252 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
After fixing the typo locally, we only see it happen four times in this
Is this to be expected? I do not see any peak luminosities jumping out in 2024 compared to previous years in the summary plots? |
An unrelated error in https://github.com/cms-sw/cmssw/blob/master/RecoLuminosity/LumiDB/scripts/pileupCalc.py we get is the following: $ pileupCalc.py -i /afs/cern.ch/user/e/emartinv/public/CMSSW_14_1_0_pre4/src/TauFW/PicoProducer/data/json/2024/Cert_Collisions2024_378981_385012_Golden.json --inputLumiJSON /afs/cern.ch/user/e/emartinv/public/CMSSW_14_1_0_pre4/src/TauFW/PicoProducer/data/json/2024/pileup_latest.txt --calcMode true --maxPileupBin 100 --numPileupBins 100 Data_PileUp_2024.root
[...]
Traceback (most recent call last):
File "/cvmfs/cms.cern.ch/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_0_pre4/bin/el9_amd64_gcc12/pileupCalc.py", line 189, in <module>
fillPileupHistogram(lumiInfo, options.calcMode,
File "/cvmfs/cms.cern.ch/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_0_pre4/bin/el9_amd64_gcc12/pileupCalc.py", line 87, in fillPileupHistogram
obs = binning.find(AveNumInt)
File "/cvmfs/cms.cern.ch/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_0_pre4/bin/el9_amd64_gcc12/pileupCalc.py", line 65, in find
return np.floor((x-self.xMin)*self.num/(self.xMax-self.xMin)).astype(np.int)
File "/cvmfs/cms.cern.ch/el9_amd64_gcc12/external/py3-numpy/1.24.3-ac08ea497df571aa0b37dc29bb7a2045/lib/python3.9/site-packages/numpy/__init__.py", line 305, in __getattr__
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations from cmssw/RecoLuminosity/LumiDB/scripts/pileupCalc.py Lines 64 to 65 in c312b85
Shall I add a fix to this PR? |
that's what's discussed at #45742. |
Yes, please |
A mean pileup as large as 295925365174 does not look healthy to me... |
the discussion here might or might not be related... |
+1 Size: This PR adds an extra 16KB to repository 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: Comparison SummarySummary:
|
Fixes ``` Traceback (most recent call last): File "/cvmfs/cms.cern.ch/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_0_pre4/bin/el9_amd64_gcc12/pileupCalc.py", line 189, in <module> fillPileupHistogram(lumiInfo, options.calcMode, File "/cvmfs/cms.cern.ch/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_0_pre4/bin/el9_amd64_gcc12/pileupCalc.py", line 87, in fillPileupHistogram obs = binning.find(AveNumInt) File "/cvmfs/cms.cern.ch/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_0_pre4/bin/el9_amd64_gcc12/pileupCalc.py", line 65, in find return np.floor((x-self.xMin)*self.num/(self.xMax-self.xMin)).astype(np.int) File "/cvmfs/cms.cern.ch/el9_amd64_gcc12/external/py3-numpy/1.24.3-ac08ea497df571aa0b37dc29bb7a2045/lib/python3.9/site-packages/numpy/__init__.py", line 305, in __getattr__ raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'int'. `np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations ```
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45989/41763 |
Pull request #45989 was updated. @cmsbuild, @consuegs, @francescobrivio, @perrotta, @saumyaphor4252 can you please check and sign again. |
please test |
+1 Size: This PR adds an extra 20KB to repository 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: Comparison SummarySummary:
|
+db
|
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, @mandrenguyen, @sextonkennedy, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
This is not really the forum for this, so if you like I can post to the CMS Talk thread @mmusich referenced in case other stumble on these errors? Still, in case it's useful, the error above were reported to me by Elvira (a TauPOG colleague). I managed to replicate it as follows (see "LumiRecommendationsRun3" TWiki): $ wget https://cms-service-dqmdc.web.cern.ch/CAF/certification/Collisions24/DCSOnly_JSONS/dailyDCSOnlyJSON/Collisions24_13p6TeV_378981_385514_DCSOnly_TkPx.json
$ export BRILWS_VERSION=3.7.4
$ source /cvmfs/cms-bril.cern.ch/cms-lumi-pog/brilws-docker/brilws-env
$ brilcalc lumi --xing -i Collisions24_13p6TeV_378981_385514_DCSOnly_TkPx.json -b "STABLE BEAMS" --normtag /cvmfs/cms-bril.cern.ch/cms-lumi-pog/Normtags/normtag_BRIL.json --xingTr 0.1 -o /eos/user/i/ineuteli/lumi_DCSONLY.csv --datatag online
$ cp -v /cvmfs/cms.cern.ch/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_0_pre4/bin/el9_amd64_gcc12/makePileupJSON.py makePileupJSON.py
$ sed -i 's/runNumber/run/g' makePileupJSON.py
$ makePileupJSON.py /eos/user/i/ineuteli/lumi_DCSONLY.csv pileup_JSON.txt Note
And
Elvira also tried with this golden JSON, but only Run 385355 was not included. |
This PR fixes small typo in https://github.com/cms-sw/cmssw/blob/master/RecoLuminosity/LumiDB/scripts/makePileupJSON.py.
Run number is introduced as just
run
:cmssw/RecoLuminosity/LumiDB/scripts/makePileupJSON.py
Lines 57 to 73 in c312b85
But later
runNumber
is used:cmssw/RecoLuminosity/LumiDB/scripts/makePileupJSON.py
Lines 132 to 138 in c312b85
This led to the following error when computing PU profile for 2024, following instructions from this "PileupJSONFileforData" TWiki: