{"action":"closed","number":9422,"pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/9422","id":201328534,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMzI4NTM0","html_url":"https://github.com/pytorch/pytorch/pull/9422","diff_url":"https://github.com/pytorch/pytorch/pull/9422.diff","patch_url":"https://github.com/pytorch/pytorch/pull/9422.patch","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/9422","number":9422,"state":"closed","locked":false,"title":"[JIT] allow reading numeric types and tensor attribute objects from all module","user":{"login":"zasdfgbnm","id":1032377,"node_id":"MDQ6VXNlcjEwMzIzNzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1032377?v=4","gravatar_id":"","url":"https://api.github.com/users/zasdfgbnm","html_url":"https://github.com/zasdfgbnm","followers_url":"https://api.github.com/users/zasdfgbnm/followers","following_url":"https://api.github.com/users/zasdfgbnm/following{/other_user}","gists_url":"https://api.github.com/users/zasdfgbnm/gists{/gist_id}","starred_url":"https://api.github.com/users/zasdfgbnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zasdfgbnm/subscriptions","organizations_url":"https://api.github.com/users/zasdfgbnm/orgs","repos_url":"https://api.github.com/users/zasdfgbnm/repos","events_url":"https://api.github.com/users/zasdfgbnm/events{/privacy}","received_events_url":"https://api.github.com/users/zasdfgbnm/received_events","type":"User","site_admin":false},"body":"Currently JIT can only resolve from `torch` and `torch.nn.functional`. This allow JIT to resolve references from other modules. Such as, to allow `@script` functions like:\r\n```python\r\nimport torch\r\nimport math\r\nimport numpy\r\n\r\na = torch.tensor(1.0)\r\n\r\n@torch.jit.script\r\ndef f(x):\r\n    return math.pi * x\r\n\r\n@torch.jit.script\r\ndef g(x):\r\n    return numpy.pi * x\r\n\r\nprint(f(a))\r\nprint(g(a))\r\n```","created_at":"2018-07-13T15:40:49Z","updated_at":"2018-09-26T02:06:36Z","closed_at":"2018-09-26T02:06:36Z","merged_at":null,"merge_commit_sha":"2cd3bef660e8be6759628403ae797f77bdbfc9d6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ezyang","id":13564,"node_id":"MDQ6VXNlcjEzNTY0","avatar_url":"https://avatars0.githubusercontent.com/u/13564?v=4","gravatar_id":"","url":"https://api.github.com/users/ezyang","html_url":"https://github.com/ezyang","followers_url":"https://api.github.com/users/ezyang/followers","following_url":"https://api.github.com/users/ezyang/following{/other_user}","gists_url":"https://api.github.com/users/ezyang/gists{/gist_id}","starred_url":"https://api.github.com/users/ezyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezyang/subscriptions","organizations_url":"https://api.github.com/users/ezyang/orgs","repos_url":"https://api.github.com/users/ezyang/repos","events_url":"https://api.github.com/users/ezyang/events{/privacy}","received_events_url":"https://api.github.com/users/ezyang/received_events","type":"User","site_admin":false},{"login":"zdevito","id":370202,"node_id":"MDQ6VXNlcjM3MDIwMg==","avatar_url":"https://avatars0.githubusercontent.com/u/370202?v=4","gravatar_id":"","url":"https://api.github.com/users/zdevito","html_url":"https://github.com/zdevito","followers_url":"https://api.github.com/users/zdevito/followers","following_url":"https://api.github.com/users/zdevito/following{/other_user}","gists_url":"https://api.github.com/users/zdevito/gists{/gist_id}","starred_url":"https://api.github.com/users/zdevito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdevito/subscriptions","organizations_url":"https://api.github.com/users/zdevito/orgs","repos_url":"https://api.github.com/users/zdevito/repos","events_url":"https://api.github.com/users/zdevito/events{/privacy}","received_events_url":"https://api.github.com/users/zdevito/received_events","type":"User","site_admin":false},{"login":"colesbury","id":655866,"node_id":"MDQ6VXNlcjY1NTg2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/655866?v=4","gravatar_id":"","url":"https://api.github.com/users/colesbury","html_url":"https://github.com/colesbury","followers_url":"https://api.github.com/users/colesbury/followers","following_url":"https://api.github.com/users/colesbury/following{/other_user}","gists_url":"https://api.github.com/users/colesbury/gists{/gist_id}","starred_url":"https://api.github.com/users/colesbury/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colesbury/subscriptions","organizations_url":"https://api.github.com/users/colesbury/orgs","repos_url":"https://api.github.com/users/colesbury/repos","events_url":"https://api.github.com/users/colesbury/events{/privacy}","received_events_url":"https://api.github.com/users/colesbury/received_events","type":"User","site_admin":false},{"login":"soumith","id":1310570,"node_id":"MDQ6VXNlcjEzMTA1NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/1310570?v=4","gravatar_id":"","url":"https://api.github.com/users/soumith","html_url":"https://github.com/soumith","followers_url":"https://api.github.com/users/soumith/followers","following_url":"https://api.github.com/users/soumith/following{/other_user}","gists_url":"https://api.github.com/users/soumith/gists{/gist_id}","starred_url":"https://api.github.com/users/soumith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soumith/subscriptions","organizations_url":"https://api.github.com/users/soumith/orgs","repos_url":"https://api.github.com/users/soumith/repos","events_url":"https://api.github.com/users/soumith/events{/privacy}","received_events_url":"https://api.github.com/users/soumith/received_events","type":"User","site_admin":false},{"login":"gchanan","id":3768583,"node_id":"MDQ6VXNlcjM3Njg1ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/3768583?v=4","gravatar_id":"","url":"https://api.github.com/users/gchanan","html_url":"https://github.com/gchanan","followers_url":"https://api.github.com/users/gchanan/followers","following_url":"https://api.github.com/users/gchanan/following{/other_user}","gists_url":"https://api.github.com/users/gchanan/gists{/gist_id}","starred_url":"https://api.github.com/users/gchanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gchanan/subscriptions","organizations_url":"https://api.github.com/users/gchanan/orgs","repos_url":"https://api.github.com/users/gchanan/repos","events_url":"https://api.github.com/users/gchanan/events{/privacy}","received_events_url":"https://api.github.com/users/gchanan/received_events","type":"User","site_admin":false},{"login":"apaszke","id":4583066,"node_id":"MDQ6VXNlcjQ1ODMwNjY=","avatar_url":"https://avatars3.githubusercontent.com/u/4583066?v=4","gravatar_id":"","url":"https://api.github.com/users/apaszke","html_url":"https://github.com/apaszke","followers_url":"https://api.github.com/users/apaszke/followers","following_url":"https://api.github.com/users/apaszke/following{/other_user}","gists_url":"https://api.github.com/users/apaszke/gists{/gist_id}","starred_url":"https://api.github.com/users/apaszke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apaszke/subscriptions","organizations_url":"https://api.github.com/users/apaszke/orgs","repos_url":"https://api.github.com/users/apaszke/repos","events_url":"https://api.github.com/users/apaszke/events{/privacy}","received_events_url":"https://api.github.com/users/apaszke/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":679953983,"node_id":"MDU6TGFiZWw2Nzk5NTM5ODM=","url":"https://api.github.com/repos/pytorch/pytorch/labels/jit","name":"jit","color":"c5def5","default":false},{"id":559719279,"node_id":"MDU6TGFiZWw1NTk3MTkyNzk=","url":"https://api.github.com/repos/pytorch/pytorch/labels/ready%20for%20review","name":"ready for review","color":"b60205","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/pytorch/pulls/9422/commits","review_comments_url":"https://api.github.com/repos/pytorch/pytorch/pulls/9422/comments","review_comment_url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/9422/comments","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/bbfe33085bc57fe1ee0ac7a62327605f44c933f9","head":{"label":"zasdfgbnm:constants_in_math","ref":"constants_in_math","sha":"bbfe33085bc57fe1ee0ac7a62327605f44c933f9","user":{"login":"zasdfgbnm","id":1032377,"node_id":"MDQ6VXNlcjEwMzIzNzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1032377?v=4","gravatar_id":"","url":"https://api.github.com/users/zasdfgbnm","html_url":"https://github.com/zasdfgbnm","followers_url":"https://api.github.com/users/zasdfgbnm/followers","following_url":"https://api.github.com/users/zasdfgbnm/following{/other_user}","gists_url":"https://api.github.com/users/zasdfgbnm/gists{/gist_id}","starred_url":"https://api.github.com/users/zasdfgbnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zasdfgbnm/subscriptions","organizations_url":"https://api.github.com/users/zasdfgbnm/orgs","repos_url":"https://api.github.com/users/zasdfgbnm/repos","events_url":"https://api.github.com/users/zasdfgbnm/events{/privacy}","received_events_url":"https://api.github.com/users/zasdfgbnm/received_events","type":"User","site_admin":false},"repo":{"id":133190875,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMxOTA4NzU=","name":"pytorch","full_name":"zasdfgbnm/pytorch","private":false,"owner":{"login":"zasdfgbnm","id":1032377,"node_id":"MDQ6VXNlcjEwMzIzNzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1032377?v=4","gravatar_id":"","url":"https://api.github.com/users/zasdfgbnm","html_url":"https://github.com/zasdfgbnm","followers_url":"https://api.github.com/users/zasdfgbnm/followers","following_url":"https://api.github.com/users/zasdfgbnm/following{/other_user}","gists_url":"https://api.github.com/users/zasdfgbnm/gists{/gist_id}","starred_url":"https://api.github.com/users/zasdfgbnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zasdfgbnm/subscriptions","organizations_url":"https://api.github.com/users/zasdfgbnm/orgs","repos_url":"https://api.github.com/users/zasdfgbnm/repos","events_url":"https://api.github.com/users/zasdfgbnm/events{/privacy}","received_events_url":"https://api.github.com/users/zasdfgbnm/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zasdfgbnm/pytorch","description":"Tensors and Dynamic neural networks in Python  with strong GPU acceleration","fork":true,"url":"https://api.github.com/repos/zasdfgbnm/pytorch","forks_url":"https://api.github.com/repos/zasdfgbnm/pytorch/forks","keys_url":"https://api.github.com/repos/zasdfgbnm/pytorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zasdfgbnm/pytorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zasdfgbnm/pytorch/teams","hooks_url":"https://api.github.com/repos/zasdfgbnm/pytorch/hooks","issue_events_url":"https://api.github.com/repos/zasdfgbnm/pytorch/issues/events{/number}","events_url":"https://api.github.com/repos/zasdfgbnm/pytorch/events","assignees_url":"https://api.github.com/repos/zasdfgbnm/pytorch/assignees{/user}","branches_url":"https://api.github.com/repos/zasdfgbnm/pytorch/branches{/branch}","tags_url":"https://api.github.com/repos/zasdfgbnm/pytorch/tags","blobs_url":"https://api.github.com/repos/zasdfgbnm/pytorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zasdfgbnm/pytorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zasdfgbnm/pytorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/zasdfgbnm/pytorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zasdfgbnm/pytorch/statuses/{sha}","languages_url":"https://api.github.com/repos/zasdfgbnm/pytorch/languages","stargazers_url":"https://api.github.com/repos/zasdfgbnm/pytorch/stargazers","contributors_url":"https://api.github.com/repos/zasdfgbnm/pytorch/contributors","subscribers_url":"https://api.github.com/repos/zasdfgbnm/pytorch/subscribers","subscription_url":"https://api.github.com/repos/zasdfgbnm/pytorch/subscription","commits_url":"https://api.github.com/repos/zasdfgbnm/pytorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/zasdfgbnm/pytorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/zasdfgbnm/pytorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/zasdfgbnm/pytorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/zasdfgbnm/pytorch/contents/{+path}","compare_url":"https://api.github.com/repos/zasdfgbnm/pytorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zasdfgbnm/pytorch/merges","archive_url":"https://api.github.com/repos/zasdfgbnm/pytorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zasdfgbnm/pytorch/downloads","issues_url":"https://api.github.com/repos/zasdfgbnm/pytorch/issues{/number}","pulls_url":"https://api.github.com/repos/zasdfgbnm/pytorch/pulls{/number}","milestones_url":"https://api.github.com/repos/zasdfgbnm/pytorch/milestones{/number}","notifications_url":"https://api.github.com/repos/zasdfgbnm/pytorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zasdfgbnm/pytorch/labels{/name}","releases_url":"https://api.github.com/repos/zasdfgbnm/pytorch/releases{/id}","deployments_url":"https://api.github.com/repos/zasdfgbnm/pytorch/deployments","created_at":"2018-05-12T23:32:13Z","updated_at":"2018-09-23T04:55:52Z","pushed_at":"2018-09-25T19:39:35Z","git_url":"git://github.com/zasdfgbnm/pytorch.git","ssh_url":"git@github.com:zasdfgbnm/pytorch.git","clone_url":"https://github.com/zasdfgbnm/pytorch.git","svn_url":"https://github.com/zasdfgbnm/pytorch","homepage":"http://pytorch.org","size":75918,"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":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pytorch:master","ref":"master","sha":"e7f49d1444330cc6704c3653a6e7ab0f5f53eb6a","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-09-26T01:28:38Z","pushed_at":"2018-09-26T02:04:41Z","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":76725,"stargazers_count":18979,"watchers_count":18979,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4559,"mirror_url":null,"archived":false,"open_issues_count":1777,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4559,"open_issues":1777,"watchers":18979,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/9422"},"html":{"href":"https://github.com/pytorch/pytorch/pull/9422"},"issue":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/9422"},"comments":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/9422/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/9422/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/9422/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/pytorch/statuses/bbfe33085bc57fe1ee0ac7a62327605f44c933f9"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":9,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":27,"deletions":8,"changed_files":2}}
{"actor":{"display_login":"zasdfgbnm"}}