{"action":"closed","issue":{"url":"https://api.github.com/repos/OpenMined/PySyft/issues/1645","repository_url":"https://api.github.com/repos/OpenMined/PySyft","labels_url":"https://api.github.com/repos/OpenMined/PySyft/issues/1645/labels{/name}","comments_url":"https://api.github.com/repos/OpenMined/PySyft/issues/1645/comments","events_url":"https://api.github.com/repos/OpenMined/PySyft/issues/1645/events","html_url":"https://github.com/OpenMined/PySyft/issues/1645","id":374904005,"node_id":"MDU6SXNzdWUzNzQ5MDQwMDU=","number":1645,"title":"Variable-Tensors are not completely removed from the receiver after get()","user":{"login":"Ogofo","id":1909690,"node_id":"MDQ6VXNlcjE5MDk2OTA=","avatar_url":"https://avatars0.githubusercontent.com/u/1909690?v=4","gravatar_id":"","url":"https://api.github.com/users/Ogofo","html_url":"https://github.com/Ogofo","followers_url":"https://api.github.com/users/Ogofo/followers","following_url":"https://api.github.com/users/Ogofo/following{/other_user}","gists_url":"https://api.github.com/users/Ogofo/gists{/gist_id}","starred_url":"https://api.github.com/users/Ogofo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ogofo/subscriptions","organizations_url":"https://api.github.com/users/Ogofo/orgs","repos_url":"https://api.github.com/users/Ogofo/repos","events_url":"https://api.github.com/users/Ogofo/events{/privacy}","received_events_url":"https://api.github.com/users/Ogofo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-29T08:22:53Z","updated_at":"2018-11-02T11:04:36Z","closed_at":"2018-11-02T11:04:36Z","author_association":"CONTRIBUTOR","body":"Hey, check out this quick example:\r\n\r\n```\r\nimport syft as sy\r\nimport torch\r\nfrom torch.autograd import Variable as Var\r\nhook = sy.TorchHook(verbose=True)\r\nme = hook.local_worker\r\nbob = sy.VirtualWorker(id=\"Bob\", hook=hook, is_client_worker=False)\r\nx_var = Var(torch.FloatTensor([1,2,3,4]))\r\nprint(bob._objects)\r\n\r\n>>>> {}\r\n\r\nx_var.send(bob)\r\nprint(bob._objects)\r\n\r\n>>>> {\r\n           59413128941: [_LocalTensor - id:59413128941 owner:Bob], \r\n           54679542725: [_LocalTensor - id:54679542725 owner:Bob], \r\n           49424246791: [_LocalTensor - id:49424246791 owner:Bob], \r\n           84172249055: [_LocalTensor - id:84172249055 owner:Bob]\r\n     }\r\n\r\nx_var.get()\r\nprint(bob._objects)\r\n\r\n>>>> {84172249055: [_LocalTensor - id:84172249055 owner:Bob]}\r\n```\r\n\r\nRegistering a variable creates 4 objects in the local registry (`base.py:register(self, result)`). `get()`only triggers `de_register()` on the three of them, leaving out `self.register(variable.grad.data.child)`. I'm not sure wether the issue is in `get()` or within the `de_register()` method, but I would like to fix this issue. "}}
{"actor":{"display_login":"iamtrask"}}