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

cfipython file changes in 14_1_0_pre4 (compared to pre3) lead to failures in ConfDb parsing #45087

Closed
Martin-Grunewald opened this issue May 29, 2024 · 39 comments

Comments

@Martin-Grunewald
Copy link
Contributor

Martin-Grunewald commented May 29, 2024

Between pre3 and pre4 of 14_1_0, there is the following change in fillDescriptions-generated cfipython files, for example:

pre3:

cat $CMSSW_RELEASE_BASE/cfipython/el8_amd64_gcc12/Alignment/CommonAlignment/apvModeFilter_cfi.py 
import FWCore.ParameterSet.Config as cms

apvModeFilter = cms.EDFilter('APVModeFilter',
  apvMode = cms.untracked.string('deco'),
  mightGet = cms.optional.untracked.vstring
)

while in pre4:

cat $CMSSW_RELEASE_BASE/cfipython/el8_amd64_gcc12/Alignment/CommonAlignment/apvModeFilter_cfi.py 
import FWCore.ParameterSet.Config as cms

from .APVModeFilter import APVModeFilter

apvModeFilter = APVModeFilter()

The pre4 version breaks ConfDb parsing with the error message:

Scanning package: /cvmfs/cms.cern.ch/el8_amd64_gcc12/cms/cmssw/CMSSW_14_1_0_pre4//cfipython/el8_amd64_gcc12/Alignment/CommonAlignment
Traceback (most recent call last):
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 1879, in <module>
    main(sys.argv[1:])
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 191, in main
    confdbjob.BeginJob()
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 483, in BeginJob
    self.ExtendTheCfi(validatedpyfile, validatedpydir, allowmultiplecfis, usepythonsubdir)
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 717, in ExtendTheCfi
    exec(importcommand)
  File "<string>", line 1, in <module>
  File "/cvmfs/cms.cern.ch/el8_amd64_gcc12/cms/cmssw/CMSSW_14_1_0_pre4//cfipython/el8_amd64_gcc12/Alignment/CommonAlignment/apvModeFilter_cfi.py", line 3, in <module>
    from .APVModeFilter import APVModeFilter
ImportError: attempted relative import with no known parent package

Clearly this is a problem.

It seems the issue is with from .APVModeFilter import APVModeFilter, the leading '.' syntax.
Can it be reverted or done differently?
For example, defining the parent package explicitly in the py file, or giving a full path in the import statement?

@Martin-Grunewald
Copy link
Contributor Author

assign core

@cmsbuild
Copy link
Contributor

New categories assigned: core

@Dr15Jones,@makortel,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks

@cmsbuild
Copy link
Contributor

cmsbuild commented May 29, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

A new Issue was created by @Martin-Grunewald.

@antoniovilela, @rappoccio, @Dr15Jones, @smuzaffar, @sextonkennedy, @makortel can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@mmusich
Copy link
Contributor

mmusich commented May 29, 2024

From a quick look, seems #44424 and #44363 caused this.

@Martin-Grunewald
Copy link
Contributor Author

Martin-Grunewald commented May 29, 2024

The generated cfipython files no longer seem to be self-contained or fully-defined python files:

pre4:

python3 $CMSSW_RELEASE_BASE/cfipython/el8_amd64_gcc12/Alignment/CommonAlignment/apvModeFilter_cfi.py
Traceback (most recent call last):
  File "/cvmfs/cms.cern.ch/el8_amd64_gcc12/cms/cmssw/CMSSW_14_1_0_pre4/cfipython/el8_amd64_gcc12/Alignment/CommonAlignment/apvModeFilter_cfi.py", line 3, in <module>
    from .APVModeFilter import APVModeFilter
ImportError: attempted relative import with no known parent package

while there is no error in pre3:

python3 $CMSSW_RELEASE_BASE/cfipython/el8_amd64_gcc12/Alignment/CommonAlignment/apvModeFilter_cfi.py

I hope this can be fixed!

@Martin-Grunewald
Copy link
Contributor Author

The following makes it work:

cat apvModeFilter_cfi.py

import FWCore.ParameterSet.Config as cms

from Alignment.CommonAlignment.APVModeFilter import APVModeFilter

apvModeFilter = APVModeFilter()

