PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

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

Open iamtrask opened this issue 7 years ago • 11 comments

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)

iamtrask avatar Aug 07 '19 16:08 iamtrask

I would like to take this issue

shashigharti avatar Aug 10 '19 05:08 shashigharti

Is the issue and the description still up to date?

gmuraru avatar Oct 22 '19 14:10 gmuraru

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

Av01 avatar Dec 26 '19 19:12 Av01

Is this still open?

agarwalmanvi avatar Feb 24 '20 20:02 agarwalmanvi

@iamtrask I would like to take up this issue.

sachin-101 avatar Mar 14 '20 10:03 sachin-101

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.

sachin-101 avatar Mar 14 '20 12:03 sachin-101

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.

iamtrask avatar Mar 14 '20 15:03 iamtrask

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 [email protected] 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 .

iamtrask avatar Mar 17 '20 10:03 iamtrask

I'm working on it

Kritikalcoder avatar Apr 24 '20 06:04 Kritikalcoder

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.

github-actions[bot] avatar May 25 '20 00:05 github-actions[bot]

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.

github-actions[bot] avatar Jun 25 '20 00:06 github-actions[bot]