-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Discuss adding a clear method to Sequence #13194
Comments
A new Issue was created by @Dr15Jones (Chris Jones). @davidlange6, @smuzaffar, @Degano, @davidlt, @Dr15Jones can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
assign core |
New categories assigned: core @Dr15Jones,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks |
@makortel Can you give the use case where you want to do a |
It comes from my third prototype for using eras to switch tracking configuration for phase1:
I need to clear and re-use the existing object e.g. here
but that doesn't do the job at all, i.e. what ends up as the I also tried
and now
i.e. parts of the original Removing each element of Sequence (as in my prototype) works, but is not too handy (especially as I don't know any other way to do it in this specific case than removing each element explicitly). Of course if there is a better way to do the job than what I have in my prototype I'm all ears. |
I'm thinking the |
It appears that the problem you were having stems from process.load("RecoTracker.FinalTrackSelectors.Phase1PU70_preDuplicateMergingGeneralTracks_cfi") # too different from Run2 that patching with era makes no sense I think the following should have worked def _modifyForPhase1(process):
from RecoTracker.FinalTrackSelectors.Phase1PU70_preDuplicateMergingGeneralTracks_cfi import preDuplicateMergingGeneralTracks as _phase1PU70Version
process.preDuplicateMergingGeneralTracks = _phase1PU70Version A better solution would be for me to add a _phase1PU70Version = ...
eras.phase1Pixel.replaceWith( preDuplicateMergingGeneralTracks, _phase1PU70Version) |
I understood your suggestion such that instead of wrapping
I tried that, and but the Could it be that replacing |
Ok, I can give a try with that tomorrow :) |
I'm not trying to put you on the spot. I'm very willing to "roll up my sleeves" and try myself. :). The concrete examples are very helpful for a place to start :). |
Thanks. You should be able to repeat what I'm doing by taking CMSSW_8_0_X_2016-01-26-1100...makortel:phase1EraMinimal_v3_2 to any IB later than CMSSW_8_0_X_2016-01-26-1100. I'm using /afs/cern.ch/user/m/mkortela/public/phase1/step3_reco.py as the job configuration, but I guess that in any post-#12806 IB the step3 of |
I tried building the code with your changes but the shear number of packages that |
Weird, makortel:phase1EraMinimal_v3_2 should not change that many thins other places depend on. |
Based on your private suggestion, I decided to ditch the ProcessModifier approach in the phase1EraMinimal_v3_2, and made another prototype with I feel this approach was much more straightforward to implement (and debug) than ProcessModifier, although it "pollutes" the module namespaces with Phase1PU70-specific stuff (TobTecStep being the worst https://github.com/makortel/cmssw/blob/790db6791248586df6b65c11b48dc103732e85d5/RecoTracker/IterativeTracking/python/TobTecStep_cff.py ). Thanks to |
I've also been exploring not using ProcessModifier based on your initial prototype I'm not all the way through the modifications but I thought people might be interested in the change. It is likely close to what Matti has done. |
I did finish my version of the change |
Thanks Chris. I see our final results are conceptually the same (with some differences in implementation). Regarding the related issues #13210 (use dict to modify nested PSet parameters) would indeed be useful, and #13209 (use None to remove a parameter) would also be nice, but not strictly necessary. In my "v3" prototype I did delete certain parameters so they would get their default value, but the same effect can, in this specific case, be achieved by other means too. The only remaining big question (to me) is then "with |
-1 |
A request has been made to add a
clear()
method to the python Sequence class.The text was updated successfully, but these errors were encountered: