unienv_interface.remote.proxies¶
UniEnv-compatible views of resources that remain on their server.
RemoteEnv
¶
RemoteEnv(client: RemoteClient, resource_id: str)
Bases: _Proxy, Env
observation_space
instance-attribute
¶
observation_space: Space[ObsType, BDeviceType, BDtypeType, BRNGType]
context_space
class-attribute
instance-attribute
¶
context_space: Optional[Space[ContextType, BDeviceType, BDtypeType, BRNGType]] = None
reset
¶
reset(*, mask: Optional[ArrayAPIArray] = None, seed: Optional[int] = None, **kwargs: Any) -> ResetResult
reload
¶
reload(*, mask: Optional[ArrayAPIArray] = None, seed: Optional[int] = None, **kwargs: Any) -> ResetResult
sample_context
¶
sample_context() -> Optional[ContextType]
Sample one context value if context_space is defined.
update_observation_post_reset
¶
update_observation_post_reset(old_obs: ObsType, newobs_masked: ObsType, mask: BArrayType) -> ObsType
Merge masked reset observations back into a full batched observation.
update_context_post_reset
¶
update_context_post_reset(old_context: ContextType, new_context: ContextType, mask: BArrayType) -> ContextType
Merge masked reset contexts back into a full batched context.
has_wrapper_attr
¶
has_wrapper_attr(name: str) -> bool
Checks if the attribute name exists in the environment.
set_wrapper_attr
¶
set_wrapper_attr(name: str, value: Any)
Sets the attribute name on the environment with value.
RemoteWorld
¶
RemoteWorld(client: RemoteClient, resource_id: str)
Bases: _Proxy, World
device
instance-attribute
¶
device: Optional[BDeviceType]
The world timestep in seconds, if None, the world is asynchronous (real-time)
world_timestep
instance-attribute
¶
world_timestep: Optional[float]
The world's physical timestep in seconds, there might be multiple world sub-steps inside a world step. If none this means it is not known
world_subtimestep
class-attribute
instance-attribute
¶
world_subtimestep: Optional[float] = None
The number of parallel environments in this world
reset
¶
reset(*, seed: Optional[int] = None, mask: Optional[ArrayAPIArray] = None, **kwargs: Any) -> None
reload
¶
reload(*, seed: Optional[int] = None, mask: Optional[ArrayAPIArray] = None, **kwargs: Any) -> None
after_reset
¶
after_reset(*, seed: Optional[int] = None, mask: Optional[ArrayAPIArray] = None, **kwargs: Any) -> None
after_reload
¶
after_reload(*, seed: Optional[int] = None, mask: Optional[ArrayAPIArray] = None, **kwargs: Any) -> None
is_control_timestep_compatible
¶
is_control_timestep_compatible(control_timestep: Optional[float]) -> bool
Check whether a node control period aligns with world_timestep.
RemoteWorldNode
¶
RemoteWorldNode(client: RemoteClient, resource_id: str)
Bases: _Proxy, WorldNode
context_space
class-attribute
instance-attribute
¶
context_space: Optional[Space[ContextType, BDeviceType, BDtypeType, BRNGType]] = None
observation_space
class-attribute
instance-attribute
¶
observation_space: Optional[Space[ObsType, BDeviceType, BDtypeType, BRNGType]] = None
action_space
class-attribute
instance-attribute
¶
action_space: Optional[Space[ActType, BDeviceType, BDtypeType, BRNGType]] = None
supported_render_modes
class-attribute
instance-attribute
¶
supported_render_modes: Sequence[str] = ()
after_reset_priorities
class-attribute
instance-attribute
¶
after_reset_priorities: Set[int] = set()
after_reload_priorities
class-attribute
instance-attribute
¶
after_reload_priorities: Set[int] = set()
pre_environment_step_priorities
class-attribute
instance-attribute
¶
pre_environment_step_priorities: Set[int] = set()
post_environment_step_priorities
class-attribute
instance-attribute
¶
post_environment_step_priorities: Set[int] = set()
effective_update_timestep
property
¶
effective_update_timestep: Optional[float]
Resolved update period, defaulting to control_timestep when unset.
pre_environment_step
¶
pre_environment_step(dt: Union[float, ArrayAPIArray], *, priority: int = 0) -> None
post_environment_step
¶
post_environment_step(dt: Union[float, ArrayAPIArray], *, priority: int = 0) -> None
reset
¶
reset(*, priority: int = 0, seed: Optional[int] = None, mask: Optional[ArrayAPIArray] = None, **kwargs: Any) -> None
reload
¶
reload(*, priority: int = 0, seed: Optional[int] = None, mask: Optional[ArrayAPIArray] = None, **kwargs: Any) -> None
get_nodes_by_type
¶
get_nodes_by_type(node_type: Type[WorldNode]) -> list[WorldNode]
Return nodes in this subtree that are instances of node_type.
has_wrapper_attr
¶
has_wrapper_attr(name: str) -> bool
Checks if the attribute name exists in the environment.
set_wrapper_attr
¶
set_wrapper_attr(name: str, value: Any)
Sets the attribute name on the environment with value.
RemoteWorldEnv
¶
RemoteWorldEnv(world: RemoteWorld, node_or_nodes: Union[RemoteWorldNode, Iterable[RemoteWorldNode]], *, render_mode: Optional[str] = 'auto')
Bases: WorldEnv
Local lifecycle composition with explicit remote operation boundaries.
Pass a RemoteWorld and RemoteWorldNode(s) from the same client and world. Underlying nodes always run on the world server. Client-local combinations are supported; combining different simulator worlds isn't a WorldEnv model.
control_timestep
property
¶
control_timestep: Optional[float]
Simulation time represented by one environment control step.
This is the resolved control timestep: the explicit node
control_timestep when configured, otherwise the effective
update timestep, otherwise the world timestep. It is None
when none of these are defined (e.g. an asynchronous real-time
world).
reset
¶
reset(*, mask: Optional[ArrayAPIArray] = None, seed: Optional[int] = None, reload: bool = False, **kwargs: Any) -> ResetResult
reload
¶
reload(*, mask: Optional[ArrayAPIArray] = None, seed: Optional[int] = None, **kwargs: Any) -> ResetResult
render
¶
render() -> RenderFrame | Sequence[RenderFrame] | None
Render via the root node when rendering is enabled.
sample_context
¶
sample_context() -> Optional[ContextType]
Sample one context value if context_space is defined.
update_observation_post_reset
¶
update_observation_post_reset(old_obs: ObsType, newobs_masked: ObsType, mask: BArrayType) -> ObsType
Merge masked reset observations back into a full batched observation.
update_context_post_reset
¶
update_context_post_reset(old_context: ContextType, new_context: ContextType, mask: BArrayType) -> ContextType
Merge masked reset contexts back into a full batched context.
has_wrapper_attr
¶
has_wrapper_attr(name: str) -> bool
Checks if the attribute name exists in the environment.
set_wrapper_attr
¶
set_wrapper_attr(name: str, value: Any)
Sets the attribute name on the environment with value.
get_node
¶
get_node(nested_keys: Union[str, Sequence[str]]) -> Optional[WorldNode[Any, Any, Any, BArrayType, BDeviceType, BDtypeType, BRNGType]]
Look up a node by name or nested path.
get_nodes_by_fn
¶
get_nodes_by_fn(fn: Callable[[WorldNode[Any, Any, Any, BArrayType, BDeviceType, BDtypeType, BRNGType]], bool]) -> list[WorldNode[Any, Any, Any, BArrayType, BDeviceType, BDtypeType, BRNGType]]
Collect nodes in the tree that satisfy fn.
get_nodes_by_type
¶
get_nodes_by_type(node_type: Type[WorldNode[Any, Any, Any, BArrayType, BDeviceType, BDtypeType, BRNGType]]) -> list[WorldNode[Any, Any, Any, BArrayType, BDeviceType, BDtypeType, BRNGType]]
Collect nodes in the tree that are instances of node_type.