{"action":"created","comment":{"url":"https://api.github.com/repos/allenai/allennlp/pulls/comments/210743619","pull_request_review_id":147026004,"id":210743619,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDc0MzYxOQ==","diff_hunk":"@@ -53,10 +54,25 @@ def test_mst_respects_no_outgoing_root_edges_constraint(self):\n         #              \\/        \\/\n         #          B(index 1)   C(index 2)\n         length = torch.LongTensor([3])\n-        heads, _ = self.model._run_mst_decoding(energy, length) # pylint: disable=protected-access\n+        heads, _ = decode_mst(energy[0, 0, :, :].numpy(), length.item(), has_labels=False)\n         # This is the correct MST, but not desirable for dependency parsing.\n-        assert heads.tolist()[0] == [-1, 0, 0]\n+        assert list(heads) == [-1, 0, 0]\n \n-        energy[:, :, 0, :] = 0\n+        # If we run the decoding with the model, it should enforce\n+        # the constraint.\n         heads, _ = self.model._run_mst_decoding(energy, length) # pylint: disable=protected-access\n         assert heads.tolist()[0] == [-1, 0, 1]\n+\n+    def test_mst_decodes_arc_labels_with_respect_to_unconstrained_scores(self):\n+        energy = torch.Tensor([[0, 2, 1],\n+                               [10, 0, 0.5],\n+                               [9, 0.2, 0]]).view(1, 1, 3, 3).expand(1, 2, 3, 3).contiguous()\n+\n+        # Make the score for the root label for arcs to the root token be higher - it\n+        # will be masked for the MST, but we want to make sure that the tags are with\n+        # respect to the unmasked tensor.","path":"allennlp/tests/models/biaffine_dependency_parser_test.py","position":null,"original_position":31,"commit_id":"1c36ced778cf56ee7a95b92ec71dad5d415aae5a","original_commit_id":"b25bd85a11c574932a0f79a0dd3597cf3e047899","user":{"login":"matt-gardner","id":3291951,"node_id":"MDQ6VXNlcjMyOTE5NTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3291951?v=4","gravatar_id":"","url":"https://api.github.com/users/matt-gardner","html_url":"https://github.com/matt-gardner","followers_url":"https://api.github.com/users/matt-gardner/followers","following_url":"https://api.github.com/users/matt-gardner/following{/other_user}","gists_url":"https://api.github.com/users/matt-gardner/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-gardner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-gardner/subscriptions","organizations_url":"https://api.github.com/users/matt-gardner/orgs","repos_url":"https://api.github.com/users/matt-gardner/repos","events_url":"https://api.github.com/users/matt-gardner/events{/privacy}","received_events_url":"https://api.github.com/users/matt-gardner/received_events","type":"User","site_admin":false},"body":"I guess if you make it clear in the comment that this is an issue for the (ROOT, root_token) edge, that would help.  Except I thought you zeroed out all of the (*, ROOT) edges, so why is (ROOT, root_token) affected...?","created_at":"2018-08-16T21:12:20Z","updated_at":"2018-08-16T21:12:20Z","html_url":"https://github.com/allenai/allennlp/pull/1619#discussion_r210743619","pull_request_url":"https://api.github.com/repos/allenai/allennlp/pulls/1619","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/allenai/allennlp/pulls/comments/210743619"},"html":{"href":"https://github.com/allenai/allennlp/pull/1619#discussion_r210743619"},"pull_request":{"href":"https://api.github.com/repos/allenai/allennlp/pulls/1619"}},"in_reply_to_id":210735612},"pull_request":{"url":"https://api.github.com/repos/allenai/allennlp/pulls/1619","id":208972064,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4OTcyMDY0","html_url":"https://github.com/allenai/allennlp/pull/1619","diff_url":"https://github.com/allenai/allennlp/pull/1619.diff","patch_url":"https://github.com/allenai/allennlp/pull/1619.patch","issue_url":"https://api.github.com/repos/allenai/allennlp/issues/1619","number":1619,"state":"open","locked":false,"title":"Parser decoding fix 2","user":{"login":"DeNeutoy","id":16001974,"node_id":"MDQ6VXNlcjE2MDAxOTc0","avatar_url":"https://avatars1.githubusercontent.com/u/16001974?v=4","gravatar_id":"","url":"https://api.github.com/users/DeNeutoy","html_url":"https://github.com/DeNeutoy","followers_url":"https://api.github.com/users/DeNeutoy/followers","following_url":"https://api.github.com/users/DeNeutoy/following{/other_user}","gists_url":"https://api.github.com/users/DeNeutoy/gists{/gist_id}","starred_url":"https://api.github.com/users/DeNeutoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeNeutoy/subscriptions","organizations_url":"https://api.github.com/users/DeNeutoy/orgs","repos_url":"https://api.github.com/users/DeNeutoy/repos","events_url":"https://api.github.com/users/DeNeutoy/events{/privacy}","received_events_url":"https://api.github.com/users/DeNeutoy/received_events","type":"User","site_admin":false},"body":"Annoyed that I missed this yesterday, in retrospect it was obvious that this would break the label assignment","created_at":"2018-08-16T20:15:45Z","updated_at":"2018-08-16T21:12:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea5061076d8bc16acbb69e4c7df78351193c0406","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/allenai/allennlp/pulls/1619/commits","review_comments_url":"https://api.github.com/repos/allenai/allennlp/pulls/1619/comments","review_comment_url":"https://api.github.com/repos/allenai/allennlp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/allenai/allennlp/issues/1619/comments","statuses_url":"https://api.github.com/repos/allenai/allennlp/statuses/1c36ced778cf56ee7a95b92ec71dad5d415aae5a","head":{"label":"DeNeutoy:parser-decoding-fix-2","ref":"parser-decoding-fix-2","sha":"1c36ced778cf56ee7a95b92ec71dad5d415aae5a","user":{"login":"DeNeutoy","id":16001974,"node_id":"MDQ6VXNlcjE2MDAxOTc0","avatar_url":"https://avatars1.githubusercontent.com/u/16001974?v=4","gravatar_id":"","url":"https://api.github.com/users/DeNeutoy","html_url":"https://github.com/DeNeutoy","followers_url":"https://api.github.com/users/DeNeutoy/followers","following_url":"https://api.github.com/users/DeNeutoy/following{/other_user}","gists_url":"https://api.github.com/users/DeNeutoy/gists{/gist_id}","starred_url":"https://api.github.com/users/DeNeutoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeNeutoy/subscriptions","organizations_url":"https://api.github.com/users/DeNeutoy/orgs","repos_url":"https://api.github.com/users/DeNeutoy/repos","events_url":"https://api.github.com/users/DeNeutoy/events{/privacy}","received_events_url":"https://api.github.com/users/DeNeutoy/received_events","type":"User","site_admin":false},"repo":{"id":95490219,"node_id":"MDEwOlJlcG9zaXRvcnk5NTQ5MDIxOQ==","name":"allennlp","full_name":"DeNeutoy/allennlp","owner":{"login":"DeNeutoy","id":16001974,"node_id":"MDQ6VXNlcjE2MDAxOTc0","avatar_url":"https://avatars1.githubusercontent.com/u/16001974?v=4","gravatar_id":"","url":"https://api.github.com/users/DeNeutoy","html_url":"https://github.com/DeNeutoy","followers_url":"https://api.github.com/users/DeNeutoy/followers","following_url":"https://api.github.com/users/DeNeutoy/following{/other_user}","gists_url":"https://api.github.com/users/DeNeutoy/gists{/gist_id}","starred_url":"https://api.github.com/users/DeNeutoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeNeutoy/subscriptions","organizations_url":"https://api.github.com/users/DeNeutoy/orgs","repos_url":"https://api.github.com/users/DeNeutoy/repos","events_url":"https://api.github.com/users/DeNeutoy/events{/privacy}","received_events_url":"https://api.github.com/users/DeNeutoy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DeNeutoy/allennlp","description":"A natural language processing toolkit using state-of-the-art deep learning models.","fork":true,"url":"https://api.github.com/repos/DeNeutoy/allennlp","forks_url":"https://api.github.com/repos/DeNeutoy/allennlp/forks","keys_url":"https://api.github.com/repos/DeNeutoy/allennlp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DeNeutoy/allennlp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DeNeutoy/allennlp/teams","hooks_url":"https://api.github.com/repos/DeNeutoy/allennlp/hooks","issue_events_url":"https://api.github.com/repos/DeNeutoy/allennlp/issues/events{/number}","events_url":"https://api.github.com/repos/DeNeutoy/allennlp/events","assignees_url":"https://api.github.com/repos/DeNeutoy/allennlp/assignees{/user}","branches_url":"https://api.github.com/repos/DeNeutoy/allennlp/branches{/branch}","tags_url":"https://api.github.com/repos/DeNeutoy/allennlp/tags","blobs_url":"https://api.github.com/repos/DeNeutoy/allennlp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DeNeutoy/allennlp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DeNeutoy/allennlp/git/refs{/sha}","trees_url":"https://api.github.com/repos/DeNeutoy/allennlp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DeNeutoy/allennlp/statuses/{sha}","languages_url":"https://api.github.com/repos/DeNeutoy/allennlp/languages","stargazers_url":"https://api.github.com/repos/DeNeutoy/allennlp/stargazers","contributors_url":"https://api.github.com/repos/DeNeutoy/allennlp/contributors","subscribers_url":"https://api.github.com/repos/DeNeutoy/allennlp/subscribers","subscription_url":"https://api.github.com/repos/DeNeutoy/allennlp/subscription","commits_url":"https://api.github.com/repos/DeNeutoy/allennlp/commits{/sha}","git_commits_url":"https://api.github.com/repos/DeNeutoy/allennlp/git/commits{/sha}","comments_url":"https://api.github.com/repos/DeNeutoy/allennlp/comments{/number}","issue_comment_url":"https://api.github.com/repos/DeNeutoy/allennlp/issues/comments{/number}","contents_url":"https://api.github.com/repos/DeNeutoy/allennlp/contents/{+path}","compare_url":"https://api.github.com/repos/DeNeutoy/allennlp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DeNeutoy/allennlp/merges","archive_url":"https://api.github.com/repos/DeNeutoy/allennlp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DeNeutoy/allennlp/downloads","issues_url":"https://api.github.com/repos/DeNeutoy/allennlp/issues{/number}","pulls_url":"https://api.github.com/repos/DeNeutoy/allennlp/pulls{/number}","milestones_url":"https://api.github.com/repos/DeNeutoy/allennlp/milestones{/number}","notifications_url":"https://api.github.com/repos/DeNeutoy/allennlp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DeNeutoy/allennlp/labels{/name}","releases_url":"https://api.github.com/repos/DeNeutoy/allennlp/releases{/id}","deployments_url":"https://api.github.com/repos/DeNeutoy/allennlp/deployments","created_at":"2017-06-26T21:16:53Z","updated_at":"2017-06-26T21:16:54Z","pushed_at":"2018-08-16T21:10:27Z","git_url":"git://github.com/DeNeutoy/allennlp.git","ssh_url":"git@github.com:DeNeutoy/allennlp.git","clone_url":"https://github.com/DeNeutoy/allennlp.git","svn_url":"https://github.com/DeNeutoy/allennlp","homepage":null,"size":14914,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"allenai:master","ref":"master","sha":"82686c10bdca062a7e41825000c39372de354479","user":{"login":"allenai","id":5667695,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Njc2OTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5667695?v=4","gravatar_id":"","url":"https://api.github.com/users/allenai","html_url":"https://github.com/allenai","followers_url":"https://api.github.com/users/allenai/followers","following_url":"https://api.github.com/users/allenai/following{/other_user}","gists_url":"https://api.github.com/users/allenai/gists{/gist_id}","starred_url":"https://api.github.com/users/allenai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenai/subscriptions","organizations_url":"https://api.github.com/users/allenai/orgs","repos_url":"https://api.github.com/users/allenai/repos","events_url":"https://api.github.com/users/allenai/events{/privacy}","received_events_url":"https://api.github.com/users/allenai/received_events","type":"Organization","site_admin":false},"repo":{"id":91356408,"node_id":"MDEwOlJlcG9zaXRvcnk5MTM1NjQwOA==","name":"allennlp","full_name":"allenai/allennlp","owner":{"login":"allenai","id":5667695,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Njc2OTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5667695?v=4","gravatar_id":"","url":"https://api.github.com/users/allenai","html_url":"https://github.com/allenai","followers_url":"https://api.github.com/users/allenai/followers","following_url":"https://api.github.com/users/allenai/following{/other_user}","gists_url":"https://api.github.com/users/allenai/gists{/gist_id}","starred_url":"https://api.github.com/users/allenai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenai/subscriptions","organizations_url":"https://api.github.com/users/allenai/orgs","repos_url":"https://api.github.com/users/allenai/repos","events_url":"https://api.github.com/users/allenai/events{/privacy}","received_events_url":"https://api.github.com/users/allenai/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/allenai/allennlp","description":"An open-source NLP research library, built on PyTorch.","fork":false,"url":"https://api.github.com/repos/allenai/allennlp","forks_url":"https://api.github.com/repos/allenai/allennlp/forks","keys_url":"https://api.github.com/repos/allenai/allennlp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allenai/allennlp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allenai/allennlp/teams","hooks_url":"https://api.github.com/repos/allenai/allennlp/hooks","issue_events_url":"https://api.github.com/repos/allenai/allennlp/issues/events{/number}","events_url":"https://api.github.com/repos/allenai/allennlp/events","assignees_url":"https://api.github.com/repos/allenai/allennlp/assignees{/user}","branches_url":"https://api.github.com/repos/allenai/allennlp/branches{/branch}","tags_url":"https://api.github.com/repos/allenai/allennlp/tags","blobs_url":"https://api.github.com/repos/allenai/allennlp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allenai/allennlp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allenai/allennlp/git/refs{/sha}","trees_url":"https://api.github.com/repos/allenai/allennlp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allenai/allennlp/statuses/{sha}","languages_url":"https://api.github.com/repos/allenai/allennlp/languages","stargazers_url":"https://api.github.com/repos/allenai/allennlp/stargazers","contributors_url":"https://api.github.com/repos/allenai/allennlp/contributors","subscribers_url":"https://api.github.com/repos/allenai/allennlp/subscribers","subscription_url":"https://api.github.com/repos/allenai/allennlp/subscription","commits_url":"https://api.github.com/repos/allenai/allennlp/commits{/sha}","git_commits_url":"https://api.github.com/repos/allenai/allennlp/git/commits{/sha}","comments_url":"https://api.github.com/repos/allenai/allennlp/comments{/number}","issue_comment_url":"https://api.github.com/repos/allenai/allennlp/issues/comments{/number}","contents_url":"https://api.github.com/repos/allenai/allennlp/contents/{+path}","compare_url":"https://api.github.com/repos/allenai/allennlp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allenai/allennlp/merges","archive_url":"https://api.github.com/repos/allenai/allennlp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allenai/allennlp/downloads","issues_url":"https://api.github.com/repos/allenai/allennlp/issues{/number}","pulls_url":"https://api.github.com/repos/allenai/allennlp/pulls{/number}","milestones_url":"https://api.github.com/repos/allenai/allennlp/milestones{/number}","notifications_url":"https://api.github.com/repos/allenai/allennlp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allenai/allennlp/labels{/name}","releases_url":"https://api.github.com/repos/allenai/allennlp/releases{/id}","deployments_url":"https://api.github.com/repos/allenai/allennlp/deployments","created_at":"2017-05-15T15:52:41Z","updated_at":"2018-08-16T20:05:09Z","pushed_at":"2018-08-16T21:10:28Z","git_url":"git://github.com/allenai/allennlp.git","ssh_url":"git@github.com:allenai/allennlp.git","clone_url":"https://github.com/allenai/allennlp.git","svn_url":"https://github.com/allenai/allennlp","homepage":"http://www.allennlp.org/","size":13585,"stargazers_count":2963,"watchers_count":2963,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":502,"mirror_url":null,"archived":false,"open_issues_count":96,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":502,"open_issues":96,"watchers":2963,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/allenai/allennlp/pulls/1619"},"html":{"href":"https://github.com/allenai/allennlp/pull/1619"},"issue":{"href":"https://api.github.com/repos/allenai/allennlp/issues/1619"},"comments":{"href":"https://api.github.com/repos/allenai/allennlp/issues/1619/comments"},"review_comments":{"href":"https://api.github.com/repos/allenai/allennlp/pulls/1619/comments"},"review_comment":{"href":"https://api.github.com/repos/allenai/allennlp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/allenai/allennlp/pulls/1619/commits"},"statuses":{"href":"https://api.github.com/repos/allenai/allennlp/statuses/1c36ced778cf56ee7a95b92ec71dad5d415aae5a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"matt-gardner"}}