openfl.component.envoy
Envoy package.
- class openfl.component.envoy.Envoy(*, shard_name: str, director_host: str, director_port: int, shard_descriptor: Type[ShardDescriptor], root_certificate: Path | str | None = None, private_key: Path | str | None = None, certificate: Path | str | None = None, tls: bool = True, install_requirements: bool = True, cuda_devices: tuple | list = (), cuda_device_monitor: Type[CUDADeviceMonitor] | None = None, review_plan_callback: None | Callable = None)
Envoy class. The Envoy is a long-lived entity that runs on collaborator nodes connected to the Director.
- Class Attributes:
name (str) – The name of the shard.
root_certificate (Union[Path, str]) – The path to the root certificate for TLS.
private_key (Union[Path, str]) – The path to the private key for TLS.
certificate (Union[Path, str]) – The path to the certificate for TLS.
director_client (ShardDirectorClient) – The director client.
shard_descriptor (Type[ShardDescriptor]) – The shard descriptor.
cuda_devices (tuple) – The CUDA devices.
install_requirements (bool) – A flag indicating if the requirements should be installed.
review_plan_callback (Union[None, Callable]) – A callback function for reviewing the plan.
cuda_device_monitor (Optional[Type[CUDADeviceMonitor]]) – The CUDA device monitor.
executor (ThreadPoolExecutor) – The executor for running tasks.
running_experiments (dict) – A dictionary to store the running experiments.
is_experiment_running (bool) – A flag indicating if an experiment is running.
_health_check_future (object) – The future object for the health check.
- run()
Run of the envoy working cycle.
- send_health_check()
Send health check to the director.
- start()
Start the envoy.
|
Envoy module. |