{"action":"created","comment":{"url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/comments/182452046","pull_request_review_id":113249400,"id":182452046,"diff_hunk":"@@ -398,51 +400,60 @@ void do_actual_learning_oaa(ldf& data, base_learner& base, size_t start_K)\n   }\n }\n \n+\n+/*\n+* The begining of the multi_ex sequence may be labels.  Process those\n+* and return the start index of the un-processed examples\n+*/\n+multi_ex process_labels(ldf& data, const multi_ex& ec_seq_all);\n+\n+/*\n+ * 1) process all labels at first \n+ * 2) verify no labels in the middle of data\n+ * 3) learn_or_predict(data) with rest\n+ */\n template <bool is_learn>\n-void do_actual_learning(ldf& data, base_learner& base)\n+void do_actual_learning(ldf& data, single_learner& base, multi_ex& ec_seq_all)\n {\n-  if (data.ec_seq.size() <= 0) return;  // nothing to do\n-  /////////////////////// handle label definitions\n+  if (ec_seq_all.size() == 0) return;  // nothing to do\n \n-  if (ec_seq_is_label_definition(data.ec_seq))\n-  {\n-    for (size_t i=0; i<data.ec_seq.size(); i++)\n-    {\n-      features new_fs = data.ec_seq[i]->feature_space[data.ec_seq[i]->indices[0]];\n+  data.ft_offset = ec_seq_all.last()->ft_offset;","path":"vowpalwabbit/csoaa.cc","position":203,"original_position":203,"commit_id":"9f3df8f03b02c96734441cc080a3d1abe6156f03","original_commit_id":"9f3df8f03b02c96734441cc080a3d1abe6156f03","user":{"login":"JohnLangford","id":79590,"avatar_url":"https://avatars3.githubusercontent.com/u/79590?v=4","gravatar_id":"","url":"https://api.github.com/users/JohnLangford","html_url":"https://github.com/JohnLangford","followers_url":"https://api.github.com/users/JohnLangford/followers","following_url":"https://api.github.com/users/JohnLangford/following{/other_user}","gists_url":"https://api.github.com/users/JohnLangford/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnLangford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnLangford/subscriptions","organizations_url":"https://api.github.com/users/JohnLangford/orgs","repos_url":"https://api.github.com/users/JohnLangford/repos","events_url":"https://api.github.com/users/JohnLangford/events{/privacy}","received_events_url":"https://api.github.com/users/JohnLangford/received_events","type":"User","site_admin":false},"body":"Todo: shift to first.","created_at":"2018-04-18T14:40:39Z","updated_at":"2018-04-18T14:40:39Z","html_url":"https://github.com/JohnLangford/vowpal_wabbit/pull/1421#discussion_r182452046","pull_request_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/1421","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/comments/182452046"},"html":{"href":"https://github.com/JohnLangford/vowpal_wabbit/pull/1421#discussion_r182452046"},"pull_request":{"href":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/1421"}},"in_reply_to_id":182413545},"pull_request":{"url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/1421","id":173186217,"html_url":"https://github.com/JohnLangford/vowpal_wabbit/pull/1421","diff_url":"https://github.com/JohnLangford/vowpal_wabbit/pull/1421.diff","patch_url":"https://github.com/JohnLangford/vowpal_wabbit/pull/1421.patch","issue_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/issues/1421","number":1421,"state":"open","locked":false,"title":"Multiline example","user":{"login":"rajan-chari","id":21222554,"avatar_url":"https://avatars1.githubusercontent.com/u/21222554?v=4","gravatar_id":"","url":"https://api.github.com/users/rajan-chari","html_url":"https://github.com/rajan-chari","followers_url":"https://api.github.com/users/rajan-chari/followers","following_url":"https://api.github.com/users/rajan-chari/following{/other_user}","gists_url":"https://api.github.com/users/rajan-chari/gists{/gist_id}","starred_url":"https://api.github.com/users/rajan-chari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajan-chari/subscriptions","organizations_url":"https://api.github.com/users/rajan-chari/orgs","repos_url":"https://api.github.com/users/rajan-chari/repos","events_url":"https://api.github.com/users/rajan-chari/events{/privacy}","received_events_url":"https://api.github.com/users/rajan-chari/received_events","type":"User","site_admin":false},"body":"Preliminary pull request.\r\n\r\nStill need to fix:\r\n\r\na) Python binding tests\r\nb) Cleanup\r\n      1) formatting/stlyle cleanup\r\n      2) check for any missed base.predict() base.learn() calls\r\n","created_at":"2018-03-06T15:10:08Z","updated_at":"2018-04-18T14:40:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a9e8b7ba0b0f6cfb6e9852964048afc339c8732","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/1421/commits","review_comments_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/1421/comments","review_comment_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/issues/1421/comments","statuses_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/statuses/9f3df8f03b02c96734441cc080a3d1abe6156f03","head":{"label":"rajan-chari:multiline-example","ref":"multiline-example","sha":"9f3df8f03b02c96734441cc080a3d1abe6156f03","user":{"login":"rajan-chari","id":21222554,"avatar_url":"https://avatars1.githubusercontent.com/u/21222554?v=4","gravatar_id":"","url":"https://api.github.com/users/rajan-chari","html_url":"https://github.com/rajan-chari","followers_url":"https://api.github.com/users/rajan-chari/followers","following_url":"https://api.github.com/users/rajan-chari/following{/other_user}","gists_url":"https://api.github.com/users/rajan-chari/gists{/gist_id}","starred_url":"https://api.github.com/users/rajan-chari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajan-chari/subscriptions","organizations_url":"https://api.github.com/users/rajan-chari/orgs","repos_url":"https://api.github.com/users/rajan-chari/repos","events_url":"https://api.github.com/users/rajan-chari/events{/privacy}","received_events_url":"https://api.github.com/users/rajan-chari/received_events","type":"User","site_admin":false},"repo":{"id":117544274,"name":"vowpal_wabbit","full_name":"rajan-chari/vowpal_wabbit","owner":{"login":"rajan-chari","id":21222554,"avatar_url":"https://avatars1.githubusercontent.com/u/21222554?v=4","gravatar_id":"","url":"https://api.github.com/users/rajan-chari","html_url":"https://github.com/rajan-chari","followers_url":"https://api.github.com/users/rajan-chari/followers","following_url":"https://api.github.com/users/rajan-chari/following{/other_user}","gists_url":"https://api.github.com/users/rajan-chari/gists{/gist_id}","starred_url":"https://api.github.com/users/rajan-chari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajan-chari/subscriptions","organizations_url":"https://api.github.com/users/rajan-chari/orgs","repos_url":"https://api.github.com/users/rajan-chari/repos","events_url":"https://api.github.com/users/rajan-chari/events{/privacy}","received_events_url":"https://api.github.com/users/rajan-chari/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rajan-chari/vowpal_wabbit","description":"Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.","fork":true,"url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit","forks_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/forks","keys_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/teams","hooks_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/hooks","issue_events_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/issues/events{/number}","events_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/events","assignees_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/assignees{/user}","branches_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/branches{/branch}","tags_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/tags","blobs_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/git/refs{/sha}","trees_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/statuses/{sha}","languages_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/languages","stargazers_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/stargazers","contributors_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/contributors","subscribers_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/subscribers","subscription_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/subscription","commits_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/commits{/sha}","git_commits_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/git/commits{/sha}","comments_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/comments{/number}","issue_comment_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/issues/comments{/number}","contents_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/contents/{+path}","compare_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/merges","archive_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/downloads","issues_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/issues{/number}","pulls_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/pulls{/number}","milestones_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/milestones{/number}","notifications_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/labels{/name}","releases_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/releases{/id}","deployments_url":"https://api.github.com/repos/rajan-chari/vowpal_wabbit/deployments","created_at":"2018-01-15T12:45:02Z","updated_at":"2018-04-10T00:24:21Z","pushed_at":"2018-04-17T14:45:12Z","git_url":"git://github.com/rajan-chari/vowpal_wabbit.git","ssh_url":"git@github.com:rajan-chari/vowpal_wabbit.git","clone_url":"https://github.com/rajan-chari/vowpal_wabbit.git","svn_url":"https://github.com/rajan-chari/vowpal_wabbit","homepage":"http://hunch.net/~vw/","size":110648,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JohnLangford:master","ref":"master","sha":"0105bbc11baf24db25490b0a9a808b18a8a846e3","user":{"login":"JohnLangford","id":79590,"avatar_url":"https://avatars3.githubusercontent.com/u/79590?v=4","gravatar_id":"","url":"https://api.github.com/users/JohnLangford","html_url":"https://github.com/JohnLangford","followers_url":"https://api.github.com/users/JohnLangford/followers","following_url":"https://api.github.com/users/JohnLangford/following{/other_user}","gists_url":"https://api.github.com/users/JohnLangford/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnLangford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnLangford/subscriptions","organizations_url":"https://api.github.com/users/JohnLangford/orgs","repos_url":"https://api.github.com/users/JohnLangford/repos","events_url":"https://api.github.com/users/JohnLangford/events{/privacy}","received_events_url":"https://api.github.com/users/JohnLangford/received_events","type":"User","site_admin":false},"repo":{"id":265995,"name":"vowpal_wabbit","full_name":"JohnLangford/vowpal_wabbit","owner":{"login":"JohnLangford","id":79590,"avatar_url":"https://avatars3.githubusercontent.com/u/79590?v=4","gravatar_id":"","url":"https://api.github.com/users/JohnLangford","html_url":"https://github.com/JohnLangford","followers_url":"https://api.github.com/users/JohnLangford/followers","following_url":"https://api.github.com/users/JohnLangford/following{/other_user}","gists_url":"https://api.github.com/users/JohnLangford/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnLangford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnLangford/subscriptions","organizations_url":"https://api.github.com/users/JohnLangford/orgs","repos_url":"https://api.github.com/users/JohnLangford/repos","events_url":"https://api.github.com/users/JohnLangford/events{/privacy}","received_events_url":"https://api.github.com/users/JohnLangford/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JohnLangford/vowpal_wabbit","description":"Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.","fork":false,"url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit","forks_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/forks","keys_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/teams","hooks_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/hooks","issue_events_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/issues/events{/number}","events_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/events","assignees_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/assignees{/user}","branches_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/branches{/branch}","tags_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/tags","blobs_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/git/refs{/sha}","trees_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/statuses/{sha}","languages_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/languages","stargazers_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/stargazers","contributors_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/contributors","subscribers_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/subscribers","subscription_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/subscription","commits_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/commits{/sha}","git_commits_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/git/commits{/sha}","comments_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/comments{/number}","issue_comment_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/issues/comments{/number}","contents_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/contents/{+path}","compare_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/merges","archive_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/downloads","issues_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/issues{/number}","pulls_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls{/number}","milestones_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/milestones{/number}","notifications_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/labels{/name}","releases_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/releases{/id}","deployments_url":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/deployments","created_at":"2009-07-31T19:36:58Z","updated_at":"2018-04-18T13:55:07Z","pushed_at":"2018-04-18T14:06:37Z","git_url":"git://github.com/JohnLangford/vowpal_wabbit.git","ssh_url":"git@github.com:JohnLangford/vowpal_wabbit.git","clone_url":"https://github.com/JohnLangford/vowpal_wabbit.git","svn_url":"https://github.com/JohnLangford/vowpal_wabbit","homepage":"http://hunch.net/~vw/","size":110287,"stargazers_count":5444,"watchers_count":5444,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1369,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1369,"open_issues":20,"watchers":5444,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/1421"},"html":{"href":"https://github.com/JohnLangford/vowpal_wabbit/pull/1421"},"issue":{"href":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/issues/1421"},"comments":{"href":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/issues/1421/comments"},"review_comments":{"href":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/1421/comments"},"review_comment":{"href":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/pulls/1421/commits"},"statuses":{"href":"https://api.github.com/repos/JohnLangford/vowpal_wabbit/statuses/9f3df8f03b02c96734441cc080a3d1abe6156f03"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"JohnLangford"}}