tff.framework.RemoteExecutor

View source on GitHub

The remote executor is a local proxy for a remote executor instance.

Inherits From: Executor

tff.framework.RemoteExecutor(
    channel, rpc_mode='REQUEST_REPLY', thread_pool_executor=None,
    dispose_batch_size=20
)

Args:

  • channel: An instance of grpc.Channel to use for communication with the remote executor service.
  • rpc_mode: Optional mode of calling the remote executor. Must be either 'REQUEST_REPLY' or 'STREAMING' (defaults to 'REQUEST_REPLY'). This option will be removed after the request-reply interface is deprecated.
  • thread_pool_executor: Optional concurrent.futures.Executor used to wait for the reply to a streaming RPC message. Uses the default Executor if not specified.
  • dispose_batch_size: The batch size for requests to dispose of remote worker values. Lower values will result in more requests to the remote worker, but will result in values being cleaned up sooner and therefore may result in lower memory usage on the remote worker.

Methods

close

View source

close()

Release resources associated with this Executor, if any.

If the executor has one or more target Executors, implementation of this method must close them.

create_call

View source

create_call(
    *args, **kwargs
)

create_selection

View source

create_selection(
    *args, **kwargs
)

create_tuple

View source

create_tuple(
    *args, **kwargs
)

create_value

View source

create_value(
    *args, **kwargs
)