{"action":"created","issue":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/5466","repository_url":"https://api.github.com/repos/pytorch/pytorch","labels_url":"https://api.github.com/repos/pytorch/pytorch/issues/5466/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/5466/comments","events_url":"https://api.github.com/repos/pytorch/pytorch/issues/5466/events","html_url":"https://github.com/pytorch/pytorch/pull/5466","id":301131736,"number":5466,"title":"torch.load() / torch.save() support arbitrary file-like object","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":5,"created_at":"2018-02-28T18:24:46Z","updated_at":"2018-03-07T15:29:46Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/5466","html_url":"https://github.com/pytorch/pytorch/pull/5466","diff_url":"https://github.com/pytorch/pytorch/pull/5466.diff","patch_url":"https://github.com/pytorch/pytorch/pull/5466.patch"},"body":"Fixes #3648.\r\n\r\nSupports arbitrary file-like object in torch.load and torch.save.\r\nThis is done by calling Python functions on the file-like object from the Python C API.\r\n\r\nCaveats:\r\n- torch.save doesn't support StringIO.StringIO. This is documented and an error gets thrown if torch.save is passed this"},"comment":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/comments/371175720","html_url":"https://github.com/pytorch/pytorch/pull/5466#issuecomment-371175720","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/5466","id":371175720,"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},"created_at":"2018-03-07T15:29:46Z","updated_at":"2018-03-07T15:29:46Z","author_association":"CONTRIBUTOR","body":"@apaszke It turns out that `PyBuffer_FromReadWriteMemory` returns a \"legacy\" PyBuffer (not to be confused with `Py_buffer` so one cannot create a memory view from it. Readinto/write works on the created PyBuffer, but this behavior is undocumented (unless it is implicitly assumed by the docs that a PyBuffer represents a bytes-like object...)"}}
{"actor":{"display_login":"zou3519"}}