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
Migrate VID BDTs to GlobalCache + GBRForest (76X) #10618
Conversation
A new Pull Request was created by @lgray (Lindsey Gray) for CMSSW_7_6_X. Migrate VID BDTs to GlobalCache + GBRForest (76X) It involves the following packages: RecoEgamma/EgammaTools @cmsbuild, @cvuosalo, @slava77 can you please review it and eventually sign? Thanks. |
@cmsbuild please test |
The tests are being triggered in jenkins. |
<< " EoP " << _allMVAVars.EoP | ||
<< " IoEmIoP " << _allMVAVars.IoEmIoP | ||
<< " eleEoPout " << _allMVAVars.eleEoPout | ||
<< " fbrem " << vars[11] //_allMVAVars.fbrem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at this somewhat crazy implementation, I'm thinking if it were better to move to TMVAEvaluator ?
How many lines of code and places need to change if one is to insert a new variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TMVA evaluator isn't threadsafe.
-L
(Sent from my Nexus 6)
On Aug 7, 2015 19:18, "Slava Krutelyov" notifications@github.com wrote:
In
RecoEgamma/ElectronIdentification/plugins/ElectronMVAEstimatorRun2Phys14NonTrig.cc
#10618 (comment):
<< " mykfhits " << _allMVAVars.kfhits
<< " gsfchi2 " << _allMVAVars.gsfchi2
<< " deta " << _allMVAVars.deta
<< " dphi " << _allMVAVars.dphi
<< " detacalo " << _allMVAVars.detacalo
<< " see " << _allMVAVars.see
<< " spp " << _allMVAVars.spp
<< " etawidth " << _allMVAVars.etawidth
<< " phiwidth " << _allMVAVars.phiwidth
<< " OneMinusE1x5E5x5 " << _allMVAVars.OneMinusE1x5E5x5
<< " R9 " << _allMVAVars.R9
<< " HoE " << _allMVAVars.HoE
<< " EoP " << _allMVAVars.EoP
<< " IoEmIoP " << _allMVAVars.IoEmIoP
<< " eleEoPout " << _allMVAVars.eleEoPout
<< " fbrem " << vars[11] //_allMVAVars.fbrem
looking at this somewhat crazy implementation, I'm thinking if it were
better to move to TMVAEvaluator ?
How many lines of code and places need to change if one is to insert a new
variable.—
Reply to this email directly or view it on GitHub
https://github.com/cms-sw/cmssw/pull/10618/files#r36539926.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take a look at #10543 .. maybe we can merge to something that fits both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, my concern here was mostly manual indexing. Maybe define enums instead?
The current row of vars[magic number]
looks pretty bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This for a debug statement. I don't use magic numbers in the rest of the
code.
-L
(Sent from my Nexus 6)
On Aug 7, 2015 19:31, "Slava Krutelyov" notifications@github.com wrote:
In
RecoEgamma/ElectronIdentification/plugins/ElectronMVAEstimatorRun2Phys14NonTrig.cc
#10618 (comment):
<< " mykfhits " << _allMVAVars.kfhits
<< " gsfchi2 " << _allMVAVars.gsfchi2
<< " deta " << _allMVAVars.deta
<< " dphi " << _allMVAVars.dphi
<< " detacalo " << _allMVAVars.detacalo
<< " see " << _allMVAVars.see
<< " spp " << _allMVAVars.spp
<< " etawidth " << _allMVAVars.etawidth
<< " phiwidth " << _allMVAVars.phiwidth
<< " OneMinusE1x5E5x5 " << _allMVAVars.OneMinusE1x5E5x5
<< " R9 " << _allMVAVars.R9
<< " HoE " << _allMVAVars.HoE
<< " EoP " << _allMVAVars.EoP
<< " IoEmIoP " << _allMVAVars.IoEmIoP
<< " eleEoPout " << _allMVAVars.eleEoPout
<< " fbrem " << vars[11] //_allMVAVars.fbrem
well, my concern here was mostly manual indexing. Maybe define enums
instead?
The current row of vars[magic number] looks pretty bad—
Reply to this email directly or view it on GitHub
https://github.com/cms-sw/cmssw/pull/10618/files#r36541165.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retract that. OK I'll add some enums later.
-L
(Sent from my Nexus 6)
On Aug 7, 2015 19:33, "Lindsey Gray" lindsey.gray@gmail.com wrote:
This for a debug statement. I don't use magic numbers in the rest of the
code.-L
(Sent from my Nexus 6)
On Aug 7, 2015 19:31, "Slava Krutelyov" notifications@github.com wrote:In
RecoEgamma/ElectronIdentification/plugins/ElectronMVAEstimatorRun2Phys14NonTrig.cc
#10618 (comment):
<< " mykfhits " << _allMVAVars.kfhits
<< " gsfchi2 " << _allMVAVars.gsfchi2
<< " deta " << _allMVAVars.deta
<< " dphi " << _allMVAVars.dphi
<< " detacalo " << _allMVAVars.detacalo
<< " see " << _allMVAVars.see
<< " spp " << _allMVAVars.spp
<< " etawidth " << _allMVAVars.etawidth
<< " phiwidth " << _allMVAVars.phiwidth
<< " OneMinusE1x5E5x5 " << _allMVAVars.OneMinusE1x5E5x5
<< " R9 " << _allMVAVars.R9
<< " HoE " << _allMVAVars.HoE
<< " EoP " << _allMVAVars.EoP
<< " IoEmIoP " << _allMVAVars.IoEmIoP
<< " eleEoPout " << _allMVAVars.eleEoPout
<< " fbrem " << vars[11] //_allMVAVars.fbrem
well, my concern here was mostly manual indexing. Maybe define enums
instead?
The current row of vars[magic number] looks pretty bad—
Reply to this email directly or view it on GitHub
https://github.com/cms-sw/cmssw/pull/10618/files#r36541165.
Or, I should say it is threadsafe but you pay for the mutex. Likewise tmva evaluator doesn't yet support gbrforest which is another point of this pr. |
Ah, didn't see it that pr. Would rather bring that in as an upgrade later. |
Don't we also pay a heavy memory tax for TMVA since we switched to ROOT 6? |
And indeed, changing TMVA evaluatour to be reentrant may require some work. It is pretty stateful right now. Would definitely prefer to bring as an update in a later PR. Switching now would degrade memory use and thread efficiency in threaded mode. |
nothing in tmva is different in root6…
|
I thought TMVA used the internal ROOT 'TFormula' which under the hood used CINT in ROOT5 and now cling in ROOT 6. So TMVA itself didn't change but I thought what it depends on did. |
allMVAVars.etawidth, | ||
allMVAVars.phiwidth, | ||
allMVAVars.HoE, | ||
allMVAVars.kfchi2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this ~20-line copy-paste with only one line change is yet another poorly maintainable piece.
// Call this function once per event to retrieve all needed | ||
// event content pices | ||
void getEventContent(const edm::Event& iEvent) override; | ||
// DEPRECATED | ||
// void getEventContent(const edm::Event& iEvent) const override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deprecated and commented out means it's not needed anymore and can be removed.
What about other "DEPRECATED" that are still used??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's final in the base class, can't override it anymore.
(Sent from my Nexus 6)
On Aug 7, 2015 8:33 PM, "Slava Krutelyov" notifications@github.com wrote:
In
RecoEgamma/PhotonIdentification/interface/PhotonMVAEstimatorRun2Phys14NonTrig.h
#10618 (comment):// Call this function once per event to retrieve all needed
// event content pices
- void getEventContent(const edm::Event& iEvent) override;
- // DEPRECATED
- // void getEventContent(const edm::Event& iEvent) const override;
deprecated and commented out means it's not needed anymore and can be
removed.
What about other "DEPRECATED" that are still used??—
Reply to this email directly or view it on GitHub
https://github.com/cms-sw/cmssw/pull/10618/files#r36547535.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it here, then?
+1
|
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar |
+1 |
Migrate VID BDTs to GlobalCache + GBRForest (76X)
Forward port of #10556.