syft.generic.pointers.pointer_plan¶
Module Contents¶
-
class
syft.generic.pointers.pointer_plan.PointerPlan(location: AbstractWorker = None, id_at_location: Union[str, int] = None, owner: AbstractWorker = None, garbage_collect_data: bool = True, id: Union[str, int] = None, tags: List[str] = None, description: str = None)¶ Bases:
syft.generic.pointers.object_pointer.ObjectPointerThe PointerPlan keeps a reference to a remote Plan.
It allows to: - __call__ an evaluation of the remote plan - get the remote plan
It’s a simplification compared to the current hybrid state of Plans which can be seen as pointers, which is ambiguous.
-
property
location(self)¶
-
property
id_at_location(self)¶
-
__call__(self, *args, **kwargs)¶ Transform the call on the pointer in a request to evaluate the remote plan
-
parameters(self)¶ Return a list of pointers to the plan parameters
-
request_run_plan(self, location: sy.workers.BaseWorker, response_ids: List[Union[str, int]], *args, **kwargs)¶ Requests plan execution.
Send a request to execute the plan on the remote location.
- Parameters
location – to which worker the request should be sent
response_ids – where the result should be stored
args – arguments used as input data for the plan
kwargs – named arguments used as input data for the plan
- Returns
Execution response
-
get(self, deregister_ptr: bool = True)¶ This is an alias to fetch_plan, to behave like a pointer
-
static
simplify(worker: AbstractWorker, ptr: PointerPlan)¶
-
static
detail(worker: AbstractWorker, tensor_tuple: tuple)¶
-
wrap(self)¶
-
__str__(self)¶ Returns a string version of this pointer.
Example
For single pointers: > [PointerPlan | me:33873097403 -> dan:72165846784]
Or for multi pointers: > [PointerPlan | me:55894304374
-> alice:72165846784 -> bob:72165846784
]
-
__del__(self)¶ This method garbage collects the object this pointer is pointing to. By default, PySyft assumes that every object only has one pointer to it. Thus, if the pointer gets garbage collected, we want to automatically garbage collect the object being pointed to.
-
property