latest (dev)
Copy
Latest development documentation · Updated 2026-10-08
tensorplay.distributed.elastic.multiprocessing API
Functions 2
start_processes
functionFull reference ↗- tensorplay.distributed.elastic.multiprocessing.start_processes(*args, **kwargs)[source]
to_map
functionFull reference ↗Classes 5
PContext
classFull reference ↗- class tensorplay.distributed.elastic.multiprocessing.PContext(name: str, entrypoint: ~collections.abc.Callable | str, args: tuple, envs: dict[int, dict[str, str]], logs_specs: ~tensorplay.distributed.elastic.multiprocessing.api.LogsSpecs | None = None, log_dir: str | None = None, redirects: ~tensorplay.distributed.elastic.multiprocessing.redirects.Std | dict[int, ~tensorplay.distributed.elastic.multiprocessing.redirects.Std] = <Std.NONE: 0>, tee: ~tensorplay.distributed.elastic.multiprocessing.redirects.Std | dict[int, ~tensorplay.distributed.elastic.multiprocessing.redirects.Std] = <Std.NONE: 0>, log_line_prefixes: dict[int, str] | None = None, duplicate_stdout_filters: list[str] | None = None, duplicate_stderr_filters: list[str] | None = None)[source]
Base class owning a homogeneous group of worker processes.
- close(death_sig: Signals | None = None, timeout: int = 30) None[source]
Terminate all workers with
death_sig, escalating to kill.
- poll() RunProcsResult | None[source]
Return the terminal result, or None while workers are running.
- wait(timeout: float = -1, period: float = 1) RunProcsResult | None[source]
Block until completion (or
timeoutseconds); returns the result.
ProcessFailure
classFull reference ↗Redirects
classFull reference ↗- class tensorplay.distributed.elastic.multiprocessing.Redirects(stdouts: Std | dict[int, ~tensorplay.distributed.elastic.multiprocessing.redirects.Std]=<Std.NONE: 0>, stderrs: Std | dict[int, ~tensorplay.distributed.elastic.multiprocessing.redirects.Std]=<Std.NONE: 0>)[source]
Per-stream redirection modes for a worker group.
RunProcsResult
classFull reference ↗- class tensorplay.distributed.elastic.multiprocessing.RunProcsResult(state: str = 'UNKNOWN', return_values: dict[int, ~typing.Any]=<factory>, failures: dict[int, ~tensorplay.distributed.elastic.multiprocessing.errors.ProcessFailure]=<factory>, stdouts: dict[int, str]=<factory>, stderrs: dict[int, str]=<factory>)[source]
Outcome of monitoring a worker group to completion.
Std
classFull reference ↗- class tensorplay.distributed.elastic.multiprocessing.Std(*values)[source]
Which standard streams a worker’s output should go to.
- as_integer_ratio()
Return a pair of integers, whose ratio is equal to the original int.
The ratio is in lowest terms and has a positive denominator.
>>> (10).as_integer_ratio() (10, 1) >>> (-10).as_integer_ratio() (-10, 1) >>> (0).as_integer_ratio() (0, 1)
- bit_count()
Number of ones in the binary representation of the absolute value of self.
Also known as the population count.
>>> bin(13) '0b1101' >>> (13).bit_count() 3
- bit_length()
Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
- conjugate()
Returns self, the complex conjugate of any int.
- denominator
the denominator of a rational number in lowest terms
- classmethod from_bytes(bytes, byteorder='big', *, signed=False)
- classmethod from_str(vm: str) Std | dict[int, Std][source]
Parse
to_map-style strings:0/1/2/3ori:j:k.The per-rank form maps rank
i(ordefault) to a mode; both0:1(shorthand for0:1:1) and full triples are accepted.
- imag
the imaginary part of a complex number
- is_integer()
Returns True. Exists for duck type compatibility with float.is_integer.
- numerator
the numerator of a rational number in lowest terms
- real
the real part of a complex number
- to_bytes(length=1, byteorder='big', *, signed=False)
Exceptions 2
ChildFailedError
exceptionFull reference ↗- exception tensorplay.distributed.elastic.multiprocessing.ChildFailedError(name_or_failures: str | list[tuple[str, ProcessFailure]] | None = None, failures: dict[int, ProcessFailure] | None = None)[source]
Raised by the launcher when one or more workers failed.
failuresis a list of(role_name, ProcessFailure)pairs so the caller can report which role failed and why.
SignalException
exceptionFull reference ↗Help improve this page
Found an error, an unclear step, or a missing example?
tensorplay.distributed.elastic.metrics API
Complete API reference for tensorplay.distributed.elastic.metrics, including signatures, parameters, examples and members.
tensorplay.distributed.elastic.rendezvous API
Complete API reference for tensorplay.distributed.elastic.rendezvous, including signatures, parameters, examples and members.

