{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/125444096","pull_request_review_id":47829854,"id":125444096,"diff_hunk":"@@ -1229,11 +1229,22 @@ def test_output_columns(self):\n                                          (2.0, Vectors.dense(0.5, 0.5))],\n                                         [\"label\", \"features\"])\n         lr = LogisticRegression(maxIter=5, regParam=0.01)\n-        ovr = OneVsRest(classifier=lr)\n+        ovr = OneVsRest(classifier=lr, parallelism=1)\n         model = ovr.fit(df)\n         output = model.transform(df)\n         self.assertEqual(output.columns, [\"label\", \"features\", \"prediction\"])\n \n+    def test_parallelism_doesnt_change_output(self):\n+        df = self.spark.createDataFrame([(0.0, Vectors.dense(1.0, 0.8)),\n+                                         (1.0, Vectors.sparse(2, [], [])),\n+                                         (2.0, Vectors.dense(0.5, 0.5))],\n+                                        [\"label\", \"features\"])\n+        ovrPar1 = OneVsRest(classifier=LogisticRegression(maxIter=5, regParam=.01), parallelism=1)\n+        modelPar1 = ovrPar1.fit(df)\n+        ovrPar2 = OneVsRest(classifier=LogisticRegression(maxIter=5, regParam=.01), parallelism=2)\n+        modelPar2 = ovrPar2.fit(df)\n+        self.assertEqual(modelPar1.getPredictionCol(), modelPar2.getPredictionCol())","path":"python/pyspark/ml/tests.py","position":28,"original_position":28,"commit_id":"4431ffcd38843798db907842799fd81a30c7a5be","original_commit_id":"4431ffcd38843798db907842799fd81a30c7a5be","user":{"login":"MLnick","id":1036807,"avatar_url":"https://avatars1.githubusercontent.com/u/1036807?v=3","gravatar_id":"","url":"https://api.github.com/users/MLnick","html_url":"https://github.com/MLnick","followers_url":"https://api.github.com/users/MLnick/followers","following_url":"https://api.github.com/users/MLnick/following{/other_user}","gists_url":"https://api.github.com/users/MLnick/gists{/gist_id}","starred_url":"https://api.github.com/users/MLnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MLnick/subscriptions","organizations_url":"https://api.github.com/users/MLnick/orgs","repos_url":"https://api.github.com/users/MLnick/repos","events_url":"https://api.github.com/users/MLnick/events{/privacy}","received_events_url":"https://api.github.com/users/MLnick/received_events","type":"User","site_admin":false},"body":"As per the Scala tests - fitting in parallel should result in exactly the same model coefficients also (though they might be in a different order). Can we check this?","created_at":"2017-07-04T10:43:57Z","updated_at":"2017-07-04T10:47:56Z","html_url":"https://github.com/apache/spark/pull/18281#discussion_r125444096","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/18281","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/125444096"},"html":{"href":"https://github.com/apache/spark/pull/18281#discussion_r125444096"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/18281"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/18281","id":125237239,"html_url":"https://github.com/apache/spark/pull/18281","diff_url":"https://github.com/apache/spark/pull/18281.diff","patch_url":"https://github.com/apache/spark/pull/18281.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/18281","number":18281,"state":"open","locked":false,"title":"[SPARK-21027][ML][PYTHON] Added tunable parallelism to one vs. rest in both Scala mllib and Pyspark","user":{"login":"ajaysaini725","id":9918578,"avatar_url":"https://avatars3.githubusercontent.com/u/9918578?v=3","gravatar_id":"","url":"https://api.github.com/users/ajaysaini725","html_url":"https://github.com/ajaysaini725","followers_url":"https://api.github.com/users/ajaysaini725/followers","following_url":"https://api.github.com/users/ajaysaini725/following{/other_user}","gists_url":"https://api.github.com/users/ajaysaini725/gists{/gist_id}","starred_url":"https://api.github.com/users/ajaysaini725/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajaysaini725/subscriptions","organizations_url":"https://api.github.com/users/ajaysaini725/orgs","repos_url":"https://api.github.com/users/ajaysaini725/repos","events_url":"https://api.github.com/users/ajaysaini725/events{/privacy}","received_events_url":"https://api.github.com/users/ajaysaini725/received_events","type":"User","site_admin":false},"body":"Added tunable parallelism to the pyspark implementation of one vs. rest classification. Added a parallelism parameter to the Scala implementation of one vs. rest along with functionality for using the parameter to tune the level of parallelism. \r\n\r\nPlease review http://spark.apache.org/contributing.html before opening a pull request.\r\n","created_at":"2017-06-12T21:48:29Z","updated_at":"2017-07-04T10:47:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0527f46b7a348bc5b022da57249ad979cc8d070","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/18281/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/18281/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/18281/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/4431ffcd38843798db907842799fd81a30c7a5be","head":{"label":"ajaysaini725:spark-21027","ref":"spark-21027","sha":"4431ffcd38843798db907842799fd81a30c7a5be","user":{"login":"ajaysaini725","id":9918578,"avatar_url":"https://avatars3.githubusercontent.com/u/9918578?v=3","gravatar_id":"","url":"https://api.github.com/users/ajaysaini725","html_url":"https://github.com/ajaysaini725","followers_url":"https://api.github.com/users/ajaysaini725/followers","following_url":"https://api.github.com/users/ajaysaini725/following{/other_user}","gists_url":"https://api.github.com/users/ajaysaini725/gists{/gist_id}","starred_url":"https://api.github.com/users/ajaysaini725/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajaysaini725/subscriptions","organizations_url":"https://api.github.com/users/ajaysaini725/orgs","repos_url":"https://api.github.com/users/ajaysaini725/repos","events_url":"https://api.github.com/users/ajaysaini725/events{/privacy}","received_events_url":"https://api.github.com/users/ajaysaini725/received_events","type":"User","site_admin":false},"repo":{"id":93882782,"name":"spark","full_name":"ajaysaini725/spark","owner":{"login":"ajaysaini725","id":9918578,"avatar_url":"https://avatars3.githubusercontent.com/u/9918578?v=3","gravatar_id":"","url":"https://api.github.com/users/ajaysaini725","html_url":"https://github.com/ajaysaini725","followers_url":"https://api.github.com/users/ajaysaini725/followers","following_url":"https://api.github.com/users/ajaysaini725/following{/other_user}","gists_url":"https://api.github.com/users/ajaysaini725/gists{/gist_id}","starred_url":"https://api.github.com/users/ajaysaini725/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajaysaini725/subscriptions","organizations_url":"https://api.github.com/users/ajaysaini725/orgs","repos_url":"https://api.github.com/users/ajaysaini725/repos","events_url":"https://api.github.com/users/ajaysaini725/events{/privacy}","received_events_url":"https://api.github.com/users/ajaysaini725/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajaysaini725/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/ajaysaini725/spark","forks_url":"https://api.github.com/repos/ajaysaini725/spark/forks","keys_url":"https://api.github.com/repos/ajaysaini725/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajaysaini725/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajaysaini725/spark/teams","hooks_url":"https://api.github.com/repos/ajaysaini725/spark/hooks","issue_events_url":"https://api.github.com/repos/ajaysaini725/spark/issues/events{/number}","events_url":"https://api.github.com/repos/ajaysaini725/spark/events","assignees_url":"https://api.github.com/repos/ajaysaini725/spark/assignees{/user}","branches_url":"https://api.github.com/repos/ajaysaini725/spark/branches{/branch}","tags_url":"https://api.github.com/repos/ajaysaini725/spark/tags","blobs_url":"https://api.github.com/repos/ajaysaini725/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajaysaini725/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajaysaini725/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajaysaini725/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajaysaini725/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/ajaysaini725/spark/languages","stargazers_url":"https://api.github.com/repos/ajaysaini725/spark/stargazers","contributors_url":"https://api.github.com/repos/ajaysaini725/spark/contributors","subscribers_url":"https://api.github.com/repos/ajaysaini725/spark/subscribers","subscription_url":"https://api.github.com/repos/ajaysaini725/spark/subscription","commits_url":"https://api.github.com/repos/ajaysaini725/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajaysaini725/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajaysaini725/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajaysaini725/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajaysaini725/spark/contents/{+path}","compare_url":"https://api.github.com/repos/ajaysaini725/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajaysaini725/spark/merges","archive_url":"https://api.github.com/repos/ajaysaini725/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajaysaini725/spark/downloads","issues_url":"https://api.github.com/repos/ajaysaini725/spark/issues{/number}","pulls_url":"https://api.github.com/repos/ajaysaini725/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/ajaysaini725/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/ajaysaini725/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajaysaini725/spark/labels{/name}","releases_url":"https://api.github.com/repos/ajaysaini725/spark/releases{/id}","deployments_url":"https://api.github.com/repos/ajaysaini725/spark/deployments","created_at":"2017-06-09T17:41:22Z","updated_at":"2017-06-09T17:41:49Z","pushed_at":"2017-06-29T22:45:10Z","git_url":"git://github.com/ajaysaini725/spark.git","ssh_url":"git@github.com:ajaysaini725/spark.git","clone_url":"https://github.com/ajaysaini725/spark.git","svn_url":"https://github.com/ajaysaini725/spark","homepage":null,"size":252996,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"ff318c0d2f283c3f46491f229f82d93714da40c7","user":{"login":"apache","id":47359,"avatar_url":"https://avatars3.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars3.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2017-07-04T10:42:28Z","pushed_at":"2017-07-04T10:01:49Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":254912,"stargazers_count":13366,"watchers_count":13366,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12639,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":408,"forks":12639,"open_issues":408,"watchers":13366,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/18281"},"html":{"href":"https://github.com/apache/spark/pull/18281"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/18281"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/18281/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/18281/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/18281/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/4431ffcd38843798db907842799fd81a30c7a5be"}}}}
{"actor":{"display_login":"MLnick"}}