Native specs
Native spec and value classes that the Python wrappers expose. The raw bindings behind them are internal.
ServeOptions
ServeOptions(
*,
allow_remote_shutdown: bool = ...,
idle_timeout_seconds: Optional[float] = None,
drain_timeout_seconds: Optional[float] = None,
close_timeout_seconds: Optional[float] = None,
workflow_edition: Optional[str] = None,
) -> ServeOptions
Server lifecycle options controlling remote shutdown and timeout behavior.
allow_remote_shutdown
property[source]property allow_remote_shutdown: boolidle_timeout_seconds
property[source]property idle_timeout_seconds: Optional[float]drain_timeout_seconds
property[source]property drain_timeout_seconds: Optional[float]close_timeout_seconds
property[source]property close_timeout_seconds: Optional[float]workflow_edition
property[source]property workflow_edition: Optional[str]Tensor
Tensor(buffer: object, shape: Sequence[int], dtype: str) -> Tensor
Native tensor value carrying a buffer, shape, dtype, and derived layout metadata.
shape
property[source]property shape: list[int]dtype
property[source]property dtype: strndim
property[source]property ndim: intsize
property[source]property size: intnbytes
property[source]property nbytes: intstrides
property[source]property strides: list[int]Strides in bytes per dimension, C-order.
device
property[source]property device: strDevice holding the tensor data. Always "cpu".
buffer
property[source]property buffer: memoryviewis_contiguous
function[source]is_contiguous() -> boolWhether the elements are laid out C-contiguously.
reshape
function[source]reshape(shape: Sequence[int]) -> TensorA tensor with the same elements and a new shape. One dimension may
be -1 to infer its size from the element count. Shares the
underlying data when this tensor is contiguous.
copy
function[source]copy() -> TensorA deep copy backed by fresh storage.
from_dlpack
function[source]from_dlpack(obj: object) -> TensorImport a tensor from a DLPack capsule or any object implementing
__dlpack__. Accepts both legacy and versioned capsules; the
elements are always copied into fresh storage and the source
capsule is consumed.
tobytes
function[source]tobytes() -> bytesEnvContract
Environment metadata returned during a remote client handshake.
id
property[source]property id: strenv
property[source]property env: EnvContractspec
property[source]property spec: EnvContractrender_mode
property[source]property render_mode: Optional[str]num_envs
property[source]property num_envs: intmetadata
property[source]property metadata: dict[str, object] | Noneobservation_space
property[source]property observation_space: SpaceSpecaction_space
property[source]property action_space: SpaceSpecto_dict
function[source]to_dict() -> dict[str, object]SpaceSpec
Native space specification used by RLMesh spaces and protocol contracts.
kind
property[source]property kind: strshape
property[source]property shape: list[int]dtype
property[source]property dtype: strto_space
function[source]to_space() -> Spaceto_gym_space
function[source]to_gym_space() -> object