TensorPlay
API reference
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-08

tensorplay.distributed.elastic.rendezvous API

Functions 1

Classes 9

#

DynamicRendezvousHandler

classFull reference ↗
class tensorplay.distributed.elastic.rendezvous.DynamicRendezvousHandler(backend: RendezvousBackend | _NodeDesc | None = None, settings: RendezvousSettings | None = None, local_addr: str | None = None, node_rank: int = 0, run_id: str = '', store: Store | None = None, backend_name: str = 'core', state_holder: _RendezvousStateHolder | None = None, node: _NodeDesc | None = None)[source]

Coordinate membership, ranks, heartbeats, and round transitions.

pre_shutdown() → None

Optional hook invoked before shutdown() during agent teardown.

#

P10dRendezvousBackend

classFull reference ↗
class tensorplay.distributed.elastic.rendezvous.P10dRendezvousBackend(store: Store, run_id: str)[source]

Rendezvous state backend backed by a TP key/value Store.

#

RendezvousHandler

classFull reference ↗
class tensorplay.distributed.elastic.rendezvous.RendezvousHandler[source]

Algorithmic interface of one rendezvous backend.

abstractmethod get_backend() → str[source]

Backend name (e.g. static or core).

abstractmethod get_run_id() → str[source]

Run identifier of this rendezvous.

abstractmethod is_closed() → bool[source]

Whether the rendezvous has been marked closed.

abstractmethod next_rendezvous() → RendezvousInfo[source]

Join or re-join the rendezvous; blocks until this round completes.

abstractmethod num_nodes_waiting() → int[source]

Number of nodes queued for the next round (pending scale-up).

pre_shutdown() → None[source]

Optional hook invoked before shutdown() during agent teardown.

abstractmethod set_closed() → None[source]

Mark the rendezvous closed; new joiners are rejected.

abstractmethod shutdown() → bool[source]

Release rendezvous resources; returns True when the backend shut down.

property use_agent_store: bool

Whether workers can reuse the agent-held store as their bootstrap store.

#

RendezvousInfo

classFull reference ↗
class tensorplay.distributed.elastic.rendezvous.RendezvousInfo(store: Store, rank: int, world_size: int, bootstrap_store_info: RendezvousStoreInfo | None = None, participants: list | None = None, wait_list: list | None = None)[source]

Outcome of a successful rendezvous for one agent.

property bootstrap_store_info: RendezvousStoreInfo | None

Connection info for the worker-facing bootstrap store.

property participants: list

Nodes participating in this round.

property rank: int

This agent’s rank within the rendezvous.

property store: Store

Shared store for this rendezvous round.

property wait_list: list

Nodes waiting for a future round.

property world_size: int

Number of participating agents.

#

RendezvousParameters

classFull reference ↗
class tensorplay.distributed.elastic.rendezvous.RendezvousParameters(backend: str, endpoint: str, run_id: str, *args, min_nodes: int | None = None, max_nodes: int | None = None, local_addr: str | None = None, node_rank: int = 0, local_world_size: int = 1, config: dict | None = None, **kwargs)[source]

Parameters describing one rendezvous request.

endpoint is host:port of the rendezvous store, local_addr the address of this node (autodetected when empty), and config carries backend-specific options accessible through get().

get(key: str, default=None)[source]

Return backend parameter key or default.

get_as_bool(key: str, default: bool | None = None) → bool | None[source]

Return key coerced to bool (accepts 1/0/true/false).

get_as_int(key: str, default: int | None = None) → int | None[source]

Return key coerced to int.

property timeout: RendezvousTimeout

Timeouts assembled from join/last_call/close/heartbeat params (seconds).

#

RendezvousStoreInfo

classFull reference ↗
class tensorplay.distributed.elastic.rendezvous.RendezvousStoreInfo(master_addr: str, port: int)[source]

Connection information for the bootstrap store handed to workers.

property addr: str

Alias of master_addr.

classmethod build(rank: int, store: Store, local_addr: str | None = None, server_port: int | None = None)[source]

Derive store info for rank from the rendezvous store.

Rank 0 owns the address/port pair: it uses the store’s own listening endpoint when available and otherwise publishes one through the store so every other rank can read it.

#

StaticTCPRendezvous

classFull reference ↗
class tensorplay.distributed.elastic.rendezvous.StaticTCPRendezvous(params: RendezvousParameters | str, master_port: int | None = None, rank: int = 0, world_size: int = 1, run_id: str = '', timeout: int = 600)[source]

One-shot rendezvous over a static TCPStore endpoint.

pre_shutdown() → None

Optional hook invoked before shutdown() during agent teardown.

#

TpRendezvousBackend

classFull reference ↗
class tensorplay.distributed.elastic.rendezvous.TpRendezvousBackend(store: Store, run_id: str)[source]

Store rendezvous state behind compare-and-set operations.

Exceptions 7

#

RendezvousClosedError

exceptionFull reference ↗
exception tensorplay.distributed.elastic.rendezvous.RendezvousClosedError[source]

The rendezvous has been closed and accepts no more participants.

#

RendezvousConnectionError

exceptionFull reference ↗
exception tensorplay.distributed.elastic.rendezvous.RendezvousConnectionError[source]

The rendezvous backend store could not be reached.

#

RendezvousError

exceptionFull reference ↗
exception tensorplay.distributed.elastic.rendezvous.RendezvousError[source]

Base class for all rendezvous failures.

#

RendezvousExhaustedError

exceptionFull reference ↗
exception tensorplay.distributed.elastic.rendezvous.RendezvousExhaustedError(config, timeout)[source]

The rendezvous join window elapsed without reaching min nodes.

#

RendezvousGracefulExitError

exceptionFull reference ↗
exception tensorplay.distributed.elastic.rendezvous.RendezvousGracefulExitError[source]

Raised to unwind an agent when it is the last node leaving.

#

RendezvousStateError

exceptionFull reference ↗
exception tensorplay.distributed.elastic.rendezvous.RendezvousStateError[source]

The rendezvous state is corrupt or the backend rejected an update.

#

RendezvousTimeoutError

exceptionFull reference ↗
exception tensorplay.distributed.elastic.rendezvous.RendezvousTimeoutError[source]

A rendezvous phase exceeded its time budget.

On this page

Ask DeepWiki