dockyard_rl.experience.cua.environment

Module Contents

Classes

OSWorldEnvironment

Multimodal multi-turn OSWorld environment, backend-agnostic.

API

class dockyard_rl.experience.cua.environment.OSWorldEnvironment(cfg: dict)

Bases: dockyard_rl.environments.interfaces.EnvironmentInterface

Multimodal multi-turn OSWorld environment, backend-agnostic.

Config keys: backend (“official”); max_turns default budget; max_concurrency (actor-level, set by create_env); plus backend-specific keys forwarded to the backend (provider_name, screen_width/height, headless, require_a11y_tree, require_terminal, client_password, cache_dir, …).

Initialization

begin_episode(metadata: dict) dict

Provision a desktop for the task and return the turn-0 observation.

Called once per sample by the CUA rollout before the first generation. Returns a serializable dict: screenshot (PNG bytes or None), text (any textual observation to accompany it), and the updated metadata (carrying the episode id and turn counter).

step(message_log_batch: list[dockyard_rl.data.interfaces.LLMMessageLogType], metadata: list[dict]) dockyard_rl.environments.interfaces.EnvironmentReturn
shutdown() None
global_post_process_and_metrics(batch: dockyard_rl.distributed.batched_data_dict.BatchedDataDict) tuple[dockyard_rl.distributed.batched_data_dict.BatchedDataDict, dict]