Pysyft: Add "force_delete()" method to Object Pointers (including TensorPointer)

Created on 7 Aug 2019  Â·  11Comments  Â·  Source: OpenMined/PySyft

In some environments the garbage collector doesn't actually collect your objects, even when you call "del my_obj". This can be annoying when trying to tell a remote worker to delete an object. Thus, it would be very nice to have a couple of overrides, one on the object itself... which should work something like this.

Let's say I have a pointer

x_ptr = th.tensor([1,2,3,4,5]).send(bob)

I want to be able to force Bob to delete it by going.

x_ptr.force_delete()

This will require adding a new function to https://github.com/OpenMined/PySyft/blob/dev/syft/frameworks/torch/pointers/object_pointer.py and to native.py.

It would also be nice to have the same function on the worker, so we could altenratively do.

bob.force_delete(x_ptr)

or equivalently

bob.force_delete(x_ptr.id)

Good first issue Status Type

Most helpful comment

I'm working on it

All 11 comments

I would like to take this issue

Is the issue and the description still up to date?

If this issue has not been assigned to anyone, can I work on it?

Is this still open?

@iamtrask I would like to take up this issue.

I went through the code and found a method similar to the one mentioned by you.
https://github.com/OpenMined/PySyft/blob/0561a5d21c1787afeeb9753a0487f0c91d38a07d/syft/generic/object_storage.py#L93
I also noticed that this issue occurs while working in jupyter notebook. So, if you need any more functionalities to be implemented, let me know.

Anyone can work on this issue. @sachin-101 it looks like no-one has begun work. Feel free to jump in.

In the future it's better to simply say "I'm working on it" and then immediately create a 'work in progress" PR so we can see your current status. This also allows people to collaborate with you.

That method is similar but it's on the worker. We need am method on a
PointerTensor :)

On Sat, Mar 14, 2020 at 12:13 PM Sachin Kumar notifications@github.com
wrote:

I went through the code and found a method similar to the one mentioned by
you.
Link:
https://github.com/OpenMined/PySyft/blob/0561a5d21c1787afeeb9753a0487f0c91d38a07d/syft/generic/object_storage.py#L93
I also noticed that this issue occurs while working in jupyter notebook.
So, if you need any more functionalities to be implemented, let me know.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/OpenMined/PySyft/issues/2448#issuecomment-599049851,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBAZER3J74W5U7PUYMV6LTRHNYE3ANCNFSM4IKCFPJA
.

I'm working on it

This issue has been marked stale because it has been open 30 days with no activity. Leave a comment or remove the stale label to unmark it. Otherwise, this will be closed in 7 days.

This issue has been marked stale because it has been open 30 days with no activity. Leave a comment or remove the stale label to unmark it. Otherwise, this will be closed in 7 days.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jvmncs picture jvmncs  Â·  3Comments

iamtrask picture iamtrask  Â·  4Comments

wentaiwu92 picture wentaiwu92  Â·  4Comments

swaroopch picture swaroopch  Â·  4Comments

IonesioJunior picture IonesioJunior  Â·  3Comments