Skip to content

Conversation

@ashlaban
Copy link
Contributor

@ashlaban ashlaban commented Apr 17, 2018

Based on PR #858. Implements only parts relevant for CV.

Rudimentary performance benchmark with ~60000 events with 2-fold CV

Multiproc: root -l -b -q TMVACrossValidation.C  15.82s user 0.46s system 152% cpu 10.679 total
Standard: root -l -b -q TMVACrossValidation.C  14.31s user 0.25s system 99% cpu 14.652 total

Which translates into a 4 second speed up.

A different example, with a deeper bdt forest and 10-fold CV, almost halves the required time on my machine :)

Single     : root -l -b -q TMVACrossValidation.C  33.66s user 1.99s system 98%  cpu 36.369 total
Multiproc 2: root -l -b -q TMVACrossValidation.C  39.14s user 2.68s system 167% cpu 25.016 total
Multiproc 4: root -l -b -q TMVACrossValidation.C  46.52s user 3.50s system 233% cpu 21.420 total

For the second example, these changes to TMVACrossValidation.C were used.

/* ...snip... */
TString cvOptions = Form("!V:NumWorkerProcs=4"
/* ...snip... */
cv.BookMethod(TMVA::Types::kBDT, "BDTG",
              "!H:!V:NTrees=1000:MinNodeSize=2.5%:BoostType=Grad"
              ":NegWeightTreatment=Pray:Shrinkage=0.10:nCuts=20"
              ":MaxDepth=6");
/* ...snip... */
// cv.BookMethod(TMVA::Types::kFisher, "Fisher",
//               "!H:!V:Fisher:VarTransform=None");
/* ...snip... */

@ashlaban ashlaban requested a review from lmoneta as a code owner April 17, 2018 12:21
@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1013/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu16/native, ubuntu16/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

When doing CV, we reuse the same DataSet (and the corresponding list of
results). Thus we need to empty the DataSet results between folds.
A convenient way of doing this was missing.
In CV, there was a bug causing erroneous results to be added to the
DataSet (where the size of those results where smaller than what was
expected).
Sometimes, methods can add extra results to the DataSet. E.g. if
`CreateMvaPDFs` is specified. This was not correctly picked up by CV.
- Variable renaming ce -> cv.
- Remove extraneous text output from method logs.
@ashlaban ashlaban requested a review from couet as a code owner April 18, 2018 12:55
@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1013/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu16/native, ubuntu16/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@ashlaban ashlaban requested a review from amadio as a code owner April 20, 2018 18:10
@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1013/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu16/native, ubuntu16/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Warnings:

  • include/TMVA/Config.h:145:26: warning: ‘TMVA::Config::fLogger’ will be initialized after [-Wreorder]
  • include/TMVA/Config.h:137:27: warning: ‘std::atomic<unsigned int> TMVA::Config::fNWorkers’ [-Wreorder]
  • ../root/tmva/tmva/src/Config.cxx:56:1: warning: when initialized here [-Wreorder]
  • ../root/tmva/tmva/test/crossvalidation/TestCrossValidationMultiProc.cxx:59:54: warning: declaration of ‘using clock_t = using high_resolution_clock = struct std::chrono::_V2::system_clock’ shadows a global declaration [-Wshadow]

Failing tests:

@phsft-bot
Copy link

Build failed on ubuntu16/native.
See console output.

Warnings:

  • include/TMVA/Config.h:145:26: warning: ‘TMVA::Config::fLogger’ will be initialized after [-Wreorder]
  • include/TMVA/Config.h:137:27: warning: ‘std::atomic<unsigned int> TMVA::Config::fNWorkers’ [-Wreorder]
  • /mnt/build/workspace/root-pullrequests-build/root/tmva/tmva/src/Config.cxx:56:1: warning: when initialized here [-Wreorder]
  • /mnt/build/workspace/root-pullrequests-build/root/tmva/tmva/test/crossvalidation/TestCrossValidationMultiProc.cxx:59:54: warning: declaration of ‘using clock_t = using high_resolution_clock = struct std::chrono::_V2::system_clock’ shadows a global declaration [-Wshadow]

Failing tests:

@phsft-bot
Copy link

Build failed on mac1013/native.
See console output.

Warnings:

  • /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tree:1819:22: warning: the specified comparator type does not provide a const call operator [-Wuser-defined-warnings]
  • /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tree:1819:22: warning: the specified comparator type does not provide a const call operator [-Wuser-defined-warnings]
  • /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tree:1819:22: warning: the specified comparator type does not provide a const call operator [-Wuser-defined-warnings]
  • /Volumes/MacintoshHD/build/jenkins/workspace/root-pullrequests-build/root/tmva/tmva/src/Config.cxx:61:4: warning: field 'fLogger' will be initialized after field 'fNWorkers' [-Wreorder]
  • /Volumes/MacintoshHD/build/jenkins/workspace/root-pullrequests-build/root/tmva/tmva/test/crossvalidation/TestCrossValidationMultiProc.cxx:59:10: warning: declaration shadows a typedef in the global namespace [-Wshadow]

Failing tests:

@lmoneta
Copy link
Member

lmoneta commented Apr 25, 2018

@phsft-bot build

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1013/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu16/native, ubuntu16/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Build failed on centos7/gcc49.
See console output.

Warnings:

  • include/TMVA/Config.h:145:26: warning: ‘TMVA::Config::fLogger’ will be initialized after [-Wreorder]
  • include/TMVA/Config.h:137:27: warning: ‘std::atomic<unsigned int> TMVA::Config::fNWorkers’ [-Wreorder]
  • ../root/tmva/tmva/src/Config.cxx:56:1: warning: when initialized here [-Wreorder]
  • ../root/tmva/tmva/test/crossvalidation/TestCrossValidationMultiProc.cxx:59:54: warning: declaration of ‘using clock_t = using high_resolution_clock = struct std::chrono::_V2::system_clock’ shadows a global declaration [-Wshadow]

Failing tests:

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1013/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu16/native, ubuntu16/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Build failed on mac1013/native.
See console output.

Warnings:

  • /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tree:1819:22: warning: the specified comparator type does not provide a const call operator [-Wuser-defined-warnings]
  • /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tree:1819:22: warning: the specified comparator type does not provide a const call operator [-Wuser-defined-warnings]
  • /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tree:1819:22: warning: the specified comparator type does not provide a const call operator [-Wuser-defined-warnings]

@phsft-bot
Copy link

Build failed on centos7/gcc49.
See console output.

Failing tests:

@lmoneta
Copy link
Member

lmoneta commented Apr 27, 2018

@phsft-bot build

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1013/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu16/native, ubuntu16/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

@phsft-bot
Copy link

Build failed on ubuntu16/native.
See console output.

Failing tests:

@lmoneta lmoneta merged commit ad91ce2 into root-project:master Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants