{"action":"created","comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/36684350","id":36684350,"diff_hunk":"@@ -60,54 +72,30 @@ MVAValueMapProducer<ParticleType>::MVAValueMapProducer(const edm::ParameterSet&\n   srcMiniAOD_ = mayConsume<edm::View<ParticleType> >(iConfig.getParameter<edm::InputTag>(\"srcMiniAOD\"));\n \n   // Loop over the list of MVA configurations passed here from python and\n-  // construct all requested MVA esimtators.\n-  const std::vector<edm::ParameterSet>& mvaEstimatorConfigs\n-    = iConfig.getParameterSetVector(\"mvaConfigurations\");\n-  for( auto &imva : mvaEstimatorConfigs ){\n-\n-    std::unique_ptr<AnyMVAEstimatorRun2Base> thisEstimator;\n-    thisEstimator.reset(NULL);\n-    if( !imva.empty() ) {\n-      const std::string& pName = imva.getParameter<std::string>(\"mvaName\");\n-      // The factory below constructs the MVA of the appropriate type based\n-      // on the \"mvaName\" which is the name of the derived MVA class (plugin)\n-      AnyMVAEstimatorRun2Base *estimator = AnyMVAEstimatorRun2Factory::get()->create(pName, imva);\n-      // Declare all event content, such as ValueMaps produced upstream or other,\n-      // original event data pieces, that is needed (if any is implemented in the specific\n-      // MVA classes)\n-      //edm::ConsumesCollector &cc = consumesCollector();\n-      estimator->setConsumes( consumesCollector() );\n-\n-      thisEstimator.reset(estimator);\n-      \n-    } else \n-      throw cms::Exception(\" MVA configuration not found: \")\n-\t<< \" failed to find proper configuration for one of the MVAs in the main python script \" << std::endl;\n-\n-    // The unique pointer control is passed to the vector in the line below.\n-    // Don't use thisEstimator pointer beyond the next line.\n-    mvaEstimators_.emplace_back( thisEstimator.release() );\n-\n+  // construct all requested MVA esimtators.  \n+  const auto& all_mvas = mva_cache->allMVAs();\n+  for( auto mvaItr = all_mvas.begin(); mvaItr != all_mvas.end(); ++mvaItr ) {\n+    // set the consumes\n+    mvaItr->second->setConsumes(consumesCollector());\n     //\n     // Compose and save the names of the value maps to be produced\n     //\n-    const auto& currentEstimator = mvaEstimators_.back();\n-    std::string thisValueMapName = currentEstimator->getName() + \"Values\";\n-    std::string thisCategoriesMapName = currentEstimator->getName() + \"Categories\";\n+    const auto& currentEstimator = mvaItr->second;","path":"RecoEgamma/EgammaTools/interface/MVAValueMapProducer.h","position":102,"original_position":102,"commit_id":"ab65c7adf5c526c0459b4d5f539688037e2cf5f7","original_commit_id":"ab65c7adf5c526c0459b4d5f539688037e2cf5f7","user":{"login":"lgray","id":1068089,"avatar_url":"https://avatars.githubusercontent.com/u/1068089?v=3","gravatar_id":"","url":"https://api.github.com/users/lgray","html_url":"https://github.com/lgray","followers_url":"https://api.github.com/users/lgray/followers","following_url":"https://api.github.com/users/lgray/following{/other_user}","gists_url":"https://api.github.com/users/lgray/gists{/gist_id}","starred_url":"https://api.github.com/users/lgray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgray/subscriptions","organizations_url":"https://api.github.com/users/lgray/orgs","repos_url":"https://api.github.com/users/lgray/repos","events_url":"https://api.github.com/users/lgray/events{/privacy}","received_events_url":"https://api.github.com/users/lgray/received_events","type":"User","site_admin":false},"body":"@slava77 That is OK. The necessity of that commit seems to be dependent on\nclang versions. It is updated in the VID PR anyway.\n\nOn Mon, Aug 10, 2015 at 10:56 PM, Slava Krutelyov <notifications@github.com>\nwrote:\n\n> In RecoEgamma/EgammaTools/interface/MVAValueMapProducer.h\n> <https://github.com/cms-sw/cmssw/pull/10556#discussion_r36683452>:\n>\n> >      //\n> >      // Compose and save the names of the value maps to be produced\n> >      //\n> > -    const auto& currentEstimator = mvaEstimators_.back();\n> > -    std::string thisValueMapName = currentEstimator->getName() + \"Values\";\n> > -    std::string thisCategoriesMapName = currentEstimator->getName() + \"Categories\";\n> > +    const auto& currentEstimator = mvaItr->second;\n>\n> an equivalent of this commit is missing here\n> lgray@e87c12e\n> <https://github.com/lgray/cmssw/commit/e87c12ec391d39e393e5346d97d56a32919d6e42>\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/cms-sw/cmssw/pull/10556/files#r36683452>.\n>\n","created_at":"2015-08-10T21:03:53Z","updated_at":"2015-08-10T21:03:53Z","html_url":"https://github.com/cms-sw/cmssw/pull/10556#discussion_r36684350","pull_request_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/10556","_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/36684350"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/10556#discussion_r36684350"},"pull_request":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/10556"}}},"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/10556","id":41559675,"html_url":"https://github.com/cms-sw/cmssw/pull/10556","diff_url":"https://github.com/cms-sw/cmssw/pull/10556.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/10556.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/10556","number":10556,"state":"open","locked":false,"title":"Migrate VID BDTs to GlobalCache + GBRForest","user":{"login":"lgray","id":1068089,"avatar_url":"https://avatars.githubusercontent.com/u/1068089?v=3","gravatar_id":"","url":"https://api.github.com/users/lgray","html_url":"https://github.com/lgray","followers_url":"https://api.github.com/users/lgray/followers","following_url":"https://api.github.com/users/lgray/following{/other_user}","gists_url":"https://api.github.com/users/lgray/gists{/gist_id}","starred_url":"https://api.github.com/users/lgray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgray/subscriptions","organizations_url":"https://api.github.com/users/lgray/orgs","repos_url":"https://api.github.com/users/lgray/repos","events_url":"https://api.github.com/users/lgray/events{/privacy}","received_events_url":"https://api.github.com/users/lgray/received_events","type":"User","site_admin":false},"body":"Typical GBRForest + GlobalCache conversion, should see a nice memory reduction when running RECO+MiniAOD (but only in 75X and later, since there are no MVAs in the present 74X default VID).\r\nThis time for EGM MVA IDs, saw about 40MB reduction in RSS per converted BDT.\r\n\r\nValidated locally that for all MVA IDs the results before and after were the same.\r\n\r\n@gpetruc The PR for the IDs will come later today.\r\n@ikrav @cmkuo","created_at":"2015-08-04T11:29:52Z","updated_at":"2015-08-10T21:03:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d8c7eb078d0ba6aae1673979152d84e3ac7bac9","assignee":null,"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/50","html_url":"https://github.com/cms-sw/cmssw/milestones/Next%20CMSSW_7_4_X","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/50/labels","id":875803,"number":50,"title":"Next CMSSW_7_4_X","description":"","creator":{"login":"nclopezo","id":1944922,"avatar_url":"https://avatars.githubusercontent.com/u/1944922?v=3","gravatar_id":"","url":"https://api.github.com/users/nclopezo","html_url":"https://github.com/nclopezo","followers_url":"https://api.github.com/users/nclopezo/followers","following_url":"https://api.github.com/users/nclopezo/following{/other_user}","gists_url":"https://api.github.com/users/nclopezo/gists{/gist_id}","starred_url":"https://api.github.com/users/nclopezo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nclopezo/subscriptions","organizations_url":"https://api.github.com/users/nclopezo/orgs","repos_url":"https://api.github.com/users/nclopezo/repos","events_url":"https://api.github.com/users/nclopezo/events{/privacy}","received_events_url":"https://api.github.com/users/nclopezo/received_events","type":"User","site_admin":false},"open_issues":63,"closed_issues":1400,"state":"open","created_at":"2014-11-21T15:23:58Z","updated_at":"2015-08-10T20:11:09Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/10556/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/10556/comments","review_comment_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/10556/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/ab65c7adf5c526c0459b4d5f539688037e2cf5f7","head":{"label":"lgray:vid_mvas_global_cache_74X","ref":"vid_mvas_global_cache_74X","sha":"ab65c7adf5c526c0459b4d5f539688037e2cf5f7","user":{"login":"lgray","id":1068089,"avatar_url":"https://avatars.githubusercontent.com/u/1068089?v=3","gravatar_id":"","url":"https://api.github.com/users/lgray","html_url":"https://github.com/lgray","followers_url":"https://api.github.com/users/lgray/followers","following_url":"https://api.github.com/users/lgray/following{/other_user}","gists_url":"https://api.github.com/users/lgray/gists{/gist_id}","starred_url":"https://api.github.com/users/lgray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgray/subscriptions","organizations_url":"https://api.github.com/users/lgray/orgs","repos_url":"https://api.github.com/users/lgray/repos","events_url":"https://api.github.com/users/lgray/events{/privacy}","received_events_url":"https://api.github.com/users/lgray/received_events","type":"User","site_admin":false},"repo":{"id":11345764,"name":"cmssw","full_name":"lgray/cmssw","owner":{"login":"lgray","id":1068089,"avatar_url":"https://avatars.githubusercontent.com/u/1068089?v=3","gravatar_id":"","url":"https://api.github.com/users/lgray","html_url":"https://github.com/lgray","followers_url":"https://api.github.com/users/lgray/followers","following_url":"https://api.github.com/users/lgray/following{/other_user}","gists_url":"https://api.github.com/users/lgray/gists{/gist_id}","starred_url":"https://api.github.com/users/lgray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgray/subscriptions","organizations_url":"https://api.github.com/users/lgray/orgs","repos_url":"https://api.github.com/users/lgray/repos","events_url":"https://api.github.com/users/lgray/events{/privacy}","received_events_url":"https://api.github.com/users/lgray/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lgray/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/lgray/cmssw","forks_url":"https://api.github.com/repos/lgray/cmssw/forks","keys_url":"https://api.github.com/repos/lgray/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lgray/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lgray/cmssw/teams","hooks_url":"https://api.github.com/repos/lgray/cmssw/hooks","issue_events_url":"https://api.github.com/repos/lgray/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/lgray/cmssw/events","assignees_url":"https://api.github.com/repos/lgray/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/lgray/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/lgray/cmssw/tags","blobs_url":"https://api.github.com/repos/lgray/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lgray/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lgray/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/lgray/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lgray/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/lgray/cmssw/languages","stargazers_url":"https://api.github.com/repos/lgray/cmssw/stargazers","contributors_url":"https://api.github.com/repos/lgray/cmssw/contributors","subscribers_url":"https://api.github.com/repos/lgray/cmssw/subscribers","subscription_url":"https://api.github.com/repos/lgray/cmssw/subscription","commits_url":"https://api.github.com/repos/lgray/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/lgray/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/lgray/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/lgray/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/lgray/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/lgray/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lgray/cmssw/merges","archive_url":"https://api.github.com/repos/lgray/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lgray/cmssw/downloads","issues_url":"https://api.github.com/repos/lgray/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/lgray/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/lgray/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/lgray/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lgray/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/lgray/cmssw/releases{/id}","created_at":"2013-07-11T15:38:46Z","updated_at":"2014-06-25T06:00:50Z","pushed_at":"2015-08-10T15:16:34Z","git_url":"git://github.com/lgray/cmssw.git","ssh_url":"git@github.com:lgray/cmssw.git","clone_url":"https://github.com/lgray/cmssw.git","svn_url":"https://github.com/lgray/cmssw","homepage":"cms-sw.github.io/cmssw","size":815512,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"CMSSW_7_0_X"}},"base":{"label":"cms-sw:CMSSW_7_4_X","ref":"CMSSW_7_4_X","sha":"95252f0f00ff881ec48c01d66d13b429c3e81eaf","user":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars.githubusercontent.com/u/3863500?v=3","gravatar_id":"","url":"https://api.github.com/users/cms-sw","html_url":"https://github.com/cms-sw","followers_url":"https://api.github.com/users/cms-sw/followers","following_url":"https://api.github.com/users/cms-sw/following{/other_user}","gists_url":"https://api.github.com/users/cms-sw/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-sw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-sw/subscriptions","organizations_url":"https://api.github.com/users/cms-sw/orgs","repos_url":"https://api.github.com/users/cms-sw/repos","events_url":"https://api.github.com/users/cms-sw/events{/privacy}","received_events_url":"https://api.github.com/users/cms-sw/received_events","type":"Organization","site_admin":false},"repo":{"id":10969551,"name":"cmssw","full_name":"cms-sw/cmssw","owner":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars.githubusercontent.com/u/3863500?v=3","gravatar_id":"","url":"https://api.github.com/users/cms-sw","html_url":"https://github.com/cms-sw","followers_url":"https://api.github.com/users/cms-sw/followers","following_url":"https://api.github.com/users/cms-sw/following{/other_user}","gists_url":"https://api.github.com/users/cms-sw/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-sw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-sw/subscriptions","organizations_url":"https://api.github.com/users/cms-sw/orgs","repos_url":"https://api.github.com/users/cms-sw/repos","events_url":"https://api.github.com/users/cms-sw/events{/privacy}","received_events_url":"https://api.github.com/users/cms-sw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cms-sw/cmssw","description":"CMS Offline Software","fork":false,"url":"https://api.github.com/repos/cms-sw/cmssw","forks_url":"https://api.github.com/repos/cms-sw/cmssw/forks","keys_url":"https://api.github.com/repos/cms-sw/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cms-sw/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cms-sw/cmssw/teams","hooks_url":"https://api.github.com/repos/cms-sw/cmssw/hooks","issue_events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/cms-sw/cmssw/events","assignees_url":"https://api.github.com/repos/cms-sw/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/cms-sw/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/cms-sw/cmssw/tags","blobs_url":"https://api.github.com/repos/cms-sw/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cms-sw/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cms-sw/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/cms-sw/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/cms-sw/cmssw/languages","stargazers_url":"https://api.github.com/repos/cms-sw/cmssw/stargazers","contributors_url":"https://api.github.com/repos/cms-sw/cmssw/contributors","subscribers_url":"https://api.github.com/repos/cms-sw/cmssw/subscribers","subscription_url":"https://api.github.com/repos/cms-sw/cmssw/subscription","commits_url":"https://api.github.com/repos/cms-sw/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/cms-sw/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/cms-sw/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/cms-sw/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cms-sw/cmssw/merges","archive_url":"https://api.github.com/repos/cms-sw/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cms-sw/cmssw/downloads","issues_url":"https://api.github.com/repos/cms-sw/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/cms-sw/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/cms-sw/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/cms-sw/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cms-sw/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/cms-sw/cmssw/releases{/id}","created_at":"2013-06-26T14:09:07Z","updated_at":"2015-08-07T23:46:12Z","pushed_at":"2015-08-10T20:58:47Z","git_url":"git://github.com/cms-sw/cmssw.git","ssh_url":"git@github.com:cms-sw/cmssw.git","clone_url":"https://github.com/cms-sw/cmssw.git","svn_url":"https://github.com/cms-sw/cmssw","homepage":"http://cms-sw.github.io/","size":1270048,"stargazers_count":256,"watchers_count":256,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1518,"mirror_url":null,"open_issues_count":219,"forks":1518,"open_issues":219,"watchers":256,"default_branch":"CMSSW_7_6_X"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/10556"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/10556"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/10556"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/10556/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/10556/comments"},"review_comment":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/10556/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/ab65c7adf5c526c0459b4d5f539688037e2cf5f7"}}}}