{"action":"created","issue":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/6069","repository_url":"https://api.github.com/repos/pytorch/pytorch","labels_url":"https://api.github.com/repos/pytorch/pytorch/issues/6069/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/6069/comments","events_url":"https://api.github.com/repos/pytorch/pytorch/issues/6069/events","html_url":"https://github.com/pytorch/pytorch/pull/6069","id":309419091,"number":6069,"title":"Fix printing of unknown binop operator in torchscript","user":{"login":"zou3519","id":5652049,"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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-28T15:32:20Z","updated_at":"2018-03-28T15:38:48Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/6069","html_url":"https://github.com/pytorch/pytorch/pull/6069","diff_url":"https://github.com/pytorch/pytorch/pull/6069.diff","patch_url":"https://github.com/pytorch/pytorch/pull/6069.patch"},"body":"Related to #6049 but not a fix for it.\r\n\r\nBefore, using an unknown binary operator like `@`:\r\n```\r\nimport torch\r\n@torch.jit.script\r\ndef mm(x, y):\r\n    return x @ y\r\n\r\nx = torch.randn(4, 3)\r\ny = torch.randn(3, 2)\r\nmm(x, y)\r\n```\r\nresulted in [this not-so-readable trace](https://gist.github.com/zou3519/052b8998108c4bc0fe0e7c85c6f5758e).\r\n\r\nNow, it tells the user that the problem is an unknown binary operator:\r\n```\r\nNotSupportedError: unsupported binary operator: MatMult\r\n@torch.jit.script\r\ndef mm(x, y):\r\n    return x @ y\r\n            ~~~ <--- HERE\r\n```\r\ncc @apaszke @zdevito "},"comment":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/comments/376932682","html_url":"https://github.com/pytorch/pytorch/pull/6069#issuecomment-376932682","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/6069","id":376932682,"user":{"login":"apaszke","id":4583066,"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},"created_at":"2018-03-28T15:38:47Z","updated_at":"2018-03-28T15:38:47Z","author_association":"OWNER","body":"Can we add a test for this error message?"}}
{"actor":{"display_login":"apaszke"}}