openfl.component.envoy.envoy.Envoy#
- class openfl.component.envoy.envoy.Envoy(*, shard_name, director_host, director_port, shard_descriptor, root_certificate=None, private_key=None, certificate=None, tls=True, install_requirements=True, cuda_devices=(), cuda_device_monitor=None, review_plan_callback=None)[source]#
Bases:
objectEnvoy class. The Envoy is a long-lived entity that runs on collaborator nodes connected to the Director.
- Parameters:
shard_name (str)
director_host (str)
director_port (int)
shard_descriptor (Type[ShardDescriptor])
root_certificate (Path | str | None)
private_key (Path | str | None)
certificate (Path | str | None)
tls (bool)
install_requirements (bool)
cuda_devices (tuple | list)
cuda_device_monitor (Type[CUDADeviceMonitor] | None)
review_plan_callback (None | Callable)
- name#
The name of the shard.
- Type:
str
- root_certificate#
The path to the root certificate for TLS.
- Type:
Union[Path, str]
- private_key#
The path to the private key for TLS.
- Type:
Union[Path, str]
- certificate#
The path to the certificate for TLS.
- Type:
Union[Path, str]
- director_client#
The director client.
- Type:
- shard_descriptor#
The shard descriptor.
- Type:
Type[ShardDescriptor]
- cuda_devices#
The CUDA devices.
- Type:
tuple
- install_requirements#
A flag indicating if the requirements should be installed.
- Type:
bool
- review_plan_callback#
A callback function for reviewing the plan.
- Type:
Union[None, Callable]
- cuda_device_monitor#
The CUDA device monitor.
- Type:
Optional[Type[CUDADeviceMonitor]]
- executor#
The executor for running tasks.
- Type:
ThreadPoolExecutor
- running_experiments#
A dictionary to store the running experiments.
- Type:
dict
- is_experiment_running#
A flag indicating if an experiment is running.
- Type:
bool
- _health_check_future#
The future object for the health check.
- Type:
object
- __init__(*, shard_name, director_host, director_port, shard_descriptor, root_certificate=None, private_key=None, certificate=None, tls=True, install_requirements=True, cuda_devices=(), cuda_device_monitor=None, review_plan_callback=None)[source]#
Initialize a envoy object.
- Parameters:
shard_name (str) – The name of the shard.
director_host (str) – The host of the director.
director_port (int) – The port of the director.
shard_descriptor (Type[ShardDescriptor]) – The shard descriptor.
root_certificate (Optional[Union[Path, str]], optional) – The path to the root certificate for TLS. Defaults to None.
private_key (Optional[Union[Path, str]], optional) – The path to the private key for TLS. Defaults to None.
certificate (Optional[Union[Path, str]], optional) – The path to the certificate for TLS. Defaults to None.
tls (bool, optional) – A flag indicating if TLS should be used for connections. Defaults to True.
install_requirements (bool, optional) – A flag indicating if the requirements should be installed. Defaults to True.
cuda_devices (Union[tuple, list], optional) – The CUDA devices. Defaults to ().
cuda_device_monitor (Optional[Type[CUDADeviceMonitor]], optional) – The CUDA device monitor. Defaults to None.
review_plan_callback (Union[None, Callable], optional) – A callback function for reviewing the plan. Defaults to None.
- Return type:
None
Methods