nvflare.client.cell.bootstrap module

Typed connection profiles for Cell-based Client API execution.

External-process profiles are owner-written launch bootstraps. Attach profiles are pre-provisioned independently of a job. Key strings and schema versions are persisted protocol and must remain stable.

class BootstrapKey[source]

Bases: object

Stable keys shared by the backend and trainer.

ATTACH_ID = 'attach_id'
AUTH_IDENTITY = 'auth_identity'
CA_CERT = 'ca_cert'
CJ_FQCN = 'cj_fqcn'
CJ_PID = 'cj_pid'
CONNECTION_SECURITY = 'connection_security'
CONNECT_URL = 'connect_url'
CP_FQCN = 'cp_fqcn'
CUDA_EMPTY_CACHE = 'cuda_empty_cache'
EXECUTION_MODE = 'execution_mode'
JOB_ID = 'job_id'
JOB_WAIT_TIMEOUT = 'job_wait_timeout'
LAUNCH_TOKEN = 'launch_token'
MEMORY_GC_ROUNDS = 'memory_gc_rounds'
RENDEZVOUS_DIR = 'rendezvous_dir'
SCHEMA_VERSION = 'schema_version'
SECURE_MODE = 'secure_mode'
SITE_NAME = 'site_name'
TASK_EXCHANGE = 'task_exchange'
TRAINER_FQCN = 'trainer_fqcn'
bootstrap_file_name(seq: int) str[source]

Return a launch-scoped bootstrap name so stale processes retain stale credentials.

get_bootstrap_client_api_type(config: dict, path: str = '<bootstrap config>') str | None[source]

Return CELL_API_TYPE for a typed config or None for a legacy config.

If either envelope marker exists, require both and reject unsupported values rather than silently selecting the legacy engine.

read_bootstrap_config(path: str) dict[source]

Read a JSON-object bootstrap config.

write_bootstrap_config(path: str, config: dict) None[source]

Atomically write an owner-only bootstrap file.

A sibling temporary preserves an existing file on failure and avoids following a planted destination symlink.