{"action":"created","issue":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/9513","repository_url":"https://api.github.com/repos/pytorch/pytorch","labels_url":"https://api.github.com/repos/pytorch/pytorch/issues/9513/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/9513/comments","events_url":"https://api.github.com/repos/pytorch/pytorch/issues/9513/events","html_url":"https://github.com/pytorch/pytorch/issues/9513","id":342114341,"node_id":"MDU6SXNzdWUzNDIxMTQzNDE=","number":9513,"title":"[jit] support at::optional","user":{"login":"SsnL","id":5674597,"node_id":"MDQ6VXNlcjU2NzQ1OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/5674597?v=4","gravatar_id":"","url":"https://api.github.com/users/SsnL","html_url":"https://github.com/SsnL","followers_url":"https://api.github.com/users/SsnL/followers","following_url":"https://api.github.com/users/SsnL/following{/other_user}","gists_url":"https://api.github.com/users/SsnL/gists{/gist_id}","starred_url":"https://api.github.com/users/SsnL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SsnL/subscriptions","organizations_url":"https://api.github.com/users/SsnL/orgs","repos_url":"https://api.github.com/users/SsnL/repos","events_url":"https://api.github.com/users/SsnL/events{/privacy}","received_events_url":"https://api.github.com/users/SsnL/received_events","type":"User","site_admin":false},"labels":[{"id":679953983,"node_id":"MDU6TGFiZWw2Nzk5NTM5ODM=","url":"https://api.github.com/repos/pytorch/pytorch/labels/jit","name":"jit","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-17T22:39:36Z","updated_at":"2018-07-24T14:16:36Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Currently we can't use `at::optional` in input argument of a native function. I am aware of some on-going work for this which plans to trace `None` numeric types as `nan`. IMO, this isn't ideal because:\r\n1. `nan` is a perfect valid input, and we can't differentiate python input `None` from `math.nan`.\r\n2. `nan` doesn't make sense for integral types.\r\n3. what about other types like `at::optional<std::string>`?"},"comment":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/comments/407422491","html_url":"https://github.com/pytorch/pytorch/issues/9513#issuecomment-407422491","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/9513","id":407422491,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzQyMjQ5MQ==","user":{"login":"zou3519","id":5652049,"node_id":"MDQ6VXNlcjU2NTIwNDk=","avatar_url":"https://avatars3.githubusercontent.com/u/5652049?v=4","gravatar_id":"","url":"https://api.github.com/users/zou3519","html_url":"https://github.com/zou3519","followers_url":"https://api.github.com/users/zou3519/followers","following_url":"https://api.github.com/users/zou3519/following{/other_user}","gists_url":"https://api.github.com/users/zou3519/gists{/gist_id}","starred_url":"https://api.github.com/users/zou3519/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zou3519/subscriptions","organizations_url":"https://api.github.com/users/zou3519/orgs","repos_url":"https://api.github.com/users/zou3519/repos","events_url":"https://api.github.com/users/zou3519/events{/privacy}","received_events_url":"https://api.github.com/users/zou3519/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T14:16:36Z","updated_at":"2018-07-24T14:16:36Z","author_association":"CONTRIBUTOR","body":"cc @wanchaol \r\n\r\n@SsnL the nan is a temporary stopgap. I believe the end state is indeed to support `at::optional` or something similar."}}
{"actor":{"display_login":"zou3519"}}