nvflare.client.cell.defs module

Protocol vocabulary for the Client API control protocol over Cell.

This module is the frozen control-protocol vocabulary of the Client API Execution Modes design (docs/design/client_api_execution_modes.md, “Control Protocol”). It is consumed by the trainer-side Cell engine, the external_process backend, and the attach backend. It is a pure vocabulary module: constants only, no Cell/cellnet imports, no I/O.

class MsgKey[source]

Bases: object

Keys for Client API control protocol message payloads.

These string values are the frozen wire contract shared across tracks; renaming a value is a protocol break, not a refactor.

ATTACH_ID = 'attach_id'
JOB_ID = 'job_id'
MANIFEST = 'manifest'
MODEL = 'model'
NONCE = 'nonce'
PARAMS = 'params'
PROOF = 'proof'
PROTOCOL_VERSION = 'protocol_version'
RANK = 'rank'
RANK_POLICY = 'rank_policy'
REASON = 'reason'
RESULT_ID = 'result_id'
SESSION_ID = 'session_id'
SITE_NAME = 'site_name'
TARGET_FQCN = 'target_fqcn'
TASK_ID = 'task_id'
TASK_NAME = 'task_name'
TRAINER_FQCN = 'trainer_fqcn'
TRANSFER_ID = 'transfer_id'
class Topic[source]

Bases: object

Topics of the Client API control protocol messages over the Cell CHANNEL.

Reply-type messages (HELLO_CHALLENGE, HELLO_ACCEPTED, TASK_ACCEPTED, RESULT_ACCEPTED, RESULT_REJECTED) may be modeled as Cell request replies at runtime rather than separate sends; the constants still name them so state machines, logs, and tests share one vocabulary.

Values are prefixed with “client_api.” so they never collide with legacy topic values (e.g. “hello”/”heartbeat”/”abort”/”bye” in nvflare/client/ipc/defs.py).

ABORT = 'client_api.abort'
BYE = 'client_api.bye'
ERROR = 'client_api.error'
HEARTBEAT = 'client_api.heartbeat'
HELLO = 'client_api.hello'
HELLO_ACCEPTED = 'client_api.hello_accepted'
HELLO_CHALLENGE = 'client_api.hello_challenge'
HELLO_PROOF = 'client_api.hello_proof'
HELLO_REJECTED = 'client_api.hello_rejected'
LOG = 'client_api.log'
RESULT_ACCEPTED = 'client_api.result_accepted'
RESULT_READY = 'client_api.result_ready'
RESULT_REJECTED = 'client_api.result_rejected'
SHUTDOWN = 'client_api.shutdown'
TASK_ACCEPTED = 'client_api.task_accepted'
TASK_FAILED = 'client_api.task_failed'
TASK_PAYLOAD_READY = 'client_api.task_payload_ready'
TASK_READY = 'client_api.task_ready'