{"action":"created","comment":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/231612156","pull_request_review_id":172617241,"id":231612156,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTYxMjE1Ng==","diff_hunk":"@@ -248,10 +254,20 @@ TypePtr matchTypeVariables(TypePtr formal, TypePtr actual, TypeEnv& type_env) {\n   } else if (auto opt_formal = formal->cast<OptionalType>()) {\n     if (auto opt_actual = actual->cast<OptionalType>()) {\n       return OptionalType::create(matchTypeVariables(\n-          opt_formal->getElementType(), opt_actual->getElementType(), type_env));\n+          opt_formal->getElementType(),\n+          opt_actual->getElementType(),\n+          type_env));\n     } else {\n+      if (actual->isSubtypeOf(NoneType::get())) {\n+        return OptionalType::create(opt_formal->getElementType());","path":"torch/csrc/jit/type.cpp","position":23,"original_position":23,"commit_id":"c7965bc6a4172b4e7d3584bed65931fcb5463748","original_commit_id":"c7965bc6a4172b4e7d3584bed65931fcb5463748","user":{"login":"eellison","id":11477974,"node_id":"MDQ6VXNlcjExNDc3OTc0","avatar_url":"https://avatars2.githubusercontent.com/u/11477974?v=4","gravatar_id":"","url":"https://api.github.com/users/eellison","html_url":"https://github.com/eellison","followers_url":"https://api.github.com/users/eellison/followers","following_url":"https://api.github.com/users/eellison/following{/other_user}","gists_url":"https://api.github.com/users/eellison/gists{/gist_id}","starred_url":"https://api.github.com/users/eellison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eellison/subscriptions","organizations_url":"https://api.github.com/users/eellison/orgs","repos_url":"https://api.github.com/users/eellison/repos","events_url":"https://api.github.com/users/eellison/events{/privacy}","received_events_url":"https://api.github.com/users/eellison/received_events","type":"User","site_admin":false},"body":"How would this work if opt_formal ElementType is VarType?","created_at":"2018-11-07T17:53:40Z","updated_at":"2018-11-07T17:57:46Z","html_url":"https://github.com/pytorch/pytorch/pull/13647#discussion_r231612156","pull_request_url":"https://api.github.com/repos/pytorch/pytorch/pulls/13647","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/231612156"},"html":{"href":"https://github.com/pytorch/pytorch/pull/13647#discussion_r231612156"},"pull_request":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/13647"}}},"pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/13647","id":228868826,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4ODY4ODI2","html_url":"https://github.com/pytorch/pytorch/pull/13647","diff_url":"https://github.com/pytorch/pytorch/pull/13647.diff","patch_url":"https://github.com/pytorch/pytorch/pull/13647.patch","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/13647","number":13647,"state":"open","locked":false,"title":"[jit] Support OptionalType export and type match","user":{"login":"driazati","id":9407960,"node_id":"MDQ6VXNlcjk0MDc5NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/9407960?v=4","gravatar_id":"","url":"https://api.github.com/users/driazati","html_url":"https://github.com/driazati","followers_url":"https://api.github.com/users/driazati/followers","following_url":"https://api.github.com/users/driazati/following{/other_user}","gists_url":"https://api.github.com/users/driazati/gists{/gist_id}","starred_url":"https://api.github.com/users/driazati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driazati/subscriptions","organizations_url":"https://api.github.com/users/driazati/orgs","repos_url":"https://api.github.com/users/driazati/repos","events_url":"https://api.github.com/users/driazati/events{/privacy}","received_events_url":"https://api.github.com/users/driazati/received_events","type":"User","site_admin":false},"body":"* Adds `OptionalType` support for import/export\r\n    * Optionals get exported along with their contained type, i.e. 'Optional[int]'\r\n* Allows concrete types and `None` to be passed to an op that takes an optional\r\n* Converts `softmax`","created_at":"2018-11-06T23:22:46Z","updated_at":"2018-11-07T17:57:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b3f55b6460e6b9f5eeef0cf4546d0339b05cb0b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":679953983,"node_id":"MDU6TGFiZWw2Nzk5NTM5ODM=","url":"https://api.github.com/repos/pytorch/pytorch/labels/jit","name":"jit","color":"c5def5","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/pytorch/pulls/13647/commits","review_comments_url":"https://api.github.com/repos/pytorch/pytorch/pulls/13647/comments","review_comment_url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/13647/comments","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/c7965bc6a4172b4e7d3584bed65931fcb5463748","head":{"label":"driazati:opt_stuff","ref":"opt_stuff","sha":"c7965bc6a4172b4e7d3584bed65931fcb5463748","user":{"login":"driazati","id":9407960,"node_id":"MDQ6VXNlcjk0MDc5NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/9407960?v=4","gravatar_id":"","url":"https://api.github.com/users/driazati","html_url":"https://github.com/driazati","followers_url":"https://api.github.com/users/driazati/followers","following_url":"https://api.github.com/users/driazati/following{/other_user}","gists_url":"https://api.github.com/users/driazati/gists{/gist_id}","starred_url":"https://api.github.com/users/driazati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driazati/subscriptions","organizations_url":"https://api.github.com/users/driazati/orgs","repos_url":"https://api.github.com/users/driazati/repos","events_url":"https://api.github.com/users/driazati/events{/privacy}","received_events_url":"https://api.github.com/users/driazati/received_events","type":"User","site_admin":false},"repo":{"id":142357224,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIzNTcyMjQ=","name":"pytorch","full_name":"driazati/pytorch","private":false,"owner":{"login":"driazati","id":9407960,"node_id":"MDQ6VXNlcjk0MDc5NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/9407960?v=4","gravatar_id":"","url":"https://api.github.com/users/driazati","html_url":"https://github.com/driazati","followers_url":"https://api.github.com/users/driazati/followers","following_url":"https://api.github.com/users/driazati/following{/other_user}","gists_url":"https://api.github.com/users/driazati/gists{/gist_id}","starred_url":"https://api.github.com/users/driazati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driazati/subscriptions","organizations_url":"https://api.github.com/users/driazati/orgs","repos_url":"https://api.github.com/users/driazati/repos","events_url":"https://api.github.com/users/driazati/events{/privacy}","received_events_url":"https://api.github.com/users/driazati/received_events","type":"User","site_admin":false},"html_url":"https://github.com/driazati/pytorch","description":"Tensors and Dynamic neural networks in Python  with strong GPU acceleration","fork":true,"url":"https://api.github.com/repos/driazati/pytorch","forks_url":"https://api.github.com/repos/driazati/pytorch/forks","keys_url":"https://api.github.com/repos/driazati/pytorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/driazati/pytorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/driazati/pytorch/teams","hooks_url":"https://api.github.com/repos/driazati/pytorch/hooks","issue_events_url":"https://api.github.com/repos/driazati/pytorch/issues/events{/number}","events_url":"https://api.github.com/repos/driazati/pytorch/events","assignees_url":"https://api.github.com/repos/driazati/pytorch/assignees{/user}","branches_url":"https://api.github.com/repos/driazati/pytorch/branches{/branch}","tags_url":"https://api.github.com/repos/driazati/pytorch/tags","blobs_url":"https://api.github.com/repos/driazati/pytorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/driazati/pytorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/driazati/pytorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/driazati/pytorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/driazati/pytorch/statuses/{sha}","languages_url":"https://api.github.com/repos/driazati/pytorch/languages","stargazers_url":"https://api.github.com/repos/driazati/pytorch/stargazers","contributors_url":"https://api.github.com/repos/driazati/pytorch/contributors","subscribers_url":"https://api.github.com/repos/driazati/pytorch/subscribers","subscription_url":"https://api.github.com/repos/driazati/pytorch/subscription","commits_url":"https://api.github.com/repos/driazati/pytorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/driazati/pytorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/driazati/pytorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/driazati/pytorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/driazati/pytorch/contents/{+path}","compare_url":"https://api.github.com/repos/driazati/pytorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/driazati/pytorch/merges","archive_url":"https://api.github.com/repos/driazati/pytorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/driazati/pytorch/downloads","issues_url":"https://api.github.com/repos/driazati/pytorch/issues{/number}","pulls_url":"https://api.github.com/repos/driazati/pytorch/pulls{/number}","milestones_url":"https://api.github.com/repos/driazati/pytorch/milestones{/number}","notifications_url":"https://api.github.com/repos/driazati/pytorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/driazati/pytorch/labels{/name}","releases_url":"https://api.github.com/repos/driazati/pytorch/releases{/id}","deployments_url":"https://api.github.com/repos/driazati/pytorch/deployments","created_at":"2018-07-25T21:46:55Z","updated_at":"2018-11-06T18:13:55Z","pushed_at":"2018-11-07T04:55:12Z","git_url":"git://github.com/driazati/pytorch.git","ssh_url":"git@github.com:driazati/pytorch.git","clone_url":"https://github.com/driazati/pytorch.git","svn_url":"https://github.com/driazati/pytorch","homepage":"http://pytorch.org","size":84535,"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":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pytorch:master","ref":"master","sha":"fbe3c3f57f0b22b6601a768e27f88a10e85787e2","user":{"login":"pytorch","id":21003710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDAzNzEw","avatar_url":"https://avatars3.githubusercontent.com/u/21003710?v=4","gravatar_id":"","url":"https://api.github.com/users/pytorch","html_url":"https://github.com/pytorch","followers_url":"https://api.github.com/users/pytorch/followers","following_url":"https://api.github.com/users/pytorch/following{/other_user}","gists_url":"https://api.github.com/users/pytorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pytorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytorch/subscriptions","organizations_url":"https://api.github.com/users/pytorch/orgs","repos_url":"https://api.github.com/users/pytorch/repos","events_url":"https://api.github.com/users/pytorch/events{/privacy}","received_events_url":"https://api.github.com/users/pytorch/received_events","type":"Organization","site_admin":false},"repo":{"id":65600975,"node_id":"MDEwOlJlcG9zaXRvcnk2NTYwMDk3NQ==","name":"pytorch","full_name":"pytorch/pytorch","private":false,"owner":{"login":"pytorch","id":21003710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDAzNzEw","avatar_url":"https://avatars3.githubusercontent.com/u/21003710?v=4","gravatar_id":"","url":"https://api.github.com/users/pytorch","html_url":"https://github.com/pytorch","followers_url":"https://api.github.com/users/pytorch/followers","following_url":"https://api.github.com/users/pytorch/following{/other_user}","gists_url":"https://api.github.com/users/pytorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pytorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytorch/subscriptions","organizations_url":"https://api.github.com/users/pytorch/orgs","repos_url":"https://api.github.com/users/pytorch/repos","events_url":"https://api.github.com/users/pytorch/events{/privacy}","received_events_url":"https://api.github.com/users/pytorch/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pytorch/pytorch","description":"Tensors and Dynamic neural networks in Python  with strong GPU acceleration","fork":false,"url":"https://api.github.com/repos/pytorch/pytorch","forks_url":"https://api.github.com/repos/pytorch/pytorch/forks","keys_url":"https://api.github.com/repos/pytorch/pytorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pytorch/pytorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pytorch/pytorch/teams","hooks_url":"https://api.github.com/repos/pytorch/pytorch/hooks","issue_events_url":"https://api.github.com/repos/pytorch/pytorch/issues/events{/number}","events_url":"https://api.github.com/repos/pytorch/pytorch/events","assignees_url":"https://api.github.com/repos/pytorch/pytorch/assignees{/user}","branches_url":"https://api.github.com/repos/pytorch/pytorch/branches{/branch}","tags_url":"https://api.github.com/repos/pytorch/pytorch/tags","blobs_url":"https://api.github.com/repos/pytorch/pytorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pytorch/pytorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pytorch/pytorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/pytorch/pytorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/{sha}","languages_url":"https://api.github.com/repos/pytorch/pytorch/languages","stargazers_url":"https://api.github.com/repos/pytorch/pytorch/stargazers","contributors_url":"https://api.github.com/repos/pytorch/pytorch/contributors","subscribers_url":"https://api.github.com/repos/pytorch/pytorch/subscribers","subscription_url":"https://api.github.com/repos/pytorch/pytorch/subscription","commits_url":"https://api.github.com/repos/pytorch/pytorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/pytorch/pytorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/pytorch/pytorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/pytorch/pytorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/pytorch/pytorch/contents/{+path}","compare_url":"https://api.github.com/repos/pytorch/pytorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pytorch/pytorch/merges","archive_url":"https://api.github.com/repos/pytorch/pytorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pytorch/pytorch/downloads","issues_url":"https://api.github.com/repos/pytorch/pytorch/issues{/number}","pulls_url":"https://api.github.com/repos/pytorch/pytorch/pulls{/number}","milestones_url":"https://api.github.com/repos/pytorch/pytorch/milestones{/number}","notifications_url":"https://api.github.com/repos/pytorch/pytorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pytorch/pytorch/labels{/name}","releases_url":"https://api.github.com/repos/pytorch/pytorch/releases{/id}","deployments_url":"https://api.github.com/repos/pytorch/pytorch/deployments","created_at":"2016-08-13T05:26:41Z","updated_at":"2018-11-07T17:38:36Z","pushed_at":"2018-11-07T17:51:33Z","git_url":"git://github.com/pytorch/pytorch.git","ssh_url":"git@github.com:pytorch/pytorch.git","clone_url":"https://github.com/pytorch/pytorch.git","svn_url":"https://github.com/pytorch/pytorch","homepage":"http://pytorch.org","size":85789,"stargazers_count":20872,"watchers_count":20872,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4951,"mirror_url":null,"archived":false,"open_issues_count":2081,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4951,"open_issues":2081,"watchers":20872,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/13647"},"html":{"href":"https://github.com/pytorch/pytorch/pull/13647"},"issue":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/13647"},"comments":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/13647/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/13647/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/13647/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/pytorch/statuses/c7965bc6a4172b4e7d3584bed65931fcb5463748"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"eellison"}}