ie, with a fully qualified import path name, python3 apvModeFilter_cfi.py does not show an error.

@mmusich
Copy link
Contributor

mmusich commented May 29, 2024

presumably a fix is needed here then:

outFile << "from ." << pythonName << " import " << pythonName << "\n\n";

(changes introduced at #44363)

@Dr15Jones
Copy link
Contributor

It seems the issue is with from .APVModeFilter import APVModeFilter, the leading '.' syntax.
Can it be reverted or done differently?

The problem is ConfDB is not properly following the python rules for doing an import. If one were going to use a subset of numpy you would not go into some numpy directory and doimport bar and expect that to work. The python rules require that you must do import numpy.foo.bar.

What I believe needs to be changed is this line in ConfDB
https://github.com/cms-sw/hlt-confdb/blob/6ade11b6afa09b185585b73ea47bbfc1c60607c4/parser/ConfdbLoadParamsFromConfigsPy3.py#L705

which should be like the line two above it
https://github.com/cms-sw/hlt-confdb/blob/6ade11b6afa09b185585b73ea47bbfc1c60607c4/parser/ConfdbLoadParamsFromConfigsPy3.py#L703

@Martin-Grunewald how do I checkout and run ConfDB to see if that change is all that is needed?

@Martin-Grunewald
Copy link
Contributor Author

Martin-Grunewald commented May 29, 2024

Sorry, your reply is confusing: the py file is not even working with python3 <file>, because it does NOT contain
from Alignment.CommonAlignment.APVModeFilter import APVModeFilter
which is what I understand you advocate (import numpy.foo.bar).

Could you please clarify?

@Martin-Grunewald
Copy link
Contributor Author

Can we make python3 file working first?

@Dr15Jones
Copy link
Contributor

So I did

source /cvmfs/cms.cern.ch/cmsset_default.csh 
scram project CMSSW_14_1_0_pre4
cd CMSSW_14_1_0_pre4
cmsenv
python3
Python 3.9.14 (main, Apr 29 2024, 23:37:22) 
[GCC 12.3.1 20230527] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from Alignment.CommonAlignment.APVModeFilter import APVModeFilter
>>> print(APVModeFilter)
<function APVModeFilter at 0x7f5c4e148af0>

@Dr15Jones
Copy link
Contributor

This also works

[cdj@cmslpc-el8-heavy01 CMSSW_14_1_0_pre4]$ python3
Python 3.9.14 (main, Apr 29 2024, 23:37:22) 
[GCC 12.3.1 20230527] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from Alignment.CommonAlignment.modules import APVModeFilter
>>> print(APVModeFilter)
<FWCore.ParameterSet.ModulesProxy._ModuleProxy object at 0x7fae552169d0>

@Martin-Grunewald
Copy link
Contributor Author

Martin-Grunewald commented May 29, 2024

What I mean is that this should work:

python3 $CMSSW_RELEASE_BASE/cfipython/el8_amd64_gcc12/Alignment/CommonAlignment/apvModeFilter_cfi.py

which no longer works in pre4 but does in pre3.

@Dr15Jones
Copy link
Contributor

What I mean is that this should work:
python3 $CMSSW_RELEASE_BASE/cfipython/el8_amd64_gcc12/Alignment/CommonAlignment/apvModeFilter_cfi.py

I'm afraid I disagree. What is intended to work is

python3 -m Alignment.CommonAlignment.apvModeFilter_cfi

i.e. the exact syntax you are required to use in an import statement. This is how files within a python module are supposed to work.

@Martin-Grunewald
Copy link
Contributor Author

That's great, so you removed functionality which worked in the past and tell me that is how it's supposed to be? Seriously?

@makortel
Copy link
Contributor

@Martin-Grunewald Could you comment if the edmMakeDummyCfis.py script added in #44424, that was specifically intended to decoupling ConfDB import from cfi file implementation, would help?

@Dr15Jones
Copy link
Contributor

So with the following changes to ConfdbLoadParamsFromConfigsPy3.py one can parse all files except one, and I have a PR fixing that one #45094

@@ -698,12 +705,8 @@ class ConfdbLoadParamsfromConfigs:
         thesubsystem = thesubsystempackage.split('/')[0]
         thepackage = thesubsystempackage.split('/')[1]
 
-        importcommand = ""
-        if(usepythonsubdir == True):
-            importcommand = "import " + thesubsystem + "." + thepackage + "." + thecomponent
-        else:    
-            importcommand = "import " + thecomponent 
-            sys.path.append(pydir)
+        importcommand = "import " + thesubsystem + "." + thepackage + "." + thecomponent
+        #sys.path.append(pydir)
@@ -715,11 +718,7 @@ class ConfdbLoadParamsfromConfigs:
         self.VerbosePrint(importcommand,1)
         exec(importcommand)
         # Now create a process and construct the command to extend it with the py-cfi
-        theextend = ""
-        if(usepythonsubdir == True):
-            theextend = "process.extend(" + thesubsystem + "." + thepackage + "." + thecomponent + ")"
-        else:
-            theextend = "process.extend(" + thecomponent + ")"
+        theextend = "process.extend(" + thesubsystem + "." + thepackage + "." + thecomponent + ")"
         self.VerbosePrint(theextend,1)
         eval(theextend)

To test this, I made additional changes to ConfdbLoadParamsFromConfigsPy3.py so that using the -n 0 option (which sets self.noload == True) stops all calls to the DB (instead of just some of them).

It would be good if there was an actual way to test the parsing without having to also use the DB.

@Martin-Grunewald
Copy link
Contributor Author

Martin-Grunewald commented May 30, 2024

Thanks a lot @Dr15Jones for looking at this and providing the fixes.
Could you please put the file somehwere for me to pick up, also with the -n 0 changes?
And concerning the parsing without using the DB, do you mean something else beyond the -n 0 changes is needed?

Given the above change is a simplification, I now wonder why the original had been coded cumbersome like that with the if-then-else alternative. And then I worry about backward compatibility, ie, parsing an old (say 14_0) release with the changes above is expected to yield the same results?

@Dr15Jones
Copy link
Contributor

Could you please put the file somehwere for me to pick up, also with the -n 0 changes?

I put it on lxplus at ~cdj/public/ConfdbLoadParamsFromConfigsPy3.py . Let me know if that isn't actually public.

And concerning the parsing without using the DB, do you mean something else beyond the -n 0 changes is needed?

It would be nice if the code were more factorized so that the parsing part could be tested completely independent of the part that reads/writes to the DB. That could allow full testing of the parser in CMSSW possibly.

Given the above change is a simplification, I now wonder why the original had been coded cumbersome like that with the if-then-else alternative. And then I worry about backward compatibility, ie, parsing an old (say 14_0) release with the changes above is expected to yield the same results?

As long as there were not two identically named files in the same package (one under cfipython and the other under python) this change should be transparent. In fact, it is actually better than what was done before as it now exactly mimics the behavior cmsRun (and python3 using the standard scram setup PYTHON3PATH) has always done when looking for python modules.

@Martin-Grunewald
Copy link
Contributor Author

Thanks a lot for the file (found it under ~chrjones/public/ConfdbLoadParamsFromConfigsPy3.py on lxplus at CERN).

@Martin-Grunewald
Copy link
Contributor Author

With -n 0 it works for me. Without it, I get an error:

Traceback (most recent call last):
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 1881, in <module>
    main(sys.argv[1:])
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 191, in main
    confdbjob.BeginJob()
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 489, in BeginJob
    self.ExtendTheCfi(validatedpyfile, validatedpydir, allowmultiplecfis, usepythonsubdir)
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 727, in ExtendTheCfi
    self.FindParamsFromPython(thesubsystem, thepackage, myproducers,"EDProducer", allowmultiplecfis)
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 915, in FindParamsFromPython
    self.LoadUpdateParam(paramname,psetname,paramval,componentsuperid)
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 1203, in LoadUpdateParam
    parametervalue = pval.value()
AttributeError: 'EventID' object has no attribute 'value'

Increasing verbosity level to -v 3 The relevant log shows:

Extending the python cfi file producerWithPSetDesc_cfi.py
import FWCore.Integration.producerWithPSetDesc_cfi
process.extend(FWCore.Integration.producerWithPSetDesc_cfi)
(EDProducer ProducerWithPSetDesc) FWCore.Integration.producerWithPSetDesc
SELECT a.id, a.name, a.cvstag, a.id_pkg FROM u_moduletemplates a, u_modt2rele c  WHERE c.id_release=121 AND a.name = 'ProducerWithPSetDesc' AND c.id_modtemplate=a.id
INSERT INTO u_moduletemplates(id_mtype, name, cvstag, id_pkg) VALUES ( 1, 'ProducerWithPSetDesc', 'a814bb63bde86f960fb889dd66d86ac3', '130')
SELECT * from u_modtelements WHERE id_modtemplate = 261514 ORDER BY id 
The last inserted sequenceNb for this component was -1
The first parameter will be inserted with sequenceNb 0
                TopLevel.testingAutoGeneratedCfi        cms.untracked.bool(True)
Added testingAutoGeneratedCfi with paramId = -6650
                TopLevel.p_int  cms.int32(3)
Added p_int with paramId = -6651
                TopLevel.p_int_untracked        cms.untracked.int32(-2147483647)
Added p_int_untracked with paramId = -6652
                TopLevel.p_int_opt      cms.int32(0)
Added p_int_opt with paramId = -6653
                TopLevel.p_int_optuntracked     cms.untracked.int32(7)
Added p_int_optuntracked with paramId = -6654
                TopLevel.p_int_opt_nd   cms.optional.int32
        Ignoring unknown parameter type _OptionalParameter
                TopLevel.p_int_optuntracked_nd  cms.optional.untracked.int32
        Ignoring unknown parameter type _OptionalParameter
                TopLevel.vint1  cms.vint32()
Added vint1 with paramId = -6655
                TopLevel.vint2  cms.vint32(2147483647)
Added vint2 with paramId = -6656
                TopLevel.vint3  cms.vint32(2147483647, -2147483647)
Added vint3 with paramId = -6657
                TopLevel.vint4  cms.vint32(2147483647, -2147483647, 0)
Added vint4 with paramId = -6658
                TopLevel.uint1  cms.uint32(4294967295)
Added uint1 with paramId = -6659
                TopLevel.uint2  cms.untracked.uint32(0)
Added uint2 with paramId = -6660
                TopLevel.vuint1 cms.vuint32()
Added vuint1 with paramId = -6661
                TopLevel.vuint2 cms.vuint32(4294967295)
Added vuint2 with paramId = -6662
                TopLevel.vuint3 cms.vuint32(4294967295, 0)
Added vuint3 with paramId = -6663
                TopLevel.vuint4 cms.vuint32(4294967295, 0, 11)
Added vuint4 with paramId = -6664
                TopLevel.vuint5 cms.vuint32(
    4294967295, 0, 11, 21, 31,
    41
)
Added vuint5 with paramId = -6665
                TopLevel.int64v1        cms.int64(9000000000000000000)
Added int64v1 with paramId = -6666
                TopLevel.int64v2        cms.int64(-9000000000000000000)
Added int64v2 with paramId = -6667
                TopLevel.int64v3        cms.int64(0)
Added int64v3 with paramId = -6668
                TopLevel.vint64v1       cms.vint64()
Added vint64v1 with paramId = -6669
                TopLevel.vint64v2       cms.vint64(9000000000000000000)
Added vint64v2 with paramId = -6670
                TopLevel.vint64v3       cms.vint64(9000000000000000000, -9000000000000000000)
Added vint64v3 with paramId = -6671
                TopLevel.vint64v4       cms.vint64(9000000000000000000, -9000000000000000000, 0)
Added vint64v4 with paramId = -6672
                TopLevel.uint64v1       cms.uint64(18000000000000000000)
Added uint64v1 with paramId = -6673
                TopLevel.uint64v2       cms.untracked.uint64(0)
Added uint64v2 with paramId = -6674
                TopLevel.vuint64v1      cms.vuint64()
Added vuint64v1 with paramId = -6675
                TopLevel.vuint64v2      cms.vuint64(18000000000000000000)
Added vuint64v2 with paramId = -6676
                TopLevel.vuint64v3      cms.vuint64(18000000000000000000, 0)
Added vuint64v3 with paramId = -6677
                TopLevel.vuint64v4      cms.vuint64(18000000000000000000, 0, 11)
Added vuint64v4 with paramId = -6678
                TopLevel.doublev1       cms.double(2.2250738585072014e-308)
Added doublev1 with paramId = -6679
                TopLevel.doublev2       cms.untracked.double(0)
Added doublev2 with paramId = -6680
                TopLevel.doublev3       cms.untracked.double(0.3)
Added doublev3 with paramId = -6681
                TopLevel.vdoublev1      cms.vdouble()
Added vdoublev1 with paramId = -6682
                TopLevel.vdoublev2      cms.vdouble(1e+300)
Added vdoublev2 with paramId = -6683
                TopLevel.vdoublev3      cms.vdouble(1e+300, 0)
Added vdoublev3 with paramId = -6684
                TopLevel.vdoublev4      cms.vdouble(1e+300, 0, 11)
Added vdoublev4 with paramId = -6685
                TopLevel.vdoublev5      cms.vdouble(1e+300, 0, 11, 0.3)
Added vdoublev5 with paramId = -6686
                TopLevel.boolv1 cms.bool(True)
Added boolv1 with paramId = -6687
                TopLevel.boolv2 cms.bool(False)
Added boolv2 with paramId = -6688
                TopLevel.stringv1       cms.string('Hello')
Added stringv1 with paramId = -6689
                TopLevel.stringv2       cms.string('')
Added stringv2 with paramId = -6690
                TopLevel.vstringv1      cms.vstring()
Added vstringv1 with paramId = -6691
                TopLevel.vstringv2      cms.vstring('Hello')
Added vstringv2 with paramId = -6692
                TopLevel.vstringv3      cms.vstring(
    'Hello',
    'World'
)
Added vstringv3 with paramId = -6693
                TopLevel.vstringv4      cms.vstring(
    'Hello',
    'World',
    ''
)
Added vstringv4 with paramId = -6694
                TopLevel.eventIDv1      cms.EventID(11, 0, 12)
Traceback (most recent call last):
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 1881, in <module>
    main(sys.argv[1:])
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 191, in main
    confdbjob.BeginJob()
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 489, in BeginJob
    self.ExtendTheCfi(validatedpyfile, validatedpydir, allowmultiplecfis, usepythonsubdir)
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 727, in ExtendTheCfi
    self.FindParamsFromPython(thesubsystem, thepackage, myproducers,"EDProducer", allowmultiplecfis)
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 915, in FindParamsFromPython
    self.LoadUpdateParam(paramname,psetname,paramval,componentsuperid)
  File "/data/user/gruen/ConfDb/CMSSW_14_1_0_pre4/hlt-confdb/parser/./ConfdbLoadParamsFromConfigsPy3.py", line 1203, in LoadUpdateParam
    parametervalue = pval.value()
AttributeError: 'EventID' object has no attribute 'value'

@Martin-Grunewald
Copy link
Contributor Author

Martin-Grunewald commented May 30, 2024

The generated cfi file has: eventIDv1 = (11, 0, 12),
which in (pure) python3 is a tuple object which does not have an attribute value as called by the parsing code.
But the above shows it does use cms.EventID(11,0,12)
??

@Dr15Jones
Copy link
Contributor

@Martin-Grunewald yeah, to make the -n 0 option run to completion, I had to make it skip any parts that were intertwined with calls to the DB (in that case doing comparisons) so it didn't do the full activity.

I looked at cms.EventID and, indeed, it has no value member (neither do a host of other parameter types such as LuminosityBlockID, EventRangeID, and LuminosityBlockRange). So this must be the first time this code has tried to parse such a type.

How do you want to proceed?

@Dr15Jones
Copy link
Contributor

Note, you could easily blacklist FWCore.Integration.producerWithPSetDesc. That module is explicitly only for testing all possible parameter set types we have in the system and is not used for anything else. (i.e. if we had a stand alone test of the parser that just tried to parse that one file it should cover all cases).

@Dr15Jones
Copy link
Contributor

A trivial workaround would be to change line 1204 from

parametervalue = pval.value()

to

if hasattr(pval, "value"):
   parametervalue = pval.value()
else:
   parametervalue = ""

@Dr15Jones
Copy link
Contributor

Dr15Jones commented May 30, 2024

Another option would be to remove EventID from self.paramtypedict as it was never able to actually store a value from it.

To do that line 328-329 could probably be changed from

            for temptype, tempname in temptuple:
	        self.paramtypedict[temptype] = tempname

to

            for temptype, tempname in temptuple:
	        if temptype != 'EventID':
  	            self.paramtypedict[temptype] = tempname

@Dr15Jones
Copy link
Contributor

Dr15Jones commented May 30, 2024

I've extended the other python parameters to have a value() method. See #45108

@Martin-Grunewald
Copy link
Contributor Author

Martin-Grunewald commented May 30, 2024

Thanks for this, for now/to test, I blacklisted in the code the files. Apart from the duplicate file (cfipython and python) you found, I see that the parsing makes changes to the three following modules (comparing pre3 to pre4 and migrating the HLT menu from pre3 to pre4):

-------------------------------------------------------------------------------
ESModules (1):
  -> CaloTowerTopologyEP [CaloTowerTopologyEP] CHANGED
       string appendToDataLabel = "" [REMOVED]

-------------------------------------------------------------------------------
Modules (2):
  -> hltGtStage2Digis [L1TRawToDigi] CHANGED
       untracked bool debug = false [REMOVED]
       uint32 MinFeds = 0 [REMOVED]
       untracked bool CTP7 = false [REMOVED]
       untracked bool MTF7 = false [REMOVED]
       uint32 DmxFWId = 0 [REMOVED]
  -> hltL1TGlobalSummary [L1TGlobalSummary] CHANGED
       string psFileName = "prescale_L1TGlobal.csv" [REMOVED]
       int32 psColumn = 0 [REMOVED]

which is UNexpected.

It seems for these three modules, there are py files with the same name in cfipython and python also.
And then it seems the variant in python now takes precedence (which do not contain the above parameters which are hence removed).

@Dr15Jones
Copy link
Contributor

It seems for these three modules, there are py files with the same name in cfipython and python also.
And then it seems the variant in python now takes precedence (which do not contain the above parameters which are hence removed).

The precedence of /python over cfipython has always been the case when doing an import from either cmsRun or python3 (so no the ConfigDB parser is being consistent with the other two).

I'm planning on opening an issue to make it a 'build' error if the same file name appears in cfipython and \python because of the confusion it causes. As a prelude, I'll see if I can get rid of the duplicate files you found.

@Martin-Grunewald
Copy link
Contributor Author

cat $CMSSW_RELEASE_BASE/src/Geometry/HcalEventSetup/python/CaloTowerTopology_cfi.py
cat $CMSSW_RELEASE_BASE/cfipython/el8_amd64_gcc12/Geometry/HcalEventSetup/CaloTowerTopology_cfi.py

cat $CMSSW_RELEASE_BASE/src/EventFilter/L1TRawToDigi/python/l1tRawToDigi_cfi.py
cat $CMSSW_RELEASE_BASE/cfipython/el8_amd64_gcc12/EventFilter/L1TRawToDigi/l1tRawToDigi_cfi.py

cat $CMSSW_RELEASE_BASE/src/L1Trigger/L1TGlobal/python/L1TGlobalSummary_cfi.py
cat $CMSSW_RELEASE_BASE/cfipython/el8_amd64_gcc12/L1Trigger/L1TGlobal/L1TGlobalSummary_cfi.py

@Martin-Grunewald
Copy link
Contributor Author

In these cases the python variants are not the ones we want as they do not specify all parameters. But yes if they are made consistent or better, removed, that's great. Note this migration only checks modules actually used in the HLT...

@Dr15Jones
Copy link
Contributor

The duplicate _cfi.py files were removed in #45112.

@makortel
Copy link
Contributor

Have all the issues been resolved now? (i.e. can this issue be closed?)

@Martin-Grunewald
Copy link
Contributor Author

From my side, yes! Thanks all for support!

@makortel
Copy link
Contributor

Thanks!

@makortel
Copy link
Contributor

+core

@makortel
Copy link
Contributor

makortel commented Jul 11, 2024

@cmsbuild, please close

@cmsbuild
Copy link
Contributor

This issue is fully signed and ready to be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants