Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
Add end-to-end tests, RL dataloader interface and GRPO TRL example to cua-bench (#919)
ddupont88258665337c
diff --git a/docs/content/docs/cuabench/examples/meta.json b/docs/content/docs/cuabench/examples/meta.jsonindex a3831e93de..490c3fa347 100644--- a/docs/content/docs/cuabench/examples/meta.json+++ b/docs/content/docs/cuabench/examples/meta.json@@ -7,6 +7,7 @@"windows-native-task","macos-native-task","genai-task-generation",- "custom-agent"+ "custom-agent",+ "rl-training"]}diff --git a/docs/content/docs/cuabench/examples/rl-training.mdx b/docs/content/docs/cuabench/examples/rl-training.mdxnew file mode 100644index 0000000000..392ab20e39--- /dev/null+++ b/docs/content/docs/cuabench/examples/rl-training.mdx@@ -0,0 +1,756 @@+---+title: RL Training with GRPO+description: Train a GUI agent using TRL's GRPOTrainer with CUA-Bench environments on Modal+---++Train a multimodal GUI agent using GRPO (Group Relative Policy Optimization) with TRL and CUA-Bench on Modal.++## How It Works++The training follows TRL's OpenEnv pattern:++```+┌─────────────────────────────────────────────────────────────┐+│ GRPO Training Loop │+├─────────────────────────────────────────────────────────────┤+│ 1. rollout_func() called with prompts │+│ ├─ Reset CUA-Bench environment │+│ ├─ Generate actions via vLLM │+│ ├─ Step environment, collect rewards │+│ └─ Return {prompt_ids, completion_ids, logprobs, ...} │+│ │+│ 2. Reward function receives env_reward from rollout │+│ │+│ 3. GRPO updates policy using rewards │+└─────────────────────────────────────────────────────────────┘+```++## Step 1: Install Modal++```bash+pip install modal+modal setup+```++Optionally, create a wandb secret for logging:++```bash+modal secret create wandb-secret WANDB_API_KEY=your_key+```++## Step 2: Create the Training Script++Create `modal_grpo_training.py`:++```python+#!/usr/bin/env python3+"""GRPO Training with CUA-Bench on Modal.++This script runs GRPO (Group Relative Policy Optimization) training using+TRL's GRPOTrainer with CUA-Bench environments on Modal's cloud infrastructure.++Usage:+ # Setup Modal+ pip install modal+ modal setup++ # Run training+ modal run modal_grpo_training.py++ # With custom settings+ modal run modal_grpo_training.py --num-workers 4 --max-steps 1000+"""++from __future__ import annotations++from dataclasses import dataclass++import modal+++# =============================================================================+# Training Configuration+# =============================================================================++@dataclass+class TrainerConfig:+ """Configuration for GRPO training hyperparameters."""++ # Model+ model_id: str = "Qwen/Qwen3-VL-2B-Instruct"+ task_prompt: str = "Complete the computer task successfully."++ # Environment+ num_workers: int = 2+ max_steps: int = 10+ max_history: int = 2++ # Generation+ num_generations: int = 4+ max_completion_length: int = 256+ temperature: float = 0.7++ # Training+ learning_rate: float = 5e-6+ gradient_accumulation_steps: int = 4+ per_device_train_batch_size: int = 1+ num_train_epochs: int = 1+ warmup_steps: int = 10++ # vLLM+ use_vllm: bool = True+ vllm_mode: str = "colocate"+ vllm_gpu_memory_utilization: float = 0.4+ vllm_max_model_length: int = 32768++ # Checkpointing+ output_dir: str = "/checkpoints/grpo-output"+ save_strategy: str = "steps"+ save_steps: int = 100++ # Logging+ logging_steps: int = 1+ use_wandb: bool = True+ wandb_project: str = "cua-bench-grpo"++ # Dataset+ dataset_size: int = 1000++ # Misc+ bf16: bool = True+ debug: bool = False+++DEFAULT_CONFIG = TrainerConfig()+++# =============================================================================+# Modal App Configuration+# =============================================================================++app = modal.App("cua-bench-grpo-training")++image = (+ modal.Image.debian_slim(python_version="3.11")+ .apt_install("git", "chromium", "chromium-driver")+ .uv_pip_install(+ "trl[vllm]==0.27.1",+ "datasets==3.5.1",+ "verl",+ "pillow",+ "requests",+ "fastapi",+ "uvicorn",+ "playwright",+ "cua-bench",+ )+ .run_commands("playwright install chromium")+ # .add_local_dir("cua_bench", remote_path="/root/cua_bench")+)++checkpoint_volume = modal.Volume.from_name("cua-bench-grpo-checkpoints", create_if_missing=True)++# Optional: wandb secret for logging+# Create with: modal secret create wandb-secret WANDB_API_KEY=your_key+++# =============================================================================+# Constants+# =============================================================================++SYSTEM_PROMPT = """You are a GUI agent. Complete tasks by interacting with the screen.++Available actions:+- click(x, y): Click at coordinates (0-1000 range)+- type(text): Type text+- hotkey(key1, key2, ...): Press keyboard shortcut+- scroll(x, y, direction): Scroll up/down+- wait(): Wait 1 second+- done(): Mark task complete++Reply with thinking in <|think_start|>...<|think_end|> tags,+then action in <|action_start|>...<|action_end|> tags.+Once you complete the task, output a done() action.++Example:+<|think_start|>I see a blue button. I'll click it.<|think_end|>+<|action_start|>click(500, 300)<|action_end|>"""++CLICK_TARGET_HTML = """<!DOCTYPE html>+<html>+<head>+ <style>+ body {{ margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background: #f0f0f0; }}+ .target {{ position: absolute; left: {x}px; top: {y}px; padding: 12px 24px; background: #3b82f6; color: white; border: none; border-radius: 8px; cursor: pointer; }}+ </style>+</head>+<body>+ <h1>Click the Button</h1>+ <button class="target" onclick="window.__clicked=true;">Click Me</button>+ <script>window.__clicked = false;</script>+</body>+</html>"""++CLICK_TARGET_TASK_PY = '''+import cua_bench as cb+import random++HTML = """{html}"""+pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Click the blue 'Click Me' button",+ computer={{"provider": "simulated", "setup_config": {{"width": 1024, "height": 720}}}},+ metadata={{"x": random.randint(100, 350), "y": random.randint(100, 250)}}+ ) for _ in range(50)]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ html = HTML.format(x=task.metadata["x"], y=task.metadata["y"])+ pid = await session.launch_window(html=html, title="Click Target", width=512, height=384)+[email protected]_task(split="train")+async def evaluate(task, session):+ return [1.0 if await session.execute_javascript(pid, "window.__clicked") else 0.0]+'''+++# =============================================================================+# Training Function+# =============================================================================++ image=image,+ gpu="H100",+ timeout=60 * 60 * 4, # 4 hours+ volumes={"/checkpoints": checkpoint_volume},+ secrets=[modal.Secret.from_name("wandb-secret")],+)+def train_grpo(+ model_id: str = DEFAULT_CONFIG.model_id,+ task_prompt: str = DEFAULT_CONFIG.task_prompt,+ num_workers: int = DEFAULT_CONFIG.num_workers,+ max_steps: int = DEFAULT_CONFIG.max_steps,+ max_history: int = DEFAULT_CONFIG.max_history,+ num_generations: int = DEFAULT_CONFIG.num_generations,+ dataset_size: int = DEFAULT_CONFIG.dataset_size,+ max_completion_length: int = DEFAULT_CONFIG.max_completion_length,+ temperature: float = DEFAULT_CONFIG.temperature,+ learning_rate: float = DEFAULT_CONFIG.learning_rate,+ gradient_accumulation_steps: int = DEFAULT_CONFIG.gradient_accumulation_steps,+ save_steps: int = DEFAULT_CONFIG.save_steps,+ use_wandb: bool = DEFAULT_CONFIG.use_wandb,+ wandb_project: str = DEFAULT_CONFIG.wandb_project,+ debug: bool = DEFAULT_CONFIG.debug,+):+ """Run GRPO training with CUA-Bench environments."""+ import asyncio+ import base64+ import io+ import re+ import tempfile+ from pathlib import Path++ from datasets import Dataset+ from PIL import Image+ from transformers import AutoTokenizer++ from trl import GRPOConfig, GRPOTrainer+ from vllm import SamplingParams++ from cua_bench.workers import CBEnvWorkerClient, cleanup_workers, create_workers++ # -------------------------------------------------------------------------+ # Multimodal rollout generation (based on TRL's generate_rollout_completions)+ # -------------------------------------------------------------------------++ def generate_rollout_completions_multimodal(+ trainer,+ prompts: list[str],+ images: list[list[Image.Image]] | None = None,+ ) -> list[dict]:+ """+ Generate completions for multimodal prompts using vLLM in colocate mode.++ Args:+ trainer: GRPOTrainer instance with vLLM configured+ prompts: List of text prompts+ images: Optional list of image lists, one per prompt++ Returns:+ List of dicts with prompt_ids, completion_ids, logprobs, and text+ """+ if not prompts:+ return []++ if not trainer.use_vllm or trainer.vllm_mode != "colocate":+ raise RuntimeError("Multimodal rollouts require vLLM in colocate mode.")++ # Build sampling params+ sampling_params = SamplingParams(+ n=1,+ temperature=trainer.temperature,+ top_k=trainer.top_k,+ min_p=0.0 if trainer.min_p is None else trainer.min_p,+ max_tokens=trainer.max_completion_length,+ logprobs=0,+ )+ if trainer.repetition_penalty is not None:+ sampling_params.repetition_penalty = trainer.repetition_penalty+ if trainer.top_p is not None:+ sampling_params.top_p = trainer.top_p++ # Wake up vLLM if sleep mode is enabled+ if trainer.args.vllm_enable_sleep_mode:+ trainer.llm.wake_up(tags=["kv_cache"])+ trainer.llm.collective_rpc("reload_weights")++ # Build inputs with multimodal data if images provided+ if images:+ inputs = []+ for i, prompt in enumerate(prompts):+ prompt_images = images[i] if i < len(images) else []+ if prompt_images:+ inputs.append({+ "prompt": prompt,+ "multi_modal_data": {"image": prompt_images},+ })+ else:+ inputs.append({"prompt": prompt})+ vllm_outputs = trainer.llm.generate(inputs, sampling_params=sampling_params, use_tqdm=False)+ else:+ vllm_outputs = trainer.llm.generate(prompts, sampling_params=sampling_params, use_tqdm=False)++ # Process outputs+ results = []+ for request in vllm_outputs:+ if not request.outputs:+ results.append({+ "prompt_ids": request.prompt_token_ids,+ "completion_ids": [],+ "logprobs": [],+ "text": "",+ })+ continue+ sequence = request.outputs[0]+ logprobs = [+ next(iter(token_logprob.values())).logprob+ for token_logprob in sequence.logprobs+ ] if sequence.logprobs else []+ results.append({+ "prompt_ids": request.prompt_token_ids,+ "completion_ids": list(sequence.token_ids),+ "logprobs": logprobs,+ "text": sequence.text,+ })++ # Sleep vLLM if sleep mode is enabled+ if trainer.args.vllm_enable_sleep_mode:+ trainer.llm.sleep(level=2)++ return results++ # -------------------------------------------------------------------------+ # Helper functions+ # -------------------------------------------------------------------------++ def decode_image(b64_str: str) -> Image.Image:+ img = Image.open(io.BytesIO(base64.b64decode(b64_str)))+ return img.convert("RGB") if img.mode != "RGB" else img++ def extract_images(obs: str) -> tuple[str, list[Image.Image]]:+ """Extract base64 images from obs and replace with vLLM-compatible placeholder."""+ images = []+ pattern = r"<\|vision_start\|>(.*?)<\|vision_end\|>"+ def repl(m):+ images.append(decode_image(m.group(1)))+ # Use Qwen2-VL's placeholder format that vLLM expects+ return "<|vision_start|><|image_pad|><|vision_end|>"+ cleaned = re.sub(pattern, repl, obs, flags=re.DOTALL)+ return cleaned, images++ def make_prompt(+ tok,+ instruction: str,+ obs: str,+ step: int,+ history: list[tuple[str, str]] | None = None,+ ) -> tuple[str, list[Image.Image]]:+ """Build prompt with optional history of previous observations and actions.++ Args:+ tok: Tokenizer+ instruction: Task instruction+ obs: Current observation (may contain base64 images)+ step: Current step number+ history: List of (prev_obs, prev_action) tuples+ """+ all_images = []++ # Build history section+ history_parts = []+ if history:+ for i, (prev_obs, prev_action) in enumerate(history):+ cleaned_prev_obs, prev_images = extract_images(prev_obs)+ all_images.extend(prev_images)+ history_parts.append(f"Step {step - len(history) + i + 1}:\n{cleaned_prev_obs}\nAction: {prev_action}")++ # Current observation+ cleaned_obs, curr_images = extract_images(obs)+ all_images.extend(curr_images)++ # Build user content+ if history_parts:+ history_text = "\n\n".join(history_parts)+ user_content = f"Task: {instruction}\n\nHistory:\n{history_text}\n\nStep {step + 1} (current):\n{cleaned_obs}\n\nWhat action?"+ else:+ user_content = f"Task: {instruction}\n\nStep {step + 1}:\n{cleaned_obs}\n\nWhat action?"++ messages = [+ {"role": "system", "content": SYSTEM_PROMPT},+ {"role": "user", "content": user_content},+ ]+ prompt = tok.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)+ return prompt, all_images++ def parse_action(response: str) -> str:+ match = re.search(r"<\|action_start\|>(.*?)<\|action_end\|>", response, re.DOTALL)+ return match.group(1).strip() if match else "wait()"++ # -------------------------------------------------------------------------+ # Episode rollout+ # -------------------------------------------------------------------------++ def rollout_episode(trainer, env, tok, prompt_text: str, max_hist: int = 2) -> dict:+ env_ret, meta = env.reset()++ # Get instruction from env.prompt (set during reset)+ instruction = env.prompt["instruction"] if env.prompt else prompt_text++ all_prompt_ids, all_completion_ids, all_logprobs = [], [], []+ all_images = []+ step_rewards = []+ history = [] # List of (screenshot, action) tuples++ for step in range(max_steps):+ if env_ret.get("done", False):+ break++ # Get current screenshot from env.prompt["steps"][-1]+ # steps contains: [screenshot0, action0, screenshot1, action1, ...]+ current_screenshot = env.prompt["steps"][-1] if env.prompt else ""++ # Get recent history (last max_hist steps)+ recent_history = history[-max_hist:] if history else None++ prompt, images = make_prompt(tok, instruction, current_screenshot, step, history=recent_history)+ if images:+ all_images.extend(images)++ rollout_output = generate_rollout_completions_multimodal(+ trainer, [prompt], images=[images] if images else None+ )[0]+ all_prompt_ids.extend(rollout_output["prompt_ids"])+ all_completion_ids.extend(rollout_output["completion_ids"])+ all_logprobs.extend(rollout_output["logprobs"])++ completion = rollout_output.get("text") or tok.decode(+ rollout_output["completion_ids"], skip_special_tokens=True+ )++ # Add current screenshot and action to history for next step+ action = parse_action(completion)+ history.append((current_screenshot, action))++ if debug:+ print(f" Step {step + 1}: {action}")++ env_ret, _ = env.step(completion)+ step_rewards.append(float(env_ret.get("reward", 0.0)))++ result = {+ "prompt_ids": all_prompt_ids,+ "completion_ids": all_completion_ids,+ "logprobs": all_logprobs,+ "env_reward": step_rewards[-1] if step_rewards else 0.0,+ }+ if all_images:+ result["images"] = all_images+ return result++ # -------------------------------------------------------------------------+ # Reward function+ # -------------------------------------------------------------------------++ def reward_evaluator_func(completions: list[str], env_reward=None, **_) -> list[float]:+ if env_reward is not None:+ return [float(r) for r in env_reward]+ return [0.0] * len(completions)++ # -------------------------------------------------------------------------+ # Create task+ # -------------------------------------------------------------------------++ def create_task(tmp_dir: Path) -> Path:+ task_dir = tmp_dir / "click-target"+ task_dir.mkdir(exist_ok=True)+ task_code = CLICK_TARGET_TASK_PY.format(html=CLICK_TARGET_HTML)+ (task_dir / "main.py").write_text(task_code)+ return task_dir++ # -------------------------------------------------------------------------+ # Main training logic+ # -------------------------------------------------------------------------++ import os++ # Initialize wandb if available+ wandb_enabled = False+ if use_wandb and os.environ.get("WANDB_API_KEY"):+ try:+ import wandb+ wandb.init(+ project=wandb_project,+ config={+ "model_id": model_id,+ "num_workers": num_workers,+ "max_steps": max_steps,+ "num_generations": num_generations,+ "learning_rate": learning_rate,+ "temperature": temperature,+ "dataset_size": dataset_size,+ },+ )+ wandb_enabled = True+ print("Wandb logging enabled")+ except ImportError:+ print("Wandb not installed, skipping logging")++ print("=" * 60)+ print("GRPO Training with CUA-Bench on Modal")+ print("=" * 60)+ print(f"Model: {model_id}")+ print(f"Workers: {num_workers}")+ print(f"Max steps: {max_steps}")+ print(f"Generations: {num_generations}")+ print(f"Wandb: {wandb_enabled}")+ print("=" * 60)++ # Setup tokenizer+ tokenizer = AutoTokenizer.from_pretrained(model_id)++ # Create temp task+ tmp_dir = Path(tempfile.mkdtemp(prefix="grpo-modal-"))+ task_path = str(create_task(tmp_dir))+ print(f"Created task: {task_path}")++ # Start workers+ print(f"Starting {num_workers} worker(s)...")+ workers = asyncio.run(create_workers(+ n_workers=num_workers,+ allowed_ips=["127.0.0.1"],+ startup_timeout=120.0,+ ))+ worker_urls = [w.api_url for w in workers]+ print(f"Workers ready: {worker_urls}")++ # Create environment clients+ task_configs = [{"env_path": task_path, "task_index": i % 10, "split": "train"} for i in range(num_workers)]+ envs = [+ CBEnvWorkerClient({+ "server_url": url,+ "task_configs": task_configs,+ "max_step": max_steps,+ "max_hist": 2,+ "timeout": 300,+ })+ for url in worker_urls+ ]++ # Dataset+ dataset = Dataset.from_dict({"prompt": [task_prompt] * dataset_size})++ # GRPO config+ config = GRPOConfig(+ output_dir=DEFAULT_CONFIG.output_dir,+ use_vllm=DEFAULT_CONFIG.use_vllm,+ vllm_mode=DEFAULT_CONFIG.vllm_mode,+ vllm_gpu_memory_utilization=DEFAULT_CONFIG.vllm_gpu_memory_utilization,+ vllm_max_model_length=DEFAULT_CONFIG.vllm_max_model_length,+ num_train_epochs=DEFAULT_CONFIG.num_train_epochs,+ per_device_train_batch_size=DEFAULT_CONFIG.per_device_train_batch_size,+ warmup_steps=DEFAULT_CONFIG.warmup_steps,+ logging_steps=DEFAULT_CONFIG.logging_steps,+ save_strategy=DEFAULT_CONFIG.save_strategy,+ bf16=DEFAULT_CONFIG.bf16,+ # From function args (overridable)+ learning_rate=learning_rate,+ gradient_accumulation_steps=gradient_accumulation_steps,+ num_generations=num_generations,+ max_completion_length=max_completion_length,+ temperature=temperature,+ save_steps=save_steps,+ report_to="wandb" if wandb_enabled else "none",+ )++ # Rollout function+ env_idx = [0]++ def rollout_func(prompts: list[str], trainer: GRPOTrainer) -> dict[str, list]:+ all_prompt_ids, all_completion_ids, all_logprobs = [], [], []+ all_rewards, all_images = [], []++ if debug:+ print(f"\n[Rollout] Processing {len(prompts)} prompts")++ for i, prompt in enumerate(prompts):+ env = envs[env_idx[0] % len(envs)]+ env_idx[0] += 1++ if debug:+ print(f"[Rollout] Episode {i + 1}/{len(prompts)}")++ episode = rollout_episode(trainer, env, tokenizer, prompt, max_hist=max_history)++ all_prompt_ids.append(episode["prompt_ids"])+ all_completion_ids.append(episode["completion_ids"])+ all_logprobs.append(episode["logprobs"])+ all_rewards.append(episode["env_reward"])++ if "images" in episode:+ all_images.append(episode["images"])++ result = {+ "prompt_ids": all_prompt_ids,+ "completion_ids": all_completion_ids,+ "logprobs": all_logprobs,+ "env_reward": all_rewards,+ }+ if all_images:+ result["images"] = all_images+ return result++ # Create trainer+ trainer = GRPOTrainer(+ model=model_id,+ processing_class=tokenizer,+ reward_funcs=[reward_evaluator_func],+ train_dataset=dataset,+ args=config,+ rollout_func=rollout_func,+ )++ try:+ print("\nStarting training...")+ trainer.train()++ # Save final checkpoint+ trainer.save_model("/checkpoints/final")+ checkpoint_volume.commit()++ print("\nTraining complete!")+ return {"status": "complete", "checkpoints": "/checkpoints/final"}++ finally:+ print("Cleaning up workers...")+ asyncio.run(cleanup_workers(workers))+ import shutil+ shutil.rmtree(tmp_dir, ignore_errors=True)+++# =============================================================================+# Entrypoint+# =============================================================================+[email protected]_entrypoint()+def main(+ model_id: str | None = None,+ num_workers: int | None = None,+ max_steps: int | None = None,+ num_generations: int | None = None,+ dataset_size: int | None = None,+ learning_rate: float | None = None,+ save_steps: int | None = None,+ debug: bool = False,+):+ """Run GRPO training on Modal."""+ kwargs = {+ k: v for k, v in {+ "model_id": model_id,+ "num_workers": num_workers,+ "max_steps": max_steps,+ "num_generations": num_generations,+ "dataset_size": dataset_size,+ "learning_rate": learning_rate,+ "save_steps": save_steps,+ "debug": debug,+ }.items() if v is not None+ }+ result = train_grpo.remote(**kwargs)+ print(f"Training result: {result}")+```++## Step 3: Run Training++```bash+modal run modal_grpo_training.py+```++With custom settings:++```bash+modal run modal_grpo_training.py \+ --model-id Qwen/Qwen3-VL-2B-Instruct \+ --num-workers 4 \+ --max-steps 10 \+ --num-generations 4 \+ --learning-rate 5e-6 \+ --debug+```++## CLI Options++| Option | Default | Description |+|--------|---------|-------------|+| `--model-id` | `Qwen/Qwen3-VL-2B-Instruct` | Model to train |+| `--num-workers` | `2` | Number of parallel environment workers |+| `--max-steps` | `10` | Max steps per episode |+| `--num-generations` | `4` | Rollouts per prompt |+| `--dataset-size` | `1000` | Number of training samples |+| `--learning-rate` | `5e-6` | Learning rate |+| `--save-steps` | `100` | Checkpoint save interval |+| `--debug` | `False` | Enable verbose output |++## Creating Custom Tasks++To train on your own task, create a task directory with `main.py`:++```python+import cua_bench as cb+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Your task description",+ computer={"provider": "simulated", "setup_config": {"width": 1024, "height": 720}},+ )]+[email protected]_task(split="train")+async def setup(task, session):+ await session.launch_window(url="https://example.com")+[email protected]_task(split="train")+async def evaluate(task, session):+ success = await session.execute_javascript(None, "checkSuccess()")+ return [1.0 if success else 0.0]+```++Then modify the script to use your task path instead of the built-in click target task.++## Reference++- [TRL GRPOTrainer Documentation](https://huggingface.co/docs/trl/grpo_trainer)+- [CUA-Bench Workers API](/cuabench/guide/advanced/rl-dataloader)diff --git a/docs/content/docs/cuabench/guide/advanced/meta.json b/docs/content/docs/cuabench/guide/advanced/meta.jsonindex 7f9bb34dd9..5ebc98286b 100644--- a/docs/content/docs/cuabench/guide/advanced/meta.json+++ b/docs/content/docs/cuabench/guide/advanced/meta.json@@ -2,5 +2,12 @@"title": "Advanced","description": "Build your own tasks and agents","icon": "Layers",- "pages": ["images", "creating-private-tasks", "custom-agents", "configuration", "telemetry"]+ "pages": [+ "images",+ "creating-private-tasks",+ "custom-agents",+ "rl-dataloader",+ "configuration",+ "telemetry"+ ]}diff --git a/docs/content/docs/cuabench/guide/advanced/rl-dataloader.mdx b/docs/content/docs/cuabench/guide/advanced/rl-dataloader.mdxnew file mode 100644index 0000000000..6e91481744--- /dev/null+++ b/docs/content/docs/cuabench/guide/advanced/rl-dataloader.mdx@@ -0,0 +1,174 @@+---+title: RL Dataloader+description: API reference for ReplayBuffer and MultiTurnDataloader+---++# RL Dataloader++The `MultiTurnDataloader` handles parallel environment rollout, tokenization, and batching for RL training.++## ReplayBuffer++Stores experience tuples with episode-aware reward discounting.++```python+from cua_bench.workers import ReplayBuffer++buffer = ReplayBuffer(+ capacity=10000, # Max experiences to store+ gamma=0.9, # Discount factor+ only_keep_outcome=False, # Keep all steps or just final+ balance_thres=0.5, # Threshold for balance stats+)++# Add experiences (as tuple)+buffer.add((+ 0, # worker_id+ {"obs": "...", "reward": 0.0, "done": False}, # env_ret+ {"uid": "episode-123"} # meta_info+))++# Sample for training+samples = buffer.sample(batch_size=32)++# Get balance statistics+below, above = buffer.get_balance_stats()+```++### Reward Discounting++When an episode completes, rewards propagate backwards:++```+Episode: [step0, step1, step2 (done, reward=1.0)]+With gamma=0.9:+ step2.reward = 1.0+ step1.reward = 0.9+ step0.reward = 0.81+```++## MultiTurnDataloader++Manages parallel environments and provides tokenized batches.++```python+from cua_bench.workers import (+ MultiTurnDataloader,+ CBEnvWorkerClient,+ create_workers,+)++workers = await create_workers(n_workers=4, allowed_ips=["127.0.0.1"])+task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+env_configs = [{+ "server_url": w.api_url,+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+} for w in workers]++dataloader = MultiTurnDataloader(+ env_class=CBEnvWorkerClient,+ env_configs=env_configs,+ tokenizer=tokenizer,+ batch_size=4,+ replay_capacity=10000,+ replay_reward_discount=0.9,+ max_prompt_length=1024,+ max_response_length=256,+)++for batch in dataloader:+ # batch: input_ids, attention_mask, position_ids, worker_id, meta_info+ responses = model.generate(batch['input_ids'])++ dataloader.async_step({+ 'prompts': batch['input_ids'],+ 'responses': responses,+ 'attention_mask': combined_mask,+ 'worker_id': batch['worker_id'],+ 'meta_info': batch['meta_info'],+ })+```++### Constructor Parameters++| Parameter | Type | Default | Description |+| ----------------------------- | ------------ | -------- | -------------------------------------- |+| `env_class` | Type | required | Environment client class |+| `env_configs` | `List[Dict]` | required | Worker configs |+| `task_configs` | `List[Dict]` | required | Task configurations |+| `tokenizer` | Any | required | HuggingFace tokenizer |+| `processor` | Any | `None` | HuggingFace processor for multimodal |+| `is_multi_modal` | bool | `False` | Enable image processing |+| `batch_size` | int | `8` | Must be less than or equal to num_envs |+| `replay_capacity` | int | `10000` | Replay buffer size |+| `replay_reward_discount` | float | `0.9` | Gamma for discounting |+| `max_prompt_length` | int | `1024` | Max prompt tokens |+| `max_response_length` | int | `1024` | Max response tokens |+| `only_keep_outcome_in_replay` | bool | `False` | Only keep final steps |++### Batch Format++From `next(dataloader)`:++```python+{+ 'input_ids': torch.Tensor, # (batch, seq_len)+ 'attention_mask': torch.Tensor, # (batch, seq_len)+ 'position_ids': torch.Tensor, # (batch, seq_len)+ 'worker_id': np.ndarray,+ 'meta_info': np.ndarray,+}+```++### batch_return Format++For `async_step()`:++```python+{+ 'prompts': torch.Tensor, # (batch, prompt_len)+ 'responses': torch.Tensor, # (batch, response_len)+ 'attention_mask': torch.Tensor, # (batch, total_len)+ 'worker_id': np.ndarray,+ 'meta_info': np.ndarray,+}+```++### Action Parsing++The dataloader parses action strings from responses:++```+<|action_start|>click(0.5, 0.5)<|action_end|>+<|action_start|>type("hello")<|action_end|>+<|action_start|>done()<|action_end|>+```++### Methods++```python+# Get running reward (EMA)+reward = dataloader.running_outcome_reward()++# Get balance stats+below, above = dataloader.get_balance_stats()++# Sample from replay buffer+batch = dataloader.sample_from_buffer(batch_size=32)++# Print stats+dataloader.print_stats_in_replay_buffer()++# Clear replay buffer+dataloader.clear_replay_buffer()++# Cleanup workers+dataloader.close()+```++## Example++See the [Train an Agent with GRPO](/cuabench/examples/rl-training) tutorial for a complete working example.diff --git a/libs/cua-bench/README.md b/libs/cua-bench/README.mdindex cc292f4437..10dd1b9b56 100644--- a/libs/cua-bench/README.md+++ b/libs/cua-bench/README.md@@ -3,3 +3,89 @@Framework for benchmarking Computer-Use Agents with verifiable cross-platform environments.**[Documentation](https://cua.ai/docs/cuabench)** - Installation, guides, and API reference.++## Running Tests++The test suite covers the core gym interface, worker system, and benchmark runners.++### Install dev dependencies++```bash+uv pip install -e ".[dev,browser,server,rl]"+```++Note: The `browser` extra installs Playwright for e2e tests with the simulated provider.++### Run all tests++```bash+uv run --with pytest pytest cua_bench/tests/ -v+```++### Run specific test modules++```bash+# Core gym interface (make, reset, step, evaluate)+uv run --with pytest pytest cua_bench/tests/test_gym_interface.py -v++# HTTP worker client (/reset, /step endpoints)+uv run --with pytest pytest cua_bench/tests/test_worker_client.py -v++# Worker server endpoints and action serialization+uv run --with pytest pytest cua_bench/tests/test_worker_server.py -v++# Benchmark runner functions+uv run --with pytest pytest cua_bench/tests/test_run_benchmark.py -v++# Worker manager (spawning/managing workers)+uv run --with pytest pytest cua_bench/tests/test_worker_manager.py -v++# Action parsing+uv run --with pytest pytest cua_bench/tests/test_actions.py -v+```++### Run tests with coverage++```bash+uv run --with pytest --with pytest-cov pytest cua_bench/tests/ -v --cov=cua_bench --cov-report=term-missing+```++## Test Structure++| Test Module | What it Tests | Approach |+| ------------------------ | ----------------------------------------------------------------- | ------------------------------------------------------------------------- |+| `test_gym_interface.py` | Core Environment API: `make()`, `reset()`, `step()`, `evaluate()` | **E2E** - Real simulated (Playwright) environments |+| `test_worker_client.py` | HTTP client for worker servers (`CBEnvWorkerClient`) | **Mock server** - Uses `@patch("requests.post")` to mock HTTP responses |+| `test_worker_server.py` | FastAPI endpoints and action serialization | **Unit** - Action serialize/deserialize, request models, simple endpoints |+| `test_run_benchmark.py` | `run_benchmark()`, `run_single_task()`, `run_interactive()` | **E2E** - Real simulated (Playwright) environments |+| `test_worker_manager.py` | Workers + dataloader training loop | **E2E** - Real workers, real envs, mock model for actions |+| `test_actions.py` | Action string parsing (`repr_to_action()`) | **Unit** - Pure function tests |++### Test Approach Philosophy++- **E2E tests** use real simulated (Playwright) environments. The `simulated` provider is fast enough for testing.+- **Mock server tests** (`test_worker_client.py`) mock HTTP responses to test client logic in isolation.+- **Mock model** (`test_worker_manager.py`) uses a mock model that returns simple actions to test the dataloader training loop without requiring a real ML model.++## Infrastructure Benchmarking++Measure the throughput of the worker infrastructure:++```bash+uv run python -m cua_bench.scripts.benchmark_workers --num_workers 16 --num_steps 10+```++Options:++| Flag | Default | Description |+| --------------- | ------- | ---------------------------------------------- |+| `--num_workers` | 16 | Number of parallel workers |+| `--num_steps` | 10 | Steps per worker |+| `--task_path` | None | Path to task directory (creates temp if empty) |++Output:++- Average reset time+- Average step time+- Average finish time+- Step throughput (steps/sec)diff --git a/libs/cua-bench/cua_bench/.DS_Store b/libs/cua-bench/cua_bench/.DS_Storeindex 954b6d4874..bc250c8a88 100644Binary files a/libs/cua-bench/cua_bench/.DS_Store and b/libs/cua-bench/cua_bench/.DS_Store differdiff --git a/libs/cua-bench/cua_bench/__init__.py b/libs/cua-bench/cua_bench/__init__.pyindex c4733f8e68..bb8c81db8e 100644--- a/libs/cua-bench/cua_bench/__init__.py+++ b/libs/cua-bench/cua_bench/__init__.py@@ -6,6 +6,13 @@ from .core import Task, interact, makefrom .decorators import evaluate_task, setup_task, solve_task, tasks_configfrom .desktop import Desktopfrom .environment import Environment+from .runners import (+ BenchmarkResult,+ TaskResult,+ run_benchmark,+ run_interactive,+ run_single_task,+)from .types import (Action,ClickAction,@@ -14,6 +21,8 @@ from .types import (DragAction,HotkeyAction,KeyAction,+ MiddleClickAction,+ MoveToAction,RightClickAction,ScrollAction,TypeAction,@@ -24,27 +33,40 @@ from .types import (MobileSession = DesktopSession__all__ = [+ # Core"Task","make","interact",+ "Environment",+ # Decorators"tasks_config","setup_task","solve_task","evaluate_task",- "Environment",+ # Session types"Desktop","DesktopSession","MobileSession",+ # Action types"Action","ClickAction",+ "RightClickAction",+ "DoubleClickAction",+ "MiddleClickAction","DragAction",+ "MoveToAction",+ "ScrollAction",+ "TypeAction","KeyAction","HotkeyAction",- "TypeAction","WaitAction","DoneAction",- "ScrollAction",- "RightClickAction",- "DoubleClickAction",+ # Utilities"repr_to_action",+ # Runners+ "run_benchmark",+ "run_single_task",+ "run_interactive",+ "BenchmarkResult",+ "TaskResult",]diff --git a/libs/cua-bench/cua_bench/actions.py b/libs/cua-bench/cua_bench/actions.pyindex cf0c68b0be..2e4f166ba9 100644--- a/libs/cua-bench/cua_bench/actions.py+++ b/libs/cua-bench/cua_bench/actions.py@@ -1,4 +1,5 @@import re+from typing import Any, Dict, Unionfrom cua_bench.types import (Action,@@ -16,60 +17,295 @@ from cua_bench.types import (WaitAction,)+# Patterns for repr format: ClickAction(x=100, y=200)+_REPR_PATTERNS = {+ # Mouse click actions+ r"ClickAction\(x=(\d+),\s*y=(\d+)\)": lambda m: ClickAction(x=int(m[0]), y=int(m[1])),+ r"RightClickAction\(x=(\d+),\s*y=(\d+)\)": lambda m: RightClickAction(x=int(m[0]), y=int(m[1])),+ r"DoubleClickAction\(x=(\d+),\s*y=(\d+)\)": lambda m: DoubleClickAction(+ x=int(m[0]), y=int(m[1])+ ),+ r"MiddleClickAction\(x=(\d+),\s*y=(\d+)\)": lambda m: MiddleClickAction(+ x=int(m[0]), y=int(m[1])+ ),+ # Drag and move actions+ r"DragAction\(from_x=(\d+),\s*from_y=(\d+),\s*to_x=(\d+),\s*to_y=(\d+),\s*duration=([0-9.]+)\)": lambda m: DragAction(+ from_x=int(m[0]), from_y=int(m[1]), to_x=int(m[2]), to_y=int(m[3]), duration=float(m[4])+ ),+ r"DragAction\(from_x=(\d+),\s*from_y=(\d+),\s*to_x=(\d+),\s*to_y=(\d+)\)": lambda m: DragAction(+ from_x=int(m[0]), from_y=int(m[1]), to_x=int(m[2]), to_y=int(m[3])+ ),+ r"MoveToAction\(x=(\d+),\s*y=(\d+),\s*duration=([0-9.]+)\)": lambda m: MoveToAction(+ x=int(m[0]), y=int(m[1]), duration=float(m[2])+ ),+ r"MoveToAction\(x=(\d+),\s*y=(\d+)\)": lambda m: MoveToAction(x=int(m[0]), y=int(m[1])),+ # Scroll actions+ r"ScrollAction\(direction=['\"](\w+)['\"]\,\s*amount=(\d+)\)": lambda m: ScrollAction(+ direction=m[0], amount=int(m[1])+ ),+ r"ScrollAction\(amount=(\d+),\s*direction=['\"](\w+)['\"]\)": lambda m: ScrollAction(+ direction=m[1], amount=int(m[0])+ ),+ r"ScrollAction\(direction=['\"](\w+)['\"]\)": lambda m: ScrollAction(direction=m[0]),+ r"ScrollAction\(amount=(\d+)\)": lambda m: ScrollAction(amount=int(m[0])),+ r"ScrollAction\(\)": lambda m: ScrollAction(),+ # Keyboard actions+ r"KeyAction\(key=['\"]([^'\"]+)['\"]\)": lambda m: KeyAction(key=m[0]),+ r"TypeAction\(text=['\"]([^'\"]*)['\"].*?\)": lambda m: TypeAction(text=m[0]),+ r"HotkeyAction\(keys=\[([^\]]+)\].*?\)": lambda m: HotkeyAction(+ keys=[key.strip().strip("'\"") for key in m[0].split(",")]+ ),+ # Control actions+ r"WaitAction\(seconds=([0-9.]+)\)": lambda m: WaitAction(seconds=float(m[0])),+ r"WaitAction\(\)": lambda m: WaitAction(),+ r"DoneAction\(\)": lambda m: DoneAction(),+}++# Patterns for snake_case format: click(0.5, 0.5)+_SNAKE_CASE_PATTERNS = {+ # Mouse click actions - support both int and float coordinates+ r"click\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*\)": lambda m: ClickAction(+ x=_parse_coord(m[0]), y=_parse_coord(m[1])+ ),+ r"right_click\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*\)": lambda m: RightClickAction(+ x=_parse_coord(m[0]), y=_parse_coord(m[1])+ ),+ r"double_click\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*\)": lambda m: DoubleClickAction(+ x=_parse_coord(m[0]), y=_parse_coord(m[1])+ ),+ r"middle_click\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*\)": lambda m: MiddleClickAction(+ x=_parse_coord(m[0]), y=_parse_coord(m[1])+ ),+ # Drag action+ r"drag\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)": lambda m: DragAction(+ from_x=_parse_coord(m[0]),+ from_y=_parse_coord(m[1]),+ to_x=_parse_coord(m[2]),+ to_y=_parse_coord(m[3]),+ ),+ # Move action+ r"move_to\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*\)": lambda m: MoveToAction(+ x=_parse_coord(m[0]), y=_parse_coord(m[1])+ ),+ # Scroll action+ r"scroll\s*\(\s*(\w+)\s*,\s*(\d+)\s*\)": lambda m: ScrollAction(+ direction=m[0], amount=int(m[1])+ ),+ r"scroll\s*\(\s*(\w+)\s*\)": lambda m: ScrollAction(direction=m[0]),+ # Keyboard actions+ r"key\s*\(\s*(\w+)\s*\)": lambda m: KeyAction(key=m[0]),+ r'type\s*\(\s*["\'](.*)["\']\s*\)': lambda m: TypeAction(text=m[0]),+ r"hotkey\s*\(\s*([\w+]+)\s*\)": lambda m: HotkeyAction(keys=m[0].split("+")),+ # Control actions+ r"wait\s*\(\s*([\d.]+)\s*\)": lambda m: WaitAction(seconds=float(m[0])),+ r"wait\s*\(\s*\)": lambda m: WaitAction(),+ r"done\s*\(\s*\)": lambda m: DoneAction(),+}+++def _parse_coord(val: str) -> Union[int, float]:+ """Parse a coordinate value, returning int if whole number, float otherwise."""+ f = float(val)+ if f == int(f):+ return int(f)+ return f+def repr_to_action(action_repr: str) -> Action:+ """Parse an action from repr format string.++ Args:+ action_repr: Action string in repr format, e.g., "ClickAction(x=100, y=200)"++ Returns:+ Parsed Action object++ Raises:+ ValueError: If the action string cannot be parsed+ """if not isinstance(action_repr, str):raise ValueError("action_repr must be a string")action_repr = action_repr.strip()- patterns = {- # Mouse click actions- r"ClickAction\(x=(\d+),\s*y=(\d+)\)": lambda m: ClickAction(x=int(m[0]), y=int(m[1])),- r"RightClickAction\(x=(\d+),\s*y=(\d+)\)": lambda m: RightClickAction(- x=int(m[0]), y=int(m[1])- ),- r"DoubleClickAction\(x=(\d+),\s*y=(\d+)\)": lambda m: DoubleClickAction(- x=int(m[0]), y=int(m[1])- ),- r"MiddleClickAction\(x=(\d+),\s*y=(\d+)\)": lambda m: MiddleClickAction(- x=int(m[0]), y=int(m[1])- ),- # Drag and move actions- r"DragAction\(from_x=(\d+),\s*from_y=(\d+),\s*to_x=(\d+),\s*to_y=(\d+),\s*duration=([0-9.]+)\)": lambda m: DragAction(- from_x=int(m[0]), from_y=int(m[1]), to_x=int(m[2]), to_y=int(m[3]), duration=float(m[4])- ),- r"DragAction\(from_x=(\d+),\s*from_y=(\d+),\s*to_x=(\d+),\s*to_y=(\d+)\)": lambda m: DragAction(- from_x=int(m[0]), from_y=int(m[1]), to_x=int(m[2]), to_y=int(m[3])- ),- r"MoveToAction\(x=(\d+),\s*y=(\d+),\s*duration=([0-9.]+)\)": lambda m: MoveToAction(- x=int(m[0]), y=int(m[1]), duration=float(m[2])- ),- r"MoveToAction\(x=(\d+),\s*y=(\d+)\)": lambda m: MoveToAction(x=int(m[0]), y=int(m[1])),- # Scroll actions- r"ScrollAction\(direction=['\"](\w+)['\"]\,\s*amount=(\d+)\)": lambda m: ScrollAction(- direction=m[0], amount=int(m[1])- ),- r"ScrollAction\(amount=(\d+),\s*direction=['\"](\w+)['\"]\)": lambda m: ScrollAction(- direction=m[1], amount=int(m[0])- ),- r"ScrollAction\(direction=['\"](\w+)['\"]\)": lambda m: ScrollAction(direction=m[0]),- r"ScrollAction\(amount=(\d+)\)": lambda m: ScrollAction(amount=int(m[0])),- r"ScrollAction\(\)": lambda m: ScrollAction(),- # Keyboard actions- r"KeyAction\(key=['\"]([^'\"]+)['\"]\)": lambda m: KeyAction(key=m[0]),- r"TypeAction\(text=['\"]([^'\"]*)['\"].*?\)": lambda m: TypeAction(text=m[0]),- r"HotkeyAction\(keys=\[([^\]]+)\].*?\)": lambda m: HotkeyAction(- keys=[key.strip().strip("'\"") for key in m[0].split(",")]- ),- # Control actions- r"WaitAction\(seconds=([0-9.]+)\)": lambda m: WaitAction(seconds=float(m[0])),- r"WaitAction\(\)": lambda m: WaitAction(),- r"DoneAction\(\)": lambda m: DoneAction(),- }-- for pattern, constructor in patterns.items():+ for pattern, constructor in _REPR_PATTERNS.items():match = re.match(pattern, action_repr)if match:return constructor(match.groups())raise ValueError(f"Unknown action representation: {action_repr}")+++def snake_case_to_action(action_str: str) -> Action:+ """Parse an action from snake_case format string.++ Args:+ action_str: Action string in snake_case format, e.g., "click(0.5, 0.5)"++ Returns:+ Parsed Action object++ Raises:+ ValueError: If the action string cannot be parsed+ """+ if not isinstance(action_str, str):+ raise ValueError("action_str must be a string")++ action_str = action_str.strip()++ for pattern, constructor in _SNAKE_CASE_PATTERNS.items():+ match = re.match(pattern, action_str)+ if match:+ return constructor(match.groups())+ raise ValueError(f"Unknown action string: {action_str}")+++def parse_action_string(action_str: str) -> Action:+ """Parse an action from either repr or snake_case format.++ This is the unified entry point for parsing action strings.+ It automatically detects the format and delegates to the appropriate parser.++ Args:+ action_str: Action string in either format:+ - Repr format: "ClickAction(x=100, y=200)"+ - Snake_case format: "click(0.5, 0.5)"++ Returns:+ Parsed Action object++ Raises:+ ValueError: If the action string cannot be parsed in either format+ """+ if not isinstance(action_str, str):+ raise ValueError("action_str must be a string")++ action_str = action_str.strip()++ # Try repr format first (check if it starts with an Action class name)+ if re.match(r"[A-Z]\w+Action\(", action_str):+ try:+ return repr_to_action(action_str)+ except ValueError:+ pass++ # Try snake_case format+ try:+ return snake_case_to_action(action_str)+ except ValueError:+ pass++ raise ValueError(f"Could not parse action string: {action_str}")+++def action_to_dict(action: Action) -> Dict[str, Any]:+ """Convert an Action object to a dictionary.++ Args:+ action: Action object to convert++ Returns:+ Dictionary representation of the action with 'type' key+ """+ action_type = type(action).__name__++ if isinstance(action, ClickAction):+ return {"type": action_type, "x": action.x, "y": action.y}+ elif isinstance(action, RightClickAction):+ return {"type": action_type, "x": action.x, "y": action.y}+ elif isinstance(action, DoubleClickAction):+ return {"type": action_type, "x": action.x, "y": action.y}+ elif isinstance(action, MiddleClickAction):+ return {"type": action_type, "x": action.x, "y": action.y}+ elif isinstance(action, MoveToAction):+ return {"type": action_type, "x": action.x, "y": action.y, "duration": action.duration}+ elif isinstance(action, DragAction):+ return {+ "type": action_type,+ "from_x": action.from_x,+ "from_y": action.from_y,+ "to_x": action.to_x,+ "to_y": action.to_y,+ "duration": action.duration,+ }+ elif isinstance(action, ScrollAction):+ return {"type": action_type, "direction": action.direction, "amount": action.amount}+ elif isinstance(action, KeyAction):+ return {"type": action_type, "key": action.key}+ elif isinstance(action, TypeAction):+ return {"type": action_type, "text": action.text}+ elif isinstance(action, HotkeyAction):+ return {"type": action_type, "keys": action.keys}+ elif isinstance(action, WaitAction):+ return {"type": action_type, "seconds": action.seconds}+ elif isinstance(action, DoneAction):+ return {"type": action_type}+ else:+ raise ValueError(f"Unknown action type: {type(action)}")+++def dict_to_action(action_dict: Dict[str, Any]) -> Action:+ """Convert a dictionary to an Action object.++ Args:+ action_dict: Dictionary with 'type' key and action parameters++ Returns:+ Action object++ Raises:+ ValueError: If the action type is unknown+ """+ action_type = action_dict.get("type") or action_dict.get("action_type", "")+ action_type_normalized = action_type.lower().replace("_", "").replace("action", "")++ if action_type_normalized in ("click", "clickaction"):+ return ClickAction(+ x=_parse_coord(str(action_dict.get("x", 0))),+ y=_parse_coord(str(action_dict.get("y", 0))),+ )+ elif action_type_normalized in ("rightclick", "rightclickaction"):+ return RightClickAction(+ x=_parse_coord(str(action_dict.get("x", 0))),+ y=_parse_coord(str(action_dict.get("y", 0))),+ )+ elif action_type_normalized in ("doubleclick", "doubleclickaction"):+ return DoubleClickAction(+ x=_parse_coord(str(action_dict.get("x", 0))),+ y=_parse_coord(str(action_dict.get("y", 0))),+ )+ elif action_type_normalized in ("middleclick", "middleclickaction"):+ return MiddleClickAction(+ x=_parse_coord(str(action_dict.get("x", 0))),+ y=_parse_coord(str(action_dict.get("y", 0))),+ )+ elif action_type_normalized in ("moveto", "movetoaction"):+ return MoveToAction(+ x=_parse_coord(str(action_dict.get("x", 0))),+ y=_parse_coord(str(action_dict.get("y", 0))),+ duration=float(action_dict.get("duration", 0.5)),+ )+ elif action_type_normalized in ("drag", "dragaction"):+ return DragAction(+ from_x=_parse_coord(str(action_dict.get("from_x", 0))),+ from_y=_parse_coord(str(action_dict.get("from_y", 0))),+ to_x=_parse_coord(str(action_dict.get("to_x", 0))),+ to_y=_parse_coord(str(action_dict.get("to_y", 0))),+ duration=float(action_dict.get("duration", 1.0)),+ )+ elif action_type_normalized in ("scroll", "scrollaction"):+ return ScrollAction(+ direction=action_dict.get("direction", "up"),+ amount=int(action_dict.get("amount", 100)),+ )+ elif action_type_normalized in ("key", "keyaction"):+ return KeyAction(key=action_dict.get("key", ""))+ elif action_type_normalized in ("type", "typeaction"):+ return TypeAction(text=action_dict.get("text", ""))+ elif action_type_normalized in ("hotkey", "hotkeyaction"):+ return HotkeyAction(keys=action_dict.get("keys", []))+ elif action_type_normalized in ("wait", "waitaction"):+ return WaitAction(seconds=float(action_dict.get("seconds", 1.0)))+ elif action_type_normalized in ("done", "doneaction"):+ return DoneAction()+ else:+ raise ValueError(f"Unknown action type: {action_type}")diff --git a/libs/cua-bench/cua_bench/environment.py b/libs/cua-bench/cua_bench/environment.pyindex 631d38e271..a8466a5e44 100644--- a/libs/cua-bench/cua_bench/environment.py+++ b/libs/cua-bench/cua_bench/environment.py@@ -158,7 +158,7 @@ class Environment:) -> Tuple[bytes, Dict]:# Reset session stateif self.session is not None:- self.session.close()+ await self.session.close()self.session = Noneself.page = Nonediff --git a/libs/cua-bench/cua_bench/runners.py b/libs/cua-bench/cua_bench/runners.pynew file mode 100644index 0000000000..9e888b0e65--- /dev/null+++ b/libs/cua-bench/cua_bench/runners.py@@ -0,0 +1,382 @@+"""Benchmark runner functions for cua-bench.++This module provides programmatic interfaces for running benchmarks and+interactive environments, using the core gym interface (make, reset, step, evaluate).+"""++import asyncio+import fnmatch+import time+import uuid+from dataclasses import dataclass+from pathlib import Path+from typing import Any, Callable, Dict, List, Optional, Tuple++from .core import Task, make+from .environment import Environment+from .types import Action, DoneAction+++@dataclass+class BenchmarkResult:+ """Result of a benchmark run.++ Attributes:+ run_id: Unique identifier for this run+ task_results: List of individual task results+ total_tasks: Total number of tasks in the benchmark+ success_count: Number of successful tasks+ failed_count: Number of failed tasks+ avg_reward: Average reward across all tasks+ duration_seconds: Total duration of the benchmark+ output_dir: Output directory for results (if any)+ """++ run_id: str+ task_results: List[Dict[str, Any]]+ total_tasks: int+ success_count: int+ failed_count: int+ avg_reward: float+ duration_seconds: float+ output_dir: Optional[str] = None+++@dataclass+class TaskResult:+ """Result of a single task execution.++ Attributes:+ task_path: Path to the task+ variant_id: Task variant index+ success: Whether the task succeeded+ reward: Reward from evaluation+ steps: Number of steps taken+ error: Error message if failed+ """++ task_path: str+ variant_id: int+ success: bool+ reward: float+ steps: int+ error: Optional[str] = None+++async def run_single_task(+ env_path: Path,+ task_index: int = 0,+ *,+ split: str = "train",+ agent_fn: Optional[Callable[[bytes, Task], Action]] = None,+ max_steps: int = 100,+ oracle: bool = False,+) -> TaskResult:+ """Run a single task using the gym interface.++ This function uses the core gym interface (make, reset, step, evaluate)+ to run a task with either an agent function or the oracle solver.++ Args:+ env_path: Path to the task environment directory+ task_index: Task variant index (default: 0)+ split: Dataset split (default: "train")+ agent_fn: Optional agent function that takes (screenshot, task_config)+ and returns an Action. If None and oracle=False, returns after setup.+ max_steps: Maximum steps per task (default: 100)+ oracle: Run oracle/solver mode (default: False)++ Returns:+ TaskResult with execution results++ Example:+ # Run with oracle+ result = await run_single_task(Path("./task"), oracle=True)++ # Run with custom agent+ def my_agent(screenshot: bytes, task: Task) -> Action:+ return DoneAction() # Simple agent that immediately finishes++ result = await run_single_task(Path("./task"), agent_fn=my_agent)+ """+ env = None+ try:+ # Create environment using gym interface+ env = make(str(env_path), split=split)+ env.max_steps = max_steps++ # Reset environment+ screenshot, task_cfg = await env.reset(task_id=task_index)++ step_count = 0+ reward = 0.0++ if oracle:+ # Run oracle solver+ if env.solve_task_fn is not None:+ await env.solve()+ step_count = env.step_count+ else:+ return TaskResult(+ task_path=str(env_path),+ variant_id=task_index,+ success=False,+ reward=0.0,+ steps=0,+ error="No solve_task_fn defined for oracle mode",+ )+ elif agent_fn is not None:+ # Run agent+ done = False+ while not done and step_count < max_steps:+ action = agent_fn(screenshot, task_cfg)+ screenshot = await env.step(action)+ step_count += 1+ done = isinstance(action, DoneAction)++ # Evaluate+ if env.evaluate_task_fn is not None:+ result = await env.evaluate()+ if isinstance(result, (int, float)):+ reward = float(result)+ elif isinstance(result, list) and len(result) > 0:+ reward = float(result[0])+ elif isinstance(result, dict) and "reward" in result:+ reward = float(result["reward"])++ return TaskResult(+ task_path=str(env_path),+ variant_id=task_index,+ success=reward >= 0.5, # Common threshold+ reward=reward,+ steps=step_count,+ )++ except Exception as e:+ return TaskResult(+ task_path=str(env_path),+ variant_id=task_index,+ success=False,+ reward=0.0,+ steps=0,+ error=str(e),+ )+ finally:+ if env is not None:+ try:+ await env.close()+ except Exception:+ pass+++async def run_benchmark(+ dataset_path: Path,+ *,+ agent_fn: Optional[Callable[[bytes, Task], Action]] = None,+ max_steps: int = 100,+ max_parallel: int = 4,+ oracle: bool = False,+ max_variants: Optional[int] = None,+ task_filter: Optional[str] = None,+ split: str = "train",+) -> BenchmarkResult:+ """Run a benchmark on a dataset using the gym interface.++ This function runs multiple tasks in parallel using the core gym interface+ (make, reset, step, evaluate).++ Args:+ dataset_path: Path to the dataset directory+ agent_fn: Optional agent function that takes (screenshot, task_config)+ and returns an Action. Required if oracle=False.+ max_steps: Maximum steps per task (default: 100)+ max_parallel: Maximum parallel workers (default: 4)+ oracle: Run oracle/solver mode (default: False)+ max_variants: Maximum variants per task (optional)+ task_filter: Glob pattern to filter tasks (optional)+ split: Dataset split (default: "train")++ Returns:+ BenchmarkResult with run statistics and task results++ Example:+ # Run oracle benchmark+ result = await run_benchmark(+ Path("./datasets/cua-bench-basic"),+ oracle=True,+ max_parallel=8,+ )+ print(f"Success rate: {result.success_count / result.total_tasks:.2%}")++ # Run with custom agent+ def random_agent(screenshot: bytes, task: Task) -> Action:+ import random+ return random.choice([+ ClickAction(x=random.randint(0, 1920), y=random.randint(0, 1080)),+ DoneAction(),+ ])++ result = await run_benchmark(+ Path("./datasets/my-dataset"),+ agent_fn=random_agent,+ max_parallel=4,+ )+ """+ start_time = time.time()++ # Validate dataset path+ if not dataset_path.exists():+ raise FileNotFoundError(f"Dataset not found: {dataset_path}")++ # Discover tasks in dataset+ tasks: List[Path] = []+ if (dataset_path / "main.py").exists():+ tasks.append(dataset_path)+ else:+ for task_dir in sorted(dataset_path.iterdir()):+ if task_dir.is_dir() and (task_dir / "main.py").exists():+ tasks.append(task_dir)++ if not tasks:+ raise ValueError(f"No tasks found in dataset: {dataset_path}")++ # Apply task filter if specified+ if task_filter:+ tasks = [t for t in tasks if fnmatch.fnmatch(t.name, task_filter)]+ if not tasks:+ raise ValueError(f"No tasks match filter: {task_filter}")++ # Expand tasks to (task_path, variant_id) tuples+ task_variants: List[Tuple[Path, int]] = []+ for task_path in tasks:+ try:+ env = make(str(task_path), split=split)+ if env.tasks_config_fn:+ variant_count = len(env.tasks_config_fn())+ else:+ variant_count = 1+ except Exception:+ variant_count = 1++ if max_variants:+ variant_count = min(variant_count, max_variants)++ for variant_id in range(variant_count):+ task_variants.append((task_path, variant_id))++ # Generate run ID+ run_id = f"run-{uuid.uuid4().hex[:8]}"++ # Run tasks with parallelism control+ semaphore = asyncio.Semaphore(max_parallel)++ async def run_with_semaphore(task_path: Path, variant_id: int) -> TaskResult:+ async with semaphore:+ return await run_single_task(+ task_path,+ task_index=variant_id,+ split=split,+ agent_fn=agent_fn,+ max_steps=max_steps,+ oracle=oracle,+ )++ # Create and run all tasks+ coroutines = [+ run_with_semaphore(task_path, variant_id) for task_path, variant_id in task_variants+ ]+ results = await asyncio.gather(*coroutines, return_exceptions=True)++ # Process results+ task_results: List[Dict[str, Any]] = []+ rewards: List[float] = []++ for result in results:+ if isinstance(result, Exception):+ task_results.append(+ {+ "task_path": "unknown",+ "variant_id": -1,+ "success": False,+ "reward": 0.0,+ "steps": 0,+ "error": str(result),+ }+ )+ rewards.append(0.0)+ else:+ task_results.append(+ {+ "task_path": result.task_path,+ "variant_id": result.variant_id,+ "success": result.success,+ "reward": result.reward,+ "steps": result.steps,+ "error": result.error,+ }+ )+ rewards.append(result.reward)++ # Calculate statistics+ success_count = sum(1 for r in task_results if r.get("success", False))+ failed_count = len(task_results) - success_count+ avg_reward = sum(rewards) / len(rewards) if rewards else 0.0+ duration_seconds = time.time() - start_time++ return BenchmarkResult(+ run_id=run_id,+ task_results=task_results,+ total_tasks=len(task_results),+ success_count=success_count,+ failed_count=failed_count,+ avg_reward=avg_reward,+ duration_seconds=duration_seconds,+ )+++async def run_interactive(+ env_path: Path,+ task_index: int = 0,+ *,+ split: str = "train",+ headless: bool = False,+) -> Tuple[Environment, bytes, Task]:+ """Run an environment interactively using the gym interface.++ This function sets up an environment for interactive use, returning+ the environment instance, initial screenshot, and task configuration.++ Args:+ env_path: Path to the environment directory+ task_index: Task variant index (default: 0)+ split: Dataset split (default: "train")+ headless: Run in headless mode (default: False)++ Returns:+ Tuple of (env, screenshot, task_config)+ - env: Environment instance (caller should call env.close() when done)+ - screenshot: Initial screenshot bytes+ - task_config: Task configuration++ Example:+ env, screenshot, task_cfg = await run_interactive(Path("./task"))+ print(f"Task: {task_cfg.description}")++ # Execute actions...+ screenshot = await env.step(ClickAction(x=100, y=200))++ # Evaluate+ reward = await env.evaluate()+ print(f"Reward: {reward}")++ # Cleanup+ await env.close()+ """+ # Create environment+ env = make(str(env_path), split=split)+ env.headless = headless++ # Reset and get initial state+ screenshot, task_cfg = await env.reset(task_id=task_index)++ return env, screenshot, task_cfgdiff --git a/libs/cua-bench/cua_bench/scripts/benchmark_workers.py b/libs/cua-bench/cua_bench/scripts/benchmark_workers.pynew file mode 100644index 0000000000..6bc921c89a--- /dev/null+++ b/libs/cua-bench/cua_bench/scripts/benchmark_workers.py@@ -0,0 +1,339 @@+#!/usr/bin/env python3+"""Benchmark script for CUA-Bench worker throughput.++This script measures the performance of parallel workers with CBEnvWorkerClient,+tracking reset times, step times, and finish times.++Usage:+ uv run python -m cua_bench.scripts.benchmark_workers --num_workers 16 --num_steps 10+"""++import argparse+import asyncio+import multiprocessing+import sys+import tempfile+import time+from multiprocessing import Manager+from pathlib import Path++# ANSI colors+BLUE = "\033[94m"+GREEN = "\033[92m"+YELLOW = "\033[93m"+RED = "\033[91m"+RESET = "\033[0m"++# Simple HTML for test tasks+SIMPLE_BUTTON_HTML = """+<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100vh;background:#f0f0f0;">+ <h1 style="margin-bottom:20px;">Benchmark Task</h1>+ <button+ id="test-btn"+ style="background:#3b82f6;color:white;padding:12px 24px;border:none;border-radius:8px;cursor:pointer;"+ onclick="window.__clicked = true; window.__score = 1.0;"+ >+ Click Me+ </button>+</div>+<script>+ window.__clicked = false;+ window.__score = 0.0;+</script>+"""+++def create_temp_task(tmp_dir: Path) -> Path:+ """Create a temporary test task directory."""+ task_dir = tmp_dir / "benchmark-task"+ task_dir.mkdir(exist_ok=True)+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""++pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Click the button",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ ) for _ in range(20)]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ pid = await session.launch_window(html=HTML, title="Benchmark", width=400, height=300)+[email protected]_task(split="train")+async def evaluate(task, session):+ global pid+ clicked = await session.execute_javascript(pid, "window.__clicked")+ return [1.0 if clicked else 0.0]+'''+ )+ return task_dir+++def run_worker(+ worker_id: int,+ server_url: str,+ task_path: str,+ num_steps: int,+ results_dict: dict,+):+ """Run a single worker process."""+ from cua_bench.workers import CBEnvWorkerClient++ print(f"{BLUE}Worker {worker_id} starting...{RESET}")++ # Create task configs for this worker+ task_configs = [+ {"env_path": task_path, "task_index": (worker_id + i) % 10, "split": "train"}+ for i in range(10)+ ]++ # Create client with env_config dict+ env_config = {+ "server_url": server_url,+ "task_configs": task_configs,+ "max_step": 100,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)++ # Initialize local counters+ worker_reset_time = 0.0+ worker_reset_count = 0+ worker_step_time = 0.0+ worker_step_count = 0+ worker_finish_time = 0.0+ worker_finish_count = 0++ try:+ # Reset environment (picks random task from task_configs)+ start_time = time.time()+ env_ret, meta_info = client.reset()+ reset_time = time.time() - start_time+ worker_reset_time += reset_time+ worker_reset_count += 1++ assert env_ret is not None+ assert meta_info is not None+ print(f"{YELLOW}Worker {worker_id} reset in {reset_time:.2f}s{RESET}")++ # Run steps+ for i in range(num_steps):+ start_time = time.time()+ # Action is now a string with action tags+ action = "<|action_start|>click(500,500)<|action_end|>"+ env_ret, meta_info = client.step(action)+ step_time = time.time() - start_time+ worker_step_time += step_time+ worker_step_count += 1++ assert env_ret is not None+ assert meta_info is not None++ if env_ret.get("done"):+ print(f"{YELLOW}Worker {worker_id} episode done at step {i+1}{RESET}")+ # Reset for next episode+ start_time = time.time()+ env_ret, meta_info = client.reset()+ reset_time = time.time() - start_time+ worker_reset_time += reset_time+ worker_reset_count += 1++ if (i + 1) % 5 == 0:+ print(+ f"{YELLOW}Worker {worker_id} step {i+1}/{num_steps} "+ f"in {step_time:.2f}s{RESET}"+ )++ # Finish with done action+ start_time = time.time()+ action = "<|action_start|>done()<|action_end|>"+ env_ret, meta_info = client.step(action)+ finish_time = time.time() - start_time+ worker_finish_time += finish_time+ worker_finish_count += 1++ assert env_ret is not None+ assert env_ret.get("done")+ print(f"{GREEN}Worker {worker_id} finish in {finish_time:.2f}s{RESET}")++ # Store results+ results_dict[worker_id] = {+ "reset_time": worker_reset_time,+ "reset_count": worker_reset_count,+ "step_time": worker_step_time,+ "step_count": worker_step_count,+ "finish_time": worker_finish_time,+ "finish_count": worker_finish_count,+ }++ except Exception as e:+ print(f"{RED}Worker {worker_id} error: {e}{RESET}")+ results_dict[worker_id] = {+ "error": str(e),+ "reset_time": worker_reset_time,+ "reset_count": worker_reset_count,+ "step_time": worker_step_time,+ "step_count": worker_step_count,+ "finish_time": worker_finish_time,+ "finish_count": worker_finish_count,+ }+++def run_benchmark(+ num_workers: int = 16,+ num_steps: int = 10,+ task_path: str | None = None,+):+ """Run the worker benchmark."""+ from cua_bench.workers import cleanup_workers, create_workers++ async def _run():+ print(f"\n{GREEN}=== CUA-Bench Worker Benchmark ==={RESET}")+ print(f"{BLUE}Workers: {num_workers}{RESET}")+ print(f"{BLUE}Steps per worker: {num_steps}{RESET}")++ # Create temp task if no task_path provided+ tmp_dir = None+ if task_path is None:+ tmp_dir = tempfile.mkdtemp(prefix="cua-bench-benchmark-")+ actual_task_path = str(create_temp_task(Path(tmp_dir)))+ print(f"{BLUE}Using temp task: {actual_task_path}{RESET}")+ else:+ actual_task_path = task_path+ print(f"{BLUE}Task path: {actual_task_path}{RESET}")++ try:+ # Start worker servers+ print(f"\n{BLUE}Starting {num_workers} worker servers...{RESET}")+ start_time = time.time()+ workers = await create_workers(+ n_workers=num_workers,+ allowed_ips=["127.0.0.1"],+ startup_timeout=120.0,+ )+ worker_startup_time = time.time() - start_time+ print(f"{GREEN}Worker servers started in {worker_startup_time:.2f}s{RESET}")++ try:+ # Create manager for shared results+ manager = Manager()+ results_dict = manager.dict()++ # Start worker processes+ print(f"\n{BLUE}Starting {num_workers} worker clients...{RESET}")+ processes = []+ for i, worker in enumerate(workers):+ p = multiprocessing.Process(+ target=run_worker,+ args=(i, worker.api_url, actual_task_path, num_steps, results_dict),+ )+ processes.append(p)+ p.start()+ time.sleep(0.1) # Small delay between starts++ # Wait for all processes+ for p in processes:+ p.join()++ # Aggregate results+ reset_time_total = 0.0+ reset_count = 0+ step_time_total = 0.0+ step_count = 0+ finish_time_total = 0.0+ finish_count = 0+ errors = []++ for worker_id, result in results_dict.items():+ if "error" in result:+ errors.append(f"Worker {worker_id}: {result['error']}")+ reset_time_total += result["reset_time"]+ reset_count += result["reset_count"]+ step_time_total += result["step_time"]+ step_count += result["step_count"]+ finish_time_total += result["finish_time"]+ finish_count += result["finish_count"]++ # Print summary+ print(f"\n{GREEN}=== Benchmark Results ==={RESET}")+ print(f"{BLUE}Workers: {num_workers}{RESET}")+ print(f"{BLUE}Steps per worker: {num_steps}{RESET}")+ print(f"{BLUE}Total resets: {reset_count}{RESET}")+ print(f"{BLUE}Total steps: {step_count}{RESET}")+ print(f"{BLUE}Total finishes: {finish_count}{RESET}")++ if reset_count > 0:+ print(f"{BLUE}Average reset time: {reset_time_total / reset_count:.2f}s{RESET}")+ if step_count > 0:+ print(f"{BLUE}Average step time: {step_time_total / step_count:.2f}s{RESET}")+ per_worker_throughput = step_count / step_time_total+ total_throughput = per_worker_throughput * num_workers+ print(+ f"{BLUE}Step throughput (per worker): {per_worker_throughput:.2f} steps/sec{RESET}"+ )+ print(f"{BLUE}Step throughput (total): {total_throughput:.2f} steps/sec{RESET}")+ if finish_count > 0:+ print(+ f"{BLUE}Average finish time: {finish_time_total / finish_count:.2f}s{RESET}"+ )++ if errors:+ print(f"\n{RED}Errors ({len(errors)}):{RESET}")+ for err in errors:+ print(f"{RED} {err}{RESET}")++ finally:+ print(f"\n{BLUE}Cleaning up workers...{RESET}")+ await cleanup_workers(workers)++ finally:+ # Clean up temp directory+ if tmp_dir is not None:+ import shutil++ shutil.rmtree(tmp_dir, ignore_errors=True)++ asyncio.run(_run())+++def main():+ parser = argparse.ArgumentParser(description="Benchmark CUA-Bench workers")+ parser.add_argument(+ "--num_workers",+ type=int,+ default=16,+ help="Number of parallel workers (default: 16)",+ )+ parser.add_argument(+ "--num_steps",+ type=int,+ default=10,+ help="Number of steps per worker (default: 10)",+ )+ parser.add_argument(+ "--task_path",+ type=str,+ default=None,+ help="Path to task directory (default: creates temp task)",+ )+ args = parser.parse_args()++ run_benchmark(+ num_workers=args.num_workers,+ num_steps=args.num_steps,+ task_path=args.task_path,+ )+ return 0+++if __name__ == "__main__":+ sys.exit(main())diff --git a/libs/cua-bench/cua_bench/tests/test_gym_interface.py b/libs/cua-bench/cua_bench/tests/test_gym_interface.pynew file mode 100644index 0000000000..9a0d6bb275--- /dev/null+++ b/libs/cua-bench/cua_bench/tests/test_gym_interface.py@@ -0,0 +1,451 @@+"""Tests for the core gym interface (make, reset, step, evaluate).++This module tests the fundamental gym-style environment API using+end-to-end tests with the simulated (Playwright) provider.+"""++import pytest+from cua_bench import (+ ClickAction,+ DoneAction,+ Environment,+ TypeAction,+ WaitAction,+ make,+)++# Simple HTML for test tasks+SIMPLE_BUTTON_HTML = """+<div class="flex flex-col items-center justify-center h-full w-full bg-gray-100 p-4">+ <h1 class="text-xl mb-4">Test Task</h1>+ <button+ id="test-btn"+ class="btn bg-blue-500 text-white px-4 py-2 rounded"+ onclick="window.__clicked = true"+ >+ Click Me+ </button>+</div>+<script>+ window.__clicked = false;+ window.__score = 0.0;+</script>+"""+++class TestMakeFunction:+ """Tests for the make() function."""++ def test_make_returns_environment(self, tmp_path):+ """Test that make() returns an Environment instance."""+ task_dir = tmp_path / "test-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ """+import cua_bench as cb+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(description="Test task")]+"""+ )++ env = make(str(task_dir))+ assert isinstance(env, Environment)++ def test_make_file_not_found(self):+ """Test make() with non-existent path."""+ with pytest.raises(FileNotFoundError):+ make("/nonexistent/path")++ def test_make_no_main_py(self, tmp_path):+ """Test make() with directory missing main.py."""+ task_dir = tmp_path / "empty-task"+ task_dir.mkdir()++ with pytest.raises(FileNotFoundError):+ make(str(task_dir))++ def test_make_with_split(self, tmp_path):+ """Test make() with different splits."""+ task_dir = tmp_path / "split-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ """+import cua_bench as cb+[email protected]_config(split="train")+def get_train_tasks():+ return [cb.Task(description="Train task")]+[email protected]_config(split="test")+def get_test_tasks():+ return [cb.Task(description="Test task")]+"""+ )++ train_env = make(str(task_dir), split="train")+ assert train_env.split == "train"++ test_env = make(str(task_dir), split="test")+ assert test_env.split == "test"+++class TestEnvironmentResetE2E:+ """E2E tests for Environment.reset() with simulated provider."""++ @pytest.mark.asyncio+ async def test_reset_returns_screenshot_and_task(self, tmp_path):+ """Test that reset() returns screenshot bytes and task config."""+ task_dir = tmp_path / "reset-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Click the button",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ await session.launch_window(html=HTML, title="Test", width=400, height=300)+'''+ )++ env = make(str(task_dir))+ try:+ screenshot, task_cfg = await env.reset(task_id=0)++ assert isinstance(screenshot, bytes)+ assert len(screenshot) > 0+ assert task_cfg is not None+ assert task_cfg.description == "Click the button"+ finally:+ await env.close()++ @pytest.mark.asyncio+ async def test_reset_clears_step_count(self, tmp_path):+ """Test that reset() clears the step counter."""+ task_dir = tmp_path / "reset-steps-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Test",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ await session.launch_window(html=HTML, title="Test", width=400, height=300)+'''+ )++ env = make(str(task_dir))+ try:+ await env.reset(task_id=0)++ # Take some steps+ await env.step(WaitAction(seconds=0.1))+ await env.step(WaitAction(seconds=0.1))+ assert env.step_count == 2++ # Reset should clear step count+ env.current_task = None # Allow re-reset+ await env.reset(task_id=0)+ assert env.step_count == 0+ finally:+ await env.close()+++class TestEnvironmentStepE2E:+ """E2E tests for Environment.step() with simulated provider."""++ @pytest.mark.asyncio+ async def test_step_executes_click_action(self, tmp_path):+ """Test that step() executes a click action."""+ task_dir = tmp_path / "step-click-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""++pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Click the button",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ pid = await session.launch_window(html=HTML, title="Test", width=400, height=300)+[email protected]_task(split="train")+async def evaluate(task, session):+ global pid+ clicked = await session.execute_javascript(pid, "window.__clicked")+ return [1.0 if clicked else 0.0]+'''+ )++ env = make(str(task_dir))+ try:+ await env.reset(task_id=0)++ # Click in the center of the window (where button should be)+ screenshot = await env.step(ClickAction(x=400, y=300))++ assert isinstance(screenshot, bytes)+ assert len(screenshot) > 0+ assert env.step_count == 1+ finally:+ await env.close()++ @pytest.mark.asyncio+ async def test_step_increments_counter(self, tmp_path):+ """Test that step() increments the step counter."""+ task_dir = tmp_path / "step-counter-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Test",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ await session.launch_window(html=HTML, title="Test", width=400, height=300)+'''+ )++ env = make(str(task_dir))+ try:+ await env.reset(task_id=0)++ assert env.step_count == 0++ await env.step(WaitAction(seconds=0.1))+ assert env.step_count == 1++ await env.step(WaitAction(seconds=0.1))+ assert env.step_count == 2++ await env.step(ClickAction(x=100, y=100))+ assert env.step_count == 3+ finally:+ await env.close()+++class TestEnvironmentEvaluateE2E:+ """E2E tests for Environment.evaluate() with simulated provider."""++ @pytest.mark.asyncio+ async def test_evaluate_returns_result(self, tmp_path):+ """Test that evaluate() returns evaluation result."""+ task_dir = tmp_path / "eval-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ '''+import cua_bench as cb++HTML = """+<div class="flex items-center justify-center h-full w-full">+ <span id="status">Ready</span>+</div>+<script>+ window.__score = 0.75;+</script>+"""++pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Test evaluation",+ computer={"provider": "simulated", "setup_config": {"width": 800, "height": 600}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ pid = await session.launch_window(html=HTML, title="Test", width=400, height=300)+[email protected]_task(split="train")+async def evaluate(task, session):+ global pid+ score = await session.execute_javascript(pid, "window.__score")+ return [float(score)]+'''+ )++ env = make(str(task_dir))+ try:+ await env.reset(task_id=0)++ result = await env.evaluate()++ assert result == [0.75]+ finally:+ await env.close()+++class TestEnvironmentSolveE2E:+ """E2E tests for Environment.solve() with simulated provider."""++ @pytest.mark.asyncio+ async def test_solve_runs_solver(self, tmp_path):+ """Test that solve() runs the solver function."""+ task_dir = tmp_path / "solve-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""++pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Click the button",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ pid = await session.launch_window(html=HTML, title="Test", width=400, height=300)+[email protected]_task(split="train")+async def solve(task, session):+ global pid+ # Click the button using bot helper+ await session.click_element(pid, "#test-btn")+[email protected]_task(split="train")+async def evaluate(task, session):+ global pid+ clicked = await session.execute_javascript(pid, "window.__clicked")+ return [1.0 if clicked else 0.0]+'''+ )++ env = make(str(task_dir))+ try:+ await env.reset(task_id=0)++ # Before solve, button not clicked+ result_before = await env.evaluate()+ assert result_before == [0.0]++ # Run solver+ await env.solve()++ # After solve, button should be clicked+ result_after = await env.evaluate()+ assert result_after == [1.0]+ finally:+ await env.close()+++class TestEnvironmentCloseE2E:+ """E2E tests for Environment.close()."""++ @pytest.mark.asyncio+ async def test_close_cleans_up_session(self, tmp_path):+ """Test that close() cleans up the session."""+ task_dir = tmp_path / "close-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Test",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ await session.launch_window(html=HTML, title="Test", width=400, height=300)+'''+ )++ env = make(str(task_dir))+ await env.reset(task_id=0)++ assert env.session is not None++ await env.close()++ assert env.session is None++ @pytest.mark.asyncio+ async def test_close_without_session(self):+ """Test that close() handles no session gracefully."""+ env = Environment()+ env.session = None++ # Should not raise+ await env.close()+++class TestActionTypes:+ """Tests for action type creation."""++ def test_click_action(self):+ """Test ClickAction creation."""+ action = ClickAction(x=100, y=200)+ assert action.x == 100+ assert action.y == 200++ def test_type_action(self):+ """Test TypeAction creation."""+ action = TypeAction(text="Hello World")+ assert action.text == "Hello World"++ def test_done_action(self):+ """Test DoneAction creation."""+ action = DoneAction()+ assert isinstance(action, DoneAction)++ def test_wait_action_default(self):+ """Test WaitAction with default seconds."""+ action = WaitAction()+ assert action.seconds == 1.0++ def test_wait_action_custom(self):+ """Test WaitAction with custom seconds."""+ action = WaitAction(seconds=2.5)+ assert action.seconds == 2.5diff --git a/libs/cua-bench/cua_bench/tests/test_iconify.py b/libs/cua-bench/cua_bench/tests/test_iconify.pyindex 4008b5803a..6038df8673 100644--- a/libs/cua-bench/cua_bench/tests/test_iconify.py+++ b/libs/cua-bench/cua_bench/tests/test_iconify.py@@ -1,6 +1,13 @@+from unittest.mock import patch+import pytestfrom cua_bench.iconify import clear_cache, process_icons+# Mock SVG response for testing+MOCK_SVG = (+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>'+)+class TestIconify:"""Test suite for iconify icon processing."""@@ -9,8 +16,10 @@ class TestIconify:"""Clear cache before each test."""clear_cache()- def test_basic_iconify_processing(self):+ @patch("cua_bench.iconify._fetch_icon_svg")+ def test_basic_iconify_processing(self, mock_fetch):"""Test basic iconify-icon element processing."""+ mock_fetch.return_value = MOCK_SVGhtml = '<iconify-icon icon="eva:people-outline"></iconify-icon>'result = process_icons(html)@@ -19,8 +28,10 @@ class TestIconify:assert "</svg>" in resultassert "iconify-icon" not in result- def test_iconify_with_attributes(self):+ @patch("cua_bench.iconify._fetch_icon_svg")+ def test_iconify_with_attributes(self, mock_fetch):"""Test iconify-icon with width and height attributes."""+ mock_fetch.return_value = MOCK_SVGhtml = '<iconify-icon icon="mdi:play" width="24" height="24"></iconify-icon>'result = process_icons(html)@@ -29,8 +40,10 @@ class TestIconify:assert 'width="24"' in resultassert 'height="24"' in result- def test_iconify_with_class(self):+ @patch("cua_bench.iconify._fetch_icon_svg")+ def test_iconify_with_class(self, mock_fetch):"""Test iconify-icon with class attribute."""+ mock_fetch.return_value = MOCK_SVGhtml = '<iconify-icon icon="mdi:play" class="text-blue-500"></iconify-icon>'result = process_icons(html)@@ -38,8 +51,10 @@ class TestIconify:assert "<svg" in resultassert "text-blue-500" in result- def test_multiple_iconify_elements(self):+ @patch("cua_bench.iconify._fetch_icon_svg")+ def test_multiple_iconify_elements(self, mock_fetch):"""Test processing multiple iconify-icon elements."""+ mock_fetch.return_value = MOCK_SVGhtml = """<div><iconify-icon icon="eva:people-outline"></iconify-icon>@@ -80,23 +95,27 @@ class TestIconify:# Should remove the element if no icon specifiedassert result == ""- def test_ignore_iconset_option(self):+ @patch("cua_bench.iconify._fetch_icon_svg")+ def test_ignore_iconset_option(self, mock_fetch):"""Test ignore_iconset option for randomization."""+ mock_fetch.return_value = MOCK_SVGhtml = '<iconify-icon icon="eva:people-outline"></iconify-icon>'# Process with ignore_iconset=Trueresult = process_icons(html, ignore_iconset=True)# Should still process the icon (may use different iconset)- assert "<svg" in result or result == "" # May not find match+ assert "<svg" in result- def test_colon_to_slash_conversion(self):+ @patch("cua_bench.iconify._fetch_icon_svg")+ def test_colon_to_slash_conversion(self, mock_fetch):"""Test that colon notation is converted to slash notation."""+ mock_fetch.return_value = MOCK_SVGhtml = '<iconify-icon icon="mdi:play"></iconify-icon>'result = process_icons(html)# Should process successfully (internal conversion from mdi:play to mdi/play)- assert "<svg" in result or result == ""+ assert "<svg" in resultif __name__ == "__main__":diff --git a/libs/cua-bench/cua_bench/tests/test_run_benchmark.py b/libs/cua-bench/cua_bench/tests/test_run_benchmark.pynew file mode 100644index 0000000000..5e9f45a8fa--- /dev/null+++ b/libs/cua-bench/cua_bench/tests/test_run_benchmark.py@@ -0,0 +1,405 @@+"""Tests for the benchmark runner functions.++This module tests run_benchmark, run_single_task, and run_interactive+which use the gym interface (make, reset, step, evaluate) directly.+"""++from pathlib import Path++import pytest+from cua_bench import (+ BenchmarkResult,+ DoneAction,+ Task,+ TaskResult,+ run_benchmark,+ run_interactive,+ run_single_task,+)++# Simple HTML for test tasks+SIMPLE_BUTTON_HTML = """+<div class="flex flex-col items-center justify-center h-full w-full bg-gray-100 p-4">+ <h1 class="text-xl mb-4">Test Task</h1>+ <button+ id="test-btn"+ class="btn bg-blue-500 text-white px-4 py-2 rounded"+ onclick="window.__clicked = true; window.__score = 1.0;"+ >+ Click Me+ </button>+</div>+<script>+ window.__clicked = false;+ window.__score = 0.0;+</script>+"""+++class TestTaskResult:+ """Tests for TaskResult dataclass."""++ def test_task_result_creation(self):+ """Test creating a TaskResult."""+ result = TaskResult(+ task_path="./task",+ variant_id=0,+ success=True,+ reward=1.0,+ steps=5,+ )+ assert result.task_path == "./task"+ assert result.variant_id == 0+ assert result.success is True+ assert result.reward == 1.0+ assert result.steps == 5+ assert result.error is None++ def test_task_result_with_error(self):+ """Test TaskResult with error."""+ result = TaskResult(+ task_path="./task",+ variant_id=0,+ success=False,+ reward=0.0,+ steps=0,+ error="Task failed: timeout",+ )+ assert result.success is False+ assert result.error == "Task failed: timeout"+++class TestBenchmarkResult:+ """Tests for BenchmarkResult dataclass."""++ def test_benchmark_result_creation(self):+ """Test creating a BenchmarkResult."""+ result = BenchmarkResult(+ run_id="test-run-123",+ task_results=[+ {"task_path": "./task1", "success": True, "reward": 1.0},+ {"task_path": "./task2", "success": False, "reward": 0.0},+ ],+ total_tasks=2,+ success_count=1,+ failed_count=1,+ avg_reward=0.5,+ duration_seconds=120.5,+ )+ assert result.run_id == "test-run-123"+ assert result.total_tasks == 2+ assert result.success_count == 1+ assert result.failed_count == 1+ assert result.avg_reward == 0.5+ assert len(result.task_results) == 2++ def test_benchmark_result_all_success(self):+ """Test BenchmarkResult with all successful tasks."""+ result = BenchmarkResult(+ run_id="success-run",+ task_results=[{"success": True, "reward": 1.0} for _ in range(5)],+ total_tasks=5,+ success_count=5,+ failed_count=0,+ avg_reward=1.0,+ duration_seconds=60.0,+ )+ assert result.success_count == result.total_tasks+ assert result.failed_count == 0++ def test_benchmark_result_all_failed(self):+ """Test BenchmarkResult with all failed tasks."""+ result = BenchmarkResult(+ run_id="failed-run",+ task_results=[{"success": False, "reward": 0.0} for _ in range(3)],+ total_tasks=3,+ success_count=0,+ failed_count=3,+ avg_reward=0.0,+ duration_seconds=30.0,+ )+ assert result.success_count == 0+ assert result.failed_count == result.total_tasks+++class TestRunSingleTaskE2E:+ """E2E tests for run_single_task function."""++ @pytest.mark.asyncio+ async def test_run_single_task_oracle(self, tmp_path):+ """Test run_single_task with oracle mode."""+ task_dir = tmp_path / "task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""++pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Click the button",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ pid = await session.launch_window(html=HTML, title="Test", width=400, height=300)+[email protected]_task(split="train")+async def solve(task, session):+ global pid+ await session.click_element(pid, "#test-btn")+[email protected]_task(split="train")+async def evaluate(task, session):+ global pid+ clicked = await session.execute_javascript(pid, "window.__clicked")+ return [1.0 if clicked else 0.0]+'''+ )++ result = await run_single_task(task_dir, oracle=True)++ assert result.success is True+ assert result.reward == 1.0++ @pytest.mark.asyncio+ async def test_run_single_task_with_agent(self, tmp_path):+ """Test run_single_task with custom agent that immediately finishes."""+ task_dir = tmp_path / "task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""++pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Click the button",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ pid = await session.launch_window(html=HTML, title="Test", width=400, height=300)+[email protected]_task(split="train")+async def evaluate(task, session):+ global pid+ clicked = await session.execute_javascript(pid, "window.__clicked")+ return [1.0 if clicked else 0.0]+'''+ )++ def done_agent(screenshot: bytes, task: Task):+ return DoneAction()++ result = await run_single_task(task_dir, agent_fn=done_agent)++ # Agent just returns DoneAction, so button won't be clicked+ assert result.reward == 0.0+ assert result.steps == 1++ @pytest.mark.asyncio+ async def test_run_single_task_failure(self):+ """Test run_single_task handles errors."""+ result = await run_single_task(Path("/nonexistent/task"))++ assert result.success is False+ assert result.reward == 0.0+ assert result.error is not None+++class TestRunBenchmark:+ """Tests for run_benchmark function."""++ @pytest.mark.asyncio+ async def test_run_benchmark_not_found(self):+ """Test run_benchmark with non-existent dataset."""+ with pytest.raises(FileNotFoundError, match="Dataset not found"):+ await run_benchmark(Path("/nonexistent/dataset"))++ @pytest.mark.asyncio+ async def test_run_benchmark_empty_dataset(self, tmp_path):+ """Test run_benchmark with empty dataset."""+ dataset_path = tmp_path / "empty"+ dataset_path.mkdir()++ with pytest.raises(ValueError, match="No tasks found"):+ await run_benchmark(dataset_path)++ @pytest.mark.asyncio+ async def test_run_benchmark_task_filter_no_match(self, tmp_path):+ """Test run_benchmark with filter that matches nothing."""+ dataset_path = tmp_path / "dataset"+ dataset_path.mkdir()+ task_dir = dataset_path / "my-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ """+import cua_bench as cb+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(description="Test")]+"""+ )++ with pytest.raises(ValueError, match="No tasks match filter"):+ await run_benchmark(dataset_path, task_filter="nonexistent-*")+++class TestRunBenchmarkE2E:+ """E2E tests for run_benchmark function."""++ @pytest.mark.asyncio+ async def test_run_benchmark_oracle(self, tmp_path):+ """Test run_benchmark with oracle mode."""+ dataset_path = tmp_path / "dataset"+ dataset_path.mkdir()++ task_dir = dataset_path / "click-task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""++pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Click the button",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ pid = await session.launch_window(html=HTML, title="Test", width=400, height=300)+[email protected]_task(split="train")+async def solve(task, session):+ global pid+ await session.click_element(pid, "#test-btn")+[email protected]_task(split="train")+async def evaluate(task, session):+ global pid+ clicked = await session.execute_javascript(pid, "window.__clicked")+ return [1.0 if clicked else 0.0]+'''+ )++ result = await run_benchmark(dataset_path, oracle=True, max_parallel=1)++ assert isinstance(result, BenchmarkResult)+ assert result.total_tasks == 1+ assert result.success_count == 1+ assert result.avg_reward == 1.0++ @pytest.mark.asyncio+ async def test_run_benchmark_task_filter(self, tmp_path):+ """Test run_benchmark with task filter."""+ dataset_path = tmp_path / "dataset"+ dataset_path.mkdir()++ # Create multiple tasks+ for name in ["click-task", "type-task", "other-task"]:+ task_dir = dataset_path / name+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""++pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="{name}",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ pid = await session.launch_window(html=HTML, title="Test", width=400, height=300)+[email protected]_task(split="train")+async def solve(task, session):+ global pid+ await session.click_element(pid, "#test-btn")+[email protected]_task(split="train")+async def evaluate(task, session):+ global pid+ clicked = await session.execute_javascript(pid, "window.__clicked")+ return [1.0 if clicked else 0.0]+'''+ )++ # Run with filter matching only click-task+ result = await run_benchmark(+ dataset_path,+ oracle=True,+ task_filter="click-*",+ max_parallel=1,+ )++ assert result.total_tasks == 1+++class TestRunInteractiveE2E:+ """E2E tests for run_interactive function."""++ @pytest.mark.asyncio+ async def test_run_interactive_returns_env(self, tmp_path):+ """Test run_interactive returns environment."""+ task_dir = tmp_path / "task"+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""++pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Interactive task",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ pid = await session.launch_window(html=HTML, title="Test", width=400, height=300)+'''+ )++ env, screenshot, task_cfg = await run_interactive(task_dir)++ try:+ assert env is not None+ assert isinstance(screenshot, bytes)+ assert len(screenshot) > 0+ assert task_cfg.description == "Interactive task"+ finally:+ await env.close()diff --git a/libs/cua-bench/cua_bench/tests/test_worker_client.py b/libs/cua-bench/cua_bench/tests/test_worker_client.pynew file mode 100644index 0000000000..6fbef21733--- /dev/null+++ b/libs/cua-bench/cua_bench/tests/test_worker_client.py@@ -0,0 +1,457 @@+"""Tests for the CBEnvWorkerClient HTTP client interface.++This module tests the CBEnvWorkerClient which communicates with worker servers+via REST API endpoints.+"""++import base64+import io+from unittest.mock import MagicMock, patch++from cua_bench.workers.worker_client import CBEnvWorkerClient+from PIL import Image+++def create_test_image(width=1024, height=768, color="blue"):+ """Create a test image and return base64 encoded string."""+ img = Image.new("RGB", (width, height), color=color)+ buffer = io.BytesIO()+ img.save(buffer, format="PNG")+ return base64.b64encode(buffer.getvalue()).decode("utf-8")+++class TestCBEnvWorkerClientInit:+ """Tests for CBEnvWorkerClient initialization."""++ def test_init_with_env_config(self):+ """Test client initialization with env_config dict."""+ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)++ assert client.server_url == "http://localhost:8001"+ assert client.max_step == 50+ assert client.max_hist == 10+ assert client.timeout == 300+ assert client.task_configs == task_configs+ assert client.env_id is None+ assert client.uid is None+ assert client.step_count == 0+ assert client.done is False++ def test_init_custom_values(self):+ """Test client initialization with custom values."""+ task_configs = [{"env_path": "./custom", "task_index": 5, "split": "test"}]+ env_config = {+ "server_url": "http://10.0.0.5:9000",+ "task_configs": task_configs,+ "max_step": 100,+ "max_hist": 20,+ "timeout": 600,+ }+ client = CBEnvWorkerClient(env_config)++ assert client.server_url == "http://10.0.0.5:9000"+ assert client.max_step == 100+ assert client.max_hist == 20+ assert client.timeout == 600+++class TestCBEnvWorkerClientReset:+ """Tests for CBEnvWorkerClient.reset() - the /reset endpoint."""++ @patch("requests.post")+ def test_reset_calls_correct_endpoint(self, mock_post):+ """Test that reset() calls POST /reset."""+ img_b64 = create_test_image(1024, 768)++ mock_response = MagicMock()+ mock_response.json.return_value = {+ "screenshot": img_b64,+ "instruction": "Click the button",+ "env_id": 0,+ }+ mock_post.return_value = mock_response++ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)+ client.reset()++ # Verify POST /reset was called+ mock_post.assert_called_once()+ call_args = mock_post.call_args+ assert "/reset" in call_args[0][0]+ assert call_args[1]["json"]["env_path"] == "./task"+ assert call_args[1]["json"]["task_index"] == 0++ @patch("requests.post")+ def test_reset_returns_observation(self, mock_post):+ """Test that reset() returns observation dict."""+ img_b64 = create_test_image(1024, 768)++ mock_response = MagicMock()+ mock_response.json.return_value = {+ "screenshot": img_b64,+ "instruction": "Click the red button",+ "env_id": 0,+ }+ mock_post.return_value = mock_response++ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)+ env_ret, meta_info = client.reset()++ # Check env_ret structure+ assert "obs" in env_ret+ assert env_ret["done"] is False+ assert env_ret["is_init"] is True++ # Check meta_info+ assert "uid" in meta_info+ assert client.uid == meta_info["uid"]++ @patch("requests.post")+ def test_reset_stores_env_id(self, mock_post):+ """Test that reset() stores the env_id."""+ img_b64 = create_test_image(1024, 768)++ mock_response = MagicMock()+ mock_response.json.return_value = {+ "screenshot": img_b64,+ "instruction": "Test",+ "env_id": 5,+ }+ mock_post.return_value = mock_response++ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)+ client.reset()++ assert client.env_id == 5++ @patch("requests.post")+ def test_reset_clears_state(self, mock_post):+ """Test that reset() clears previous episode state."""+ img_b64 = create_test_image(1024, 768)++ mock_response = MagicMock()+ mock_response.json.return_value = {+ "screenshot": img_b64,+ "instruction": "Test",+ "env_id": 0,+ }+ mock_post.return_value = mock_response++ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)+ client.step_count = 10+ client.done = True++ client.reset()++ assert client.step_count == 0+ assert client.done is False+++class TestCBEnvWorkerClientStep:+ """Tests for CBEnvWorkerClient.step() - the /step endpoint."""++ @patch("requests.post")+ def test_step_calls_correct_endpoint(self, mock_post):+ """Test that step() calls POST /step."""+ img_b64 = create_test_image(1024, 768)++ # Setup mock for both reset and step+ def mock_post_side_effect(url, **kwargs):+ mock_resp = MagicMock()+ if "/reset" in url:+ mock_resp.json.return_value = {+ "screenshot": img_b64,+ "instruction": "Test",+ "env_id": 0,+ }+ else:+ mock_resp.json.return_value = {+ "screenshot": img_b64,+ "reward": 0.0,+ "done": False,+ }+ return mock_resp++ mock_post.side_effect = mock_post_side_effect++ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)+ client.reset()++ # Step with action string+ action = "<|action_start|>click(500,500)<|action_end|>"+ client.step(action)++ # Verify POST /step was called (second call after reset)+ assert mock_post.call_count == 2+ step_call = mock_post.call_args_list[1]+ assert "/step" in step_call[0][0]+ assert step_call[1]["json"]["env_id"] == 0+ assert "action" in step_call[1]["json"]++ @patch("requests.post")+ def test_step_returns_observation(self, mock_post):+ """Test that step() returns observation dict."""+ img_b64 = create_test_image(1024, 768)++ def mock_post_side_effect(url, **kwargs):+ mock_resp = MagicMock()+ if "/reset" in url:+ mock_resp.json.return_value = {+ "screenshot": img_b64,+ "instruction": "Test",+ "env_id": 0,+ }+ else:+ mock_resp.json.return_value = {+ "screenshot": img_b64,+ "reward": 0.5,+ "done": False,+ }+ return mock_resp++ mock_post.side_effect = mock_post_side_effect++ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)+ client.reset()++ action = "<|action_start|>click(500,500)<|action_end|>"+ env_ret, meta_info = client.step(action)++ # Check env_ret structure+ assert "obs" in env_ret+ assert "action" in env_ret+ assert "reward" in env_ret+ assert "done" in env_ret+ assert env_ret["is_init"] is False++ @patch("requests.post")+ def test_step_increments_counter(self, mock_post):+ """Test that step() increments step_count."""+ img_b64 = create_test_image(1024, 768)++ def mock_post_side_effect(url, **kwargs):+ mock_resp = MagicMock()+ if "/reset" in url:+ mock_resp.json.return_value = {+ "screenshot": img_b64,+ "instruction": "Test",+ "env_id": 0,+ }+ else:+ mock_resp.json.return_value = {+ "screenshot": img_b64,+ "reward": 0.0,+ "done": False,+ }+ return mock_resp++ mock_post.side_effect = mock_post_side_effect++ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)+ client.reset()++ assert client.step_count == 0++ client.step("<|action_start|>click(500,500)<|action_end|>")+ assert client.step_count == 1++ client.step("<|action_start|>click(600,600)<|action_end|>")+ assert client.step_count == 2++ @patch("requests.post")+ def test_step_sets_done_flag(self, mock_post):+ """Test that step() sets done flag when episode ends."""+ img_b64 = create_test_image(1024, 768)++ def mock_post_side_effect(url, **kwargs):+ mock_resp = MagicMock()+ if "/reset" in url:+ mock_resp.json.return_value = {+ "screenshot": img_b64,+ "instruction": "Test",+ "env_id": 0,+ }+ else:+ mock_resp.json.return_value = {+ "screenshot": img_b64,+ "reward": 1.0,+ "done": True,+ }+ return mock_resp++ mock_post.side_effect = mock_post_side_effect++ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)+ client.reset()++ env_ret, _ = client.step("<|action_start|>done()<|action_end|>")++ assert client.done is True+ assert env_ret["done"] is True+ assert env_ret["reward"] == 1.0+++class TestCBEnvWorkerClientActions:+ """Tests for action processing in CBEnvWorkerClient."""++ def test_check_and_fix_action_click(self):+ """Test click action processing."""+ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)++ action_str, action_obj = client.check_and_fix_action("click(500,500)")++ assert "click(" in action_str+ # Action object is a ClickAction with denormalized coordinates+ from cua_bench.types import ClickAction++ assert isinstance(action_obj, ClickAction)++ def test_check_and_fix_action_finish(self):+ """Test finish action processing."""+ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)++ action_str, action_obj = client.check_and_fix_action("done()")++ assert "done()" in action_str+ from cua_bench.types import DoneAction++ assert isinstance(action_obj, DoneAction)++ def test_check_and_fix_action_invalid(self):+ """Test invalid action falls back to wait."""+ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)++ action_str, action_obj = client.check_and_fix_action("invalid_action()")++ assert action_str == "wait()"+ from cua_bench.types import WaitAction++ assert isinstance(action_obj, WaitAction)+++class TestCBEnvWorkerClientObservations:+ """Tests for observation formatting in CBEnvWorkerClient."""++ def test_prompt_to_input_obs(self):+ """Test prompt to observation conversion."""+ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_config = {+ "server_url": "http://localhost:8001",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)++ prompt = {+ "instruction": "Click the button",+ "steps": [+ "<|vision_start|>img1<|vision_end|>",+ "<|action_start|>click(500,500)<|action_end|>",+ "<|vision_start|>img2<|vision_end|>",+ ],+ }++ obs = client.prompt_to_input_obs(prompt)++ assert "Click the button" in obs+ assert "<|vision_start|>img1<|vision_end|>" in obs+ assert "<|action_start|>click(500,500)<|action_end|>" in obs+ assert "<|vision_start|>img2<|vision_end|>" in obsdiff --git a/libs/cua-bench/cua_bench/tests/test_worker_manager.py b/libs/cua-bench/cua_bench/tests/test_worker_manager.pynew file mode 100644index 0000000000..45916a8001--- /dev/null+++ b/libs/cua-bench/cua_bench/tests/test_worker_manager.py@@ -0,0 +1,812 @@+"""E2E tests for workers and dataloader.++This module tests the full worker system end-to-end:+- Worker server spawning and management+- Worker client communication+- MultiTurnDataloader with mock model training loop+- ReplayBuffer functionality with tokenization++All tests use real simulated (Playwright) environments - no mocking of env functions.+"""++import time+from pathlib import Path++import pytest++try:+ import torch++ HAS_TORCH = True+except ImportError:+ HAS_TORCH = False++from cua_bench.workers.dataloader import (+ MultiTurnDataloader,+ ReplayBuffer,+)+from cua_bench.workers.worker_client import CBEnvWorkerClient+from cua_bench.workers.worker_manager import (+ WorkerPool,+ cleanup_workers,+ create_workers,+)++# Simple HTML for test tasks+SIMPLE_BUTTON_HTML = """+<div class="flex flex-col items-center justify-center h-full w-full bg-gray-100 p-4">+ <h1 class="text-xl mb-4">Test Task</h1>+ <button+ id="test-btn"+ class="btn bg-blue-500 text-white px-4 py-2 rounded"+ onclick="window.__clicked = true; window.__score = 1.0;"+ >+ Click Me+ </button>+</div>+<script>+ window.__clicked = false;+ window.__score = 0.0;+</script>+"""+++class MockTokenizer:+ """Mock tokenizer for testing without HuggingFace dependencies."""++ def __init__(self, vocab_size: int = 1000):+ self.vocab_size = vocab_size+ self.pad_token_id = 0+ self.eos_token_id = 1+ self.bos_token_id = 2++ def encode(self, text: str, add_special_tokens: bool = True) -> list:+ """Simple encoding: convert each character to an ID."""+ ids = [ord(c) % self.vocab_size for c in text]+ if add_special_tokens:+ ids = [self.bos_token_id] + ids + [self.eos_token_id]+ return ids++ def decode(self, ids: list, skip_special_tokens: bool = False) -> str:+ """Simple decoding: convert IDs back to characters."""+ if skip_special_tokens:+ ids = [+ i for i in ids if i not in (self.pad_token_id, self.eos_token_id, self.bos_token_id)+ ]+ return "".join(chr(i) if 32 <= i < 127 else "?" for i in ids)++ def __call__(+ self,+ texts,+ padding=True,+ truncation=True,+ max_length=512,+ return_tensors=None,+ add_special_tokens=True,+ ):+ """Batch tokenization."""+ if isinstance(texts, str):+ texts = [texts]+ encoded = [self.encode(t, add_special_tokens=add_special_tokens) for t in texts]++ # Pad to max length+ max_len = min(max(len(e) for e in encoded), max_length)+ for i in range(len(encoded)):+ if len(encoded[i]) > max_len:+ encoded[i] = encoded[i][:max_len]+ else:+ encoded[i] = encoded[i] + [self.pad_token_id] * (max_len - len(encoded[i]))++ attention_mask = [[1 if t != self.pad_token_id else 0 for t in e] for e in encoded]++ if return_tensors == "pt" and HAS_TORCH:+ return {+ "input_ids": torch.tensor(encoded),+ "attention_mask": torch.tensor(attention_mask),+ }+ return {"input_ids": encoded, "attention_mask": attention_mask}+++class TestReplayBuffer:+ """Tests for ReplayBuffer class."""++ def test_buffer_add_and_size(self):+ """Test adding steps to buffer."""+ buffer = ReplayBuffer(capacity=100)++ # Add a complete episode (using tuple format)+ buffer.add(+ (0, {"obs": "obs1", "is_init": True, "done": False, "reward": 0.0}, {"uid": "ep1"})+ )+ buffer.add(+ (0, {"obs": "obs2", "action": "click", "done": False, "reward": 0.0}, {"uid": "ep1"})+ )+ buffer.add(+ (0, {"obs": "obs3", "action": "done", "reward": 1.0, "done": True}, {"uid": "ep1"})+ )++ # Episode is processed on done, all 3 steps should be in buffer+ assert len(buffer) == 3++ def test_buffer_sample(self):+ """Test sampling from buffer."""+ buffer = ReplayBuffer(capacity=100)++ # Add multiple episodes (using tuple format)+ for ep in range(5):+ uid = f"ep{ep}"+ buffer.add(+ (+ 0,+ {"obs": f"obs{ep}_0", "is_init": True, "done": False, "reward": 0.0},+ {"uid": uid},+ )+ )+ buffer.add(+ (+ 0,+ {"obs": f"obs{ep}_1", "action": "click", "reward": 1.0, "done": True},+ {"uid": uid},+ )+ )++ # Should have 10 steps (2 per episode * 5 episodes)+ assert len(buffer) == 10++ # Sample+ samples = buffer.sample(5)+ assert len(samples) == 5+ assert all(isinstance(s, tuple) and len(s) == 3 for s in samples)++ def test_buffer_sample_insufficient(self):+ """Test sampling when buffer has insufficient data returns what's available."""+ buffer = ReplayBuffer(capacity=100)+ buffer.add(+ (0, {"obs": "obs1", "is_init": True, "done": False, "reward": 0.0}, {"uid": "ep1"})+ )+ buffer.add((0, {"obs": "obs2", "reward": 1.0, "done": True}, {"uid": "ep1"}))++ # Should return what's available+ samples = buffer.sample(10)+ assert len(samples) == 2++ def test_buffer_reward_discounting(self):+ """Test that rewards are discounted backwards."""+ buffer = ReplayBuffer(capacity=100, gamma=0.9)++ # Add episode with reward only at the end (using tuple format)+ buffer.add(+ (0, {"obs": "obs1", "is_init": True, "done": False, "reward": 0.0}, {"uid": "ep1"})+ )+ buffer.add(+ (0, {"obs": "obs2", "action": "a1", "done": False, "reward": 0.0}, {"uid": "ep1"})+ )+ buffer.add(+ (0, {"obs": "obs3", "action": "done", "done": True, "reward": 1.0}, {"uid": "ep1"})+ )++ # Sample all and check rewards are discounted+ samples = buffer.sample(3)+ rewards = sorted([s[1]["reward"] for s in samples], reverse=True)++ # Final step should have reward 1.0+ assert rewards[0] == 1.0+ # Previous step should have 0.9+ assert abs(rewards[1] - 0.9) < 0.01+ # First step should have 0.81+ assert abs(rewards[2] - 0.81) < 0.01++ def test_buffer_only_keep_outcome(self):+ """Test only_keep_outcome mode."""+ buffer = ReplayBuffer(capacity=100, only_keep_outcome=True)++ # Add episode with 3 steps (using tuple format)+ buffer.add(+ (0, {"obs": "obs1", "is_init": True, "done": False, "reward": 0.0}, {"uid": "ep1"})+ )+ buffer.add(+ (0, {"obs": "obs2", "action": "a1", "done": False, "reward": 0.0}, {"uid": "ep1"})+ )+ buffer.add(+ (0, {"obs": "obs3", "action": "done", "reward": 1.0, "done": True}, {"uid": "ep1"})+ )++ # Only final step should be kept+ assert len(buffer) == 1+ sample = buffer.sample(1)[0]+ assert sample[1]["done"] is True++ def test_buffer_clear(self):+ """Test clearing the buffer."""+ buffer = ReplayBuffer(capacity=100)+ buffer.add(+ (0, {"obs": "obs1", "is_init": True, "done": False, "reward": 0.0}, {"uid": "ep1"})+ )+ buffer.add((0, {"obs": "obs2", "reward": 1.0, "done": True}, {"uid": "ep1"}))++ assert len(buffer) == 2+ buffer.clear()+ assert len(buffer) == 0++ def test_buffer_balance_stats(self):+ """Test balance statistics."""+ buffer = ReplayBuffer(capacity=100, balance_thres=0.5)++ # Add episodes with different rewards (using tuple format)+ buffer.add(+ (0, {"obs": "obs1", "is_init": True, "done": False, "reward": 0.0}, {"uid": "ep1"})+ )+ buffer.add((0, {"obs": "obs2", "reward": 0.2, "done": True}, {"uid": "ep1"})) # below++ buffer.add(+ (1, {"obs": "obs3", "is_init": True, "done": False, "reward": 0.0}, {"uid": "ep2"})+ )+ buffer.add((1, {"obs": "obs4", "reward": 0.8, "done": True}, {"uid": "ep2"})) # above++ below, above = buffer.get_balance_stats()+ # With gamma=1.0, rewards propagate equally+ # ep1: both steps get 0.2, ep2: both steps get 0.8+ assert below == 2 # All ep1 steps below threshold+ assert above == 2 # All ep2 steps above threshold+++class TestWorkerPoolInit:+ """Tests for WorkerPool initialization (no actual spawning)."""++ def test_worker_pool_init(self):+ """Test WorkerPool initialization."""+ pool = WorkerPool(+ n_workers=4,+ allowed_ips=["127.0.0.1"],+ startup_timeout=30.0,+ )++ assert pool.n_workers == 4+ assert pool.allowed_ips == ["127.0.0.1"]+ assert pool.startup_timeout == 30.0+++class MockModel:+ """Mock model that returns actions with proper token format."""++ def __init__(self, tokenizer, steps_before_done: int = 2):+ self.tokenizer = tokenizer+ self.steps_before_done = steps_before_done+ self.step_counts = {}++ def generate(self, input_ids, attention_mask=None) -> "torch.Tensor":+ """Generate action response tokens."""+ batch_size = input_ids.shape[0]+ responses = []++ for i in range(batch_size):+ count = self.step_counts.get(i, 0)++ if count >= self.steps_before_done:+ # Return done action+ action_str = "<|action_start|>done()<|action_end|>"+ self.step_counts[i] = 0 # Reset for next episode+ else:+ # Return click action with normalized coordinates+ action_str = "<|action_start|>click(0.5,0.5)<|action_end|>"+ self.step_counts[i] = count + 1++ response_ids = self.tokenizer.encode(action_str, add_special_tokens=False)+ responses.append(response_ids)++ # Pad responses to same length+ max_len = max(len(r) for r in responses)+ padded = []+ for r in responses:+ if len(r) < max_len:+ r = r + [self.tokenizer.pad_token_id] * (max_len - len(r))+ padded.append(r)++ return torch.tensor(padded)+++def create_test_task(tmp_path: Path, name: str = "test-task") -> Path:+ """Create a test task directory with simulated provider."""+ task_dir = tmp_path / name+ task_dir.mkdir()+ (task_dir / "main.py").write_text(+ f'''+import cua_bench as cb++HTML = """{SIMPLE_BUTTON_HTML}"""++pid = None+[email protected]_config(split="train")+def get_tasks():+ return [cb.Task(+ description="Click the button",+ computer={{"provider": "simulated", "setup_config": {{"width": 800, "height": 600}}}}+ )]+[email protected]_task(split="train")+async def setup(task, session):+ global pid+ pid = await session.launch_window(html=HTML, title="Test", width=400, height=300)+[email protected]_task(split="train")+async def evaluate(task, session):+ global pid+ clicked = await session.execute_javascript(pid, "window.__clicked")+ return [1.0 if clicked else 0.0]+'''+ )+ return task_dir+++class TestWorkerClientE2E:+ """E2E tests for CBEnvWorkerClient with real worker server."""++ @pytest.mark.asyncio+ async def test_client_reset_step_done(self, tmp_path):+ """Test full client flow: reset -> step -> done."""+ task_dir = create_test_task(tmp_path)++ # Start a worker+ workers = await create_workers(+ n_workers=1,+ allowed_ips=["127.0.0.1"],+ startup_timeout=30.0,+ )++ try:+ assert len(workers) == 1+ worker = workers[0]++ # Create task configs+ task_configs = [{"env_path": str(task_dir), "task_index": 0, "split": "train"}]++ # Create client with env_config dict+ env_config = {+ "server_url": worker.api_url,+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ client = CBEnvWorkerClient(env_config)++ # Reset (picks from task_configs)+ env_ret, meta_info = client.reset()+ assert "obs" in env_ret+ assert env_ret["is_init"] is True+ assert env_ret["done"] is False+ assert "uid" in meta_info++ # Step with click (action is now a string with tags)+ env_ret, meta_info = client.step("<|action_start|>click(500,500)<|action_end|>")+ assert "obs" in env_ret+ assert env_ret["done"] is False++ # Step with done+ env_ret, meta_info = client.step("<|action_start|>done()<|action_end|>")+ assert env_ret["done"] is True+ assert "reward" in env_ret++ finally:+ await cleanup_workers(workers)+++class TestDataloaderE2E:+ """E2E tests for MultiTurnDataloader with mock model training loop."""++ @pytest.mark.asyncio+ @pytest.mark.skipif(not HAS_TORCH, reason="torch required")+ async def test_dataloader_training_loop(self, tmp_path):+ """Test dataloader with mock model training loop.++ This simulates the full RL training loop:+ for batch in dataloader:+ responses = model.generate(batch['input_ids'], batch['attention_mask'])+ batch_return = {+ 'prompts': batch['input_ids'],+ 'responses': responses,+ 'attention_mask': combined_mask,+ 'worker_id': batch['worker_id'],+ 'meta_info': batch['meta_info'],+ }+ dataloader.async_step(batch_return)+ """+ task_dir = create_test_task(tmp_path)++ # Start workers+ workers = await create_workers(+ n_workers=1,+ allowed_ips=["127.0.0.1"],+ startup_timeout=30.0,+ )++ try:+ # Create task configs+ task_configs = [{"env_path": str(task_dir), "task_index": 0, "split": "train"}]+ env_configs = [+ {+ "server_url": w.api_url,+ "task_configs": task_configs,+ "max_step": 2,+ "max_hist": 10,+ "timeout": 300,+ }+ for w in workers+ ]++ # Create tokenizer+ tokenizer = MockTokenizer()++ # Create dataloader+ dataloader = MultiTurnDataloader(+ env_class=CBEnvWorkerClient,+ env_configs=env_configs,+ tokenizer=tokenizer,+ processor=None,+ is_multi_modal=False,+ batch_size=1,+ replay_capacity=100,+ replay_reward_discount=0.9,+ max_prompt_length=512,+ max_response_length=256,+ )++ # Mock model+ model = MockModel(tokenizer=tokenizer, steps_before_done=2)++ # Run a few iterations of the training loop+ iterations = 0+ max_iterations = 3++ for batch in dataloader:+ if iterations >= max_iterations:+ break++ # Verify batch structure+ assert "input_ids" in batch+ assert "attention_mask" in batch+ assert "worker_id" in batch+ assert "meta_info" in batch++ # Model generates response tokens+ responses = model.generate(batch["input_ids"], batch["attention_mask"])++ # Create response attention mask+ response_mask = (responses != tokenizer.pad_token_id).long()++ # Build batch_return for async_step+ batch_return = {+ "prompts": batch["input_ids"],+ "responses": responses,+ "attention_mask": torch.cat([batch["attention_mask"], response_mask], dim=1),+ "worker_id": batch["worker_id"],+ "meta_info": batch["meta_info"],+ }++ # Step environments+ dataloader.async_step(batch_return)++ iterations += 1++ # Check replay buffer has data+ assert len(dataloader.replay) > 0++ # Check stats+ print(f"\nReplay buffer size: {len(dataloader.replay)}")+ print(f"Running reward: {dataloader.running_outcome_reward():.4f}")+ dataloader.print_stats_in_replay_buffer()++ # Cleanup+ print("Closing dataloader...")+ dataloader.close()+ print("Closing dataloader... DONE")++ finally:+ print("Cleaning up workers")+ await cleanup_workers(workers)+ print("Cleaning up workers... DONE")++ @pytest.mark.asyncio+ @pytest.mark.skipif(not HAS_TORCH, reason="torch required")+ async def test_dataloader_replay_sampling(self, tmp_path):+ """Test sampling from replay buffer after training."""+ task_dir = create_test_task(tmp_path)++ # Start workers+ workers = await create_workers(+ n_workers=1,+ allowed_ips=["127.0.0.1"],+ startup_timeout=30.0,+ )++ try:+ task_configs = [{"env_path": str(task_dir), "task_index": 0, "split": "train"}]+ tokenizer = MockTokenizer()+ env_configs = [+ {+ "server_url": w.api_url,+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ for w in workers+ ]++ dataloader = MultiTurnDataloader(+ env_class=CBEnvWorkerClient,+ env_configs=env_configs,+ tokenizer=tokenizer,+ processor=None,+ is_multi_modal=False,+ batch_size=1,+ replay_capacity=100,+ replay_reward_discount=0.9,+ max_prompt_length=512,+ max_response_length=256,+ )++ model = MockModel(tokenizer=tokenizer, steps_before_done=1)++ # Run enough iterations to fill buffer+ for i, batch in enumerate(dataloader):+ if i >= 5:+ break+ responses = model.generate(batch["input_ids"], batch["attention_mask"])+ response_mask = (responses != tokenizer.pad_token_id).long()+ batch_return = {+ "prompts": batch["input_ids"],+ "responses": responses,+ "attention_mask": torch.cat([batch["attention_mask"], response_mask], dim=1),+ "worker_id": batch["worker_id"],+ "meta_info": batch["meta_info"],+ }+ dataloader.async_step(batch_return)++ # Wait for replay buffer to populate+ time.sleep(1)+ dataloader._gather_env_ret(first_block=False)++ # Sample from buffer+ if len(dataloader.replay) >= 2:+ samples = dataloader.sample_from_buffer(batch_size=2)+ assert samples is not None+ assert "input_ids" in samples+ assert "attention_mask" in samples+ assert "reward" in samples+ print(f"Sampled batch shape: {samples['input_ids'].shape}")++ # Check balance stats+ below, above = dataloader.get_balance_stats()+ print(f"Balance stats - below threshold: {below}, above threshold: {above}")++ dataloader.close()++ finally:+ await cleanup_workers(workers)+++class TestDataloaderBenchmark:+ """Benchmark tests for MultiTurnDataloader demonstrating full usage."""++ @pytest.mark.asyncio+ @pytest.mark.skipif(not HAS_TORCH, reason="torch required")+ async def test_dataloader_benchmark(self, tmp_path):+ """Benchmark test demonstrating full dataloader usage.++ This test shows the complete workflow:+ 1. Create dataloader with tokenizer/processor+ 2. Iterate through batches+ 3. Generate mock responses+ 4. Step environments+ 5. Sample from replay buffer+ 6. Get statistics+ """+ task_dir = create_test_task(tmp_path)+ num_workers = 1+ batch_size = 1++ # Start workers+ workers = await create_workers(+ n_workers=num_workers,+ allowed_ips=["127.0.0.1"],+ startup_timeout=30.0,+ )++ try:+ # Create configurations+ task_configs = [{"env_path": str(task_dir), "task_index": 0, "split": "train"}]+ env_configs = [+ {+ "server_url": w.api_url,+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ for w in workers+ ]+ tokenizer = MockTokenizer()++ # Create MultiTurnDataloader+ dataloader = MultiTurnDataloader(+ env_class=CBEnvWorkerClient,+ env_configs=env_configs,+ tokenizer=tokenizer,+ processor=None,+ is_multi_modal=False,+ batch_size=min(batch_size, len(env_configs)),+ replay_capacity=1000,+ replay_reward_discount=0.9,+ max_prompt_length=512,+ max_response_length=256,+ only_keep_outcome_in_replay=False,+ )++ stats = {+ "num_workers": num_workers,+ "batch_size": batch_size,+ "batches_processed": 0,+ "total_steps": 0,+ "replay_buffer_size": 0,+ "running_reward": 0,+ "batch_times": [],+ "errors": [],+ }++ print("\nRunning dataloader iterations...")++ # Process batches from the dataloader+ num_iterations = 5+ for i in range(num_iterations):+ try:+ start_time = time.time()++ # Get batch from dataloader (blocks until batch_size envs are ready)+ batch = next(dataloader)+ batch_time = time.time() - start_time++ stats["batches_processed"] += 1+ stats["batch_times"].append(batch_time)++ print(+ f"Batch {i+1}/{num_iterations}: {batch['input_ids'].shape} in {batch_time:.2f}s"+ )++ # Simulate model inference - encode action as response tokens+ # Alternate between click and done to complete episodes+ batch_size_actual = batch["input_ids"].shape[0]+ if i % 2 == 0:+ action_str = "<|action_start|>click(0.5,0.5)<|action_end|>"+ else:+ action_str = "<|action_start|>done()<|action_end|>"+ action_ids = tokenizer.encode(action_str, add_special_tokens=False)+ action_tensor = torch.tensor(action_ids, dtype=torch.long)++ # Pad/truncate to fixed length+ response_len = 64+ if len(action_ids) < response_len:+ padded = torch.full(+ (response_len,), tokenizer.pad_token_id, dtype=torch.long+ )+ padded[: len(action_ids)] = action_tensor+ action_tensor = padded+ else:+ action_tensor = action_tensor[:response_len]++ # Stack for batch+ responses = action_tensor.unsqueeze(0).repeat(batch_size_actual, 1)+ response_mask = (responses != tokenizer.pad_token_id).long()++ # Create batch_return for async_step+ batch_return = {+ "prompts": batch["input_ids"],+ "responses": responses,+ "attention_mask": torch.cat(+ [batch["attention_mask"], response_mask], dim=1+ ),+ "worker_id": batch["worker_id"],+ "meta_info": batch["meta_info"],+ }++ # Send actions back to environments using async_step+ dataloader.async_step(batch_return)+ stats["total_steps"] += batch_size_actual++ # Give worker time to process and collect results+ time.sleep(0.2)+ dataloader._gather_env_ret(first_block=False)++ except Exception as e:+ print(f"Error in batch {i+1}: {e}")+ stats["errors"].append(str(e))++ # Give time for replay buffer to populate - need to gather results+ # after done() actions are processed+ for _ in range(5):+ time.sleep(0.5)+ dataloader._gather_env_ret(first_block=False)+ if len(dataloader.replay) > 0:+ break++ # Get replay buffer stats+ stats["replay_buffer_size"] = len(dataloader.replay)+ stats["running_reward"] = dataloader.running_outcome_reward()++ print("\nReplay Buffer Stats:")+ dataloader.print_stats_in_replay_buffer()++ # Sample from replay buffer+ if len(dataloader.replay) > 0:+ print("Sampling from replay buffer...")+ try:+ sample_size = min(4, len(dataloader.replay))+ sample = dataloader.replay.sample(sample_size)+ print(f"Sampled {len(sample)} experiences from replay buffer")+ below, above = dataloader.get_balance_stats()+ print(f"Balance stats - below threshold: {below}, above threshold: {above}")+ except Exception as e:+ print(f"Could not sample from replay: {e}")++ # Calculate summary+ avg_batch_time = (+ sum(stats["batch_times"]) / len(stats["batch_times"]) if stats["batch_times"] else 0+ )+ throughput = (+ len(stats["batch_times"]) / sum(stats["batch_times"]) if stats["batch_times"] else 0+ )++ print("\n=== MultiTurnDataloader Benchmark Complete ===")+ print(f"Workers: {stats['num_workers']}")+ print(f"Batch size: {stats['batch_size']}")+ print(f"Batches processed: {stats['batches_processed']}")+ print(f"Total steps: {stats['total_steps']}")+ print(f"Replay buffer size: {stats['replay_buffer_size']}")+ print(f"Running reward: {stats['running_reward']:.4f}")+ print(f"Avg batch time: {avg_batch_time:.2f}s")+ print(f"Throughput: {throughput:.2f} batches/sec")++ # Assertions+ assert stats["batches_processed"] == num_iterations+ assert (+ stats["replay_buffer_size"] > 0+ ), "Replay buffer should have data after done() actions"++ dataloader.close()++ finally:+ await cleanup_workers(workers)+++class TestWorkerPoolContextManager:+ """E2E tests for WorkerPool as context manager."""++ @pytest.mark.asyncio+ async def test_worker_pool_context_manager(self, tmp_path):+ """Test WorkerPool as async context manager."""+ task_dir = create_test_task(tmp_path)++ async with WorkerPool(+ n_workers=1,+ allowed_ips=["127.0.0.1"],+ startup_timeout=30.0,+ ) as pool:+ assert len(pool.urls) == 1++ # Create client and test+ client = CBEnvWorkerClient(+ {+ "server_url": pool.urls[0],+ "task_configs": [+ {"env_path": str(task_dir), "task_index": 0, "split": "train"}+ ],+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ )+ env_ret, _ = client.reset()+ assert env_ret["is_init"] is True++ # Workers should be cleaned up after context exitdiff --git a/libs/cua-bench/cua_bench/tests/test_worker_server.py b/libs/cua-bench/cua_bench/tests/test_worker_server.pynew file mode 100644index 0000000000..fde12a4345--- /dev/null+++ b/libs/cua-bench/cua_bench/tests/test_worker_server.py@@ -0,0 +1,363 @@+"""Tests for the worker server HTTP endpoints.++This module tests:+- Action serialization/deserialization (unit tests)+- FastAPI server endpoints using TestClient with real simulated environments (e2e)+"""++import pytest+from cua_bench.types import (+ ClickAction,+ DoneAction,+ DoubleClickAction,+ DragAction,+ HotkeyAction,+ KeyAction,+ MiddleClickAction,+ MoveToAction,+ RightClickAction,+ ScrollAction,+ TypeAction,+ WaitAction,+)+from cua_bench.workers.worker_server import (+ ResetRequest,+ ShutdownRequest,+ StepRequest,+ app,+ deserialize_action,+ serialize_action,+)+from fastapi.testclient import TestClient++# Simple HTML for test tasks+SIMPLE_BUTTON_HTML = """+<div class="flex flex-col items-center justify-center h-full w-full bg-gray-100 p-4">+ <h1 class="text-xl mb-4">Test Task</h1>+ <button+ id="test-btn"+ class="btn bg-blue-500 text-white px-4 py-2 rounded"+ onclick="window.__clicked = true; window.__score = 1.0;"+ >+ Click Me+ </button>+</div>+<script>+ window.__clicked = false;+ window.__score = 0.0;+</script>+"""+++class TestDeserializeAction:+ """Tests for deserialize_action function."""++ def test_click_action_type_format(self):+ """Test deserializing ClickAction with type format."""+ action_dict = {"type": "ClickAction", "x": 100, "y": 200}+ action = deserialize_action(action_dict)+ assert isinstance(action, ClickAction)+ assert action.x == 100+ assert action.y == 200++ def test_click_action_lowercase_format(self):+ """Test deserializing ClickAction with lowercase format."""+ action_dict = {"action_type": "click", "x": 100, "y": 200}+ action = deserialize_action(action_dict)+ assert isinstance(action, ClickAction)+ assert action.x == 100+ assert action.y == 200++ def test_right_click_action(self):+ """Test deserializing RightClickAction."""+ action_dict = {"type": "RightClickAction", "x": 50, "y": 75}+ action = deserialize_action(action_dict)+ assert isinstance(action, RightClickAction)+ assert action.x == 50+ assert action.y == 75++ def test_double_click_action(self):+ """Test deserializing DoubleClickAction."""+ action_dict = {"type": "DoubleClickAction", "x": 300, "y": 400}+ action = deserialize_action(action_dict)+ assert isinstance(action, DoubleClickAction)+ assert action.x == 300+ assert action.y == 400++ def test_middle_click_action(self):+ """Test deserializing MiddleClickAction."""+ action_dict = {"type": "MiddleClickAction", "x": 150, "y": 250}+ action = deserialize_action(action_dict)+ assert isinstance(action, MiddleClickAction)+ assert action.x == 150+ assert action.y == 250++ def test_drag_action(self):+ """Test deserializing DragAction."""+ action_dict = {+ "type": "DragAction",+ "from_x": 100,+ "from_y": 100,+ "to_x": 200,+ "to_y": 200,+ "duration": 0.5,+ }+ action = deserialize_action(action_dict)+ assert isinstance(action, DragAction)+ assert action.from_x == 100+ assert action.from_y == 100+ assert action.to_x == 200+ assert action.to_y == 200+ assert action.duration == 0.5++ def test_drag_action_default_duration(self):+ """Test deserializing DragAction with default duration."""+ action_dict = {+ "type": "DragAction",+ "from_x": 100,+ "from_y": 100,+ "to_x": 200,+ "to_y": 200,+ }+ action = deserialize_action(action_dict)+ assert action.duration == 1.0 # Default++ def test_move_to_action(self):+ """Test deserializing MoveToAction."""+ action_dict = {"type": "MoveToAction", "x": 500, "y": 600, "duration": 0.2}+ action = deserialize_action(action_dict)+ assert isinstance(action, MoveToAction)+ assert action.x == 500+ assert action.y == 600+ assert action.duration == 0.2++ def test_scroll_action(self):+ """Test deserializing ScrollAction."""+ action_dict = {"type": "ScrollAction", "direction": "down", "amount": 50}+ action = deserialize_action(action_dict)+ assert isinstance(action, ScrollAction)+ assert action.direction == "down"+ assert action.amount == 50++ def test_scroll_action_defaults(self):+ """Test deserializing ScrollAction with defaults."""+ action_dict = {"type": "ScrollAction"}+ action = deserialize_action(action_dict)+ assert action.direction == "up" # Default+ assert action.amount == 100 # Default++ def test_type_action(self):+ """Test deserializing TypeAction."""+ action_dict = {"type": "TypeAction", "text": "Hello World"}+ action = deserialize_action(action_dict)+ assert isinstance(action, TypeAction)+ assert action.text == "Hello World"++ def test_key_action(self):+ """Test deserializing KeyAction."""+ action_dict = {"type": "KeyAction", "key": "Enter"}+ action = deserialize_action(action_dict)+ assert isinstance(action, KeyAction)+ assert action.key == "Enter"++ def test_hotkey_action(self):+ """Test deserializing HotkeyAction."""+ action_dict = {"type": "HotkeyAction", "keys": ["ctrl", "c"]}+ action = deserialize_action(action_dict)+ assert isinstance(action, HotkeyAction)+ assert action.keys == ["ctrl", "c"]++ def test_wait_action(self):+ """Test deserializing WaitAction."""+ action_dict = {"type": "WaitAction", "seconds": 2.5}+ action = deserialize_action(action_dict)+ assert isinstance(action, WaitAction)+ assert action.seconds == 2.5++ def test_wait_action_default(self):+ """Test deserializing WaitAction with default seconds."""+ action_dict = {"type": "WaitAction"}+ action = deserialize_action(action_dict)+ assert action.seconds == 1.0++ def test_done_action(self):+ """Test deserializing DoneAction."""+ action_dict = {"type": "DoneAction"}+ action = deserialize_action(action_dict)+ assert isinstance(action, DoneAction)++ def test_unknown_action_raises(self):+ """Test that unknown action type raises ValueError."""+ action_dict = {"type": "UnknownAction"}+ with pytest.raises(ValueError, match="Unknown action type"):+ deserialize_action(action_dict)+++class TestSerializeAction:+ """Tests for serialize_action function."""++ def test_serialize_click_action(self):+ """Test serializing ClickAction."""+ action = ClickAction(x=100, y=200)+ result = serialize_action(action)+ assert result["type"] == "ClickAction"+ assert result["x"] == 100+ assert result["y"] == 200++ def test_serialize_right_click_action(self):+ """Test serializing RightClickAction."""+ action = RightClickAction(x=50, y=75)+ result = serialize_action(action)+ assert result["type"] == "RightClickAction"+ assert result["x"] == 50+ assert result["y"] == 75++ def test_serialize_drag_action(self):+ """Test serializing DragAction."""+ action = DragAction(from_x=100, from_y=100, to_x=200, to_y=200, duration=0.5)+ result = serialize_action(action)+ assert result["type"] == "DragAction"+ assert result["from_x"] == 100+ assert result["from_y"] == 100+ assert result["to_x"] == 200+ assert result["to_y"] == 200+ assert result["duration"] == 0.5++ def test_serialize_type_action(self):+ """Test serializing TypeAction."""+ action = TypeAction(text="Hello")+ result = serialize_action(action)+ assert result["type"] == "TypeAction"+ assert result["text"] == "Hello"++ def test_serialize_done_action(self):+ """Test serializing DoneAction."""+ action = DoneAction()+ result = serialize_action(action)+ assert result["type"] == "DoneAction"+++class TestRequestModels:+ """Tests for Pydantic request models."""++ def test_reset_request_defaults(self):+ """Test ResetRequest with default values."""+ request = ResetRequest(env_path="./task")+ assert request.env_path == "./task"+ assert request.task_index == 0+ assert request.split == "train"+ assert request.timeout == 300++ def test_reset_request_custom(self):+ """Test ResetRequest with custom values."""+ request = ResetRequest(+ env_path="./custom-task",+ task_index=5,+ split="test",+ timeout=600,+ )+ assert request.env_path == "./custom-task"+ assert request.task_index == 5+ assert request.split == "test"+ assert request.timeout == 600++ def test_step_request(self):+ """Test StepRequest."""+ request = StepRequest(+ action={"type": "ClickAction", "x": 100, "y": 200},+ env_id=0,+ )+ assert request.action["type"] == "ClickAction"+ assert request.env_id == 0++ def test_shutdown_request_all(self):+ """Test ShutdownRequest for all envs."""+ request = ShutdownRequest()+ assert request.env_id is None++ def test_shutdown_request_specific(self):+ """Test ShutdownRequest for specific env."""+ request = ShutdownRequest(env_id=1)+ assert request.env_id == 1+++class TestActionRoundTrip:+ """Tests for serialize/deserialize round-trip."""++ def test_click_roundtrip(self):+ """Test ClickAction serialize/deserialize round-trip."""+ original = ClickAction(x=123, y=456)+ serialized = serialize_action(original)+ restored = deserialize_action(serialized)+ assert restored.x == original.x+ assert restored.y == original.y++ def test_drag_roundtrip(self):+ """Test DragAction serialize/deserialize round-trip."""+ original = DragAction(from_x=10, from_y=20, to_x=30, to_y=40, duration=1.5)+ serialized = serialize_action(original)+ restored = deserialize_action(serialized)+ assert restored.from_x == original.from_x+ assert restored.from_y == original.from_y+ assert restored.to_x == original.to_x+ assert restored.to_y == original.to_y+ assert restored.duration == original.duration++ def test_type_roundtrip(self):+ """Test TypeAction serialize/deserialize round-trip."""+ original = TypeAction(text="Hello World!")+ serialized = serialize_action(original)+ restored = deserialize_action(serialized)+ assert restored.text == original.text++ def test_hotkey_roundtrip(self):+ """Test HotkeyAction serialize/deserialize round-trip."""+ original = HotkeyAction(keys=["ctrl", "shift", "n"])+ serialized = serialize_action(original)+ restored = deserialize_action(serialized)+ assert restored.keys == original.keys+++class TestServerEndpoints:+ """Tests for FastAPI server endpoints using TestClient.++ Note: These tests only cover endpoints that don't require Playwright.+ Full e2e tests with real environments are in test_worker_manager.py.+ """++ def test_health_endpoint(self):+ """Test GET /health returns ok status."""+ client = TestClient(app)+ response = client.get("/health")+ assert response.status_code == 200+ data = response.json()+ assert data["status"] == "ok"+ assert "available_envs" in data+ assert "active_envs" in data+ assert "max_envs" in data++ def test_shutdown_endpoint(self):+ """Test POST /shutdown releases environments."""+ client = TestClient(app)+ response = client.post("/shutdown", json={})+ assert response.status_code == 200+ data = response.json()+ assert data["status"] == "ok"++ def test_step_without_env_returns_error(self):+ """Test POST /step without valid env_id returns 404."""+ client = TestClient(app)+ response = client.post(+ "/step",+ json={+ "action": {"type": "ClickAction", "x": 100, "y": 200},+ "env_id": 999,+ },+ )+ assert response.status_code == 404++ def test_screenshot_without_env_returns_error(self):+ """Test GET /screenshot without valid env_id returns 404."""+ client = TestClient(app)+ response = client.get("/screenshot", params={"env_id": 999})+ assert response.status_code == 404diff --git a/libs/cua-bench/cua_bench/workers/__init__.py b/libs/cua-bench/cua_bench/workers/__init__.pynew file mode 100644index 0000000000..ed6a44d594--- /dev/null+++ b/libs/cua-bench/cua_bench/workers/__init__.py@@ -0,0 +1,31 @@+"""Worker-based gym system for parallel environment management.++This module provides a FastAPI-based worker system for running CUA-Bench+environments in parallel, enabling efficient RL training and evaluation.++Components:+- worker_server: FastAPI server wrapping Environment instances+- worker_client: HTTP client for interacting with worker servers+- worker_manager: Utilities for spawning and managing multiple workers+- dataloader: MultiTurnDataloader and ReplayBuffer for RL training+"""++from .dataloader import MultiTurnDataloader, ReplayBuffer+from .worker_client import CBEnvWorkerClient+from .worker_manager import (+ WorkerHandle,+ WorkerPool,+ cleanup_workers,+ create_workers,+)++__all__ = [+ # Worker server (run as module: python -m cua_bench.workers.worker_server)+ "CBEnvWorkerClient",+ "WorkerHandle",+ "WorkerPool",+ "create_workers",+ "cleanup_workers",+ "MultiTurnDataloader",+ "ReplayBuffer",+]diff --git a/libs/cua-bench/cua_bench/workers/dataloader.py b/libs/cua-bench/cua_bench/workers/dataloader.pynew file mode 100644index 0000000000..8e390497c8--- /dev/null+++ b/libs/cua-bench/cua_bench/workers/dataloader.py@@ -0,0 +1,688 @@+"""Dataloader for RL training with parallel environment workers.++This module provides:+- ReplayBuffer: Episode-aware replay buffer with reward discounting for RL+- MultiTurnDataloader: Handles parallel environment rollout, batching, and preprocessing++The dataloader is designed to be compatible with RL training frameworks like TRL's+GRPOTrainer, supporting tokenized inputs/outputs with proper attention masks.++Example:+ from transformers import AutoTokenizer+ from cua_bench.workers import MultiTurnDataloader, CBEnvWorkerClient++ tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-0.5B-Instruct")++ task_configs = [{"env_path": "./task", "task_index": 0, "split": "train"}]+ env_configs = [+ {+ "server_url": f"http://localhost:{8001+i}",+ "task_configs": task_configs,+ "max_step": 50,+ "max_hist": 10,+ "timeout": 300,+ }+ for i in range(4)+ ]++ dataloader = MultiTurnDataloader(+ env_class=CBEnvWorkerClient,+ env_configs=env_configs,+ tokenizer=tokenizer,+ processor=None,+ is_multi_modal=False,+ batch_size=4,+ replay_capacity=1000,+ replay_reward_discount=0.9,+ max_prompt_length=512,+ max_response_length=256,+ )++ for batch in dataloader:+ # batch contains: input_ids, attention_mask, worker_id, meta_info+ responses = model.generate(batch['input_ids'], batch['attention_mask'])++ batch_return = {+ 'prompts': batch['input_ids'],+ 'responses': responses,+ 'attention_mask': torch.cat([batch['attention_mask'], response_mask], dim=1),+ 'worker_id': batch['worker_id'],+ 'meta_info': batch['meta_info'],+ }+ dataloader.async_step(batch_return)++ # Sample from replay buffer for training+ replay_batch = dataloader.sample_from_buffer(batch_size=32)+"""++import multiprocessing as mp+import random++import numpy as np+import torch+import verl.utils.torch_functional as verl_F+from verl.utils.model import compute_position_id_with_mask+++def print_debug(msg):+ print(msg)+++def collate_fn(data_list: list[dict]) -> dict:+ tensors = {}+ non_tensors = {}++ for data in data_list:+ for key, val in data.items():+ if isinstance(val, torch.Tensor):+ if key not in tensors:+ tensors[key] = []+ tensors[key].append(val)+ else:+ if key not in non_tensors:+ non_tensors[key] = []+ non_tensors[key].append(val)++ for key, val in tensors.items():+ if key in ["responses", "input_ids", "attention_mask", "position_ids"]:+ tensors[key] = torch.stack(val, dim=0).to(torch.int64)+ else:+ tensors[key] = torch.stack(val, dim=0)++ for key, val in non_tensors.items():+ non_tensors[key] = np.array(val, dtype=object)++ output = {}+ output.update(tensors)+ output.update(non_tensors)+ return output+++def process_image(image: str):+ import base64+ import io++ from PIL import Image++ jpg_bytes = base64.b64decode(image)+ # Convert bytes to PIL Image+ buffer = io.BytesIO(jpg_bytes)+ image = Image.open(buffer)++ if image.mode != "RGB":+ image = image.convert("RGB")++ return image+++def replace_vision_tags(input_string):+ import re++ # List to store the extracted strings+ extracted_strings = []++ # Pattern to match <|vision_start|> followed by any characters until <|vision_end|>+ pattern = r"<\|vision_start\|>(.*?)<\|vision_end\|>"++ # Function to replace matches and collect the inner string+ def replacement(match):+ extracted_strings.append(match.group(1))+ return "<image>"++ # Perform the replacement+ result = re.sub(pattern, replacement, input_string, flags=re.DOTALL)++ return result, extracted_strings+++class ReplayBuffer:++ def __init__(self, capacity=10000, gamma=1.0, only_keep_outcome=False, balance_thres=0.1):+ """+ Initialize the replay buffer with improved episode handling++ Args:+ capacity (int): Maximum capacity of the replay buffer+ gamma (float): Discount factor for reward calculation+ only_keep_outcome (bool): Whether to only keep the final step of episodes+ """+ self.capacity = capacity+ self.gamma = gamma+ self.only_keep_outcome = only_keep_outcome+ self.balance_thres = balance_thres++ # Main buffer for ready-to-sample experiences+ self.ready_buffer = [None] * capacity+ self.ready_position = 0+ self.ready_count = 0++ # Temporary storage for ongoing episodes+ self.episode_buffer = {} # uid -> list of episode steps++ def add(self, data):+ """+ Add data to the replay buffer++ Args:+ data (tuple): A tuple of (worker_id, env_ret, meta_info)+ """+ worker_id, env_ret, meta_info = data+ uid = meta_info["uid"]+ done = env_ret["done"]++ # If this is the first step of an episode, initialize the episode buffer+ if uid not in self.episode_buffer:+ self.episode_buffer[uid] = []++ # Add the current step to the episode buffer+ self.episode_buffer[uid].append(data)++ # If episode is done, process it and add to ready buffer+ if done:+ self._process_episode(uid)++ def _process_episode(self, uid):+ """+ Process a completed episode, calculate discounted rewards,+ and add to the ready buffer++ Args:+ uid (str): Unique ID of the episode+ """+ episode = self.episode_buffer[uid]+ below, above = self.get_balance_stats()++ # Calculate discounted returns for each step (G = r + gamma * G_next)+ # First, get the immediate rewards for each step+ rewards = [step[1]["reward"] for step in episode]++ # Calculate discounted returns (working backwards)+ discounted_returns = [0] * len(rewards)+ discounted_returns[-1] = rewards[-1] # Last step return is just its reward++ # Calculate returns for all previous steps+ for i in range(len(rewards) - 2, -1, -1):+ discounted_returns[i] = rewards[i] + self.gamma * discounted_returns[i + 1]++ # If only keeping outcome, just store the final step+ if self.only_keep_outcome:+ # Only add the final step+ self._add_to_ready_buffer(episode[-1])+ else:+ # Add all steps with properly calculated returns+ for i in range(len(episode)):+ # Copy the data to avoid modifying the original+ worker_id, env_ret, meta_info = episode[i]+ env_ret = env_ret.copy() # Shallow copy is sufficient++ # Set the discounted return+ env_ret["reward"] = discounted_returns[i]++ # Add to ready buffer+ self._add_to_ready_buffer((worker_id, env_ret, meta_info))++ # Clear the episode from temporary storage+ del self.episode_buffer[uid]++ def _add_to_ready_buffer(self, data):+ """+ Add a processed experience to the ready buffer++ Args:+ data (tuple): Processed experience data+ """+ # Replace the oldest item if buffer is full+ self.ready_buffer[self.ready_position] = data++ # Update position+ self.ready_position = (self.ready_position + 1) % self.capacity++ # Update count+ self.ready_count = min(self.ready_count + 1, self.capacity)++ def get_balance_stats(self):+ thres = self.balance_thres+ below = 0+ above = 0+ for data in self.ready_buffer:+ if data is None:+ continue+ _, env_ret, _ = data+ env_ret = env_ret["reward"]+ if env_ret < thres:+ below += 1+ else:+ above += 1+ return below, above++ def should_keep(self, curr_below, curr_above, curr_ret):+ # if rate -> 1, then there are too many high return states+ # if rate -> -1, there are are too many low return states+ # we need to balance it to around 0+ thres = self.balance_thres+ rate = (curr_above - curr_below) / (curr_above + curr_below + 1e-8)+ keep = False+ if -0.1 < rate < 0.1:+ keep = True+ elif rate >= 0.1:+ keep = True if curr_ret < thres else False+ else:+ keep = True if curr_ret > thres else False+ # add noise to revert the decision+ # keep = not keep if np.random.uniform() < 0.1 else keep+ return keep++ def sample(self, batch_size):+ """+ Sample experiences from the ready buffer++ Args:+ batch_size (int): Number of experiences to sample++ Returns:+ list: List of sampled experiences+ """+ if self.ready_count == 0:+ return []++ valid_indices = [i for i in range(self.ready_count) if self.ready_buffer[i] is not None]++ if len(valid_indices) < batch_size:+ sampled_indices = random.sample(valid_indices, len(valid_indices))+ else:+ sampled_indices = random.sample(valid_indices, batch_size)++ return [self.ready_buffer[i] for i in sampled_indices]++ def clear(self):+ """+ Clear both ready buffer and episode buffer+ """+ self.ready_buffer = [None] * self.capacity+ self.ready_position = 0+ self.ready_count = 0+ self.episode_buffer = {}++ def __len__(self):+ """+ Return the number of valid experiences in the ready buffer+ """+ return sum(1 for item in self.ready_buffer if item is not None)+++def env_worker_process(+ env_config,+ recv_queue,+ send_queue,+ worker_id,+ env_class,+):+ """Worker process that runs environment rollouts.++ Args:+ env_config: Configuration dict for the environment client.+ Must contain 'task_configs' key with list of task configurations.+ recv_queue: Queue to receive actions from main process+ send_queue: Queue to send results to main process+ worker_id: ID of this worker+ env_class: Environment client class (e.g., CBEnvWorkerClient)+ """+ # Create environment client with env_config dict+ env = env_class(env_config)++ # Initial reset to random task_config+ env_ret, meta_info = env.reset()+ send_queue.put((worker_id, env_ret, meta_info))++ while True:+ item = recv_queue.get()+ wid, action, _ = item+ if wid is None and action is None:+ break+ assert wid == worker_id+ env_ret, meta_info = env.step(action)+ send_queue.put((worker_id, env_ret, meta_info))+ if env_ret["done"]:+ item = recv_queue.get()+ env_ret, meta_info = env.reset()+ send_queue.put((worker_id, env_ret, meta_info))+++class MultiTurnDataloader:+ """Dataloader for RL training with parallel environment workers.++ Each env_config must contain a 'task_configs' key with a list of task+ configurations that the client will use internally.+ """++ def __init__(+ self,+ env_class,+ env_configs,+ tokenizer,+ processor=None, # for multi-modal+ is_multi_modal=True,+ batch_size=8,+ replay_capacity=10000,+ replay_reward_discount=0.9,+ max_prompt_length=1024,+ max_response_length=1024,+ only_keep_outcome_in_replay=False,+ ):+ self.num_envs = len(env_configs)+ self._tokenizer = tokenizer+ self._processor = processor+ self._is_multi_modal = is_multi_modal+ self.batch_size = batch_size+ assert (+ self.batch_size <= self.num_envs+ ), "Each env cannot run more than one step in a data batch."+ self.replay = ReplayBuffer(+ replay_capacity, replay_reward_discount, only_keep_outcome_in_replay+ )+ self._only_keep_outcome_in_replay = only_keep_outcome_in_replay++ self._action_queues = [mp.Queue() for _ in range(self.num_envs)]+ self._env_ret_queue = mp.Queue()++ self._env_states = [[] for _ in range(self.num_envs)]+ self._env_global_steps = [0 for _ in range(self.num_envs)]+ self._max_prompt_length = max_prompt_length+ self._max_response_length = max_response_length+ self._running_reward = 0++ self._workers = []+ for wid in range(self.num_envs):+ w = mp.Process(+ target=env_worker_process,+ args=(+ env_configs[wid],+ self._action_queues[wid],+ self._env_ret_queue,+ wid,+ env_class,+ ),+ )+ w.daemon = True+ w.start()+ self._workers.append(w)++ self._running = True++ def __iter__(self):+ return self++ def __next__(self):+ self._gather_env_ret(first_block=False)+ ready_envs = [len(self._env_states[i]) > 0 for i in range(self.num_envs)]+ print_debug(f"[DataLoader] Number of ready envs: {sum(ready_envs)}")+ while sum(ready_envs) < self.batch_size:+ print_debug("[DataLoader] No ready envs, waiting for envs to return data...")+ self._gather_env_ret()+ ready_envs = [len(self._env_states[i]) > 0 for i in range(self.num_envs)]+ print_debug(f"[DataLoader] Number of ready envs: {sum(ready_envs)}")+ ids = self._make_indices(ready_envs, self.batch_size)+ batch = [self._env_states[i].pop(0) for i in ids]+ batch = self._preprocess_batch(batch, include_response=False, use_prev_obs=False)+ batch = collate_fn(batch)+ return batch++ def _preprocess_batch(self, batch, include_response=True, use_prev_obs=True):+ rows = []+ for wid, state, meta_info in batch:+ row_dict = {}+ prompt = state["prev_obs"] if use_prev_obs else state["obs"]++ if self._is_multi_modal:+ prompt, jpg_strs = replace_vision_tags(prompt)+ raw_prompt = prompt.replace(+ "<image>", "<|vision_start|><|image_pad|><|vision_end|>"+ )+ row_dict["multi_modal_data"] = {+ "image": [process_image(image) for image in jpg_strs]+ }+ image_inputs = self._processor.image_processor(+ row_dict["multi_modal_data"]["image"], return_tensors="pt"+ )+ image_grid_thw = image_inputs["image_grid_thw"]+ row_dict["multi_modal_inputs"] = {key: val for key, val in image_inputs.items()}++ if image_grid_thw is not None:+ merge_length = self._processor.image_processor.merge_size**2+ index = 0+ while "<image>" in prompt:+ prompt = prompt.replace(+ "<image>",+ "<|vision_start|>"+ + "<|placeholder|>" * (image_grid_thw[index].prod() // merge_length)+ + "<|vision_end|>",+ 1,+ )+ index += 1++ prompt = prompt.replace("<|placeholder|>", self._processor.image_token)+ else:+ raw_prompt = prompt++ input_ids, attention_mask = verl_F.tokenize_and_postprocess_data(+ prompt=prompt,+ tokenizer=self._tokenizer,+ max_length=self._max_prompt_length,+ pad_token_id=self._tokenizer.pad_token_id,+ left_pad=True,+ truncation="left",+ )++ if include_response:+ response_ids, response_attention_mask = verl_F.tokenize_and_postprocess_data(+ prompt=state["action"],+ tokenizer=self._tokenizer,+ max_length=self._max_response_length,+ pad_token_id=self._tokenizer.pad_token_id,+ left_pad=False,+ truncation="right",+ )+ input_ids = torch.cat([input_ids, response_ids], dim=1)+ attention_mask = torch.cat([attention_mask, response_attention_mask], dim=1)+ row_dict["responses"] = response_ids[0]+ row_dict["reward"] = torch.tensor(state["reward"]).float()++ if self._is_multi_modal:+ from verl.models.transformers.qwen2_vl import get_rope_index++ position_ids = get_rope_index(+ self._processor,+ input_ids=input_ids[0],+ image_grid_thw=image_grid_thw,+ attention_mask=attention_mask[0],+ ) # (3, seq_len)+ else:+ position_ids = compute_position_id_with_mask(attention_mask)++ row_dict["input_ids"] = input_ids[0]+ row_dict["attention_mask"] = attention_mask[0]+ row_dict["position_ids"] = position_ids[0]+ row_dict["worker_id"] = wid+ row_dict["meta_info"] = meta_info+ row_dict["raw_prompt_ids"] = self._tokenizer.encode(+ raw_prompt, add_special_tokens=False+ )++ rows.append(row_dict)+ return rows++ def _process_batch_return(self, batch_return):+ actions = []+ meta_infos = []+ for i in range(len(batch_return["prompts"])):+ # prompt_ids = batch_return["prompts"][i]+ prompt_length = batch_return["prompts"][i].shape[-1]++ # valid_prompt_length = batch_return["attention_mask"][i][:prompt_length].sum()+ # valid_prompt_ids = prompt_ids[-valid_prompt_length:]++ response_ids = batch_return["responses"][i]+ valid_response_length = batch_return["attention_mask"][i][prompt_length:].sum()+ valid_response_ids = response_ids[:valid_response_length]+ sequences_str = self._tokenizer.decode(valid_response_ids)+ actions.append((batch_return["worker_id"][i], sequences_str))+ meta_infos.append(batch_return["meta_info"][i])++ return actions, meta_infos++ def _make_indices_sync(self, n):+ assert n <= self.num_envs+ s_min = min(self._env_global_steps)+ s_max = max(self._env_global_steps)+ assert s_max - s_min <= 1, "All envs should progress together"++ arr = np.array(self._env_global_steps)+ list_smin = np.where(arr == s_min)[0]+ list_smax = np.where(arr == s_max)[0]++ np.random.shuffle(list_smin)+ np.random.shuffle(list_smax)++ if n <= len(list_smin):+ indices = list_smin[:n]+ else:+ needed_from_smax = n - len(list_smin)+ indices = np.concatenate((list_smin, list_smax[:needed_from_smax]))++ return indices++ def _make_indices(self, ready_envs, n):+ assert n <= sum(ready_envs)+ ids = np.where(ready_envs)[0]+ np.random.shuffle(ids)+ indices = ids[:n]+ return indices++ def _gather_env_ret(self, first_block=True):+ if first_block:+ item = self._env_ret_queue.get(block=True)+ self._env_states[item[0]].append(item)+ if not item[1]["is_init"]:+ self.replay.add(item)+ if item[1]["done"]:+ self._running_reward = 0.99 * self._running_reward + 0.01 * item[1]["reward"]+ while True:+ try:+ item = self._env_ret_queue.get(block=False)+ self._env_states[item[0]].append(item)+ if not item[1]["is_init"]:+ self.replay.add(item)+ if item[1]["done"]:+ self._running_reward = 0.99 * self._running_reward + 0.01 * item[1]["reward"]+ except Exception:+ break++ def async_step(self, batch_return):+ actions, meta_infos = self._process_batch_return(batch_return)+ for i in range(len(actions)):+ wid, action = actions[i]+ meta_info = meta_infos[i]+ self._action_queues[wid].put((wid, action, meta_info))+ self._env_global_steps[wid] += 1++ def sample_from_buffer(self, batch_size=None):+ if batch_size is None:+ batch_size = self.batch_size+ while len(self.replay) < batch_size:+ self._gather_env_ret()++ batch = self.replay.sample(batch_size)+ batch = self._preprocess_batch(batch, include_response=True, use_prev_obs=True)+ batch = collate_fn(batch)+ return batch++ def clear_replay_buffer(self):+ self.replay.clear()++ def get_balance_stats(self):+ below, above = self.replay.get_balance_stats()+ return below, above++ def calculate_outcome_reward(self):+ rwds = []+ for item in self.replay.ready_buffer:+ if item is None:+ continue+ wid, data, meta_info = item+ if data["done"]:+ rwds.append(data["reward"])+ if len(rwds) > 0:+ return np.mean(rwds)+ return 0++ def print_examples(self, n=2):+ n = min(n, len(self.replay))+ examples = self.replay.sample(n)+ for e in examples:+ print(e[1]["obs"])++ def print_stats_in_replay_buffer(self):+ uid_counts = {}+ for item in self.replay.ready_buffer:+ if item is None:+ continue+ uid = item[2]["uid"] # meta_info is the third element, access 'uid'+ if uid in uid_counts:+ uid_counts[uid] += 1+ else:+ uid_counts[uid] = 1+ num_uids = len(uid_counts)+ hist = {}+ for count in uid_counts.values():+ if count in hist:+ hist[count] += 1+ else:+ hist[count] = 1++ stats = (+ f"Replay buffer size: {len(self.replay)}. "+ + f"Number of uids: {num_uids}. "+ + "Histogram of item counts per uid in replay buffer (x-y): "+ )+ counts = []+ for count in sorted(hist.keys()):+ counts.append(f"{count}-{hist[count]}")+ stats = stats + ", ".join(counts)+ print(stats)++ def running_outcome_reward(self):+ return self._running_reward++ def close(self):+ """Close all workers and clean up resources."""+ self._running = False++ # Signal workers to stop - send twice because worker may be waiting+ # at either the outer loop or inner loop (after episode done)+ for wid in range(self.num_envs):+ try:+ self._action_queues[wid].put((None, None, None))+ self._action_queues[wid].put((None, None, None))+ except Exception:+ pass++ # Wait for workers to finish+ for worker in self._workers:+ worker.join(timeout=5)+ if worker.is_alive():+ worker.terminate()+ worker.join(timeout=2)++ # Close queues+ for q in self._action_queues:+ try:+ q.cancel_join_thread()+ q.close()+ except Exception:+ pass++ try:+ self._env_ret_queue.cancel_join_thread()+ self._env_ret_queue.close()+ except Exception:+ passdiff --git a/libs/cua-bench/cua_bench/workers/worker_client.py b/libs/cua-bench/cua_bench/workers/worker_client.pynew file mode 100644index 0000000000..e025a95420--- /dev/null+++ b/libs/cua-bench/cua_bench/workers/worker_client.py@@ -0,0 +1,505 @@+import base64+import io+import random+import re+import uuid+from typing import Any, Dict, List++import numpy as np+import requests+from cua_bench.actions import action_to_dict+from cua_bench.types import (+ ClickAction,+ DoneAction,+ DoubleClickAction,+ DragAction,+ HotkeyAction,+ RightClickAction,+ ScrollAction,+ TypeAction,+ WaitAction,+)+from PIL import Image++DEBUG = True+++def print_debug(msg):+ if DEBUG:+ print(msg)+++def pillow_to_jpg_string(img):+ # Save to bytes buffer as JPG+ buffer = io.BytesIO()+ img.save(buffer, format="JPEG", quality=80)+ jpg_bytes = buffer.getvalue()+ # Encode bytes to base64 string+ jpg_string = base64.b64encode(jpg_bytes).decode("utf-8")+ return jpg_string+++def jpg_string_to_pillow(jpg_string):+ # Decode base64 string to bytes+ jpg_bytes = base64.b64decode(jpg_string)+ # Convert bytes to PIL Image+ buffer = io.BytesIO(jpg_bytes)+ img = Image.open(buffer)+ return img+++def rgb_to_jpg_string(rgb_array):+ """+ Convert RGB array to JPG-encoded base64 string.+ Input: numpy array of shape (height, width, 3) with values 0-255+ Output: base64-encoded string+ """+ img = Image.fromarray(rgb_array.astype("uint8"), "RGB")+ buffer = io.BytesIO()+ img.save(buffer, format="JPEG", quality=80)+ jpg_bytes = buffer.getvalue()+ buffer.close()+ jpg_string = base64.b64encode(jpg_bytes).decode("utf-8")+ return jpg_string+++def jpg_string_to_rgb(jpg_string):+ """+ Convert JPG-encoded base64 string back to RGB array.+ Input: base64-encoded string+ Output: numpy array of shape (height, width, 3) with values 0-255+ """+ jpg_bytes = base64.b64decode(jpg_string)+ buffer = io.BytesIO(jpg_bytes)+ img = Image.open(buffer)+ rgb_array = np.array(img)+ buffer.close()+ return rgb_array+++def parse_action(action_string):+ pattern = r"(\w+)\((.*?)\)"+ match = re.match(pattern, action_string)+ if not match:+ return None, None+ function_name = match.group(1)+ args_string = match.group(2)+ if not args_string:+ return function_name, []+ args = []+ for arg in re.split(r",\s*", args_string):+ try:+ args.append(int(arg))+ except ValueError:+ args.append(arg)+ return function_name, args+++def check_type(inputs, types):+ if len(inputs) != len(types):+ return False+ for i, t in zip(inputs, types):+ if not isinstance(i, t):+ return False+ return True+++class CBEnvWorkerClient:+ """HTTP client for CUA-Bench worker servers.++ This client manages communication with the worker server, image processing,+ observation history tracking, and action normalization.++ Args:+ env_config: Configuration dict with keys:+ - server_url: URL of the worker server+ - task_configs: List of task configs, each with env_path, task_index, split+ - img_w: Image width (default: 1920)+ - img_h: Image height (default: 1080)+ - max_step: Maximum steps per episode (default: 50)+ - max_hist: Maximum observation history length (default: 10)+ - timeout: Environment timeout in seconds (default: 300)+ """++ vision_start_token = "<|vision_start|>"+ vision_end_token = "<|vision_end|>"+ think_start_token = "<|think_start|>"+ think_end_token = "<|think_end|>"+ action_start_token = "<|action_start|>"+ action_end_token = "<|action_end|>"+ valid_fn_names = [+ "click",+ "left_double",+ "right_single",+ "drag",+ "hotkey",+ "type",+ "scroll",+ "wait",+ "call_user",+ "done",+ ]+ vlm_img_w = 1260+ vlm_img_h = 700+ dynamic_img_size = True++ def __init__(self, env_config):+ print_debug("[CBEnvWorkerClient] Initializing worker...")+ self.env_config = env_config+ self.server_url = env_config["server_url"]+ self.max_step = env_config["max_step"]+ self.max_hist = env_config["max_hist"]+ self.task_configs: List[Dict[str, Any]] = env_config["task_configs"]+ self.img_h = env_config.get("img_h", 1920)+ self.img_w = env_config.get("img_w", 1080)+ self.timeout = env_config["timeout"]+ self.env_id = None+ self.uid = None+ self.step_count = 0+ self.done = False+ self.prompt = None++ def reset(self):+ ret, meta_info = self.reset_attempt()+ while ret is None:+ print_debug("[CBEnvWorkerClient] Reset failed, retrying...")+ ret, meta_info = self.reset_attempt()+ return ret, meta_info++ def reset_attempt(self):+ print_debug("[CBEnvWorkerClient] Resetting environment...")+ if not self.task_configs:+ print_debug("[CBEnvWorkerClient] ERROR: No task configs available")+ return None, None++ # Select a random task config+ task_config = random.choice(self.task_configs)+ env_path = task_config["env_path"]+ task_index = task_config.get("task_index", 0)+ split = task_config.get("split", "train")+ print_debug(+ f"[CBEnvWorkerClient] Selected env_path: {env_path}, task_index: {task_index}, split: {split}"+ )++ try:+ headers = {"Content-Type": "application/json"}+ print_debug(f"[CBEnvWorkerClient] Sending reset request to {self.server_url}/reset")+ reset = requests.post(+ f"{self.server_url}/reset",+ headers=headers,+ json={+ "env_path": env_path,+ "task_index": task_index,+ "split": split,+ "timeout": self.timeout,+ },+ )+ reset.raise_for_status()+ reset_data = reset.json()+ print_debug("[CBEnvWorkerClient] Reset successful, received response data")+ jpg_string = reset_data["screenshot"]+ instruction = reset_data["instruction"]+ self.env_id = reset_data["env_id"]+ print_debug(f"[CBEnvWorkerClient] Env ID assigned: {self.env_id}")++ except requests.RequestException as e:+ print_debug(f"[CBEnvWorkerClient] ERROR in reset processing: {e}")+ return None, None++ jpg_string = self.check_and_resize_image(jpg_string)+ self.prompt = {+ "instruction": instruction,+ "steps": [f"{self.vision_start_token}{jpg_string}{self.vision_end_token}"],+ }+ self.uid = str(uuid.uuid4())+ self.step_count = 0+ self.done = False++ obs = self.prompt_to_input_obs(self.prompt)+ ret = {"obs": obs, "done": False, "is_init": True}+ meta_info = {"uid": self.uid}+ return ret, meta_info++ def prompt_to_input_obs(self, prompt):+ obs = prompt["instruction"]+ for s in prompt["steps"]:+ obs = obs + s+ return obs++ def check_and_fix_action(self, action_str):+ """Parse action string and return (normalized_str, Action object for server)."""+ print_debug(f"[CBEnvWorkerClient ID: {self.env_id}] Processing action: {action_str}")+ fn_name, args = parse_action(action_str)+ default_action = WaitAction(seconds=1.0)++ if fn_name is None or fn_name not in self.valid_fn_names:+ return "wait()", default_action++ if fn_name == "click":+ if not check_type(args, [int, int]):+ return "wait()", default_action+ x = int(args[0] / 1000.0 * self.img_w)+ y = int(args[1] / 1000.0 * self.img_h)+ return f"click({args[0]},{args[1]})", ClickAction(x=x, y=y)++ elif fn_name == "left_double":+ if not check_type(args, [int, int]):+ return "wait()", default_action+ x = int(args[0] / 1000.0 * self.img_w)+ y = int(args[1] / 1000.0 * self.img_h)+ return f"left_double({args[0]},{args[1]})", DoubleClickAction(x=x, y=y)++ elif fn_name == "right_single":+ if not check_type(args, [int, int]):+ return "wait()", default_action+ x = int(args[0] / 1000.0 * self.img_w)+ y = int(args[1] / 1000.0 * self.img_h)+ return f"right_single({args[0]},{args[1]})", RightClickAction(x=x, y=y)++ elif fn_name == "drag":+ if not check_type(args, [int, int, int, int]):+ return "wait()", default_action+ x1 = int(args[0] / 1000.0 * self.img_w)+ y1 = int(args[1] / 1000.0 * self.img_h)+ x2 = int(args[2] / 1000.0 * self.img_w)+ y2 = int(args[3] / 1000.0 * self.img_h)+ return f"drag({args[0]},{args[1]},{args[2]},{args[3]})", DragAction(+ from_x=x1, from_y=y1, to_x=x2, to_y=y2+ )++ elif fn_name == "hotkey":+ args_str = ",".join(args)+ return f"hotkey({args_str})", HotkeyAction(keys=list(args))++ elif fn_name == "type":+ if not check_type(args, [str]):+ return "wait()", default_action+ return f"type({args[0]})", TypeAction(text=args[0])++ elif fn_name == "scroll":+ if not check_type(args, [int, int, str]):+ return "wait()", default_action+ direction = args[2]+ if direction not in ["up", "down"]:+ return "wait()", default_action+ amount = 100 if direction == "up" else -100+ return f"scroll({args[0]},{args[1]},{args[2]})", ScrollAction(+ direction=direction, amount=abs(amount)+ )++ elif fn_name == "wait":+ if len(args) != 0:+ return "wait()", default_action+ return "wait()", WaitAction(seconds=1.0)++ elif fn_name == "call_user":+ # Treat call_user as wait since there's no equivalent+ if len(args) != 0:+ return "wait()", default_action+ return "call_user()", WaitAction(seconds=1.0)++ elif fn_name == "done":+ if len(args) != 0:+ return "wait()", default_action+ return "done()", DoneAction()++ else:+ raise ValueError(f"Unexpected action: {fn_name}")++ def reward_shaping(self, reward):+ return reward++ def check_and_resize_image(self, jpg_string):+ print_debug(f"[CBEnvWorkerClient ID: {self.env_id}] Processing and resizing image...")+ img = jpg_string_to_pillow(jpg_string)+ w, h = img.size+ if self.dynamic_img_size:+ self.img_w = w+ self.img_h = h+ assert w == self.img_w and h == self.img_h+ img_rs = img.resize((self.vlm_img_w, self.vlm_img_h))+ jpg_string_rs = pillow_to_jpg_string(img_rs)+ return jpg_string_rs++ def step(self, action):+ ret, meta_info = self.step_attempt(action)+ while ret is None:+ print_debug(f"[CBEnvWorkerClient ID: {self.env_id}] Step failed, retrying...")+ ret, meta_info = self.step_attempt(action)+ return ret, meta_info++ def step_attempt(self, action):+ print_debug(+ f"[CBEnvWorkerClient ID: {self.env_id}] Step {self.step_count + 1} with action: {action}"+ )+ assert not self.done+ assert isinstance(action, str)+ prev_obs = self.prompt_to_input_obs(self.prompt)+ try:+ print_debug(f"[CBEnvWorkerClient ID: {self.env_id}] Parsing action tokens...")+ think_pattern = (+ re.escape(self.think_start_token) + r"(.*?)" + re.escape(self.think_end_token)+ )+ action_pattern = (+ re.escape(self.action_start_token) + r"(.*?)" + re.escape(self.action_end_token)+ )++ think_match = re.search(think_pattern, action)+ action_match = re.search(action_pattern, action)++ think_str = think_match.group(1).strip() if think_match else ""+ action_str = action_match.group(1).strip() if action_match else ""+ print_debug(+ f"[CBEnvWorkerClient ID: {self.env_id}] Parsed action tokens: think_str={think_str}, action_str={action_str}"+ )+ except Exception as e:+ print_debug(f"[CBEnvWorkerClient ID: {self.env_id}] ERROR in action parsing: {e}")+ return None, None++ action_str, action_obj = self.check_and_fix_action(action_str)+ print_debug(f"[CBEnvWorkerClient ID: {self.env_id}] Normalized action: {action_str}")+ print_debug(f"[CBEnvWorkerClient ID: {self.env_id}] Action object: {action_obj}")++ if self.step_count >= self.max_step:+ print_debug(f"[CBEnvWorkerClient ID: {self.env_id}] Max steps reached, forcing done()")+ action_obj = DoneAction()+ action_str = "done()"++ try:+ print_debug(+ f"[CBEnvWorkerClient ID: {self.env_id}] Sending step request to {self.server_url}/step"+ )+ action_dict = action_to_dict(action_obj)+ step_ret = requests.post(+ f"{self.server_url}/step", json={"action": action_dict, "env_id": self.env_id}+ )+ step_ret.raise_for_status()+ step_data = step_ret.json()+ print_debug(f"[CBEnvWorkerClient ID: {self.env_id}] Step request successful")++ jpg_string = step_data["screenshot"]+ reward = step_data["reward"]+ done = step_data["done"]+ print_debug(+ f"[CBEnvWorkerClient ID: {self.env_id}] Step result - reward: {reward}, done: {done}"+ )++ assert isinstance(reward, (int, float))+ assert isinstance(done, bool)+ if isinstance(action_obj, DoneAction):+ assert done+ self.done = done+ except Exception as e:+ print_debug(f"[CBEnvWorkerClient ID: {self.env_id}] ERROR in step execution: {e}")+ return None, None++ action_clean = (+ f"{self.think_start_token}{think_str}{self.think_end_token}"+ + f"{self.action_start_token}{action_str}{self.action_end_token}"+ )++ jpg_string = self.check_and_resize_image(jpg_string)+ reward = self.reward_shaping(reward)++ self.step_count += 1+ self.prompt["steps"].append(action_clean)+ self.prompt["steps"].append(f"{self.vision_start_token}{jpg_string}{self.vision_end_token}")+ curr_obs = self.prompt_to_input_obs(self.prompt)++ ret = {+ "prev_obs": prev_obs,+ "action": action_clean,+ "obs": curr_obs,+ "reward": reward,+ "done": self.done,+ "is_init": False,+ }+ meta_info = {"uid": self.uid}+ print_debug(+ f"[CBEnvWorkerClient ID: {self.env_id}] Step {self.step_count} completed successfully"+ )+ return ret, meta_info++ def render(self):+ """+ Renders the current state in self.prompt as a sequence of text-image pairs into a single image+ Returns:+ PIL.Image: Combined image showing the instruction and interaction history+ """+ import re++ from PIL import Image, ImageDraw, ImageFont++ # Constants for rendering+ PADDING = 20+ TEXT_HEIGHT = 100+ FONT_SIZE = 20+ CLICK_RADIUS = 5+ CLICK_COLOR = "red"+ try:+ font = ImageFont.truetype("DejaVuSans.ttf", FONT_SIZE)+ except Exception:+ font = ImageFont.load_default()++ # First calculate total height needed+ total_height = PADDING+ total_height += TEXT_HEIGHT # Initial instruction++ for step in self.prompt["steps"]:+ if self.vision_start_token in step:+ # Image height + padding+ total_height += self.vlm_img_h + PADDING+ else:+ # Text height + padding+ total_height += TEXT_HEIGHT + PADDING++ # Create blank image+ combined_img = Image.new("RGB", (self.vlm_img_w + 2 * PADDING, total_height), "white")+ draw = ImageDraw.Draw(combined_img)++ # Start drawing from top+ y_offset = PADDING++ # Draw instruction+ draw.text((PADDING, y_offset), self.prompt["instruction"], font=font, fill="black")+ y_offset += TEXT_HEIGHT + PADDING++ # Draw each step+ for step in self.prompt["steps"]:+ if self.vision_start_token in step:+ # Extract and paste image+ img_str = step[len(self.vision_start_token) : -len(self.vision_end_token)]+ img = jpg_string_to_pillow(img_str)+ combined_img.paste(img, (PADDING, y_offset))++ # Check previous step for click coordinates+ if len(self.prompt["steps"]) > 1:+ prev_step = self.prompt["steps"][-2] # Get the step before the image+ if "<|action_start|>" in prev_step and "<|action_end|>" in prev_step:+ action = prev_step.split("<|action_start|>")[1].split("<|action_end|>")[0]+ # Look for click(x,y) pattern+ click_match = re.search(r"click\((\d+),(\d+)\)", action)+ if click_match:+ # Get normalized coordinates+ norm_x, norm_y = map(int, click_match.groups())+ # Denormalize coordinates (assuming coordinates are normalized to 100)+ x = int((norm_x / 1000.0) * self.vlm_img_w)+ y = int((norm_y / 1000.0) * self.vlm_img_h)+ # Draw click point+ draw.ellipse(+ [+ PADDING + x - CLICK_RADIUS,+ y_offset + y - CLICK_RADIUS,+ PADDING + x + CLICK_RADIUS,+ y_offset + y + CLICK_RADIUS,+ ],+ fill=CLICK_COLOR,+ )++ y_offset += self.vlm_img_h + PADDING+ else:+ # Draw text (action/thought)+ draw.text((PADDING, y_offset), step, font=font, fill="black")+ y_offset += TEXT_HEIGHT + PADDING++ return combined_imgdiff --git a/libs/cua-bench/cua_bench/workers/worker_manager.py b/libs/cua-bench/cua_bench/workers/worker_manager.pynew file mode 100644index 0000000000..474607f1b6--- /dev/null+++ b/libs/cua-bench/cua_bench/workers/worker_manager.py@@ -0,0 +1,320 @@+"""Worker manager for spawning and managing multiple worker servers.++This module provides utilities for creating and managing pools of worker servers,+enabling parallel environment execution.++Example:+ workers = await create_workers(+ n_workers=4,+ allowed_ips=["127.0.0.1", "10.0.0.5"],+ )+ # Each worker manages up to 2 envs, so 4 workers = 8 parallel envs++ # Use workers...++ await cleanup_workers(workers)+"""++import asyncio+import os+import socket+import subprocess+import sys+from dataclasses import dataclass+from typing import List, Optional++import aiohttp+++def _find_free_ports(n: int) -> List[int]:+ """Find N free ports by binding to port 0.++ Args:+ n: Number of free ports to find++ Returns:+ List of available port numbers+ """+ ports = []+ sockets = []++ for _ in range(n):+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)+ s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)+ s.bind(("", 0))+ ports.append(s.getsockname()[1])+ sockets.append(s)++ # Close all sockets to release the ports+ for s in sockets:+ s.close()++ return ports+++@dataclass+class WorkerHandle:+ """Handle for a running worker server.++ Attributes:+ worker_id: Unique identifier for this worker+ port: Port the worker is listening on+ process: Subprocess running the worker+ api_url: Full URL for API requests+ """++ worker_id: str+ port: int+ process: subprocess.Popen+ api_url: str++ async def health_check(self, timeout: float = 5.0) -> bool:+ """Check if the worker is healthy.++ Args:+ timeout: Request timeout in seconds++ Returns:+ True if healthy, False otherwise+ """+ try:+ async with aiohttp.ClientSession() as session:+ async with session.get(+ f"{self.api_url}/health",+ timeout=aiohttp.ClientTimeout(total=timeout),+ ) as response:+ if response.status == 200:+ return True+ except Exception:+ pass+ return False++ def stop(self) -> None:+ """Stop the worker process."""+ if self.process and self.process.poll() is None:+ # Try graceful shutdown first+ try:+ self.process.terminate()+ try:+ self.process.wait(timeout=5)+ except subprocess.TimeoutExpired:+ # Force kill if graceful shutdown fails+ self.process.kill()+ self.process.wait(timeout=5)+ except Exception:+ pass++ @property+ def is_running(self) -> bool:+ """Check if the worker process is still running."""+ return self.process is not None and self.process.poll() is None+++async def create_workers(+ n_workers: int,+ allowed_ips: List[str],+ startup_timeout: float = 30.0,+ host: str = "0.0.0.0",+) -> List[WorkerHandle]:+ """Spawn N worker servers on automatically allocated free ports.++ Args:+ n_workers: Number of worker servers to spawn+ allowed_ips: List of IPs allowed to access workers+ startup_timeout: Max time to wait for each worker to become healthy+ host: Host for workers to bind to++ Returns:+ List of WorkerHandle objects++ Raises:+ RuntimeError: If any worker fails to start++ Example:+ workers = await create_workers(+ n_workers=4,+ allowed_ips=["127.0.0.1", "10.0.0.5"],+ )+ # Each worker manages up to 2 envs, so 4 workers = 8 parallel envs+ """+ handles: List[WorkerHandle] = []++ # Find free ports for all workers+ ports = _find_free_ports(n_workers)++ for i in range(n_workers):+ port = ports[i]+ worker_id = f"w{i}"++ # Build environment+ env = os.environ.copy()+ env["OSGYM_ALLOWED_IPS"] = ",".join(allowed_ips)++ # Start worker process+ cmd = [+ sys.executable,+ "-m",+ "cua_bench.workers.worker_server",+ "--host",+ host,+ "--port",+ str(port),+ ]++ try:+ process = subprocess.Popen(+ cmd,+ env=env,+ stdout=subprocess.PIPE,+ stderr=subprocess.PIPE,+ start_new_session=True, # Detach from parent+ )+ except Exception as e:+ # Clean up already started workers+ for handle in handles:+ handle.stop()+ raise RuntimeError(f"Failed to start worker {worker_id}: {e}")++ api_url = f"http://127.0.0.1:{port}"+ handle = WorkerHandle(+ worker_id=worker_id,+ port=port,+ process=process,+ api_url=api_url,+ )+ handles.append(handle)++ # Wait for all workers to become healthy+ async def wait_for_health(handle: WorkerHandle) -> bool:+ """Wait for a worker to become healthy."""+ start_time = asyncio.get_event_loop().time()+ while asyncio.get_event_loop().time() - start_time < startup_timeout:+ if await handle.health_check():+ return True+ await asyncio.sleep(0.5)+ return False++ try:+ health_results = await asyncio.gather(+ *[wait_for_health(h) for h in handles],+ return_exceptions=True,+ )++ failed_workers = []+ for i, (handle, result) in enumerate(zip(handles, health_results)):+ if isinstance(result, Exception) or not result:+ failed_workers.append(handle.worker_id)++ if failed_workers:+ # Clean up all workers+ for handle in handles:+ handle.stop()+ failed_ports = [handles[int(w[1:])].port for w in failed_workers]+ raise RuntimeError(+ f"Workers failed to start: {failed_workers} on ports {failed_ports}."+ )++ except Exception:+ # Clean up all workers on any error+ for handle in handles:+ handle.stop()+ raise++ return handles+++async def cleanup_workers(workers: List[WorkerHandle]) -> None:+ """Stop all workers.++ Args:+ workers: List of WorkerHandle objects to stop+ """+ for handle in workers:+ handle.stop()+++async def wait_for_workers(+ workers: List[WorkerHandle],+ timeout: Optional[float] = None,+) -> None:+ """Wait for all workers to terminate.++ Args:+ workers: List of WorkerHandle objects to wait for+ timeout: Max time to wait (None for indefinite)++ Raises:+ asyncio.TimeoutError: If timeout expires before all workers terminate+ """++ async def wait_for_one(handle: WorkerHandle) -> None:+ """Wait for a single worker to terminate."""+ while handle.is_running:+ await asyncio.sleep(0.1)++ wait_tasks = [wait_for_one(h) for h in workers]++ if timeout is not None:+ await asyncio.wait_for(+ asyncio.gather(*wait_tasks),+ timeout=timeout,+ )+ else:+ await asyncio.gather(*wait_tasks)+++class WorkerPool:+ """Context manager for a pool of worker servers.++ Example:+ async with WorkerPool(n_workers=4, allowed_ips=["127.0.0.1"]) as pool:+ for url in pool.urls:+ client = CBEnvWorkerClient({ "server_url": url })+ # Use client...+ """++ def __init__(+ self,+ n_workers: int,+ allowed_ips: List[str],+ startup_timeout: float = 30.0,+ host: str = "0.0.0.0",+ ):+ self.n_workers = n_workers+ self.allowed_ips = allowed_ips+ self.startup_timeout = startup_timeout+ self.host = host+ self._workers: List[WorkerHandle] = []++ async def __aenter__(self) -> "WorkerPool":+ self._workers = await create_workers(+ n_workers=self.n_workers,+ allowed_ips=self.allowed_ips,+ startup_timeout=self.startup_timeout,+ host=self.host,+ )+ return self++ async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:+ await cleanup_workers(self._workers)++ @property+ def workers(self) -> List[WorkerHandle]:+ """Get the list of worker handles."""+ return self._workers++ @property+ def urls(self) -> List[str]:+ """Get the list of worker URLs."""+ return [w.api_url for w in self._workers]++ async def health_check_all(self) -> dict:+ """Check health of all workers.++ Returns:+ Dict mapping worker_id to health status+ """+ results = {}+ for worker in self._workers:+ results[worker.worker_id] = await worker.health_check()+ return resultsdiff --git a/libs/cua-bench/cua_bench/workers/worker_server.py b/libs/cua-bench/cua_bench/workers/worker_server.pynew file mode 100644index 0000000000..087658cc95--- /dev/null+++ b/libs/cua-bench/cua_bench/workers/worker_server.py@@ -0,0 +1,480 @@+"""FastAPI server wrapping cua_bench Environment instances.++This server provides a REST API for managing a pool of Environment instances,+enabling parallel environment execution for RL training.++Usage:+ OSGYM_ALLOWED_IPS=127.0.0.1 python -m cua_bench.workers.worker_server --port 8001++Environment Variables:+ OSGYM_ALLOWED_IPS: Comma-separated list of allowed IP addresses (default: 127.0.0.1)+"""++import argparse+import asyncio+import base64+import os+import threading+import time+from dataclasses import asdict, dataclass+from typing import Any, Dict, List, Optional++# Import cua_bench components+from cua_bench import make+from cua_bench.types import (+ Action,+ ClickAction,+ DoneAction,+ DoubleClickAction,+ DragAction,+ HotkeyAction,+ KeyAction,+ MiddleClickAction,+ MoveToAction,+ RightClickAction,+ ScrollAction,+ TypeAction,+ WaitAction,+)+from fastapi import FastAPI, HTTPException, Request+from fastapi.middleware.cors import CORSMiddleware+from pydantic import BaseModel++# Maximum number of environments per server+MAX_ENVS = 2++# Default timeout for inactive environments (seconds)+DEFAULT_TIMEOUT = 300+++@dataclass+class EnvState:+ """State of an environment instance."""++ env: Any # Environment instance+ env_path: str+ task_index: int+ split: str+ timeout: int+ last_accessed: float+ instruction: str = ""+++# Global state+env_lock = threading.Lock()+available_envs: List[int] = list(range(MAX_ENVS - 1, -1, -1)) # [1, 0] for MAX_ENVS=2+active_envs: List[int] = []+env_map: Dict[int, EnvState] = {}++# FastAPI app+app = FastAPI(title="CUA-Bench Worker Server", version="0.1.0")++# Add CORS middleware+app.add_middleware(+ CORSMiddleware,+ allow_origins=["*"],+ allow_credentials=True,+ allow_methods=["*"],+ allow_headers=["*"],+)+++# --- IP Filtering Middleware ---[email protected]("http")+async def ip_filter_middleware(request: Request, call_next):+ """Filter requests by IP address."""+ allowed_ips = os.environ.get("OSGYM_ALLOWED_IPS", "127.0.0.1").split(",")+ allowed_ips = [ip.strip() for ip in allowed_ips if ip.strip()]++ client_ip = request.client.host if request.client else "unknown"++ # Allow localhost variants (including "testclient" for FastAPI TestClient)+ localhost_variants = ["127.0.0.1", "::1", "localhost", "testclient"]+ if client_ip in localhost_variants:+ client_ip = "127.0.0.1"++ if allowed_ips and client_ip not in allowed_ips:+ raise HTTPException(+ status_code=403,+ detail=f"Access denied: IP {client_ip} not in allowed list",+ )++ return await call_next(request)+++# --- Request/Response Models ---+class ResetRequest(BaseModel):+ """Request body for /reset endpoint."""++ env_path: str+ task_index: int = 0+ split: str = "train"+ timeout: int = DEFAULT_TIMEOUT+++class StepRequest(BaseModel):+ """Request body for /step endpoint."""++ action: Dict[str, Any] # Serialized Action+ env_id: int+++class ShutdownRequest(BaseModel):+ """Request body for /shutdown endpoint."""++ env_id: Optional[int] = None # If None, shut down all envs+++class ResetResponse(BaseModel):+ """Response body for /reset endpoint."""++ screenshot: str # Base64-encoded screenshot+ instruction: str+ env_id: int+++class StepResponse(BaseModel):+ """Response body for /step endpoint."""++ screenshot: str # Base64-encoded screenshot+ reward: float+ done: bool+++class ScreenshotResponse(BaseModel):+ """Response body for /screenshot endpoint."""++ screenshot: str # Base64-encoded screenshot+ env_id: int+++class HealthResponse(BaseModel):+ """Response body for /health endpoint."""++ status: str+ available_envs: int+ active_envs: int+ max_envs: int+++# --- Helper Functions ---+def _get_available_env(timeout: int) -> int:+ """Get an available environment slot from the pool."""+ with env_lock:+ if not available_envs:+ raise HTTPException(+ status_code=503,+ detail=f"No available environments. Max capacity: {MAX_ENVS}",+ )+ env_id = available_envs.pop()+ active_envs.append(env_id)+ return env_id+++def _release_env(env_id_or_all: int | str) -> None:+ """Release an environment back to the pool."""+ with env_lock:+ if env_id_or_all == "all":+ # Release all active envs+ for eid in list(active_envs):+ if eid in env_map:+ state = env_map.pop(eid)+ # Close the environment+ try:+ asyncio.create_task(_close_env_async(state.env))+ except Exception:+ pass+ active_envs.remove(eid)+ available_envs.append(eid)+ else:+ env_id = int(env_id_or_all)+ if env_id in active_envs:+ if env_id in env_map:+ state = env_map.pop(env_id)+ # Close the environment+ try:+ asyncio.create_task(_close_env_async(state.env))+ except Exception:+ pass+ active_envs.remove(env_id)+ available_envs.append(env_id)+++async def _close_env_async(env: Any) -> None:+ """Close an environment asynchronously."""+ try:+ await env.close()+ except Exception:+ pass+++def _get_env(env_id: int) -> EnvState:+ """Get an environment by ID."""+ with env_lock:+ if env_id not in env_map:+ raise HTTPException(+ status_code=404,+ detail=f"Environment {env_id} not found",+ )+ state = env_map[env_id]+ state.last_accessed = time.time()+ return state+++def deserialize_action(action_dict: Dict[str, Any]) -> Action:+ """Deserialize an action from a dictionary.++ Supports two formats:+ 1. {"type": "ClickAction", "x": 100, "y": 200}+ 2. {"action_type": "click", "x": 100, "y": 200}+ """+ action_type = action_dict.get("type") or action_dict.get("action_type", "")++ # Normalize action type+ action_type_lower = action_type.lower().replace("_", "").replace("action", "")++ if action_type_lower == "click" or action_type == "ClickAction":+ return ClickAction(x=int(action_dict["x"]), y=int(action_dict["y"]))+ elif action_type_lower == "rightclick" or action_type == "RightClickAction":+ return RightClickAction(x=int(action_dict["x"]), y=int(action_dict["y"]))+ elif action_type_lower == "doubleclick" or action_type == "DoubleClickAction":+ return DoubleClickAction(x=int(action_dict["x"]), y=int(action_dict["y"]))+ elif action_type_lower == "middleclick" or action_type == "MiddleClickAction":+ return MiddleClickAction(x=int(action_dict["x"]), y=int(action_dict["y"]))+ elif action_type_lower == "drag" or action_type == "DragAction":+ return DragAction(+ from_x=int(action_dict["from_x"]),+ from_y=int(action_dict["from_y"]),+ to_x=int(action_dict["to_x"]),+ to_y=int(action_dict["to_y"]),+ duration=float(action_dict.get("duration", 1.0)),+ )+ elif action_type_lower == "moveto" or action_type == "MoveToAction":+ return MoveToAction(+ x=int(action_dict["x"]),+ y=int(action_dict["y"]),+ duration=float(action_dict.get("duration", 0.0)),+ )+ elif action_type_lower == "scroll" or action_type == "ScrollAction":+ return ScrollAction(+ direction=action_dict.get("direction", "up"),+ amount=int(action_dict.get("amount", 100)),+ )+ elif action_type_lower == "type" or action_type == "TypeAction":+ return TypeAction(text=str(action_dict["text"]))+ elif action_type_lower == "key" or action_type == "KeyAction":+ return KeyAction(key=str(action_dict["key"]))+ elif action_type_lower == "hotkey" or action_type == "HotkeyAction":+ return HotkeyAction(keys=list(action_dict["keys"]))+ elif action_type_lower == "wait" or action_type == "WaitAction":+ return WaitAction(seconds=float(action_dict.get("seconds", 1.0)))+ elif action_type_lower == "done" or action_type == "DoneAction":+ return DoneAction()+ else:+ raise ValueError(f"Unknown action type: {action_type}")+++def serialize_action(action: Action) -> Dict[str, Any]:+ """Serialize an action to a dictionary."""+ result = asdict(action)+ result["type"] = type(action).__name__+ return result+++# --- Timeout Management ---+def _timeout_checker():+ """Background thread that releases inactive environments."""+ while True:+ time.sleep(30) # Check every 30 seconds+ current_time = time.time()++ with env_lock:+ for env_id in list(active_envs):+ if env_id in env_map:+ state = env_map[env_id]+ if current_time - state.last_accessed > state.timeout:+ # Release timed out environment+ _release_env(env_id)+++# Start timeout checker thread+_timeout_thread = threading.Thread(target=_timeout_checker, daemon=True)+_timeout_thread.start()+++# --- API Endpoints ---[email protected]("/reset", response_model=ResetResponse)+async def reset(request: ResetRequest):+ """Reset environment to a task.++ This endpoint:+ 1. Releases all active environments first+ 2. Gets an available environment slot from the pool+ 3. Creates/resets the environment to the specified task+ 4. Returns the initial screenshot and task instruction+ """+ # Release all active envs first (as per incus pattern)+ _release_env("all")++ # Get available env from pool+ env_id = _get_available_env(request.timeout)++ try:+ # Create environment+ env = make(request.env_path, split=request.split)++ # Reset to task+ screenshot, task_cfg = await env.reset(task_id=request.task_index)++ # Get instruction from task config+ instruction = ""+ if hasattr(task_cfg, "description"):+ instruction = task_cfg.description+ elif isinstance(task_cfg, dict) and "description" in task_cfg:+ instruction = task_cfg["description"]++ # Store environment state+ with env_lock:+ env_map[env_id] = EnvState(+ env=env,+ env_path=request.env_path,+ task_index=request.task_index,+ split=request.split,+ timeout=request.timeout,+ last_accessed=time.time(),+ instruction=instruction,+ )++ # Encode screenshot+ screenshot_b64 = base64.b64encode(screenshot).decode("utf-8")++ return ResetResponse(+ screenshot=screenshot_b64,+ instruction=instruction,+ env_id=env_id,+ )++ except Exception as e:+ # Release env on error+ _release_env(env_id)+ raise HTTPException(status_code=500, detail=str(e))++[email protected]("/step", response_model=StepResponse)+async def step(request: StepRequest):+ """Execute an action in the environment.++ Returns the resulting screenshot, reward (if done), and done flag.+ """+ state = _get_env(request.env_id)++ try:+ # Deserialize action+ action = deserialize_action(request.action)++ # Execute action+ screenshot = await state.env.step(action)++ # Check if done+ done = isinstance(action, DoneAction)+ reward = 0.0++ if done:+ # Run evaluation+ try:+ result = await state.env.evaluate()+ if isinstance(result, (int, float)):+ reward = float(result)+ elif isinstance(result, list) and len(result) > 0:+ reward = float(result[0])+ elif isinstance(result, dict) and "reward" in result:+ reward = float(result["reward"])+ except Exception:+ # Evaluation may not be implemented+ pass++ # Release environment+ _release_env(request.env_id)++ # Encode screenshot+ screenshot_b64 = base64.b64encode(screenshot).decode("utf-8")++ return StepResponse(+ screenshot=screenshot_b64,+ reward=reward,+ done=done,+ )++ except Exception as e:+ raise HTTPException(status_code=500, detail=str(e))++[email protected]("/screenshot", response_model=ScreenshotResponse)+async def get_screenshot(env_id: int):+ """Get the current screenshot from an environment."""+ state = _get_env(env_id)++ try:+ if state.env.session is None:+ raise HTTPException(status_code=500, detail="No active session")++ screenshot = await state.env.session.screenshot()+ screenshot_b64 = base64.b64encode(screenshot).decode("utf-8")++ return ScreenshotResponse(+ screenshot=screenshot_b64,+ env_id=env_id,+ )++ except Exception as e:+ raise HTTPException(status_code=500, detail=str(e))++[email protected]("/shutdown")+async def shutdown(request: ShutdownRequest):+ """Shut down environments.++ If env_id is specified, shuts down that specific environment.+ If env_id is None, shuts down all environments.+ """+ if request.env_id is not None:+ _release_env(request.env_id)+ return {"status": "ok", "message": f"Environment {request.env_id} shut down"}+ else:+ _release_env("all")+ return {"status": "ok", "message": "All environments shut down"}++[email protected]("/health", response_model=HealthResponse)+async def health():+ """Health check endpoint."""+ with env_lock:+ return HealthResponse(+ status="ok",+ available_envs=len(available_envs),+ active_envs=len(active_envs),+ max_envs=MAX_ENVS,+ )+++# --- CLI Entry Point ---+def main():+ """Run the worker server."""+ parser = argparse.ArgumentParser(description="CUA-Bench Worker Server")+ parser.add_argument("--host", default="0.0.0.0", help="Host to bind to")+ parser.add_argument("--port", type=int, default=8001, help="Port to bind to")+ parser.add_argument("--reload", action="store_true", help="Enable auto-reload")+ args = parser.parse_args()++ import uvicorn++ uvicorn.run(+ "cua_bench.workers.worker_server:app",+ host=args.host,+ port=args.port,+ reload=args.reload,+ )+++if __name__ == "__main__":+ main()diff --git a/libs/cua-bench/datasets/cua-bench-workflows/unity-tasks/main.py b/libs/cua-bench/datasets/cua-bench-workflows/unity-tasks/main.pyindex 28013f23b6..8b106e122a 100644--- a/libs/cua-bench/datasets/cua-bench-workflows/unity-tasks/main.py+++ b/libs/cua-bench/datasets/cua-bench-workflows/unity-tasks/main.py@@ -64,7 +64,8 @@ def load():computer={"provider": "native","setup_config": {- "os_type": "windows",+ # "os_type": "windows",+ "os_type": "linux","width": 1920,"height": 1080,},diff --git a/libs/cua-bench/pyproject.toml b/libs/cua-bench/pyproject.tomlindex 66dc9b0706..b630c74f3b 100644--- a/libs/cua-bench/pyproject.toml+++ b/libs/cua-bench/pyproject.toml@@ -103,6 +103,14 @@ dev = ["ruff>=0.1.0",]+# RL training+rl = [+ "torch>=2.0.0",+ "torchvision>=0.15.0",+ "transformers>=4.57.0,<5.0",+ "verl"+]+[project.urls]Homepage = "https://github.com/trycua/cua"Documentation = "https://docs.trycua.com"diff --git a/libs/cua-bench/uv.lock b/libs/cua-bench/uv.lockindex d79686c242..d9ae911bce 100644--- a/libs/cua-bench/uv.lock+++ b/libs/cua-bench/uv.lock@@ -1,15 +1,29 @@version = 1-revision = 3-requires-python = ">=3.12, <=3.13"+revision = 2+requires-python = ">=3.12, <3.14"resolution-markers = [- "python_full_version >= '3.13'",- "python_full_version < '3.13'",+ "python_full_version >= '3.13' and sys_platform == 'linux'",+ "python_full_version >= '3.13' and sys_platform != 'linux'",+ "python_full_version < '3.13' and sys_platform == 'linux'",+ "python_full_version < '3.13' and sys_platform != 'linux'",]-[manifest]-members = [- "cua-bench",- "uigen-env",+[[package]]+name = "accelerate"+version = "1.12.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "huggingface-hub" },+ { name = "numpy" },+ { name = "packaging" },+ { name = "psutil" },+ { name = "pyyaml" },+ { name = "safetensors" },+ { name = "torch" },+]+sdist = { url = "https://files.pythonhosted.org/packages/4a/8e/ac2a9566747a93f8be36ee08532eb0160558b07630a081a6056a9f89bf1d/accelerate-1.12.0.tar.gz", hash = "sha256:70988c352feb481887077d2ab845125024b2a137a5090d6d7a32b57d03a45df6", size = 398399, upload-time = "2025-11-21T11:27:46.973Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9f/d2/c581486aa6c4fbd7394c23c47b83fa1a919d34194e16944241daf9e762dd/accelerate-1.12.0-py3-none-any.whl", hash = "sha256:3e2091cd341423207e2f084a6654b1efcd250dc326f2a37d6dde446e07cabb11", size = 380935, upload-time = "2025-11-21T11:27:44.522Z" },][[package]]@@ -81,6 +95,18 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/c9/58/afab7f2b9e7df88c995995172eb78cae8a3d5a62d5681abaade86b3f0089/aiohttp-3.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:7897298b3eedc790257fef8a6ec582ca04e9dbe568ba4a9a890913b925b8ea21", size = 450138, upload-time = "2025-10-06T19:56:49.49Z" },]+[[package]]+name = "aiohttp-cors"+version = "0.8.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "aiohttp" },+]+sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/d89e846a5444b3d5eb8985a6ddb0daef3774928e1bfbce8e84ec97b0ffa7/aiohttp_cors-0.8.1.tar.gz", hash = "sha256:ccacf9cb84b64939ea15f859a146af1f662a6b1d68175754a07315e305fb1403", size = 38626, upload-time = "2025-03-31T14:16:20.048Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/98/3b/40a68de458904bcc143622015fff2352b6461cd92fd66d3527bf1c6f5716/aiohttp_cors-0.8.1-py3-none-any.whl", hash = "sha256:3180cf304c5c712d626b9162b195b1db7ddf976a2a25172b35bb2448b890a80d", size = 25231, upload-time = "2025-03-31T14:16:18.478Z" },+]+[[package]]name = "aiosignal"version = "1.4.0"@@ -143,6 +169,12 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/9b/38/75129688de5637eb5b383e5f2b1570a5cc3aecafa4de422da8eea4b90a6c/anthropic-0.69.0-py3-none-any.whl", hash = "sha256:1f73193040f33f11e27c2cd6ec25f24fe7c3f193dc1c5cde6b7a08b18a16bcc5", size = 337265, upload-time = "2025-09-29T16:53:43.686Z" },]+[[package]]+name = "antlr4-python3-runtime"+version = "4.9.3"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/3e/38/7859ff46355f76f8d19459005ca000b6e7012f2f1ca597746cbcd1fbfe5e/antlr4-python3-runtime-4.9.3.tar.gz", hash = "sha256:f224469b4168294902bb1efa80a8bf7855f24c99aef99cbefc1bcd3cce77881b", size = 117034, upload-time = "2021-11-06T17:52:23.524Z" }+[[package]]name = "anyio"version = "4.11.0"@@ -175,35 +207,6 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/3a/2a/7cc015f5b9f5db42b7d48157e23356022889fc354a2813c15934b7cb5c0e/attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373", size = 67615, upload-time = "2025-10-06T13:54:43.17Z" },]-[[package]]-name = "av"-version = "16.0.1"-source = { registry = "https://pypi.org/simple" }-sdist = { url = "https://files.pythonhosted.org/packages/15/c3/fd72a0315bc6c943ced1105aaac6e0ec1be57c70d8a616bd05acaa21ffee/av-16.0.1.tar.gz", hash = "sha256:dd2ce779fa0b5f5889a6d9e00fbbbc39f58e247e52d31044272648fe16ff1dbf", size = 3904030, upload-time = "2025-10-13T12:28:51.082Z" }-wheels = [- { url = "https://files.pythonhosted.org/packages/44/78/12a11d7a44fdd8b26a65e2efa1d8a5826733c8887a989a78306ec4785956/av-16.0.1-cp312-cp312-macosx_11_0_x86_64.whl", hash = "sha256:e41a8fef85dfb2c717349f9ff74f92f9560122a9f1a94b1c6c9a8a9c9462ba71", size = 27206375, upload-time = "2025-10-13T12:25:44.423Z" },- { url = "https://files.pythonhosted.org/packages/27/19/3a4d3882852a0ee136121979ce46f6d2867b974eb217a2c9a070939f55ad/av-16.0.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:6352a64b25c9f985d4f279c2902db9a92424e6f2c972161e67119616f0796cb9", size = 21752603, upload-time = "2025-10-13T12:25:49.122Z" },- { url = "https://files.pythonhosted.org/packages/cb/6e/f7abefba6e008e2f69bebb9a17ba38ce1df240c79b36a5b5fcacf8c8fcfd/av-16.0.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:5201f7b4b5ed2128118cb90c2a6d64feedb0586ca7c783176896c78ffb4bbd5c", size = 38931978, upload-time = "2025-10-13T12:25:55.021Z" },- { url = "https://files.pythonhosted.org/packages/b2/7a/1305243ab47f724fdd99ddef7309a594e669af7f0e655e11bdd2c325dfae/av-16.0.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:daecc2072b82b6a942acbdaa9a2e00c05234c61fef976b22713983c020b07992", size = 40549383, upload-time = "2025-10-13T12:26:00.897Z" },- { url = "https://files.pythonhosted.org/packages/32/b2/357cc063185043eb757b4a48782bff780826103bcad1eb40c3ddfc050b7e/av-16.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6573da96e8bebc3536860a7def108d7dbe1875c86517072431ced702447e6aea", size = 40241993, upload-time = "2025-10-13T12:26:06.993Z" },- { url = "https://files.pythonhosted.org/packages/20/bb/ced42a4588ba168bf0ef1e9d016982e3ba09fde6992f1dda586fd20dcf71/av-16.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4bc064e48a8de6c087b97dd27cf4ef8c13073f0793108fbce3ecd721201b2502", size = 41532235, upload-time = "2025-10-13T12:26:12.488Z" },- { url = "https://files.pythonhosted.org/packages/15/37/c7811eca0f318d5fd3212f7e8c3d8335f75a54907c97a89213dc580b8056/av-16.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0c669b6b6668c8ae74451c15ec6d6d8a36e4c3803dc5d9910f607a174dd18f17", size = 32296912, upload-time = "2025-10-13T12:26:19.187Z" },- { url = "https://files.pythonhosted.org/packages/86/59/972f199ccc4f8c9e51f59e0f8962a09407396b3f6d11355e2c697ba555f9/av-16.0.1-cp313-cp313-macosx_11_0_x86_64.whl", hash = "sha256:4c61c6c120f5c5d95c711caf54e2c4a9fb2f1e613ac0a9c273d895f6b2602e44", size = 27170433, upload-time = "2025-10-13T12:26:24.673Z" },- { url = "https://files.pythonhosted.org/packages/53/9d/0514cbc185fb20353ab25da54197fbd169a233e39efcbb26533c36a9dbb9/av-16.0.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:7ecc2e41320c69095f44aff93470a0d32c30892b2dbad0a08040441c81efa379", size = 21717654, upload-time = "2025-10-13T12:26:29.12Z" },- { url = "https://files.pythonhosted.org/packages/32/8c/881409dd124b4e07d909d2b70568acb21126fc747656390840a2238651c9/av-16.0.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:036f0554d6faef3f4a94acaeb0cedd388e3ab96eb0eb5a14ec27c17369c466c9", size = 38651601, upload-time = "2025-10-13T12:26:33.919Z" },- { url = "https://files.pythonhosted.org/packages/35/fd/867ba4cc3ab504442dc89b0c117e6a994fc62782eb634c8f31304586f93e/av-16.0.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:876415470a62e4a3550cc38db2fc0094c25e64eea34d7293b7454125d5958190", size = 40278604, upload-time = "2025-10-13T12:26:39.2Z" },- { url = "https://files.pythonhosted.org/packages/b3/87/63cde866c0af09a1fa9727b4f40b34d71b0535785f5665c27894306f1fbc/av-16.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:56902a06bd0828d13f13352874c370670882048267191ff5829534b611ba3956", size = 39984854, upload-time = "2025-10-13T12:26:44.581Z" },- { url = "https://files.pythonhosted.org/packages/71/3b/8f40a708bff0e6b0f957836e2ef1f4d4429041cf8d99a415a77ead8ac8a3/av-16.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fe988c2bf0fc2d952858f791f18377ea4ae4e19ba3504793799cd6c2a2562edf", size = 41270352, upload-time = "2025-10-13T12:26:50.817Z" },- { url = "https://files.pythonhosted.org/packages/1e/b5/c114292cb58a7269405ae13b7ba48c7d7bfeebbb2e4e66c8073c065a4430/av-16.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:708a66c248848029bf518f0482b81c5803846f1b597ef8013b19c014470b620f", size = 32273242, upload-time = "2025-10-13T12:26:55.788Z" },- { url = "https://files.pythonhosted.org/packages/ff/e9/a5b714bc078fdcca8b46c8a0b38484ae5c24cd81d9c1703d3e8ae2b57259/av-16.0.1-cp313-cp313t-macosx_11_0_x86_64.whl", hash = "sha256:79a77ee452537030c21a0b41139bedaf16629636bf764b634e93b99c9d5f4558", size = 27248984, upload-time = "2025-10-13T12:27:00.564Z" },- { url = "https://files.pythonhosted.org/packages/06/ef/ff777aaf1f88e3f6ce94aca4c5806a0c360e68d48f9d9f0214e42650f740/av-16.0.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:080823a6ff712f81e7089ae9756fb1512ca1742a138556a852ce50f58e457213", size = 21828098, upload-time = "2025-10-13T12:27:05.433Z" },- { url = "https://files.pythonhosted.org/packages/34/d7/a484358d24a42bedde97f61f5d6ee568a7dd866d9df6e33731378db92d9e/av-16.0.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:04e00124afa8b46a850ed48951ddda61de874407fb8307d6a875bba659d5727e", size = 40051697, upload-time = "2025-10-13T12:27:10.525Z" },- { url = "https://files.pythonhosted.org/packages/73/87/6772d6080837da5d5c810a98a95bde6977e1f5a6e2e759e8c9292af9ec69/av-16.0.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:bc098c1c6dc4e7080629a7e9560e67bd4b5654951e17e5ddfd2b1515cfcd37db", size = 41352596, upload-time = "2025-10-13T12:27:16.217Z" },- { url = "https://files.pythonhosted.org/packages/bd/58/fe448c60cf7f85640a0ed8936f16bac874846aa35e1baa521028949c1ea3/av-16.0.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e6ffd3559a72c46a76aa622630751a821499ba5a780b0047ecc75105d43a6b61", size = 41183156, upload-time = "2025-10-13T12:27:21.574Z" },- { url = "https://files.pythonhosted.org/packages/85/c6/a039a0979d0c278e1bed6758d5a6186416c3ccb8081970df893fdf9a0d99/av-16.0.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:7a3f1a36b550adadd7513f4f5ee956f9e06b01a88e59f3150ef5fec6879d6f79", size = 42302331, upload-time = "2025-10-13T12:27:26.953Z" },- { url = "https://files.pythonhosted.org/packages/18/7b/2ca4a9e3609ff155436dac384e360f530919cb1e328491f7df294be0f0dc/av-16.0.1-cp313-cp313t-win_amd64.whl", hash = "sha256:c6de794abe52b8c0be55d8bb09ade05905efa74b1a5ab4860b4b9c2bfb6578bf", size = 32462194, upload-time = "2025-10-13T12:27:32.942Z" },-]-[[package]]name = "backoff"version = "2.2.1"@@ -331,6 +334,24 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/db/d3/9dcc0f5797f070ec8edf30fbadfb200e71d9db6b84d211e3b2085a7589a0/click-8.3.0-py3-none-any.whl", hash = "sha256:9b9f285302c6e3064f4330c05f05b81945b2a39544279343e6e7c5f27a9baddc", size = 107295, upload-time = "2025-09-18T17:32:22.42Z" },]+[[package]]+name = "cloudpickle"+version = "3.1.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/27/fb/576f067976d320f5f0114a8d9fa1215425441bb35627b1993e5afd8111e5/cloudpickle-3.1.2.tar.gz", hash = "sha256:7fda9eb655c9c230dab534f1983763de5835249750e85fbcef43aaa30a9a2414", size = 22330, upload-time = "2025-11-03T09:25:26.604Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/88/39/799be3f2f0f38cc727ee3b4f1445fe6d5e4133064ec2e4115069418a5bb6/cloudpickle-3.1.2-py3-none-any.whl", hash = "sha256:9acb47f6afd73f60dc1df93bb801b472f05ff42fa6c84167d25cb206be1fbf4a", size = 22228, upload-time = "2025-11-03T09:25:25.534Z" },+]++[[package]]+name = "codetiming"+version = "1.4.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/ad/4e/c40bf151af20ba2748bd6ea24e484d7b6196b1056ba3a1a4ee33b6939c37/codetiming-1.4.0.tar.gz", hash = "sha256:4937bf913a2814258b87eaaa43d9a1bb24711ffd3557a9ab6934fa1fe3ba0dbc", size = 14899, upload-time = "2022-11-08T07:12:29.361Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/bc/91/e4a2b7c64e738beefddfa24b409d6eecb16c378bde01578918b6ea722a09/codetiming-1.4.0-py3-none-any.whl", hash = "sha256:3b80f409bef00941a9755c5524071ce2f72eaa4520f4bc35b33869cde024ccbd", size = 7165, upload-time = "2022-11-08T07:12:23.553Z" },+]+[[package]]name = "colorama"version = "0.4.6"@@ -340,6 +361,18 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },]+[[package]]+name = "colorful"+version = "0.5.8"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "colorama", marker = "sys_platform == 'win32'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/82/31/109ef4bedeb32b4202e02ddb133162457adc4eb890a9ed9c05c9dd126ed0/colorful-0.5.8.tar.gz", hash = "sha256:bb16502b198be2f1c42ba3c52c703d5f651d826076817185f0294c1a549a7445", size = 209361, upload-time = "2025-10-29T11:53:21.663Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/c3/11/25cdf9d5fc21efd30134fc74c43702c6f7ef09ebae8ed927f1283403ad8d/colorful-0.5.8-py2.py3-none-any.whl", hash = "sha256:a9381fdda3337fbaba5771991020abc69676afa102646650b759927892875992", size = 201334, upload-time = "2025-10-29T11:53:20.251Z" },+]+[[package]]name = "contourpy"version = "1.3.3"@@ -457,94 +490,122 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/61/2d/6a9aeac58a625ea3d326acf23690e75ba49f4cde6c1457927efc3b94f789/cua_agent-0.6.2-py3-none-any.whl", hash = "sha256:40b0a9b03689f37d925176b4423aaaabc0d23d8273dbb21d0054b73c01cfb966", size = 202054, upload-time = "2025-12-18T22:22:04.92Z" },]-[package.optional-dependencies]-gemini = [- { name = "google-genai" },-]-qwen = [- { name = "pillow" },- { name = "qwen-agent" },- { name = "qwen-vl-utils" },-]-[[package]]name = "cua-bench"-version = "0.1.0"+version = "0.2.3"source = { editable = "." }dependencies = [{ name = "aiofiles" },{ name = "aiohttp" },- { name = "aiosqlite" },- { name = "anthropic" },{ name = "beautifulsoup4" },- { name = "cua-agent", extra = ["gemini", "qwen"] },{ name = "cua-computer" },+ { name = "cua-core" },{ name = "datasets" },{ name = "docker" },- { name = "dotenv" },- { name = "fastapi" },- { name = "gcloud-aio-storage" },- { name = "google-cloud-batch" },- { name = "google-cloud-logging" },- { name = "google-cloud-storage" },- { name = "grpcio" },{ name = "html5lib" },- { name = "icoextract", marker = "sys_platform == 'win32'" },{ name = "jinja2" },{ name = "matplotlib" },{ name = "numpy" },{ name = "pillow" },- { name = "playwright" },- { name = "pypiwin32", marker = "sys_platform == 'win32'" },+ { name = "psutil" },{ name = "pyquery" },- { name = "python-multipart" },+ { name = "python-dotenv" },{ name = "rich" },{ name = "tqdm" },- { name = "uvicorn" },{ name = "websockets" },]-[package.dev-dependencies]+[package.optional-dependencies]+agents = [+ { name = "anthropic" },+ { name = "cua-agent" },+]+all = [+ { name = "anthropic" },+ { name = "cua-agent" },+ { name = "gcloud-aio-storage" },+ { name = "google-cloud-batch" },+ { name = "google-cloud-logging" },+ { name = "google-cloud-storage" },+ { name = "grpcio" },+ { name = "playwright" },+]+browser = [+ { name = "playwright" },+]+cloud = [+ { name = "gcloud-aio-storage" },+ { name = "google-cloud-batch" },+ { name = "google-cloud-logging" },+ { name = "google-cloud-storage" },+ { name = "grpcio" },+]dev = [{ name = "pytest" },+ { name = "pytest-asyncio" },+ { name = "ruff" },+]+rl = [+ { name = "torch" },+ { name = "torchvision" },+ { name = "transformers" },+ { name = "verl" },+]+server = [+ { name = "aiosqlite" },+ { name = "fastapi" },+ { name = "python-multipart" },+ { name = "uvicorn" },+]+windows = [+ { name = "icoextract" },+ { name = "pypiwin32" },][package.metadata]requires-dist = [{ name = "aiofiles", specifier = ">=23.0.0" },{ name = "aiohttp", specifier = ">=3.9.0" },- { name = "aiosqlite", specifier = ">=0.19.0" },- { name = "anthropic", specifier = ">=0.26.0" },+ { name = "aiosqlite", marker = "extra == 'server'", specifier = ">=0.19.0" },+ { name = "anthropic", marker = "extra == 'agents'", specifier = ">=0.26.0" },{ name = "beautifulsoup4", specifier = ">=4.14.2" },- { name = "cua-agent", extras = ["gemini", "qwen"], specifier = ">=0.6.2" },+ { name = "cua-agent", marker = "extra == 'agents'", specifier = ">=0.6.2" },+ { name = "cua-bench", extras = ["browser", "agents", "cloud"], marker = "extra == 'all'" },{ name = "cua-computer", specifier = ">=0.4.19" },- { name = "datasets", specifier = ">=4.1.1" },+ { name = "cua-core" },+ { name = "datasets", specifier = ">=3.0.0" },{ name = "docker", specifier = ">=7.0.0" },- { name = "dotenv", specifier = ">=0.9.9" },- { name = "fastapi", specifier = ">=0.121.0" },- { name = "gcloud-aio-storage", specifier = ">=9.0.0" },- { name = "google-cloud-batch", specifier = ">=0.17.0" },- { name = "google-cloud-logging", specifier = ">=3.5.0" },- { name = "google-cloud-storage", specifier = ">=2.10.0" },- { name = "grpcio", specifier = "==1.60.1" },+ { name = "fastapi", marker = "extra == 'server'", specifier = ">=0.100.0" },+ { name = "gcloud-aio-storage", marker = "extra == 'cloud'", specifier = ">=9.0.0" },+ { name = "google-cloud-batch", marker = "extra == 'cloud'", specifier = ">=0.17.0" },+ { name = "google-cloud-logging", marker = "extra == 'cloud'", specifier = ">=3.5.0" },+ { name = "google-cloud-storage", marker = "extra == 'cloud'", specifier = ">=2.10.0" },+ { name = "grpcio", marker = "extra == 'cloud'", specifier = ">=1.60.0" },{ name = "html5lib", specifier = ">=1.1" },- { name = "icoextract", marker = "sys_platform == 'win32'", specifier = ">=0.2.0" },+ { name = "icoextract", marker = "extra == 'windows'", specifier = ">=0.2.0" },{ name = "jinja2", specifier = ">=3.1.0" },- { name = "matplotlib", specifier = ">=3.10.7" },- { name = "numpy", specifier = ">=2.3.3" },- { name = "pillow", specifier = ">=11.3.0" },- { name = "playwright", specifier = ">=1.40.0" },- { name = "pypiwin32", marker = "sys_platform == 'win32'", specifier = ">=223" },+ { name = "matplotlib", specifier = ">=3.8.0" },+ { name = "numpy", specifier = ">=2.0.0" },+ { name = "pillow", specifier = ">=11.0.0" },+ { name = "playwright", marker = "extra == 'browser'", specifier = ">=1.40.0" },+ { name = "psutil", specifier = ">=5.9.0" },+ { name = "pypiwin32", marker = "extra == 'windows'", specifier = ">=223" },{ name = "pyquery", specifier = ">=2.0.1" },- { name = "python-multipart", specifier = ">=0.0.6" },+ { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0.0" },+ { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.23.0" },+ { name = "python-dotenv", specifier = ">=1.0.0" },+ { name = "python-multipart", marker = "extra == 'server'", specifier = ">=0.0.6" },{ name = "rich", specifier = ">=14.2.0" },+ { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.1.0" },+ { name = "torch", marker = "extra == 'rl'", specifier = ">=2.0.0" },+ { name = "torchvision", marker = "extra == 'rl'", specifier = ">=0.15.0" },{ name = "tqdm", specifier = ">=4.66.0" },- { name = "uvicorn", specifier = ">=0.38.0" },+ { name = "transformers", marker = "extra == 'rl'", specifier = ">=4.57.0,<5.0" },+ { name = "uvicorn", marker = "extra == 'server'", specifier = ">=0.30.0" },+ { name = "verl", marker = "extra == 'rl'" },{ name = "websockets", specifier = ">=12.0" },]--[package.metadata.requires-dev]-dev = [{ name = "pytest", specifier = ">=8.4.2" }]+provides-extras = ["all", "browser", "agents", "cloud", "server", "windows", "dev", "rl"][[package]]name = "cua-computer"@@ -579,27 +640,33 @@ wheels = [][[package]]-name = "cycler"-version = "0.12.1"+name = "cuda-bindings"+version = "12.9.4"source = { registry = "https://pypi.org/simple" }-sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c", size = 7615, upload-time = "2023-10-07T05:32:18.335Z" }+dependencies = [+ { name = "cuda-pathfinder" },+]wheels = [- { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321, upload-time = "2023-10-07T05:32:16.783Z" },+ { url = "https://files.pythonhosted.org/packages/a9/c1/dabe88f52c3e3760d861401bb994df08f672ec893b8f7592dc91626adcf3/cuda_bindings-12.9.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fda147a344e8eaeca0c6ff113d2851ffca8f7dfc0a6c932374ee5c47caa649c8", size = 12151019, upload-time = "2025-10-21T14:51:43.167Z" },+ { url = "https://files.pythonhosted.org/packages/63/56/e465c31dc9111be3441a9ba7df1941fe98f4aa6e71e8788a3fb4534ce24d/cuda_bindings-12.9.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:32bdc5a76906be4c61eb98f546a6786c5773a881f3b166486449b5d141e4a39f", size = 11906628, upload-time = "2025-10-21T14:51:49.905Z" },+ { url = "https://files.pythonhosted.org/packages/a3/84/1e6be415e37478070aeeee5884c2022713c1ecc735e6d82d744de0252eee/cuda_bindings-12.9.4-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:56e0043c457a99ac473ddc926fe0dc4046694d99caef633e92601ab52cbe17eb", size = 11925991, upload-time = "2025-10-21T14:51:56.535Z" },][[package]]-name = "dashscope"-version = "1.25.5"+name = "cuda-pathfinder"+version = "1.3.3"source = { registry = "https://pypi.org/simple" }-dependencies = [- { name = "aiohttp" },- { name = "certifi" },- { name = "cryptography" },- { name = "requests" },- { name = "websocket-client" },+wheels = [+ { url = "https://files.pythonhosted.org/packages/0b/02/4dbe7568a42e46582248942f54dc64ad094769532adbe21e525e4edf7bc4/cuda_pathfinder-1.3.3-py3-none-any.whl", hash = "sha256:9984b664e404f7c134954a771be8775dfd6180ea1e1aef4a5a37d4be05d9bbb1", size = 27154, upload-time = "2025-12-04T22:35:08.996Z" },]++[[package]]+name = "cycler"+version = "0.12.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c", size = 7615, upload-time = "2023-10-07T05:32:18.335Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/c5/91/60f5353c8752d8ce489f4baeb252999d4cfb1a784c0beda34b5287135d65/dashscope-1.25.5-py3-none-any.whl", hash = "sha256:1be9eebaf1e7327317a22db9233770f4252463b926c84071ffd8805ae06cf998", size = 1323186, upload-time = "2025-12-18T02:15:26.462Z" },+ { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321, upload-time = "2023-10-07T05:32:16.783Z" },][[package]]@@ -635,6 +702,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/50/3d/9373ad9c56321fdab5b41197068e1d8c25883b3fea29dd361f9b55116869/dill-0.4.0-py3-none-any.whl", hash = "sha256:44f54bf6412c2c8464c14e8243eb163690a9800dbe2c367330883b19c7561049", size = 119668, upload-time = "2025-04-16T00:41:47.671Z" },]+[[package]]+name = "distlib"+version = "0.4.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz", hash = "sha256:feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d", size = 614605, upload-time = "2025-07-17T16:52:00.465Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/33/6b/e0547afaf41bf2c42e52430072fa5658766e3d65bd4b03a563d1b6336f57/distlib-0.4.0-py2.py3-none-any.whl", hash = "sha256:9659f7d87e46584a30b5780e43ac7a2143098441670ff0a49d5f9034c54a6c16", size = 469047, upload-time = "2025-07-17T16:51:58.613Z" },+]+[[package]]name = "distro"version = "1.9.0"@@ -667,26 +743,6 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/55/e2/2537ebcff11c1ee1ff17d8d0b6f4db75873e3b0fb32c2d4a2ee31ecb310a/docstring_parser-0.17.0-py3-none-any.whl", hash = "sha256:cf2569abd23dce8099b300f9b4fa8191e9582dda731fd533daf54c4551658708", size = 36896, upload-time = "2025-07-21T07:35:00.684Z" },]-[[package]]-name = "dotenv"-version = "0.9.9"-source = { registry = "https://pypi.org/simple" }-dependencies = [- { name = "python-dotenv" },-]-wheels = [- { url = "https://files.pythonhosted.org/packages/b2/b7/545d2c10c1fc15e48653c91efde329a790f2eecfbbf2bd16003b5db2bab0/dotenv-0.9.9-py2.py3-none-any.whl", hash = "sha256:29cf74a087b31dafdb5a446b6d7e11cbce8ed2741540e2339c69fbef92c94ce9", size = 1892, upload-time = "2025-02-19T22:15:01.647Z" },-]--[[package]]-name = "eval-type-backport"-version = "0.3.1"-source = { registry = "https://pypi.org/simple" }-sdist = { url = "https://files.pythonhosted.org/packages/fb/a3/cafafb4558fd638aadfe4121dc6cefb8d743368c085acb2f521df0f3d9d7/eval_type_backport-0.3.1.tar.gz", hash = "sha256:57e993f7b5b69d271e37482e62f74e76a0276c82490cf8e4f0dffeb6b332d5ed", size = 9445, upload-time = "2025-12-02T11:51:42.987Z" }-wheels = [- { url = "https://files.pythonhosted.org/packages/cf/22/fdc2e30d43ff853720042fa15baa3e6122722be1a7950a98233ebb55cd71/eval_type_backport-0.3.1-py3-none-any.whl", hash = "sha256:279ab641905e9f11129f56a8a78f493518515b83402b860f6f06dd7c011fdfa8", size = 6063, upload-time = "2025-12-02T11:51:41.665Z" },-]-[[package]]name = "fastapi"version = "0.121.0"@@ -868,6 +924,30 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/40/47/bcc9b3fddb9eb4c45633f8faaf5f49fe814b9c970cf1c6d32645647efab8/gcloud_aio_storage-9.6.0-py3-none-any.whl", hash = "sha256:259d2f0a9da4ed8ac3b23b59c2effb7f89b2c2504d4ef6e30102d08e1cba02aa", size = 17371, upload-time = "2025-08-29T16:16:22.049Z" },]+[[package]]+name = "gitdb"+version = "4.0.12"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "smmap" },+]+sdist = { url = "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz", hash = "sha256:5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571", size = 394684, upload-time = "2025-01-02T07:20:46.413Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/a0/61/5c78b91c3143ed5c14207f463aecfc8f9dbb5092fb2869baf37c273b2705/gitdb-4.0.12-py3-none-any.whl", hash = "sha256:67073e15955400952c6565cc3e707c554a4eea2e428946f7a4c162fab9bd9bcf", size = 62794, upload-time = "2025-01-02T07:20:43.624Z" },+]++[[package]]+name = "gitpython"+version = "3.1.46"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "gitdb" },+]+sdist = { url = "https://files.pythonhosted.org/packages/df/b5/59d16470a1f0dfe8c793f9ef56fd3826093fc52b3bd96d6b9d6c26c7e27b/gitpython-3.1.46.tar.gz", hash = "sha256:400124c7d0ef4ea03f7310ac2fbf7151e09ff97f2a3288d64a440c584a29c37f", size = 215371, upload-time = "2026-01-01T15:37:32.073Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/6a/09/e21df6aef1e1ffc0c816f0522ddc3f6dcded766c3261813131c78a704470/gitpython-3.1.46-py3-none-any.whl", hash = "sha256:79812ed143d9d25b6d176a10bb511de0f9c67b1fa641d82097b0ab90398a2058", size = 208620, upload-time = "2026-01-01T15:37:30.574Z" },+]+[[package]]name = "google-api-core"version = "2.25.2"@@ -904,11 +984,6 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/c6/97/451d55e05487a5cd6279a01a7e34921858b16f7dc8aa38a2c684743cd2b3/google_auth-2.45.0-py2.py3-none-any.whl", hash = "sha256:82344e86dc00410ef5382d99be677c6043d72e502b625aa4f4afa0bdacca0f36", size = 233312, upload-time = "2025-12-15T22:58:40.777Z" },]-[package.optional-dependencies]-requests = [- { name = "requests" },-]-[[package]]name = "google-cloud-appengine-logging"version = "1.6.2"@@ -1022,27 +1097,6 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/61/cb/c585282a03a0cea70fcaa1bf55d5d702d0f2351094d663ec3be1c6c67c52/google_crc32c-1.7.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e10554d4abc5238823112c2ad7e4560f96c7bf3820b202660373d769d9e6e4c9", size = 32870, upload-time = "2025-03-26T14:41:37.08Z" },]-[[package]]-name = "google-genai"-version = "1.56.0"-source = { registry = "https://pypi.org/simple" }-dependencies = [- { name = "anyio" },- { name = "distro" },- { name = "google-auth", extra = ["requests"] },- { name = "httpx" },- { name = "pydantic" },- { name = "requests" },- { name = "sniffio" },- { name = "tenacity" },- { name = "typing-extensions" },- { name = "websockets" },-]-sdist = { url = "https://files.pythonhosted.org/packages/70/ad/d3ac5a102135bd3f1e4b1475ca65d2bd4bcc22eb2e9348ac40fe3fadb1d6/google_genai-1.56.0.tar.gz", hash = "sha256:0491af33c375f099777ae207d9621f044e27091fafad4c50e617eba32165e82f", size = 340451, upload-time = "2025-12-17T12:35:05.412Z" }-wheels = [- { url = "https://files.pythonhosted.org/packages/84/93/94bc7a89ef4e7ed3666add55cd859d1483a22737251df659bf1aa46e9405/google_genai-1.56.0-py3-none-any.whl", hash = "sha256:9e6b11e0c105ead229368cb5849a480e4d0185519f8d9f538d61ecfcf193b052", size = 426563, upload-time = "2025-12-17T12:35:03.717Z" },-]-[[package]]name = "google-resumable-media"version = "2.7.2"@@ -1231,6 +1285,20 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/31/a0/651f93d154cb72323358bf2bbae3e642bdb5d2f1bfc874d096f7cb159fa0/huggingface_hub-0.35.3-py3-none-any.whl", hash = "sha256:0e3a01829c19d86d03793e4577816fe3bdfc1602ac62c7fb220d593d351224ba", size = 564262, upload-time = "2025-09-29T14:29:55.813Z" },]+[[package]]+name = "hydra-core"+version = "1.3.2"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "antlr4-python3-runtime" },+ { name = "omegaconf" },+ { name = "packaging" },+]+sdist = { url = "https://files.pythonhosted.org/packages/6d/8e/07e42bc434a847154083b315779b0a81d567154504624e181caf2c71cd98/hydra-core-1.3.2.tar.gz", hash = "sha256:8a878ed67216997c3e9d88a8e72e7b4767e81af37afb4ea3334b269a4390a824", size = 3263494, upload-time = "2023-02-23T18:33:43.03Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/c6/50/e0edd38dcd63fb26a8547f13d28f7a008bc4a3fd4eb4ff030673f22ad41a/hydra_core-1.3.2-py3-none-any.whl", hash = "sha256:fa0238a9e31df3373b35b0bfb672c34cc92718d21f81311d8996a16de1141d8b", size = 154547, upload-time = "2023-02-23T18:33:40.801Z" },+]+[[package]]name = "icoextract"version = "0.2.0"@@ -1317,27 +1385,6 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/a6/87/fc632776344e7aabbab05a95a0075476f418c5d29ab0f2eec672b7a1f0ac/jiter-0.11.0-cp313-cp313t-win_amd64.whl", hash = "sha256:a4d71d7ea6ea8786291423fe209acf6f8d398a0759d03e7f24094acb8ab686ba", size = 204225, upload-time = "2025-09-15T09:20:03.102Z" },]-[[package]]-name = "json5"-version = "0.12.1"-source = { registry = "https://pypi.org/simple" }-sdist = { url = "https://files.pythonhosted.org/packages/12/ae/929aee9619e9eba9015207a9d2c1c54db18311da7eb4dcf6d41ad6f0eb67/json5-0.12.1.tar.gz", hash = "sha256:b2743e77b3242f8d03c143dd975a6ec7c52e2f2afe76ed934e53503dd4ad4990", size = 52191, upload-time = "2025-08-12T19:47:42.583Z" }-wheels = [- { url = "https://files.pythonhosted.org/packages/85/e2/05328bd2621be49a6fed9e3030b1e51a2d04537d3f816d211b9cc53c5262/json5-0.12.1-py3-none-any.whl", hash = "sha256:d9c9b3bc34a5f54d43c35e11ef7cb87d8bdd098c6ace87117a7b7e83e705c1d5", size = 36119, upload-time = "2025-08-12T19:47:41.131Z" },-]--[[package]]-name = "jsonlines"-version = "4.0.0"-source = { registry = "https://pypi.org/simple" }-dependencies = [- { name = "attrs" },-]-sdist = { url = "https://files.pythonhosted.org/packages/35/87/bcda8e46c88d0e34cad2f09ee2d0c7f5957bccdb9791b0b934ec84d84be4/jsonlines-4.0.0.tar.gz", hash = "sha256:0c6d2c09117550c089995247f605ae4cf77dd1533041d366351f6f298822ea74", size = 11359, upload-time = "2023-09-01T12:34:44.187Z" }-wheels = [- { url = "https://files.pythonhosted.org/packages/f8/62/d9ba6323b9202dd2fe166beab8a86d29465c41a0288cbe229fac60c1ab8d/jsonlines-4.0.0-py3-none-any.whl", hash = "sha256:185b334ff2ca5a91362993f42e83588a360cf95ce4b71a73548502bda52a7c55", size = 8701, upload-time = "2023-09-01T12:34:42.563Z" },-]-[[package]]name = "jsonschema"version = "4.25.1"@@ -1580,6 +1627,41 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" },]+[[package]]+name = "mpmath"+version = "1.3.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f", size = 508106, upload-time = "2023-03-07T16:47:11.061Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c", size = 536198, upload-time = "2023-03-07T16:47:09.197Z" },+]++[[package]]+name = "msgpack"+version = "1.1.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz", hash = "sha256:3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e", size = 173581, upload-time = "2025-10-08T09:15:56.596Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ad/bd/8b0d01c756203fbab65d265859749860682ccd2a59594609aeec3a144efa/msgpack-1.1.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:70a0dff9d1f8da25179ffcf880e10cf1aad55fdb63cd59c9a49a1b82290062aa", size = 81939, upload-time = "2025-10-08T09:15:01.472Z" },+ { url = "https://files.pythonhosted.org/packages/34/68/ba4f155f793a74c1483d4bdef136e1023f7bcba557f0db4ef3db3c665cf1/msgpack-1.1.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:446abdd8b94b55c800ac34b102dffd2f6aa0ce643c55dfc017ad89347db3dbdb", size = 85064, upload-time = "2025-10-08T09:15:03.764Z" },+ { url = "https://files.pythonhosted.org/packages/f2/60/a064b0345fc36c4c3d2c743c82d9100c40388d77f0b48b2f04d6041dbec1/msgpack-1.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c63eea553c69ab05b6747901b97d620bb2a690633c77f23feb0c6a947a8a7b8f", size = 417131, upload-time = "2025-10-08T09:15:05.136Z" },+ { url = "https://files.pythonhosted.org/packages/65/92/a5100f7185a800a5d29f8d14041f61475b9de465ffcc0f3b9fba606e4505/msgpack-1.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:372839311ccf6bdaf39b00b61288e0557916c3729529b301c52c2d88842add42", size = 427556, upload-time = "2025-10-08T09:15:06.837Z" },+ { url = "https://files.pythonhosted.org/packages/f5/87/ffe21d1bf7d9991354ad93949286f643b2bb6ddbeab66373922b44c3b8cc/msgpack-1.1.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2929af52106ca73fcb28576218476ffbb531a036c2adbcf54a3664de124303e9", size = 404920, upload-time = "2025-10-08T09:15:08.179Z" },+ { url = "https://files.pythonhosted.org/packages/ff/41/8543ed2b8604f7c0d89ce066f42007faac1eaa7d79a81555f206a5cdb889/msgpack-1.1.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:be52a8fc79e45b0364210eef5234a7cf8d330836d0a64dfbb878efa903d84620", size = 415013, upload-time = "2025-10-08T09:15:09.83Z" },+ { url = "https://files.pythonhosted.org/packages/41/0d/2ddfaa8b7e1cee6c490d46cb0a39742b19e2481600a7a0e96537e9c22f43/msgpack-1.1.2-cp312-cp312-win32.whl", hash = "sha256:1fff3d825d7859ac888b0fbda39a42d59193543920eda9d9bea44d958a878029", size = 65096, upload-time = "2025-10-08T09:15:11.11Z" },+ { url = "https://files.pythonhosted.org/packages/8c/ec/d431eb7941fb55a31dd6ca3404d41fbb52d99172df2e7707754488390910/msgpack-1.1.2-cp312-cp312-win_amd64.whl", hash = "sha256:1de460f0403172cff81169a30b9a92b260cb809c4cb7e2fc79ae8d0510c78b6b", size = 72708, upload-time = "2025-10-08T09:15:12.554Z" },+ { url = "https://files.pythonhosted.org/packages/c5/31/5b1a1f70eb0e87d1678e9624908f86317787b536060641d6798e3cf70ace/msgpack-1.1.2-cp312-cp312-win_arm64.whl", hash = "sha256:be5980f3ee0e6bd44f3a9e9dea01054f175b50c3e6cdb692bc9424c0bbb8bf69", size = 64119, upload-time = "2025-10-08T09:15:13.589Z" },+ { url = "https://files.pythonhosted.org/packages/6b/31/b46518ecc604d7edf3a4f94cb3bf021fc62aa301f0cb849936968164ef23/msgpack-1.1.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4efd7b5979ccb539c221a4c4e16aac1a533efc97f3b759bb5a5ac9f6d10383bf", size = 81212, upload-time = "2025-10-08T09:15:14.552Z" },+ { url = "https://files.pythonhosted.org/packages/92/dc/c385f38f2c2433333345a82926c6bfa5ecfff3ef787201614317b58dd8be/msgpack-1.1.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:42eefe2c3e2af97ed470eec850facbe1b5ad1d6eacdbadc42ec98e7dcf68b4b7", size = 84315, upload-time = "2025-10-08T09:15:15.543Z" },+ { url = "https://files.pythonhosted.org/packages/d3/68/93180dce57f684a61a88a45ed13047558ded2be46f03acb8dec6d7c513af/msgpack-1.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1fdf7d83102bf09e7ce3357de96c59b627395352a4024f6e2458501f158bf999", size = 412721, upload-time = "2025-10-08T09:15:16.567Z" },+ { url = "https://files.pythonhosted.org/packages/5d/ba/459f18c16f2b3fc1a1ca871f72f07d70c07bf768ad0a507a698b8052ac58/msgpack-1.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fac4be746328f90caa3cd4bc67e6fe36ca2bf61d5c6eb6d895b6527e3f05071e", size = 424657, upload-time = "2025-10-08T09:15:17.825Z" },+ { url = "https://files.pythonhosted.org/packages/38/f8/4398c46863b093252fe67368b44edc6c13b17f4e6b0e4929dbf0bdb13f23/msgpack-1.1.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:fffee09044073e69f2bad787071aeec727183e7580443dfeb8556cbf1978d162", size = 402668, upload-time = "2025-10-08T09:15:19.003Z" },+ { url = "https://files.pythonhosted.org/packages/28/ce/698c1eff75626e4124b4d78e21cca0b4cc90043afb80a507626ea354ab52/msgpack-1.1.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5928604de9b032bc17f5099496417f113c45bc6bc21b5c6920caf34b3c428794", size = 419040, upload-time = "2025-10-08T09:15:20.183Z" },+ { url = "https://files.pythonhosted.org/packages/67/32/f3cd1667028424fa7001d82e10ee35386eea1408b93d399b09fb0aa7875f/msgpack-1.1.2-cp313-cp313-win32.whl", hash = "sha256:a7787d353595c7c7e145e2331abf8b7ff1e6673a6b974ded96e6d4ec09f00c8c", size = 65037, upload-time = "2025-10-08T09:15:21.416Z" },+ { url = "https://files.pythonhosted.org/packages/74/07/1ed8277f8653c40ebc65985180b007879f6a836c525b3885dcc6448ae6cb/msgpack-1.1.2-cp313-cp313-win_amd64.whl", hash = "sha256:a465f0dceb8e13a487e54c07d04ae3ba131c7c5b95e2612596eafde1dccf64a9", size = 72631, upload-time = "2025-10-08T09:15:22.431Z" },+ { url = "https://files.pythonhosted.org/packages/e5/db/0314e4e2db56ebcf450f277904ffd84a7988b9e5da8d0d61ab2d057df2b6/msgpack-1.1.2-cp313-cp313-win_arm64.whl", hash = "sha256:e69b39f8c0aa5ec24b57737ebee40be647035158f14ed4b40e6f150077e21a84", size = 64118, upload-time = "2025-10-08T09:15:23.402Z" },+]+[[package]]name = "mslex"version = "1.3.0"@@ -1668,6 +1750,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/da/d9/f7f9379981e39b8c2511c9e0326d212accacb82f12fbfdc1aa2ce2a7b2b6/multiprocess-0.70.16-py39-none-any.whl", hash = "sha256:a0bafd3ae1b732eac64be2e72038231c1ba97724b60b09400d68f229fcc2fbf3", size = 133351, upload-time = "2024-01-28T18:52:31.981Z" },]+[[package]]+name = "networkx"+version = "3.6.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/6a/51/63fe664f3908c97be9d2e4f1158eb633317598cfa6e1fc14af5383f17512/networkx-3.6.1.tar.gz", hash = "sha256:26b7c357accc0c8cde558ad486283728b65b6a95d85ee1cd66bafab4c8168509", size = 2517025, upload-time = "2025-12-08T17:02:39.908Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl", hash = "sha256:d47fbf302e7d9cbbb9e2555a0d267983d2aa476bac30e90dfbe5669bd57f3762", size = 2068504, upload-time = "2025-12-08T17:02:38.159Z" },+]+[[package]]name = "numpy"version = "2.3.3"@@ -1710,57 +1801,318 @@ wheels = [][[package]]-name = "openai"-version = "2.13.0"+name = "nvidia-cublas-cu12"+version = "12.8.4.1"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/dc/61/e24b560ab2e2eaeb3c839129175fb330dfcfc29e5203196e5541a4c44682/nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:8ac4e771d5a348c551b2a426eda6193c19aa630236b418086020df5ba9667142", size = 594346921, upload-time = "2025-03-07T01:44:31.254Z" },+]++[[package]]+name = "nvidia-cuda-cupti-cu12"+version = "12.8.90"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/f8/02/2adcaa145158bf1a8295d83591d22e4103dbfd821bcaf6f3f53151ca4ffa/nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea0cb07ebda26bb9b29ba82cda34849e73c166c18162d3913575b0c9db9a6182", size = 10248621, upload-time = "2025-03-07T01:40:21.213Z" },+]++[[package]]+name = "nvidia-cuda-nvrtc-cu12"+version = "12.8.93"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/05/6b/32f747947df2da6994e999492ab306a903659555dddc0fbdeb9d71f75e52/nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:a7756528852ef889772a84c6cd89d41dfa74667e24cca16bb31f8f061e3e9994", size = 88040029, upload-time = "2025-03-07T01:42:13.562Z" },+]++[[package]]+name = "nvidia-cuda-runtime-cu12"+version = "12.8.90"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/0d/9b/a997b638fcd068ad6e4d53b8551a7d30fe8b404d6f1804abf1df69838932/nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adade8dcbd0edf427b7204d480d6066d33902cab2a4707dcfc48a2d0fd44ab90", size = 954765, upload-time = "2025-03-07T01:40:01.615Z" },+]++[[package]]+name = "nvidia-cudnn-cu12"+version = "9.10.2.21"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "anyio" },- { name = "distro" },- { name = "httpx" },- { name = "jiter" },- { name = "pydantic" },- { name = "sniffio" },- { name = "tqdm" },- { name = "typing-extensions" },+ { name = "nvidia-cublas-cu12" },]-sdist = { url = "https://files.pythonhosted.org/packages/0f/39/8e347e9fda125324d253084bb1b82407e5e3c7777a03dc398f79b2d95626/openai-2.13.0.tar.gz", hash = "sha256:9ff633b07a19469ec476b1e2b5b26c5ef700886524a7a72f65e6f0b5203142d5", size = 626583, upload-time = "2025-12-16T18:19:44.387Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/bb/d5/eb52edff49d3d5ea116e225538c118699ddeb7c29fa17ec28af14bc10033/openai-2.13.0-py3-none-any.whl", hash = "sha256:746521065fed68df2f9c2d85613bb50844343ea81f60009b60e6a600c9352c79", size = 1066837, upload-time = "2025-12-16T18:19:43.124Z" },+ { url = "https://files.pythonhosted.org/packages/ba/51/e123d997aa098c61d029f76663dedbfb9bc8dcf8c60cbd6adbe42f76d049/nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:949452be657fa16687d0930933f032835951ef0892b37d2d53824d1a84dc97a8", size = 706758467, upload-time = "2025-06-06T21:54:08.597Z" },][[package]]-name = "opentelemetry-api"-version = "1.37.0"+name = "nvidia-cufft-cu12"+version = "11.3.3.83"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "importlib-metadata" },- { name = "typing-extensions" },+ { name = "nvidia-nvjitlink-cu12" },]-sdist = { url = "https://files.pythonhosted.org/packages/63/04/05040d7ce33a907a2a02257e601992f0cdf11c73b33f13c4492bf6c3d6d5/opentelemetry_api-1.37.0.tar.gz", hash = "sha256:540735b120355bd5112738ea53621f8d5edb35ebcd6fe21ada3ab1c61d1cd9a7", size = 64923, upload-time = "2025-09-11T10:29:01.662Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/91/48/28ed9e55dcf2f453128df738210a980e09f4e468a456fa3c763dbc8be70a/opentelemetry_api-1.37.0-py3-none-any.whl", hash = "sha256:accf2024d3e89faec14302213bc39550ec0f4095d1cf5ca688e1bfb1c8612f47", size = 65732, upload-time = "2025-09-11T10:28:41.826Z" },+ { url = "https://files.pythonhosted.org/packages/1f/13/ee4e00f30e676b66ae65b4f08cb5bcbb8392c03f54f2d5413ea99a5d1c80/nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d2dd21ec0b88cf61b62e6b43564355e5222e4a3fb394cac0db101f2dd0d4f74", size = 193118695, upload-time = "2025-03-07T01:45:27.821Z" },][[package]]-name = "packaging"-version = "25.0"+name = "nvidia-cufile-cu12"+version = "1.13.1.3"source = { registry = "https://pypi.org/simple" }-sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" },+ { url = "https://files.pythonhosted.org/packages/bb/fe/1bcba1dfbfb8d01be8d93f07bfc502c93fa23afa6fd5ab3fc7c1df71038a/nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1d069003be650e131b21c932ec3d8969c1715379251f8d23a1860554b1cb24fc", size = 1197834, upload-time = "2025-03-07T01:45:50.723Z" },][[package]]-name = "pandas"-version = "2.3.3"+name = "nvidia-curand-cu12"+version = "10.3.9.90"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/fb/aa/6584b56dc84ebe9cf93226a5cde4d99080c8e90ab40f0c27bda7a0f29aa1/nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:b32331d4f4df5d6eefa0554c565b626c7216f87a06a4f56fab27c3b68a830ec9", size = 63619976, upload-time = "2025-03-07T01:46:23.323Z" },+]++[[package]]+name = "nvidia-cusolver-cu12"+version = "11.7.3.90"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "numpy" },- { name = "python-dateutil" },- { name = "pytz" },- { name = "tzdata" },+ { name = "nvidia-cublas-cu12" },+ { name = "nvidia-cusparse-cu12" },+ { name = "nvidia-nvjitlink-cu12" },]-sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223, upload-time = "2025-09-29T23:34:51.853Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/85/48/9a13d2975803e8cf2777d5ed57b87a0b6ca2cc795f9a4f59796a910bfb80/nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:4376c11ad263152bd50ea295c05370360776f8c3427b30991df774f9fb26c450", size = 267506905, upload-time = "2025-03-07T01:47:16.273Z" },+]++[[package]]+name = "nvidia-cusparse-cu12"+version = "12.5.8.93"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "nvidia-nvjitlink-cu12" },+]+wheels = [+ { url = "https://files.pythonhosted.org/packages/c2/f5/e1854cb2f2bcd4280c44736c93550cc300ff4b8c95ebe370d0aa7d2b473d/nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ec05d76bbbd8b61b06a80e1eaf8cf4959c3d4ce8e711b65ebd0443bb0ebb13b", size = 288216466, upload-time = "2025-03-07T01:48:13.779Z" },+]++[[package]]+name = "nvidia-cusparselt-cu12"+version = "0.7.1"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/56/79/12978b96bd44274fe38b5dde5cfb660b1d114f70a65ef962bcbbed99b549/nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f1bb701d6b930d5a7cea44c19ceb973311500847f81b634d802b7b539dc55623", size = 287193691, upload-time = "2025-02-26T00:15:44.104Z" },+]++[[package]]+name = "nvidia-nccl-cu12"+version = "2.27.5"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/6e/89/f7a07dc961b60645dbbf42e80f2bc85ade7feb9a491b11a1e973aa00071f/nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ad730cf15cb5d25fe849c6e6ca9eb5b76db16a80f13f425ac68d8e2e55624457", size = 322348229, upload-time = "2025-06-26T04:11:28.385Z" },+]++[[package]]+name = "nvidia-nvjitlink-cu12"+version = "12.8.93"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/f6/74/86a07f1d0f42998ca31312f998bd3b9a7eff7f52378f4f270c8679c77fb9/nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:81ff63371a7ebd6e6451970684f916be2eab07321b73c9d244dc2b4da7f73b88", size = 39254836, upload-time = "2025-03-07T01:49:55.661Z" },+]++[[package]]+name = "nvidia-nvshmem-cu12"+version = "3.4.5"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b5/09/6ea3ea725f82e1e76684f0708bbedd871fc96da89945adeba65c3835a64c/nvidia_nvshmem_cu12-3.4.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:042f2500f24c021db8a06c5eec2539027d57460e1c1a762055a6554f72c369bd", size = 139103095, upload-time = "2025-09-06T00:32:31.266Z" },+]++[[package]]+name = "nvidia-nvtx-cu12"+version = "12.8.90"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/a2/eb/86626c1bbc2edb86323022371c39aa48df6fd8b0a1647bc274577f72e90b/nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5b17e2001cc0d751a5bc2c6ec6d26ad95913324a4adb86788c944f8ce9ba441f", size = 89954, upload-time = "2025-03-07T01:42:44.131Z" },+]++[[package]]+name = "omegaconf"+version = "2.3.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "antlr4-python3-runtime" },+ { name = "pyyaml" },+]+sdist = { url = "https://files.pythonhosted.org/packages/09/48/6388f1bb9da707110532cb70ec4d2822858ddfb44f1cdf1233c20a80ea4b/omegaconf-2.3.0.tar.gz", hash = "sha256:d5d4b6d29955cc50ad50c46dc269bcd92c6e00f5f90d23ab5fee7bfca4ba4cc7", size = 3298120, upload-time = "2022-12-08T20:59:22.753Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/e3/94/1843518e420fa3ed6919835845df698c7e27e183cb997394e4a670973a65/omegaconf-2.3.0-py3-none-any.whl", hash = "sha256:7b4df175cdb08ba400f45cae3bdcae7ba8365db4d165fc65fd04b050ab63b46b", size = 79500, upload-time = "2022-12-08T20:59:19.686Z" },+]++[[package]]+name = "openai"+version = "2.13.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "anyio" },+ { name = "distro" },+ { name = "httpx" },+ { name = "jiter" },+ { name = "pydantic" },+ { name = "sniffio" },+ { name = "tqdm" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/0f/39/8e347e9fda125324d253084bb1b82407e5e3c7777a03dc398f79b2d95626/openai-2.13.0.tar.gz", hash = "sha256:9ff633b07a19469ec476b1e2b5b26c5ef700886524a7a72f65e6f0b5203142d5", size = 626583, upload-time = "2025-12-16T18:19:44.387Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/bb/d5/eb52edff49d3d5ea116e225538c118699ddeb7c29fa17ec28af14bc10033/openai-2.13.0-py3-none-any.whl", hash = "sha256:746521065fed68df2f9c2d85613bb50844343ea81f60009b60e6a600c9352c79", size = 1066837, upload-time = "2025-12-16T18:19:43.124Z" },+]++[[package]]+name = "opencensus"+version = "0.11.4"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "google-api-core" },+ { name = "opencensus-context" },+ { name = "six" },+]+sdist = { url = "https://files.pythonhosted.org/packages/15/a7/a46dcffa1b63084f9f17fe3c8cb20724c4c8f91009fd0b2cfdb27d5d2b35/opencensus-0.11.4.tar.gz", hash = "sha256:cbef87d8b8773064ab60e5c2a1ced58bbaa38a6d052c41aec224958ce544eff2", size = 64966, upload-time = "2024-01-03T18:04:07.085Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b5/ed/9fbdeb23a09e430d87b7d72d430484b88184633dc50f6bfb792354b6f661/opencensus-0.11.4-py2.py3-none-any.whl", hash = "sha256:a18487ce68bc19900336e0ff4655c5a116daf10c1b3685ece8d971bddad6a864", size = 128225, upload-time = "2024-01-03T18:04:05.127Z" },+]++[[package]]+name = "opencensus-context"+version = "0.1.3"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/4c/96/3b6f638f6275a8abbd45e582448723bffa29c1fb426721dedb5c72f7d056/opencensus-context-0.1.3.tar.gz", hash = "sha256:a03108c3c10d8c80bb5ddf5c8a1f033161fa61972a9917f9b9b3a18517f0088c", size = 4066, upload-time = "2022-08-03T22:20:22.359Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/10/68/162c97ea78c957d68ecf78a5c5041d2e25bd5562bdf5d89a6cbf7f8429bf/opencensus_context-0.1.3-py2.py3-none-any.whl", hash = "sha256:073bb0590007af276853009fac7e4bab1d523c3f03baf4cb4511ca38967c6039", size = 5060, upload-time = "2022-08-03T22:20:20.352Z" },+]++[[package]]+name = "opentelemetry-api"+version = "1.37.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "importlib-metadata" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/63/04/05040d7ce33a907a2a02257e601992f0cdf11c73b33f13c4492bf6c3d6d5/opentelemetry_api-1.37.0.tar.gz", hash = "sha256:540735b120355bd5112738ea53621f8d5edb35ebcd6fe21ada3ab1c61d1cd9a7", size = 64923, upload-time = "2025-09-11T10:29:01.662Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/91/48/28ed9e55dcf2f453128df738210a980e09f4e468a456fa3c763dbc8be70a/opentelemetry_api-1.37.0-py3-none-any.whl", hash = "sha256:accf2024d3e89faec14302213bc39550ec0f4095d1cf5ca688e1bfb1c8612f47", size = 65732, upload-time = "2025-09-11T10:28:41.826Z" },+]++[[package]]+name = "opentelemetry-exporter-prometheus"+version = "0.58b0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "opentelemetry-api" },+ { name = "opentelemetry-sdk" },+ { name = "prometheus-client" },+]+sdist = { url = "https://files.pythonhosted.org/packages/1a/4c/e351559526ee35fa36d990d3455e81a5607c1fa3e544b599ad802f2481f8/opentelemetry_exporter_prometheus-0.58b0.tar.gz", hash = "sha256:70f2627b4bb82bac65a1fcf95f6e0dcce9e823dd47379ced854753a7e14dfc93", size = 14972, upload-time = "2025-09-11T10:29:05.513Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/a6/e3/50e9cdc5a52c2ab19585dd69e668ec9fee0343fafc4bffa919ca79230a4f/opentelemetry_exporter_prometheus-0.58b0-py3-none-any.whl", hash = "sha256:02005033a7a108ab9f3000ff3aa49e2d03a8893b5bf3431322ffa246affbf951", size = 13016, upload-time = "2025-09-11T10:28:47.67Z" },+]++[[package]]+name = "opentelemetry-proto"+version = "1.39.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "protobuf" },+]+sdist = { url = "https://files.pythonhosted.org/packages/49/1d/f25d76d8260c156c40c97c9ed4511ec0f9ce353f8108ca6e7561f82a06b2/opentelemetry_proto-1.39.1.tar.gz", hash = "sha256:6c8e05144fc0d3ed4d22c2289c6b126e03bcd0e6a7da0f16cedd2e1c2772e2c8", size = 46152, upload-time = "2025-12-11T13:32:48.681Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/51/95/b40c96a7b5203005a0b03d8ce8cd212ff23f1793d5ba289c87a097571b18/opentelemetry_proto-1.39.1-py3-none-any.whl", hash = "sha256:22cdc78efd3b3765d09e68bfbd010d4fc254c9818afd0b6b423387d9dee46007", size = 72535, upload-time = "2025-12-11T13:32:33.866Z" },+]++[[package]]+name = "opentelemetry-sdk"+version = "1.37.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "opentelemetry-api" },+ { name = "opentelemetry-semantic-conventions" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/f4/62/2e0ca80d7fe94f0b193135375da92c640d15fe81f636658d2acf373086bc/opentelemetry_sdk-1.37.0.tar.gz", hash = "sha256:cc8e089c10953ded765b5ab5669b198bbe0af1b3f89f1007d19acd32dc46dda5", size = 170404, upload-time = "2025-09-11T10:29:11.779Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9f/62/9f4ad6a54126fb00f7ed4bb5034964c6e4f00fcd5a905e115bd22707e20d/opentelemetry_sdk-1.37.0-py3-none-any.whl", hash = "sha256:8f3c3c22063e52475c5dbced7209495c2c16723d016d39287dfc215d1771257c", size = 131941, upload-time = "2025-09-11T10:28:57.83Z" },+]++[[package]]+name = "opentelemetry-semantic-conventions"+version = "0.58b0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "opentelemetry-api" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/aa/1b/90701d91e6300d9f2fb352153fb1721ed99ed1f6ea14fa992c756016e63a/opentelemetry_semantic_conventions-0.58b0.tar.gz", hash = "sha256:6bd46f51264279c433755767bb44ad00f1c9e2367e1b42af563372c5a6fa0c25", size = 129867, upload-time = "2025-09-11T10:29:12.597Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/07/90/68152b7465f50285d3ce2481b3aec2f82822e3f52e5152eeeaf516bab841/opentelemetry_semantic_conventions-0.58b0-py3-none-any.whl", hash = "sha256:5564905ab1458b96684db1340232729fce3b5375a06e140e8904c78e4f815b28", size = 207954, upload-time = "2025-09-11T10:28:59.218Z" },+]++[[package]]+name = "orjson"+version = "3.11.5"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/04/b8/333fdb27840f3bf04022d21b654a35f58e15407183aeb16f3b41aa053446/orjson-3.11.5.tar.gz", hash = "sha256:82393ab47b4fe44ffd0a7659fa9cfaacc717eb617c93cde83795f14af5c2e9d5", size = 5972347, upload-time = "2025-12-06T15:55:39.458Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ef/a4/8052a029029b096a78955eadd68ab594ce2197e24ec50e6b6d2ab3f4e33b/orjson-3.11.5-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:334e5b4bff9ad101237c2d799d9fd45737752929753bf4faf4b207335a416b7d", size = 245347, upload-time = "2025-12-06T15:54:22.061Z" },+ { url = "https://files.pythonhosted.org/packages/64/67/574a7732bd9d9d79ac620c8790b4cfe0717a3d5a6eb2b539e6e8995e24a0/orjson-3.11.5-cp312-cp312-macosx_15_0_arm64.whl", hash = "sha256:ff770589960a86eae279f5d8aa536196ebda8273a2a07db2a54e82b93bc86626", size = 129435, upload-time = "2025-12-06T15:54:23.615Z" },+ { url = "https://files.pythonhosted.org/packages/52/8d/544e77d7a29d90cf4d9eecd0ae801c688e7f3d1adfa2ebae5e1e94d38ab9/orjson-3.11.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed24250e55efbcb0b35bed7caaec8cedf858ab2f9f2201f17b8938c618c8ca6f", size = 132074, upload-time = "2025-12-06T15:54:24.694Z" },+ { url = "https://files.pythonhosted.org/packages/6e/57/b9f5b5b6fbff9c26f77e785baf56ae8460ef74acdb3eae4931c25b8f5ba9/orjson-3.11.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a66d7769e98a08a12a139049aac2f0ca3adae989817f8c43337455fbc7669b85", size = 130520, upload-time = "2025-12-06T15:54:26.185Z" },+ { url = "https://files.pythonhosted.org/packages/f6/6d/d34970bf9eb33f9ec7c979a262cad86076814859e54eb9a059a52f6dc13d/orjson-3.11.5-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:86cfc555bfd5794d24c6a1903e558b50644e5e68e6471d66502ce5cb5fdef3f9", size = 136209, upload-time = "2025-12-06T15:54:27.264Z" },+ { url = "https://files.pythonhosted.org/packages/e7/39/bc373b63cc0e117a105ea12e57280f83ae52fdee426890d57412432d63b3/orjson-3.11.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a230065027bc2a025e944f9d4714976a81e7ecfa940923283bca7bbc1f10f626", size = 139837, upload-time = "2025-12-06T15:54:28.75Z" },+ { url = "https://files.pythonhosted.org/packages/cb/aa/7c4818c8d7d324da220f4f1af55c343956003aa4d1ce1857bdc1d396ba69/orjson-3.11.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b29d36b60e606df01959c4b982729c8845c69d1963f88686608be9ced96dbfaa", size = 137307, upload-time = "2025-12-06T15:54:29.856Z" },+ { url = "https://files.pythonhosted.org/packages/46/bf/0993b5a056759ba65145effe3a79dd5a939d4a070eaa5da2ee3180fbb13f/orjson-3.11.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c74099c6b230d4261fdc3169d50efc09abf38ace1a42ea2f9994b1d79153d477", size = 139020, upload-time = "2025-12-06T15:54:31.024Z" },+ { url = "https://files.pythonhosted.org/packages/65/e8/83a6c95db3039e504eda60fc388f9faedbb4f6472f5aba7084e06552d9aa/orjson-3.11.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e697d06ad57dd0c7a737771d470eedc18e68dfdefcdd3b7de7f33dfda5b6212e", size = 141099, upload-time = "2025-12-06T15:54:32.196Z" },+ { url = "https://files.pythonhosted.org/packages/b9/b4/24fdc024abfce31c2f6812973b0a693688037ece5dc64b7a60c1ce69e2f2/orjson-3.11.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:e08ca8a6c851e95aaecc32bc44a5aa75d0ad26af8cdac7c77e4ed93acf3d5b69", size = 413540, upload-time = "2025-12-06T15:54:33.361Z" },+ { url = "https://files.pythonhosted.org/packages/d9/37/01c0ec95d55ed0c11e4cae3e10427e479bba40c77312b63e1f9665e0737d/orjson-3.11.5-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e8b5f96c05fce7d0218df3fdfeb962d6b8cfff7e3e20264306b46dd8b217c0f3", size = 151530, upload-time = "2025-12-06T15:54:34.6Z" },+ { url = "https://files.pythonhosted.org/packages/f9/d4/f9ebc57182705bb4bbe63f5bbe14af43722a2533135e1d2fb7affa0c355d/orjson-3.11.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ddbfdb5099b3e6ba6d6ea818f61997bb66de14b411357d24c4612cf1ebad08ca", size = 141863, upload-time = "2025-12-06T15:54:35.801Z" },+ { url = "https://files.pythonhosted.org/packages/0d/04/02102b8d19fdcb009d72d622bb5781e8f3fae1646bf3e18c53d1bc8115b5/orjson-3.11.5-cp312-cp312-win32.whl", hash = "sha256:9172578c4eb09dbfcf1657d43198de59b6cef4054de385365060ed50c458ac98", size = 135255, upload-time = "2025-12-06T15:54:37.209Z" },+ { url = "https://files.pythonhosted.org/packages/d4/fb/f05646c43d5450492cb387de5549f6de90a71001682c17882d9f66476af5/orjson-3.11.5-cp312-cp312-win_amd64.whl", hash = "sha256:2b91126e7b470ff2e75746f6f6ee32b9ab67b7a93c8ba1d15d3a0caaf16ec875", size = 133252, upload-time = "2025-12-06T15:54:38.401Z" },+ { url = "https://files.pythonhosted.org/packages/dc/a6/7b8c0b26ba18c793533ac1cd145e131e46fcf43952aa94c109b5b913c1f0/orjson-3.11.5-cp312-cp312-win_arm64.whl", hash = "sha256:acbc5fac7e06777555b0722b8ad5f574739e99ffe99467ed63da98f97f9ca0fe", size = 126777, upload-time = "2025-12-06T15:54:39.515Z" },+ { url = "https://files.pythonhosted.org/packages/10/43/61a77040ce59f1569edf38f0b9faadc90c8cf7e9bec2e0df51d0132c6bb7/orjson-3.11.5-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:3b01799262081a4c47c035dd77c1301d40f568f77cc7ec1bb7db5d63b0a01629", size = 245271, upload-time = "2025-12-06T15:54:40.878Z" },+ { url = "https://files.pythonhosted.org/packages/55/f9/0f79be617388227866d50edd2fd320cb8fb94dc1501184bb1620981a0aba/orjson-3.11.5-cp313-cp313-macosx_15_0_arm64.whl", hash = "sha256:61de247948108484779f57a9f406e4c84d636fa5a59e411e6352484985e8a7c3", size = 129422, upload-time = "2025-12-06T15:54:42.403Z" },+ { url = "https://files.pythonhosted.org/packages/77/42/f1bf1549b432d4a78bfa95735b79b5dac75b65b5bb815bba86ad406ead0a/orjson-3.11.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:894aea2e63d4f24a7f04a1908307c738d0dce992e9249e744b8f4e8dd9197f39", size = 132060, upload-time = "2025-12-06T15:54:43.531Z" },+ { url = "https://files.pythonhosted.org/packages/25/49/825aa6b929f1a6ed244c78acd7b22c1481fd7e5fda047dc8bf4c1a807eb6/orjson-3.11.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ddc21521598dbe369d83d4d40338e23d4101dad21dae0e79fa20465dbace019f", size = 130391, upload-time = "2025-12-06T15:54:45.059Z" },+ { url = "https://files.pythonhosted.org/packages/42/ec/de55391858b49e16e1aa8f0bbbb7e5997b7345d8e984a2dec3746d13065b/orjson-3.11.5-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7cce16ae2f5fb2c53c3eafdd1706cb7b6530a67cc1c17abe8ec747f5cd7c0c51", size = 135964, upload-time = "2025-12-06T15:54:46.576Z" },+ { url = "https://files.pythonhosted.org/packages/1c/40/820bc63121d2d28818556a2d0a09384a9f0262407cf9fa305e091a8048df/orjson-3.11.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e46c762d9f0e1cfb4ccc8515de7f349abbc95b59cb5a2bd68df5973fdef913f8", size = 139817, upload-time = "2025-12-06T15:54:48.084Z" },+ { url = "https://files.pythonhosted.org/packages/09/c7/3a445ca9a84a0d59d26365fd8898ff52bdfcdcb825bcc6519830371d2364/orjson-3.11.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d7345c759276b798ccd6d77a87136029e71e66a8bbf2d2755cbdde1d82e78706", size = 137336, upload-time = "2025-12-06T15:54:49.426Z" },+ { url = "https://files.pythonhosted.org/packages/9a/b3/dc0d3771f2e5d1f13368f56b339c6782f955c6a20b50465a91acb79fe961/orjson-3.11.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75bc2e59e6a2ac1dd28901d07115abdebc4563b5b07dd612bf64260a201b1c7f", size = 138993, upload-time = "2025-12-06T15:54:50.939Z" },+ { url = "https://files.pythonhosted.org/packages/d1/a2/65267e959de6abe23444659b6e19c888f242bf7725ff927e2292776f6b89/orjson-3.11.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:54aae9b654554c3b4edd61896b978568c6daa16af96fa4681c9b5babd469f863", size = 141070, upload-time = "2025-12-06T15:54:52.414Z" },+ { url = "https://files.pythonhosted.org/packages/63/c9/da44a321b288727a322c6ab17e1754195708786a04f4f9d2220a5076a649/orjson-3.11.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:4bdd8d164a871c4ec773f9de0f6fe8769c2d6727879c37a9666ba4183b7f8228", size = 413505, upload-time = "2025-12-06T15:54:53.67Z" },+ { url = "https://files.pythonhosted.org/packages/7f/17/68dc14fa7000eefb3d4d6d7326a190c99bb65e319f02747ef3ebf2452f12/orjson-3.11.5-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:a261fef929bcf98a60713bf5e95ad067cea16ae345d9a35034e73c3990e927d2", size = 151342, upload-time = "2025-12-06T15:54:55.113Z" },+ { url = "https://files.pythonhosted.org/packages/c4/c5/ccee774b67225bed630a57478529fc026eda33d94fe4c0eac8fe58d4aa52/orjson-3.11.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c028a394c766693c5c9909dec76b24f37e6a1b91999e8d0c0d5feecbe93c3e05", size = 141823, upload-time = "2025-12-06T15:54:56.331Z" },+ { url = "https://files.pythonhosted.org/packages/67/80/5d00e4155d0cd7390ae2087130637671da713959bb558db9bac5e6f6b042/orjson-3.11.5-cp313-cp313-win32.whl", hash = "sha256:2cc79aaad1dfabe1bd2d50ee09814a1253164b3da4c00a78c458d82d04b3bdef", size = 135236, upload-time = "2025-12-06T15:54:57.507Z" },+ { url = "https://files.pythonhosted.org/packages/95/fe/792cc06a84808dbdc20ac6eab6811c53091b42f8e51ecebf14b540e9cfe4/orjson-3.11.5-cp313-cp313-win_amd64.whl", hash = "sha256:ff7877d376add4e16b274e35a3f58b7f37b362abf4aa31863dadacdd20e3a583", size = 133167, upload-time = "2025-12-06T15:54:58.71Z" },+ { url = "https://files.pythonhosted.org/packages/46/2c/d158bd8b50e3b1cfdcf406a7e463f6ffe3f0d167b99634717acdaf5e299f/orjson-3.11.5-cp313-cp313-win_arm64.whl", hash = "sha256:59ac72ea775c88b163ba8d21b0177628bd015c5dd060647bbab6e22da3aad287", size = 126712, upload-time = "2025-12-06T15:54:59.892Z" },+]++[[package]]+name = "packaging"+version = "25.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" },+]++[[package]]+name = "pandas"+version = "2.3.3"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "numpy" },+ { name = "python-dateutil" },+ { name = "pytz" },+ { name = "tzdata" },+]+sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223, upload-time = "2025-09-29T23:34:51.853Z" }wheels = [{ url = "https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53", size = 11597846, upload-time = "2025-09-29T23:19:48.856Z" },{ url = "https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35", size = 10729618, upload-time = "2025-09-29T23:39:08.659Z" },@@ -1793,6 +2145,27 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl", hash = "sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f", size = 74766, upload-time = "2024-08-26T21:01:02.632Z" },]+[[package]]+name = "peft"+version = "0.18.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "accelerate" },+ { name = "huggingface-hub" },+ { name = "numpy" },+ { name = "packaging" },+ { name = "psutil" },+ { name = "pyyaml" },+ { name = "safetensors" },+ { name = "torch" },+ { name = "tqdm" },+ { name = "transformers" },+]+sdist = { url = "https://files.pythonhosted.org/packages/d8/48/147b3ea999560b40a34fd78724c7777aa9d18409c2250bdcaf9c4f2db7fc/peft-0.18.1.tar.gz", hash = "sha256:2dd0d6bfce936d1850e48aaddbd250941c5c02fc8ef3237cd8fd5aac35e0bae2", size = 635030, upload-time = "2026-01-09T13:08:01.136Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b3/14/b4e3f574acf349ae6f61f9c000a77f97a3b315b4bb6ad03791e79ae4a568/peft-0.18.1-py3-none-any.whl", hash = "sha256:0bf06847a3551e3019fc58c440cffc9a6b73e6e2962c95b52e224f77bbdb50f1", size = 556960, upload-time = "2026-01-09T13:07:55.865Z" },+]+[[package]]name = "pillow"version = "11.3.0"@@ -1837,6 +2210,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/f3/7e/b623008460c09a0cb38263c93b828c666493caee2eb34ff67f778b87e58c/pillow-11.3.0-cp313-cp313t-win_arm64.whl", hash = "sha256:8797edc41f3e8536ae4b10897ee2f637235c94f27404cac7297f7b607dd0716e", size = 2424803, upload-time = "2025-07-01T09:15:15.695Z" },]+[[package]]+name = "platformdirs"+version = "4.5.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/cf/86/0248f086a84f01b37aaec0fa567b397df1a119f73c16f6c7a9aac73ea309/platformdirs-4.5.1.tar.gz", hash = "sha256:61d5cdcc6065745cdd94f0f878977f8de9437be93de97c1c12f853c9c0cdcbda", size = 21715, upload-time = "2025-12-05T13:52:58.638Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/cb/28/3bfe2fa5a7b9c46fe7e13c97bda14c895fb10fa2ebf1d0abb90e0cea7ee1/platformdirs-4.5.1-py3-none-any.whl", hash = "sha256:d03afa3963c806a9bed9d5125c8f4cb2fdaf74a55ab60e5d59b3fde758104d31", size = 18731, upload-time = "2025-12-05T13:52:56.823Z" },+]+[[package]]name = "playwright"version = "1.55.0"@@ -1882,6 +2264,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/9f/8b/13066693d7a6f94fb5da3407417bbbc3f6aa8487051294d0ef766c1567fa/posthog-7.4.0-py3-none-any.whl", hash = "sha256:f9d4e32c1c0f2110256b1aae7046ed90af312c1dbb1eecc6a9cb427733b22970", size = 166079, upload-time = "2025-12-16T23:42:04.33Z" },]+[[package]]+name = "prometheus-client"+version = "0.24.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/f0/58/a794d23feb6b00fc0c72787d7e87d872a6730dd9ed7c7b3e954637d8f280/prometheus_client-0.24.1.tar.gz", hash = "sha256:7e0ced7fbbd40f7b84962d5d2ab6f17ef88a72504dcf7c0b40737b43b2a461f9", size = 85616, upload-time = "2026-01-14T15:26:26.965Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/74/c3/24a2f845e3917201628ecaba4f18bab4d18a337834c1df2a159ee9d22a42/prometheus_client-0.24.1-py3-none-any.whl", hash = "sha256:150db128af71a5c2482b36e588fc8a6b95e498750da4b17065947c16070f4055", size = 64057, upload-time = "2026-01-14T15:26:24.42Z" },+]+[[package]]name = "propcache"version = "0.4.0"@@ -1962,6 +2353,43 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/97/b7/15cc7d93443d6c6a84626ae3258a91f4c6ac8c0edd5df35ea7658f71b79c/protobuf-6.32.1-py3-none-any.whl", hash = "sha256:2601b779fc7d32a866c6b4404f9d42a3f67c5b9f3f15b4db3cccabe06b95c346", size = 169289, upload-time = "2025-09-11T21:38:41.234Z" },]+[[package]]+name = "psutil"+version = "7.2.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/73/cb/09e5184fb5fc0358d110fc3ca7f6b1d033800734d34cac10f4136cfac10e/psutil-7.2.1.tar.gz", hash = "sha256:f7583aec590485b43ca601dd9cea0dcd65bd7bb21d30ef4ddbf4ea6b5ed1bdd3", size = 490253, upload-time = "2025-12-29T08:26:00.169Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/77/8e/f0c242053a368c2aa89584ecd1b054a18683f13d6e5a318fc9ec36582c94/psutil-7.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ba9f33bb525b14c3ea563b2fd521a84d2fa214ec59e3e6a2858f78d0844dd60d", size = 129624, upload-time = "2025-12-29T08:26:04.255Z" },+ { url = "https://files.pythonhosted.org/packages/26/97/a58a4968f8990617decee234258a2b4fc7cd9e35668387646c1963e69f26/psutil-7.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:81442dac7abfc2f4f4385ea9e12ddf5a796721c0f6133260687fec5c3780fa49", size = 130132, upload-time = "2025-12-29T08:26:06.228Z" },+ { url = "https://files.pythonhosted.org/packages/db/6d/ed44901e830739af5f72a85fa7ec5ff1edea7f81bfbf4875e409007149bd/psutil-7.2.1-cp313-cp313t-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ea46c0d060491051d39f0d2cff4f98d5c72b288289f57a21556cc7d504db37fc", size = 180612, upload-time = "2025-12-29T08:26:08.276Z" },+ { url = "https://files.pythonhosted.org/packages/c7/65/b628f8459bca4efbfae50d4bf3feaab803de9a160b9d5f3bd9295a33f0c2/psutil-7.2.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:35630d5af80d5d0d49cfc4d64c1c13838baf6717a13effb35869a5919b854cdf", size = 183201, upload-time = "2025-12-29T08:26:10.622Z" },+ { url = "https://files.pythonhosted.org/packages/fb/23/851cadc9764edcc18f0effe7d0bf69f727d4cf2442deb4a9f78d4e4f30f2/psutil-7.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:923f8653416604e356073e6e0bccbe7c09990acef442def2f5640dd0faa9689f", size = 139081, upload-time = "2025-12-29T08:26:12.483Z" },+ { url = "https://files.pythonhosted.org/packages/59/82/d63e8494ec5758029f31c6cb06d7d161175d8281e91d011a4a441c8a43b5/psutil-7.2.1-cp313-cp313t-win_arm64.whl", hash = "sha256:cfbe6b40ca48019a51827f20d830887b3107a74a79b01ceb8cc8de4ccb17b672", size = 134767, upload-time = "2025-12-29T08:26:14.528Z" },+ { url = "https://files.pythonhosted.org/packages/c5/cf/5180eb8c8bdf6a503c6919f1da28328bd1e6b3b1b5b9d5b01ae64f019616/psutil-7.2.1-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:b2e953fcfaedcfbc952b44744f22d16575d3aa78eb4f51ae74165b4e96e55f42", size = 128137, upload-time = "2025-12-29T08:26:27.759Z" },+ { url = "https://files.pythonhosted.org/packages/c5/2c/78e4a789306a92ade5000da4f5de3255202c534acdadc3aac7b5458fadef/psutil-7.2.1-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:05cc68dbb8c174828624062e73078e7e35406f4ca2d0866c272c2410d8ef06d1", size = 128947, upload-time = "2025-12-29T08:26:29.548Z" },+ { url = "https://files.pythonhosted.org/packages/29/f8/40e01c350ad9a2b3cb4e6adbcc8a83b17ee50dd5792102b6142385937db5/psutil-7.2.1-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e38404ca2bb30ed7267a46c02f06ff842e92da3bb8c5bfdadbd35a5722314d8", size = 154694, upload-time = "2025-12-29T08:26:32.147Z" },+ { url = "https://files.pythonhosted.org/packages/06/e4/b751cdf839c011a9714a783f120e6a86b7494eb70044d7d81a25a5cd295f/psutil-7.2.1-cp36-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ab2b98c9fc19f13f59628d94df5cc4cc4844bc572467d113a8b517d634e362c6", size = 156136, upload-time = "2025-12-29T08:26:34.079Z" },+ { url = "https://files.pythonhosted.org/packages/44/ad/bbf6595a8134ee1e94a4487af3f132cef7fce43aef4a93b49912a48c3af7/psutil-7.2.1-cp36-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:f78baafb38436d5a128f837fab2d92c276dfb48af01a240b861ae02b2413ada8", size = 148108, upload-time = "2025-12-29T08:26:36.225Z" },+ { url = "https://files.pythonhosted.org/packages/1c/15/dd6fd869753ce82ff64dcbc18356093471a5a5adf4f77ed1f805d473d859/psutil-7.2.1-cp36-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:99a4cd17a5fdd1f3d014396502daa70b5ec21bf4ffe38393e152f8e449757d67", size = 147402, upload-time = "2025-12-29T08:26:39.21Z" },+ { url = "https://files.pythonhosted.org/packages/34/68/d9317542e3f2b180c4306e3f45d3c922d7e86d8ce39f941bb9e2e9d8599e/psutil-7.2.1-cp37-abi3-win_amd64.whl", hash = "sha256:b1b0671619343aa71c20ff9767eced0483e4fc9e1f489d50923738caf6a03c17", size = 136938, upload-time = "2025-12-29T08:26:41.036Z" },+ { url = "https://files.pythonhosted.org/packages/3e/73/2ce007f4198c80fcf2cb24c169884f833fe93fbc03d55d302627b094ee91/psutil-7.2.1-cp37-abi3-win_arm64.whl", hash = "sha256:0d67c1822c355aa6f7314d92018fb4268a76668a536f133599b91edd48759442", size = 133836, upload-time = "2025-12-29T08:26:43.086Z" },+]++[[package]]+name = "py-spy"+version = "0.4.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/19/e2/ff811a367028b87e86714945bb9ecb5c1cc69114a8039a67b3a862cef921/py_spy-0.4.1.tar.gz", hash = "sha256:e53aa53daa2e47c2eef97dd2455b47bb3a7e7f962796a86cc3e7dbde8e6f4db4", size = 244726, upload-time = "2025-07-31T19:33:25.172Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/14/e3/3a32500d845bdd94f6a2b4ed6244982f42ec2bc64602ea8fcfe900678ae7/py_spy-0.4.1-py2.py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:809094208c6256c8f4ccadd31e9a513fe2429253f48e20066879239ba12cd8cc", size = 3682508, upload-time = "2025-07-31T19:33:13.753Z" },+ { url = "https://files.pythonhosted.org/packages/4f/bf/e4d280e9e0bec71d39fc646654097027d4bbe8e04af18fb68e49afcff404/py_spy-0.4.1-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:1fb8bf71ab8df95a95cc387deed6552934c50feef2cf6456bc06692a5508fd0c", size = 1796395, upload-time = "2025-07-31T19:33:15.325Z" },+ { url = "https://files.pythonhosted.org/packages/df/79/9ed50bb0a9de63ed023aa2db8b6265b04a7760d98c61eb54def6a5fddb68/py_spy-0.4.1-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee776b9d512a011d1ad3907ed53ae32ce2f3d9ff3e1782236554e22103b5c084", size = 2034938, upload-time = "2025-07-31T19:33:17.194Z" },+ { url = "https://files.pythonhosted.org/packages/53/a5/36862e3eea59f729dfb70ee6f9e14b051d8ddce1aa7e70e0b81d9fe18536/py_spy-0.4.1-py2.py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:532d3525538254d1859b49de1fbe9744df6b8865657c9f0e444bf36ce3f19226", size = 2658968, upload-time = "2025-07-31T19:33:18.916Z" },+ { url = "https://files.pythonhosted.org/packages/08/f8/9ea0b586b065a623f591e5e7961282ec944b5fbbdca33186c7c0296645b3/py_spy-0.4.1-py2.py3-none-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4972c21890b6814017e39ac233c22572c4a61fd874524ebc5ccab0f2237aee0a", size = 2147541, upload-time = "2025-07-31T19:33:20.565Z" },+ { url = "https://files.pythonhosted.org/packages/68/fb/bc7f639aed026bca6e7beb1e33f6951e16b7d315594e7635a4f7d21d63f4/py_spy-0.4.1-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6a80ec05eb8a6883863a367c6a4d4f2d57de68466f7956b6367d4edd5c61bb29", size = 2763338, upload-time = "2025-07-31T19:33:22.202Z" },+ { url = "https://files.pythonhosted.org/packages/e1/da/fcc9a9fcd4ca946ff402cff20348e838b051d69f50f5d1f5dca4cd3c5eb8/py_spy-0.4.1-py2.py3-none-win_amd64.whl", hash = "sha256:d92e522bd40e9bf7d87c204033ce5bb5c828fca45fa28d970f58d71128069fdc", size = 1818784, upload-time = "2025-07-31T19:33:23.802Z" },+]+[[package]]name = "pyarrow"version = "21.0.0"@@ -2012,6 +2440,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/77/89/bc88a6711935ba795a679ea6ebee07e128050d6382eaa35a0a47c8032bdc/pyasn1_modules-0.4.1-py3-none-any.whl", hash = "sha256:49bfa96b45a292b711e986f222502c1c9a5e1f4e568fc30e2574a6c7d07838fd", size = 181537, upload-time = "2024-09-11T16:02:10.336Z" },]+[[package]]+name = "pybind11"+version = "3.0.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/2f/7b/a6d8dcb83c457e24a9df1e4d8fd5fb8034d4bbc62f3c324681e8a9ba57c2/pybind11-3.0.1.tar.gz", hash = "sha256:9c0f40056a016da59bab516efb523089139fcc6f2ba7e4930854c61efb932051", size = 546914, upload-time = "2025-08-22T20:09:27.265Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/cd/8a/37362fc2b949d5f733a8b0f2ff51ba423914cabefe69f1d1b6aab710f5fe/pybind11-3.0.1-py3-none-any.whl", hash = "sha256:aa8f0aa6e0a94d3b64adfc38f560f33f15e589be2175e103c0a33c6bce55ee89", size = 293611, upload-time = "2025-08-22T20:09:25.235Z" },+]+[[package]]name = "pycparser"version = "2.23"@@ -2112,6 +2549,12 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/61/ad/689f02752eeec26aed679477e80e632ef1b682313be70793d798c1d5fc8f/PyJWT-2.10.1-py3-none-any.whl", hash = "sha256:dcdd193e30abefd5debf142f9adfcdd2b58004e644f25406ffaebd50bd98dacb", size = 22997, upload-time = "2024-11-28T03:43:27.893Z" },]+[[package]]+name = "pylatexenc"+version = "2.10"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/5d/ab/34ec41718af73c00119d0351b7a2531d2ebddb51833a36448fc7b862be60/pylatexenc-2.10.tar.gz", hash = "sha256:3dd8fd84eb46dc30bee1e23eaab8d8fb5a7f507347b23e5f38ad9675c84f40d3", size = 162597, upload-time = "2021-04-06T07:56:07.854Z" }+[[package]]name = "pyparsing"version = "3.2.5"@@ -2162,6 +2605,19 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/a8/a4/20da314d277121d6534b3a980b29035dcd51e6744bd79075a6ce8fa4eb8d/pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79", size = 365750, upload-time = "2025-09-04T14:34:20.226Z" },]+[[package]]+name = "pytest-asyncio"+version = "1.3.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pytest" },+ { name = "typing-extensions", marker = "python_full_version < '3.13'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/90/2c/8af215c0f776415f3590cac4f9086ccefd6fd463befeae41cd4d3f193e5a/pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5", size = 50087, upload-time = "2025-11-10T16:07:47.256Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/e5/35/f8b19922b6a25bc0880171a2f1a003eaeb93657475193ab516fd87cac9da/pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5", size = 15075, upload-time = "2025-11-10T16:07:45.537Z" },+]+[[package]]name = "python-dateutil"version = "2.9.0.post0"@@ -2243,40 +2699,45 @@ wheels = [][[package]]-name = "qwen-agent"-version = "0.0.31"+name = "ray"+version = "2.53.0"source = { registry = "https://pypi.org/simple" }dependencies = [- { name = "dashscope" },- { name = "dotenv" },- { name = "eval-type-backport" },- { name = "json5" },- { name = "jsonlines" },+ { name = "click" },+ { name = "filelock" },{ name = "jsonschema" },- { name = "openai" },- { name = "pillow" },- { name = "pydantic" },+ { name = "msgpack" },+ { name = "packaging" },+ { name = "protobuf" },+ { name = "pyyaml" },{ name = "requests" },- { name = "tiktoken" },]-sdist = { url = "https://files.pythonhosted.org/packages/69/3d/5bec08ac6474415a484cf0aa008fc28e71b416ce3713e1d514d203374bd6/qwen_agent-0.0.31.tar.gz", hash = "sha256:c608d08f89cbffd7840c7151f59095f7ac08321f10398b0637639dec67294386", size = 7058070, upload-time = "2025-09-26T04:00:34.716Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/78/8b/67ad5290066ac20e5ceddf1d53232e8509b99fa1ebbb60a34da9d5045a25/qwen_agent-0.0.31-py3-none-any.whl", hash = "sha256:3ef803f8450fdf211c0a958b62365b1791c98928cd3f3511d06feb3c97e5c2b3", size = 7134107, upload-time = "2025-09-26T04:00:28.785Z" },+ { url = "https://files.pythonhosted.org/packages/b2/44/562718a634e63e8ef7985285288a167d4af62bc2a7decce3300cf937776a/ray-2.53.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:d8b95d047d947493803fb8417aea31225dcacdab15afdc75b8a238901949d457", size = 69463763, upload-time = "2025-12-20T16:06:28.685Z" },+ { url = "https://files.pythonhosted.org/packages/38/68/8e59b8413f3751fe7ce8b98ee8787d13964b47a4043587950790a9dd2151/ray-2.53.0-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:65e2ce58d3dc6baa3cf45824d889c1968ebde565ee54dfd80a98af8f31af8e4a", size = 71504450, upload-time = "2025-12-20T16:06:34.922Z" },+ { url = "https://files.pythonhosted.org/packages/2a/db/978a50d264565ca42e2a4bf115ec9a1f04f19ca5e620e6aa2f280747b644/ray-2.53.0-cp312-cp312-manylinux2014_x86_64.whl", hash = "sha256:14f46363e9b4cf0c1c8b4d8623ec337c5bd408377831b5e5b50067930137bbca", size = 72370424, upload-time = "2025-12-20T16:06:40.821Z" },+ { url = "https://files.pythonhosted.org/packages/8d/6c/bba6f22a9d83ee8f236000ba315f0c197bdc79888b4fa42fd762f729cbbd/ray-2.53.0-cp312-cp312-win_amd64.whl", hash = "sha256:b828c147f9ff2f277b1d254e4fe9a746fdfaee7e313a93a97c7edf4dae9b81a4", size = 27178106, upload-time = "2025-12-20T16:06:45.594Z" },+ { url = "https://files.pythonhosted.org/packages/3d/38/450cf9cf3c490fa4cc6d470597f819444da60f85579d2b34b95ee79fcb6f/ray-2.53.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:85b472ab6fb8f1189f8cef81913fd91b24dd69b3fa7dcca7e144827bd924f6c0", size = 69409819, upload-time = "2025-12-20T16:06:50.668Z" },+ { url = "https://files.pythonhosted.org/packages/71/5e/d452970b07174d5e4f8688abae889d01321b51ced827db1f1d1cb7d56d44/ray-2.53.0-cp313-cp313-manylinux2014_aarch64.whl", hash = "sha256:7196e5358dfcc8211be864f45e6dfe4827202df294af3c7a76ff8fbc080e0522", size = 71409529, upload-time = "2025-12-20T16:06:56.2Z" },+ { url = "https://files.pythonhosted.org/packages/cb/84/50b317a125617a638a64694c12f56183edd5df01828a35fa4c55c7b13c66/ray-2.53.0-cp313-cp313-manylinux2014_x86_64.whl", hash = "sha256:73dbbaa7962a7f5e38aa8cf9483e0e9817205e989aa3dc859c738c2af1ae01df", size = 72283961, upload-time = "2025-12-20T16:07:05.831Z" },]-[[package]]-name = "qwen-vl-utils"-version = "0.0.14"-source = { registry = "https://pypi.org/simple" }-dependencies = [- { name = "av" },- { name = "packaging" },- { name = "pillow" },+[package.optional-dependencies]+default = [+ { name = "aiohttp" },+ { name = "aiohttp-cors" },+ { name = "colorful" },+ { name = "grpcio" },+ { name = "opencensus" },+ { name = "opentelemetry-exporter-prometheus" },+ { name = "opentelemetry-proto" },+ { name = "opentelemetry-sdk" },+ { name = "prometheus-client" },+ { name = "py-spy" },+ { name = "pydantic" },{ name = "requests" },-]-sdist = { url = "https://files.pythonhosted.org/packages/b6/b1/ad4fc2260a3badd278b38d642f3b987412f1f6682f0ef2b31b0572d5caa8/qwen_vl_utils-0.0.14.tar.gz", hash = "sha256:9c7cad5ae803b3a10f8bb7194deb12aeacdd032f92f4224e880c73587a7346ad", size = 8453, upload-time = "2025-09-23T09:38:57.532Z" }-wheels = [- { url = "https://files.pythonhosted.org/packages/c4/43/80f67e0336cb2fc725f8e06f7fe35c1d0fe946f4d2b8b2175e797e07349e/qwen_vl_utils-0.0.14-py3-none-any.whl", hash = "sha256:5e28657bfd031e56bd447c5901b58ddfc3835285ed100f4c56580e0ade054e96", size = 8120, upload-time = "2025-09-23T09:38:56.297Z" },+ { name = "smart-open" },+ { name = "virtualenv" },][[package]]@@ -2435,6 +2896,76 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/64/8d/0133e4eb4beed9e425d9a98ed6e081a55d195481b7632472be1af08d2f6b/rsa-4.9.1-py3-none-any.whl", hash = "sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762", size = 34696, upload-time = "2025-04-16T09:51:17.142Z" },]+[[package]]+name = "ruff"+version = "0.14.14"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/2e/06/f71e3a86b2df0dfa2d2f72195941cd09b44f87711cb7fa5193732cb9a5fc/ruff-0.14.14.tar.gz", hash = "sha256:2d0f819c9a90205f3a867dbbd0be083bee9912e170fd7d9704cc8ae45824896b", size = 4515732, upload-time = "2026-01-22T22:30:17.527Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/d2/89/20a12e97bc6b9f9f68343952da08a8099c57237aef953a56b82711d55edd/ruff-0.14.14-py3-none-linux_armv6l.whl", hash = "sha256:7cfe36b56e8489dee8fbc777c61959f60ec0f1f11817e8f2415f429552846aed", size = 10467650, upload-time = "2026-01-22T22:30:08.578Z" },+ { url = "https://files.pythonhosted.org/packages/a3/b1/c5de3fd2d5a831fcae21beda5e3589c0ba67eec8202e992388e4b17a6040/ruff-0.14.14-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6006a0082336e7920b9573ef8a7f52eec837add1265cc74e04ea8a4368cd704c", size = 10883245, upload-time = "2026-01-22T22:30:04.155Z" },+ { url = "https://files.pythonhosted.org/packages/b8/7c/3c1db59a10e7490f8f6f8559d1db8636cbb13dccebf18686f4e3c9d7c772/ruff-0.14.14-py3-none-macosx_11_0_arm64.whl", hash = "sha256:026c1d25996818f0bf498636686199d9bd0d9d6341c9c2c3b62e2a0198b758de", size = 10231273, upload-time = "2026-01-22T22:30:34.642Z" },+ { url = "https://files.pythonhosted.org/packages/a1/6e/5e0e0d9674be0f8581d1f5e0f0a04761203affce3232c1a1189d0e3b4dad/ruff-0.14.14-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f666445819d31210b71e0a6d1c01e24447a20b85458eea25a25fe8142210ae0e", size = 10585753, upload-time = "2026-01-22T22:30:31.781Z" },+ { url = "https://files.pythonhosted.org/packages/23/09/754ab09f46ff1884d422dc26d59ba18b4e5d355be147721bb2518aa2a014/ruff-0.14.14-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3c0f18b922c6d2ff9a5e6c3ee16259adc513ca775bcf82c67ebab7cbd9da5bc8", size = 10286052, upload-time = "2026-01-22T22:30:24.827Z" },+ { url = "https://files.pythonhosted.org/packages/c8/cc/e71f88dd2a12afb5f50733851729d6b571a7c3a35bfdb16c3035132675a0/ruff-0.14.14-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1629e67489c2dea43e8658c3dba659edbfd87361624b4040d1df04c9740ae906", size = 11043637, upload-time = "2026-01-22T22:30:13.239Z" },+ { url = "https://files.pythonhosted.org/packages/67/b2/397245026352494497dac935d7f00f1468c03a23a0c5db6ad8fc49ca3fb2/ruff-0.14.14-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:27493a2131ea0f899057d49d303e4292b2cae2bb57253c1ed1f256fbcd1da480", size = 12194761, upload-time = "2026-01-22T22:30:22.542Z" },+ { url = "https://files.pythonhosted.org/packages/5b/06/06ef271459f778323112c51b7587ce85230785cd64e91772034ddb88f200/ruff-0.14.14-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:01ff589aab3f5b539e35db38425da31a57521efd1e4ad1ae08fc34dbe30bd7df", size = 12005701, upload-time = "2026-01-22T22:30:20.499Z" },+ { url = "https://files.pythonhosted.org/packages/41/d6/99364514541cf811ccc5ac44362f88df66373e9fec1b9d1c4cc830593fe7/ruff-0.14.14-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1cc12d74eef0f29f51775f5b755913eb523546b88e2d733e1d701fe65144e89b", size = 11282455, upload-time = "2026-01-22T22:29:59.679Z" },+ { url = "https://files.pythonhosted.org/packages/ca/71/37daa46f89475f8582b7762ecd2722492df26421714a33e72ccc9a84d7a5/ruff-0.14.14-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb8481604b7a9e75eff53772496201690ce2687067e038b3cc31aaf16aa0b974", size = 11215882, upload-time = "2026-01-22T22:29:57.032Z" },+ { url = "https://files.pythonhosted.org/packages/2c/10/a31f86169ec91c0705e618443ee74ede0bdd94da0a57b28e72db68b2dbac/ruff-0.14.14-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:14649acb1cf7b5d2d283ebd2f58d56b75836ed8c6f329664fa91cdea19e76e66", size = 11180549, upload-time = "2026-01-22T22:30:27.175Z" },+ { url = "https://files.pythonhosted.org/packages/fd/1e/c723f20536b5163adf79bdd10c5f093414293cdf567eed9bdb7b83940f3f/ruff-0.14.14-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e8058d2145566510790eab4e2fad186002e288dec5e0d343a92fe7b0bc1b3e13", size = 10543416, upload-time = "2026-01-22T22:30:01.964Z" },+ { url = "https://files.pythonhosted.org/packages/3e/34/8a84cea7e42c2d94ba5bde1d7a4fae164d6318f13f933d92da6d7c2041ff/ruff-0.14.14-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:e651e977a79e4c758eb807f0481d673a67ffe53cfa92209781dfa3a996cf8412", size = 10285491, upload-time = "2026-01-22T22:30:29.51Z" },+ { url = "https://files.pythonhosted.org/packages/55/ef/b7c5ea0be82518906c978e365e56a77f8de7678c8bb6651ccfbdc178c29f/ruff-0.14.14-py3-none-musllinux_1_2_i686.whl", hash = "sha256:cc8b22da8d9d6fdd844a68ae937e2a0adf9b16514e9a97cc60355e2d4b219fc3", size = 10733525, upload-time = "2026-01-22T22:30:06.499Z" },+ { url = "https://files.pythonhosted.org/packages/6a/5b/aaf1dfbcc53a2811f6cc0a1759de24e4b03e02ba8762daabd9b6bd8c59e3/ruff-0.14.14-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:16bc890fb4cc9781bb05beb5ab4cd51be9e7cb376bf1dd3580512b24eb3fda2b", size = 11315626, upload-time = "2026-01-22T22:30:36.848Z" },+ { url = "https://files.pythonhosted.org/packages/2c/aa/9f89c719c467dfaf8ad799b9bae0df494513fb21d31a6059cb5870e57e74/ruff-0.14.14-py3-none-win32.whl", hash = "sha256:b530c191970b143375b6a68e6f743800b2b786bbcf03a7965b06c4bf04568167", size = 10502442, upload-time = "2026-01-22T22:30:38.93Z" },+ { url = "https://files.pythonhosted.org/packages/87/44/90fa543014c45560cae1fffc63ea059fb3575ee6e1cb654562197e5d16fb/ruff-0.14.14-py3-none-win_amd64.whl", hash = "sha256:3dde1435e6b6fe5b66506c1dff67a421d0b7f6488d466f651c07f4cab3bf20fd", size = 11630486, upload-time = "2026-01-22T22:30:10.852Z" },+ { url = "https://files.pythonhosted.org/packages/9e/6a/40fee331a52339926a92e17ae748827270b288a35ef4a15c9c8f2ec54715/ruff-0.14.14-py3-none-win_arm64.whl", hash = "sha256:56e6981a98b13a32236a72a8da421d7839221fa308b223b9283312312e5ac76c", size = 10920448, upload-time = "2026-01-22T22:30:15.417Z" },+]++[[package]]+name = "safetensors"+version = "0.7.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/29/9c/6e74567782559a63bd040a236edca26fd71bc7ba88de2ef35d75df3bca5e/safetensors-0.7.0.tar.gz", hash = "sha256:07663963b67e8bd9f0b8ad15bb9163606cd27cc5a1b96235a50d8369803b96b0", size = 200878, upload-time = "2025-11-19T15:18:43.199Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/fa/47/aef6c06649039accf914afef490268e1067ed82be62bcfa5b7e886ad15e8/safetensors-0.7.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c82f4d474cf725255d9e6acf17252991c3c8aac038d6ef363a4bf8be2f6db517", size = 467781, upload-time = "2025-11-19T15:18:35.84Z" },+ { url = "https://files.pythonhosted.org/packages/e8/00/374c0c068e30cd31f1e1b46b4b5738168ec79e7689ca82ee93ddfea05109/safetensors-0.7.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:94fd4858284736bb67a897a41608b5b0c2496c9bdb3bf2af1fa3409127f20d57", size = 447058, upload-time = "2025-11-19T15:18:34.416Z" },+ { url = "https://files.pythonhosted.org/packages/f1/06/578ffed52c2296f93d7fd2d844cabfa92be51a587c38c8afbb8ae449ca89/safetensors-0.7.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e07d91d0c92a31200f25351f4acb2bc6aff7f48094e13ebb1d0fb995b54b6542", size = 491748, upload-time = "2025-11-19T15:18:09.79Z" },+ { url = "https://files.pythonhosted.org/packages/ae/33/1debbbb70e4791dde185edb9413d1fe01619255abb64b300157d7f15dddd/safetensors-0.7.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8469155f4cb518bafb4acf4865e8bb9d6804110d2d9bdcaa78564b9fd841e104", size = 503881, upload-time = "2025-11-19T15:18:16.145Z" },+ { url = "https://files.pythonhosted.org/packages/8e/1c/40c2ca924d60792c3be509833df711b553c60effbd91da6f5284a83f7122/safetensors-0.7.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:54bef08bf00a2bff599982f6b08e8770e09cc012d7bba00783fc7ea38f1fb37d", size = 623463, upload-time = "2025-11-19T15:18:21.11Z" },+ { url = "https://files.pythonhosted.org/packages/9b/3a/13784a9364bd43b0d61eef4bea2845039bc2030458b16594a1bd787ae26e/safetensors-0.7.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:42cb091236206bb2016d245c377ed383aa7f78691748f3bb6ee1bfa51ae2ce6a", size = 532855, upload-time = "2025-11-19T15:18:25.719Z" },+ { url = "https://files.pythonhosted.org/packages/a0/60/429e9b1cb3fc651937727befe258ea24122d9663e4d5709a48c9cbfceecb/safetensors-0.7.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac7252938f0696ddea46f5e855dd3138444e82236e3be475f54929f0c510d48", size = 507152, upload-time = "2025-11-19T15:18:33.023Z" },+ { url = "https://files.pythonhosted.org/packages/3c/a8/4b45e4e059270d17af60359713ffd83f97900d45a6afa73aaa0d737d48b6/safetensors-0.7.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1d060c70284127fa805085d8f10fbd0962792aed71879d00864acda69dbab981", size = 541856, upload-time = "2025-11-19T15:18:31.075Z" },+ { url = "https://files.pythonhosted.org/packages/06/87/d26d8407c44175d8ae164a95b5a62707fcc445f3c0c56108e37d98070a3d/safetensors-0.7.0-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:cdab83a366799fa730f90a4ebb563e494f28e9e92c4819e556152ad55e43591b", size = 674060, upload-time = "2025-11-19T15:18:37.211Z" },+ { url = "https://files.pythonhosted.org/packages/11/f5/57644a2ff08dc6325816ba7217e5095f17269dada2554b658442c66aed51/safetensors-0.7.0-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:672132907fcad9f2aedcb705b2d7b3b93354a2aec1b2f706c4db852abe338f85", size = 771715, upload-time = "2025-11-19T15:18:38.689Z" },+ { url = "https://files.pythonhosted.org/packages/86/31/17883e13a814bd278ae6e266b13282a01049b0c81341da7fd0e3e71a80a3/safetensors-0.7.0-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:5d72abdb8a4d56d4020713724ba81dac065fedb7f3667151c4a637f1d3fb26c0", size = 714377, upload-time = "2025-11-19T15:18:40.162Z" },+ { url = "https://files.pythonhosted.org/packages/4a/d8/0c8a7dc9b41dcac53c4cbf9df2b9c83e0e0097203de8b37a712b345c0be5/safetensors-0.7.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b0f6d66c1c538d5a94a73aa9ddca8ccc4227e6c9ff555322ea40bdd142391dd4", size = 677368, upload-time = "2025-11-19T15:18:41.627Z" },+ { url = "https://files.pythonhosted.org/packages/05/e5/cb4b713c8a93469e3c5be7c3f8d77d307e65fe89673e731f5c2bfd0a9237/safetensors-0.7.0-cp38-abi3-win32.whl", hash = "sha256:c74af94bf3ac15ac4d0f2a7c7b4663a15f8c2ab15ed0fc7531ca61d0835eccba", size = 326423, upload-time = "2025-11-19T15:18:45.74Z" },+ { url = "https://files.pythonhosted.org/packages/5d/e6/ec8471c8072382cb91233ba7267fd931219753bb43814cbc71757bfd4dab/safetensors-0.7.0-cp38-abi3-win_amd64.whl", hash = "sha256:d1239932053f56f3456f32eb9625590cc7582e905021f94636202a864d470755", size = 341380, upload-time = "2025-11-19T15:18:44.427Z" },+]++[[package]]+name = "sentry-sdk"+version = "2.50.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "certifi" },+ { name = "urllib3" },+]+sdist = { url = "https://files.pythonhosted.org/packages/15/8a/3c4f53d32c21012e9870913544e56bfa9e931aede080779a0f177513f534/sentry_sdk-2.50.0.tar.gz", hash = "sha256:873437a989ee1b8b25579847bae8384515bf18cfed231b06c591b735c1781fe3", size = 401233, upload-time = "2026-01-20T12:53:16.244Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/4e/5b/cbc2bb9569f03c8e15d928357e7e6179e5cfab45544a3bbac8aec4caf9be/sentry_sdk-2.50.0-py2.py3-none-any.whl", hash = "sha256:0ef0ed7168657ceb5a0be081f4102d92042a125462d1d1a29277992e344e749e", size = 424961, upload-time = "2026-01-20T12:53:14.826Z" },+]++[[package]]+name = "setuptools"+version = "80.10.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/76/95/faf61eb8363f26aa7e1d762267a8d602a1b26d4f3a1e758e92cb3cb8b054/setuptools-80.10.2.tar.gz", hash = "sha256:8b0e9d10c784bf7d262c4e5ec5d4ec94127ce206e8738f29a437945fbc219b70", size = 1200343, upload-time = "2026-01-25T22:38:17.252Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/94/b8/f1f62a5e3c0ad2ff1d189590bfa4c46b4f3b6e49cef6f26c6ee4e575394d/setuptools-80.10.2-py3-none-any.whl", hash = "sha256:95b30ddfb717250edb492926c92b5221f7ef3fbcc2b07579bcd4a27da21d0173", size = 1064234, upload-time = "2026-01-25T22:38:15.216Z" },+]+[[package]]name = "six"version = "1.17.0"@@ -2444,6 +2975,27 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" },]+[[package]]+name = "smart-open"+version = "7.5.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "wrapt" },+]+sdist = { url = "https://files.pythonhosted.org/packages/67/9a/0a7acb748b86e2922982366d780ca4b16c33f7246fa5860d26005c97e4f3/smart_open-7.5.0.tar.gz", hash = "sha256:f394b143851d8091011832ac8113ea4aba6b92e6c35f6e677ddaaccb169d7cb9", size = 53920, upload-time = "2025-11-08T21:38:40.698Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ad/95/bc978be7ea0babf2fb48a414b6afaad414c6a9e8b1eafc5b8a53c030381a/smart_open-7.5.0-py3-none-any.whl", hash = "sha256:87e695c5148bbb988f15cec00971602765874163be85acb1c9fb8abc012e6599", size = 63940, upload-time = "2025-11-08T21:38:39.024Z" },+]++[[package]]+name = "smmap"+version = "5.0.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz", hash = "sha256:26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5", size = 22329, upload-time = "2025-01-02T07:14:40.909Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/04/be/d09147ad1ec7934636ad912901c5fd7667e1c858e19d355237db0d0cd5e4/smmap-5.0.2-py3-none-any.whl", hash = "sha256:b30115f0def7d7531d22a0fb6502488d879e75b260a9db4d0819cfb25403af5e", size = 24303, upload-time = "2025-01-02T07:14:38.724Z" },+]+[[package]]name = "sniffio"version = "1.3.1"@@ -2476,12 +3028,30 @@ wheels = [][[package]]-name = "tenacity"-version = "9.1.2"+name = "sympy"+version = "1.14.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "mpmath" },+]+sdist = { url = "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517", size = 7793921, upload-time = "2025-04-27T18:05:01.611Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", size = 6299353, upload-time = "2025-04-27T18:04:59.103Z" },+]++[[package]]+name = "tensordict"+version = "0.6.2"source = { registry = "https://pypi.org/simple" }-sdist = { url = "https://files.pythonhosted.org/packages/0a/d4/2b0cd0fe285e14b36db076e78c93766ff1d529d70408bd1d2a5a84f1d929/tenacity-9.1.2.tar.gz", hash = "sha256:1169d376c297e7de388d18b4481760d478b0e99a777cad3a9c86e556f4b697cb", size = 48036, upload-time = "2025-04-02T08:25:09.966Z" }+dependencies = [+ { name = "cloudpickle" },+ { name = "numpy" },+ { name = "orjson" },+ { name = "torch" },+]wheels = [- { url = "https://files.pythonhosted.org/packages/e5/30/643397144bfbfec6f6ef821f36f33e57d35946c44a2352d3c9f0ae847619/tenacity-9.1.2-py3-none-any.whl", hash = "sha256:f77bf36710d8b73a50b2dd155c97b870017ad21afe6ab300326b0371b3b05138", size = 28248, upload-time = "2025-04-02T08:25:07.678Z" },+ { url = "https://files.pythonhosted.org/packages/d2/17/a2bdb51d5d1b2f06debdf8f60c159cf328c778b6cc8103940f2079e2e767/tensordict-0.6.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:529515ffcb0c6ab5d1c0c85798defe8972e5390412c356c79b87f4073e48b537", size = 668892, upload-time = "2024-11-14T15:02:37.036Z" },+ { url = "https://files.pythonhosted.org/packages/64/aa/2b562740c8be079aba4bb9eb37cb94ed042d65e48f739577eb70eee617c2/tensordict-0.6.2-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:6ce86d8f9ed53d1c893e0064729a799eb06371902e2d5a2f3c83c6af010cf3c2", size = 360647, upload-time = "2024-11-14T15:02:38.475Z" },][[package]]@@ -2542,6 +3112,88 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/b3/46/e33a8c93907b631a99377ef4c5f817ab453d0b34f93529421f42ff559671/tokenizers-0.22.1-cp39-abi3-win_amd64.whl", hash = "sha256:65fd6e3fb11ca1e78a6a93602490f134d1fdeb13bcef99389d5102ea318ed138", size = 2674684, upload-time = "2025-09-19T09:49:24.953Z" },]+[[package]]+name = "torch"+version = "2.10.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "cuda-bindings", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "filelock" },+ { name = "fsspec" },+ { name = "jinja2" },+ { name = "networkx" },+ { name = "nvidia-cublas-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-cuda-cupti-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-cuda-nvrtc-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-cuda-runtime-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-cudnn-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-cufft-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-cufile-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-curand-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-cusolver-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-cusparse-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-cusparselt-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-nccl-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-nvjitlink-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-nvshmem-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "nvidia-nvtx-cu12", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "setuptools" },+ { name = "sympy" },+ { name = "triton", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },+ { name = "typing-extensions" },+]+wheels = [+ { url = "https://files.pythonhosted.org/packages/cc/af/758e242e9102e9988969b5e621d41f36b8f258bb4a099109b7a4b4b50ea4/torch-2.10.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:5fd4117d89ffd47e3dcc71e71a22efac24828ad781c7e46aaaf56bf7f2796acf", size = 145996088, upload-time = "2026-01-21T16:24:44.171Z" },+ { url = "https://files.pythonhosted.org/packages/23/8e/3c74db5e53bff7ed9e34c8123e6a8bfef718b2450c35eefab85bb4a7e270/torch-2.10.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:787124e7db3b379d4f1ed54dd12ae7c741c16a4d29b49c0226a89bea50923ffb", size = 915711952, upload-time = "2026-01-21T16:23:53.503Z" },+ { url = "https://files.pythonhosted.org/packages/6e/01/624c4324ca01f66ae4c7cd1b74eb16fb52596dce66dbe51eff95ef9e7a4c/torch-2.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:2c66c61f44c5f903046cc696d088e21062644cbe541c7f1c4eaae88b2ad23547", size = 113757972, upload-time = "2026-01-21T16:24:39.516Z" },+ { url = "https://files.pythonhosted.org/packages/c9/5c/dee910b87c4d5c0fcb41b50839ae04df87c1cfc663cf1b5fca7ea565eeaa/torch-2.10.0-cp312-none-macosx_11_0_arm64.whl", hash = "sha256:6d3707a61863d1c4d6ebba7be4ca320f42b869ee657e9b2c21c736bf17000294", size = 79498198, upload-time = "2026-01-21T16:24:34.704Z" },+ { url = "https://files.pythonhosted.org/packages/c9/6f/f2e91e34e3fcba2e3fc8d8f74e7d6c22e74e480bbd1db7bc8900fdf3e95c/torch-2.10.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:5c4d217b14741e40776dd7074d9006fd28b8a97ef5654db959d8635b2fe5f29b", size = 146004247, upload-time = "2026-01-21T16:24:29.335Z" },+ { url = "https://files.pythonhosted.org/packages/98/fb/5160261aeb5e1ee12ee95fe599d0541f7c976c3701d607d8fc29e623229f/torch-2.10.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:6b71486353fce0f9714ca0c9ef1c850a2ae766b409808acd58e9678a3edb7738", size = 915716445, upload-time = "2026-01-21T16:22:45.353Z" },+ { url = "https://files.pythonhosted.org/packages/6a/16/502fb1b41e6d868e8deb5b0e3ae926bbb36dab8ceb0d1b769b266ad7b0c3/torch-2.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:c2ee399c644dc92ef7bc0d4f7e74b5360c37cdbe7c5ba11318dda49ffac2bc57", size = 113757050, upload-time = "2026-01-21T16:24:19.204Z" },+ { url = "https://files.pythonhosted.org/packages/1a/0b/39929b148f4824bc3ad6f9f72a29d4ad865bcf7ebfc2fa67584773e083d2/torch-2.10.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:3202429f58309b9fa96a614885eace4b7995729f44beb54d3e4a47773649d382", size = 79851305, upload-time = "2026-01-21T16:24:09.209Z" },+ { url = "https://files.pythonhosted.org/packages/d8/14/21fbce63bc452381ba5f74a2c0a959fdf5ad5803ccc0c654e752e0dbe91a/torch-2.10.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:aae1b29cd68e50a9397f5ee897b9c24742e9e306f88a807a27d617f07adb3bd8", size = 146005472, upload-time = "2026-01-21T16:22:29.022Z" },+ { url = "https://files.pythonhosted.org/packages/54/fd/b207d1c525cb570ef47f3e9f836b154685011fce11a2f444ba8a4084d042/torch-2.10.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:6021db85958db2f07ec94e1bc77212721ba4920c12a18dc552d2ae36a3eb163f", size = 915612644, upload-time = "2026-01-21T16:21:47.019Z" },+ { url = "https://files.pythonhosted.org/packages/36/53/0197f868c75f1050b199fe58f9bf3bf3aecac9b4e85cc9c964383d745403/torch-2.10.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ff43db38af76fda183156153983c9a096fc4c78d0cd1e07b14a2314c7f01c2c8", size = 113997015, upload-time = "2026-01-21T16:23:00.767Z" },+ { url = "https://files.pythonhosted.org/packages/0e/13/e76b4d9c160e89fff48bf16b449ea324bda84745d2ab30294c37c2434c0d/torch-2.10.0-cp313-none-macosx_11_0_arm64.whl", hash = "sha256:cdf2a523d699b70d613243211ecaac14fe9c5df8a0b0a9c02add60fb2a413e0f", size = 79498248, upload-time = "2026-01-21T16:23:09.315Z" },+]++[[package]]+name = "torchdata"+version = "0.11.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "requests" },+ { name = "torch" },+ { name = "urllib3" },+]+wheels = [+ { url = "https://files.pythonhosted.org/packages/95/d4/af694ef718aedbe95a72760ab9ff7a6a7a44ace2d7f70c27bfeb67c5c503/torchdata-0.11.0-py3-none-any.whl", hash = "sha256:52b940fbbe0e00fb21cabddf528449d1bec5bfb0d0823b7487b15f951658ee33", size = 61968, upload-time = "2025-02-20T22:26:30.666Z" },+]++[[package]]+name = "torchvision"+version = "0.25.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "numpy" },+ { name = "pillow" },+ { name = "torch" },+]+wheels = [+ { url = "https://files.pythonhosted.org/packages/56/3a/6ea0d73f49a9bef38a1b3a92e8dd455cea58470985d25635beab93841748/torchvision-0.25.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c2abe430c90b1d5e552680037d68da4eb80a5852ebb1c811b2b89d299b10573b", size = 1874920, upload-time = "2026-01-21T16:27:45.348Z" },+ { url = "https://files.pythonhosted.org/packages/51/f8/c0e1ef27c66e15406fece94930e7d6feee4cb6374bbc02d945a630d6426e/torchvision-0.25.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:b75deafa2dfea3e2c2a525559b04783515e3463f6e830cb71de0fb7ea36fe233", size = 2344556, upload-time = "2026-01-21T16:27:40.125Z" },+ { url = "https://files.pythonhosted.org/packages/68/2f/f24b039169db474e8688f649377de082a965fbf85daf4e46c44412f1d15a/torchvision-0.25.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:f25aa9e380865b11ea6e9d99d84df86b9cc959f1a007cd966fc6f1ab2ed0e248", size = 8072351, upload-time = "2026-01-21T16:27:21.074Z" },+ { url = "https://files.pythonhosted.org/packages/ad/16/8f650c2e288977cf0f8f85184b90ee56ed170a4919347fc74ee99286ed6f/torchvision-0.25.0-cp312-cp312-win_amd64.whl", hash = "sha256:f9c55ae8d673ab493325d1267cbd285bb94d56f99626c00ac4644de32a59ede3", size = 4303059, upload-time = "2026-01-21T16:27:11.08Z" },+ { url = "https://files.pythonhosted.org/packages/f5/5b/1562a04a6a5a4cf8cf40016a0cdeda91ede75d6962cff7f809a85ae966a5/torchvision-0.25.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:24e11199e4d84ba9c5ee7825ebdf1cd37ce8deec225117f10243cae984ced3ec", size = 1874918, upload-time = "2026-01-21T16:27:39.02Z" },+ { url = "https://files.pythonhosted.org/packages/36/b1/3d6c42f62c272ce34fcce609bb8939bdf873dab5f1b798fd4e880255f129/torchvision-0.25.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:5f271136d2d2c0b7a24c5671795c6e4fd8da4e0ea98aeb1041f62bc04c4370ef", size = 2309106, upload-time = "2026-01-21T16:27:30.624Z" },+ { url = "https://files.pythonhosted.org/packages/c7/60/59bb9c8b67cce356daeed4cb96a717caa4f69c9822f72e223a0eae7a9bd9/torchvision-0.25.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:855c0dc6d37f462482da7531c6788518baedca1e0847f3df42a911713acdfe52", size = 8071522, upload-time = "2026-01-21T16:27:29.392Z" },+ { url = "https://files.pythonhosted.org/packages/32/a5/9a9b1de0720f884ea50dbf9acb22cbe5312e51d7b8c4ac6ba9b51efd9bba/torchvision-0.25.0-cp313-cp313-win_amd64.whl", hash = "sha256:cef0196be31be421f6f462d1e9da1101be7332d91984caa6f8022e6c78a5877f", size = 4321911, upload-time = "2026-01-21T16:27:35.195Z" },+ { url = "https://files.pythonhosted.org/packages/52/99/dca81ed21ebaeff2b67cc9f815a20fdaa418b69f5f9ea4c6ed71721470db/torchvision-0.25.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a8f8061284395ce31bcd460f2169013382ccf411148ceb2ee38e718e9860f5a7", size = 1896209, upload-time = "2026-01-21T16:27:32.159Z" },+ { url = "https://files.pythonhosted.org/packages/28/cc/2103149761fdb4eaed58a53e8437b2d716d48f05174fab1d9fcf1e2a2244/torchvision-0.25.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:146d02c9876858420adf41f3189fe90e3d6a409cbfa65454c09f25fb33bf7266", size = 2310735, upload-time = "2026-01-21T16:27:22.327Z" },+ { url = "https://files.pythonhosted.org/packages/76/ad/f4c985ad52ddd3b22711c588501be1b330adaeaf6850317f66751711b78c/torchvision-0.25.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:c4d395cb2c4a2712f6eb93a34476cdf7aae74bb6ea2ea1917f858e96344b00aa", size = 8089557, upload-time = "2026-01-21T16:27:27.666Z" },+ { url = "https://files.pythonhosted.org/packages/63/cc/0ea68b5802e5e3c31f44b307e74947bad5a38cc655231d845534ed50ddb8/torchvision-0.25.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5e6b449e9fa7d642142c0e27c41e5a43b508d57ed8e79b7c0a0c28652da8678c", size = 4344260, upload-time = "2026-01-21T16:27:17.018Z" },+]+[[package]]name = "tqdm"version = "4.67.1"@@ -2554,6 +3206,37 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2", size = 78540, upload-time = "2024-11-24T20:12:19.698Z" },]+[[package]]+name = "transformers"+version = "4.57.6"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "filelock" },+ { name = "huggingface-hub" },+ { name = "numpy" },+ { name = "packaging" },+ { name = "pyyaml" },+ { name = "regex" },+ { name = "requests" },+ { name = "safetensors" },+ { name = "tokenizers" },+ { name = "tqdm" },+]+sdist = { url = "https://files.pythonhosted.org/packages/c4/35/67252acc1b929dc88b6602e8c4a982e64f31e733b804c14bc24b47da35e6/transformers-4.57.6.tar.gz", hash = "sha256:55e44126ece9dc0a291521b7e5492b572e6ef2766338a610b9ab5afbb70689d3", size = 10134912, upload-time = "2026-01-16T10:38:39.284Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/03/b8/e484ef633af3887baeeb4b6ad12743363af7cce68ae51e938e00aaa0529d/transformers-4.57.6-py3-none-any.whl", hash = "sha256:4c9e9de11333ddfe5114bc872c9f370509198acf0b87a832a0ab9458e2bd0550", size = 11993498, upload-time = "2026-01-16T10:38:31.289Z" },+]++[[package]]+name = "triton"+version = "3.6.0"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ab/a8/cdf8b3e4c98132f965f88c2313a4b493266832ad47fb52f23d14d4f86bb5/triton-3.6.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:74caf5e34b66d9f3a429af689c1c7128daba1d8208df60e81106b115c00d6fca", size = 188266850, upload-time = "2026-01-20T16:00:43.041Z" },+ { url = "https://files.pythonhosted.org/packages/f9/0b/37d991d8c130ce81a8728ae3c25b6e60935838e9be1b58791f5997b24a54/triton-3.6.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10c7f76c6e72d2ef08df639e3d0d30729112f47a56b0c81672edc05ee5116ac9", size = 188289450, upload-time = "2026-01-20T16:00:49.136Z" },+ { url = "https://files.pythonhosted.org/packages/35/f8/9c66bfc55361ec6d0e4040a0337fb5924ceb23de4648b8a81ae9d33b2b38/triton-3.6.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d002e07d7180fd65e622134fbd980c9a3d4211fb85224b56a0a0efbd422ab72f", size = 188400296, upload-time = "2026-01-20T16:00:56.042Z" },+]+[[package]]name = "typing-extensions"version = "4.15.0"@@ -2584,23 +3267,6 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/5c/23/c7abc0ca0a1526a0774eca151daeb8de62ec457e77262b66b359c3c7679e/tzdata-2025.2-py2.py3-none-any.whl", hash = "sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8", size = 347839, upload-time = "2025-03-23T13:54:41.845Z" },]-[[package]]-name = "uigen-env"-version = "0.1.0"-source = { virtual = "tasks/uigen_env" }-dependencies = [- { name = "beautifulsoup4" },- { name = "html5lib" },- { name = "pyquery" },-]--[package.metadata]-requires-dist = [- { name = "beautifulsoup4", specifier = ">=4.14.2" },- { name = "html5lib", specifier = ">=1.1" },- { name = "pyquery", specifier = ">=2.0.1" },-]-[[package]]name = "urllib3"version = "2.5.0"@@ -2623,6 +3289,77 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/ee/d9/d88e73ca598f4f6ff671fb5fde8a32925c2e08a637303a1d12883c7305fa/uvicorn-0.38.0-py3-none-any.whl", hash = "sha256:48c0afd214ceb59340075b4a052ea1ee91c16fbc2a9b1469cca0e54566977b02", size = 68109, upload-time = "2025-10-18T13:46:42.958Z" },]+[[package]]+name = "verl"+version = "0.4.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "accelerate" },+ { name = "codetiming" },+ { name = "datasets" },+ { name = "dill" },+ { name = "hydra-core" },+ { name = "numpy" },+ { name = "packaging" },+ { name = "pandas" },+ { name = "peft" },+ { name = "pyarrow" },+ { name = "pybind11" },+ { name = "pylatexenc" },+ { name = "ray", extra = ["default"] },+ { name = "tensordict" },+ { name = "torchdata" },+ { name = "transformers" },+ { name = "wandb" },+]+sdist = { url = "https://files.pythonhosted.org/packages/23/9e/30621d81bb656b9e1cdb331b7ac57c8ff491040a9a342dcb51478420f30f/verl-0.4.1.tar.gz", hash = "sha256:54ed6a5a30e0a170f2f781be98809d3364c57439dfdcab5aa836887f19394bee", size = 525329, upload-time = "2025-06-27T00:11:52.924Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ab/ef/7c43b6339ed4598657be1955fea62d1e8982e50cb284fac09ac18136b6b7/verl-0.4.1-py2.py3-none-any.whl", hash = "sha256:160a9fe5509f8d1c1ec98c00a18925128387b25c97420fb8e836f6e848cf20aa", size = 747002, upload-time = "2025-06-27T00:11:49.374Z" },+]++[[package]]+name = "virtualenv"+version = "20.35.4"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "distlib" },+ { name = "filelock" },+ { name = "platformdirs" },+]+sdist = { url = "https://files.pythonhosted.org/packages/20/28/e6f1a6f655d620846bd9df527390ecc26b3805a0c5989048c210e22c5ca9/virtualenv-20.35.4.tar.gz", hash = "sha256:643d3914d73d3eeb0c552cbb12d7e82adf0e504dbf86a3182f8771a153a1971c", size = 6028799, upload-time = "2025-10-29T06:57:40.511Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/79/0c/c05523fa3181fdf0c9c52a6ba91a23fbf3246cc095f26f6516f9c60e6771/virtualenv-20.35.4-py3-none-any.whl", hash = "sha256:c21c9cede36c9753eeade68ba7d523529f228a403463376cf821eaae2b650f1b", size = 6005095, upload-time = "2025-10-29T06:57:37.598Z" },+]++[[package]]+name = "wandb"+version = "0.24.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "click" },+ { name = "gitpython" },+ { name = "packaging" },+ { name = "platformdirs" },+ { name = "protobuf" },+ { name = "pydantic" },+ { name = "pyyaml" },+ { name = "requests" },+ { name = "sentry-sdk" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/27/7e/aad6e943012ea4d88f3a037f1a5a7c6898263c60fbef8c9cdb95a8ff9fd9/wandb-0.24.0.tar.gz", hash = "sha256:4715a243b3d460b6434b9562e935dfd9dfdf5d6e428cfb4c3e7ce4fd44460ab3", size = 44197947, upload-time = "2026-01-13T22:59:59.767Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/5f/8a/efec186dcc5dcf3c806040e3f33e58997878b2d30b87aa02b26f046858b6/wandb-0.24.0-py3-none-macosx_12_0_arm64.whl", hash = "sha256:aa9777398ff4b0f04c41359f7d1b95b5d656cb12c37c63903666799212e50299", size = 21464901, upload-time = "2026-01-13T22:59:31.86Z" },+ { url = "https://files.pythonhosted.org/packages/ed/84/fadf0d5f1d86c3ba662d2b33a15d2b1f08ff1e4e196c77e455f028b0fda2/wandb-0.24.0-py3-none-macosx_12_0_x86_64.whl", hash = "sha256:0423fbd58c3926949724feae8aab89d20c68846f9f4f596b80f9ffe1fc298130", size = 22697817, upload-time = "2026-01-13T22:59:35.267Z" },+ { url = "https://files.pythonhosted.org/packages/6e/5f/e3124e68d02b30c62856175ce714e07904730be06eecb00f66bb1a59aacf/wandb-0.24.0-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:2b25fc0c123daac97ed32912ac55642c65013cc6e3a898e88ca2d917fc8eadc0", size = 21118798, upload-time = "2026-01-13T22:59:38.453Z" },+ { url = "https://files.pythonhosted.org/packages/22/a1/8d68a914c030e897c306c876d47c73aa5d9ca72be608971290d3a5749570/wandb-0.24.0-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:9485344b4667944b5b77294185bae8469cfa4074869bec0e74f54f8492234cc2", size = 22849954, upload-time = "2026-01-13T22:59:41.265Z" },+ { url = "https://files.pythonhosted.org/packages/e9/f8/3e68841a4282a4fb6a8935534e6064acc6c9708e8fb76953ec73bbc72a5e/wandb-0.24.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:51b2b9a9d7d6b35640f12a46a48814fd4516807ad44f586b819ed6560f8de1fd", size = 21160339, upload-time = "2026-01-13T22:59:43.967Z" },+ { url = "https://files.pythonhosted.org/packages/16/e5/d851868ce5b4b437a7cc90405979cd83809790e4e2a2f1e454f63f116e52/wandb-0.24.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:11f7e7841f31eff82c82a677988889ad3aa684c6de61ff82145333b5214ec860", size = 22936978, upload-time = "2026-01-13T22:59:46.911Z" },+ { url = "https://files.pythonhosted.org/packages/d2/34/43b7f18870051047ce6fe18e7eb24ba7ebdc71663a8f1c58e31e855eb8ac/wandb-0.24.0-py3-none-win32.whl", hash = "sha256:42af348998b00d4309ae790c5374040ac6cc353ab21567f4e29c98c9376dee8e", size = 22118243, upload-time = "2026-01-13T22:59:49.555Z" },+ { url = "https://files.pythonhosted.org/packages/a1/92/909c81173cf1399111f57f9ca5399a8f165607b024e406e080178c878f70/wandb-0.24.0-py3-none-win_amd64.whl", hash = "sha256:32604eddcd362e1ed4a2e2ce5f3a239369c4a193af223f3e66603481ac91f336", size = 22118246, upload-time = "2026-01-13T22:59:52.126Z" },+ { url = "https://files.pythonhosted.org/packages/87/85/a845aefd9c2285f98261fa6ffa0a14466366c1ac106d35bc84b654c0ad7f/wandb-0.24.0-py3-none-win_arm64.whl", hash = "sha256:e0f2367552abfca21b0f3a03405fbf48f1e14de9846e70f73c6af5da57afd8ef", size = 20077678, upload-time = "2026-01-13T22:59:56.112Z" },+]+[[package]]name = "webencodings"version = "0.5.1"@@ -2672,6 +3409,51 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/fa/a8/5b41e0da817d64113292ab1f8247140aac61cbf6cfd085d6a0fa77f4984f/websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f", size = 169743, upload-time = "2025-03-05T20:03:39.41Z" },]+[[package]]+name = "wrapt"+version = "2.0.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/49/2a/6de8a50cb435b7f42c46126cf1a54b2aab81784e74c8595c8e025e8f36d3/wrapt-2.0.1.tar.gz", hash = "sha256:9c9c635e78497cacb81e84f8b11b23e0aacac7a136e73b8e5b2109a1d9fc468f", size = 82040, upload-time = "2025-11-07T00:45:33.312Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/cb/73/8cb252858dc8254baa0ce58ce382858e3a1cf616acebc497cb13374c95c6/wrapt-2.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1fdbb34da15450f2b1d735a0e969c24bdb8d8924892380126e2a293d9902078c", size = 78129, upload-time = "2025-11-07T00:43:48.852Z" },+ { url = "https://files.pythonhosted.org/packages/19/42/44a0db2108526ee6e17a5ab72478061158f34b08b793df251d9fbb9a7eb4/wrapt-2.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3d32794fe940b7000f0519904e247f902f0149edbe6316c710a8562fb6738841", size = 61205, upload-time = "2025-11-07T00:43:50.402Z" },+ { url = "https://files.pythonhosted.org/packages/4d/8a/5b4b1e44b791c22046e90d9b175f9a7581a8cc7a0debbb930f81e6ae8e25/wrapt-2.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:386fb54d9cd903ee0012c09291336469eb7b244f7183d40dc3e86a16a4bace62", size = 61692, upload-time = "2025-11-07T00:43:51.678Z" },+ { url = "https://files.pythonhosted.org/packages/11/53/3e794346c39f462bcf1f58ac0487ff9bdad02f9b6d5ee2dc84c72e0243b2/wrapt-2.0.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7b219cb2182f230676308cdcacd428fa837987b89e4b7c5c9025088b8a6c9faf", size = 121492, upload-time = "2025-11-07T00:43:55.017Z" },+ { url = "https://files.pythonhosted.org/packages/c6/7e/10b7b0e8841e684c8ca76b462a9091c45d62e8f2de9c4b1390b690eadf16/wrapt-2.0.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:641e94e789b5f6b4822bb8d8ebbdfc10f4e4eae7756d648b717d980f657a9eb9", size = 123064, upload-time = "2025-11-07T00:43:56.323Z" },+ { url = "https://files.pythonhosted.org/packages/0e/d1/3c1e4321fc2f5ee7fd866b2d822aa89b84495f28676fd976c47327c5b6aa/wrapt-2.0.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fe21b118b9f58859b5ebaa4b130dee18669df4bd111daad082b7beb8799ad16b", size = 117403, upload-time = "2025-11-07T00:43:53.258Z" },+ { url = "https://files.pythonhosted.org/packages/a4/b0/d2f0a413cf201c8c2466de08414a15420a25aa83f53e647b7255cc2fab5d/wrapt-2.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:17fb85fa4abc26a5184d93b3efd2dcc14deb4b09edcdb3535a536ad34f0b4dba", size = 121500, upload-time = "2025-11-07T00:43:57.468Z" },+ { url = "https://files.pythonhosted.org/packages/bd/45/bddb11d28ca39970a41ed48a26d210505120f925918592283369219f83cc/wrapt-2.0.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:b89ef9223d665ab255ae42cc282d27d69704d94be0deffc8b9d919179a609684", size = 116299, upload-time = "2025-11-07T00:43:58.877Z" },+ { url = "https://files.pythonhosted.org/packages/81/af/34ba6dd570ef7a534e7eec0c25e2615c355602c52aba59413411c025a0cb/wrapt-2.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a453257f19c31b31ba593c30d997d6e5be39e3b5ad9148c2af5a7314061c63eb", size = 120622, upload-time = "2025-11-07T00:43:59.962Z" },+ { url = "https://files.pythonhosted.org/packages/e2/3e/693a13b4146646fb03254636f8bafd20c621955d27d65b15de07ab886187/wrapt-2.0.1-cp312-cp312-win32.whl", hash = "sha256:3e271346f01e9c8b1130a6a3b0e11908049fe5be2d365a5f402778049147e7e9", size = 58246, upload-time = "2025-11-07T00:44:03.169Z" },+ { url = "https://files.pythonhosted.org/packages/a7/36/715ec5076f925a6be95f37917b66ebbeaa1372d1862c2ccd7a751574b068/wrapt-2.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:2da620b31a90cdefa9cd0c2b661882329e2e19d1d7b9b920189956b76c564d75", size = 60492, upload-time = "2025-11-07T00:44:01.027Z" },+ { url = "https://files.pythonhosted.org/packages/ef/3e/62451cd7d80f65cc125f2b426b25fbb6c514bf6f7011a0c3904fc8c8df90/wrapt-2.0.1-cp312-cp312-win_arm64.whl", hash = "sha256:aea9c7224c302bc8bfc892b908537f56c430802560e827b75ecbde81b604598b", size = 58987, upload-time = "2025-11-07T00:44:02.095Z" },+ { url = "https://files.pythonhosted.org/packages/ad/fe/41af4c46b5e498c90fc87981ab2972fbd9f0bccda597adb99d3d3441b94b/wrapt-2.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:47b0f8bafe90f7736151f61482c583c86b0693d80f075a58701dd1549b0010a9", size = 78132, upload-time = "2025-11-07T00:44:04.628Z" },+ { url = "https://files.pythonhosted.org/packages/1c/92/d68895a984a5ebbbfb175512b0c0aad872354a4a2484fbd5552e9f275316/wrapt-2.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:cbeb0971e13b4bd81d34169ed57a6dda017328d1a22b62fda45e1d21dd06148f", size = 61211, upload-time = "2025-11-07T00:44:05.626Z" },+ { url = "https://files.pythonhosted.org/packages/e8/26/ba83dc5ae7cf5aa2b02364a3d9cf74374b86169906a1f3ade9a2d03cf21c/wrapt-2.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:eb7cffe572ad0a141a7886a1d2efa5bef0bf7fe021deeea76b3ab334d2c38218", size = 61689, upload-time = "2025-11-07T00:44:06.719Z" },+ { url = "https://files.pythonhosted.org/packages/cf/67/d7a7c276d874e5d26738c22444d466a3a64ed541f6ef35f740dbd865bab4/wrapt-2.0.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:c8d60527d1ecfc131426b10d93ab5d53e08a09c5fa0175f6b21b3252080c70a9", size = 121502, upload-time = "2025-11-07T00:44:09.557Z" },+ { url = "https://files.pythonhosted.org/packages/0f/6b/806dbf6dd9579556aab22fc92908a876636e250f063f71548a8660382184/wrapt-2.0.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c654eafb01afac55246053d67a4b9a984a3567c3808bb7df2f8de1c1caba2e1c", size = 123110, upload-time = "2025-11-07T00:44:10.64Z" },+ { url = "https://files.pythonhosted.org/packages/e5/08/cdbb965fbe4c02c5233d185d070cabed2ecc1f1e47662854f95d77613f57/wrapt-2.0.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:98d873ed6c8b4ee2418f7afce666751854d6d03e3c0ec2a399bb039cd2ae89db", size = 117434, upload-time = "2025-11-07T00:44:08.138Z" },+ { url = "https://files.pythonhosted.org/packages/2d/d1/6aae2ce39db4cb5216302fa2e9577ad74424dfbe315bd6669725569e048c/wrapt-2.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c9e850f5b7fc67af856ff054c71690d54fa940c3ef74209ad9f935b4f66a0233", size = 121533, upload-time = "2025-11-07T00:44:12.142Z" },+ { url = "https://files.pythonhosted.org/packages/79/35/565abf57559fbe0a9155c29879ff43ce8bd28d2ca61033a3a3dd67b70794/wrapt-2.0.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:e505629359cb5f751e16e30cf3f91a1d3ddb4552480c205947da415d597f7ac2", size = 116324, upload-time = "2025-11-07T00:44:13.28Z" },+ { url = "https://files.pythonhosted.org/packages/e1/e0/53ff5e76587822ee33e560ad55876d858e384158272cd9947abdd4ad42ca/wrapt-2.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2879af909312d0baf35f08edeea918ee3af7ab57c37fe47cb6a373c9f2749c7b", size = 120627, upload-time = "2025-11-07T00:44:14.431Z" },+ { url = "https://files.pythonhosted.org/packages/7c/7b/38df30fd629fbd7612c407643c63e80e1c60bcc982e30ceeae163a9800e7/wrapt-2.0.1-cp313-cp313-win32.whl", hash = "sha256:d67956c676be5a24102c7407a71f4126d30de2a569a1c7871c9f3cabc94225d7", size = 58252, upload-time = "2025-11-07T00:44:17.814Z" },+ { url = "https://files.pythonhosted.org/packages/85/64/d3954e836ea67c4d3ad5285e5c8fd9d362fd0a189a2db622df457b0f4f6a/wrapt-2.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:9ca66b38dd642bf90c59b6738af8070747b610115a39af2498535f62b5cdc1c3", size = 60500, upload-time = "2025-11-07T00:44:15.561Z" },+ { url = "https://files.pythonhosted.org/packages/89/4e/3c8b99ac93527cfab7f116089db120fef16aac96e5f6cdb724ddf286086d/wrapt-2.0.1-cp313-cp313-win_arm64.whl", hash = "sha256:5a4939eae35db6b6cec8e7aa0e833dcca0acad8231672c26c2a9ab7a0f8ac9c8", size = 58993, upload-time = "2025-11-07T00:44:16.65Z" },+ { url = "https://files.pythonhosted.org/packages/f9/f4/eff2b7d711cae20d220780b9300faa05558660afb93f2ff5db61fe725b9a/wrapt-2.0.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:a52f93d95c8d38fed0669da2ebdb0b0376e895d84596a976c15a9eb45e3eccb3", size = 82028, upload-time = "2025-11-07T00:44:18.944Z" },+ { url = "https://files.pythonhosted.org/packages/0c/67/cb945563f66fd0f61a999339460d950f4735c69f18f0a87ca586319b1778/wrapt-2.0.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:4e54bbf554ee29fcceee24fa41c4d091398b911da6e7f5d7bffda963c9aed2e1", size = 62949, upload-time = "2025-11-07T00:44:20.074Z" },+ { url = "https://files.pythonhosted.org/packages/ec/ca/f63e177f0bbe1e5cf5e8d9b74a286537cd709724384ff20860f8f6065904/wrapt-2.0.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:908f8c6c71557f4deaa280f55d0728c3bca0960e8c3dd5ceeeafb3c19942719d", size = 63681, upload-time = "2025-11-07T00:44:21.345Z" },+ { url = "https://files.pythonhosted.org/packages/39/a1/1b88fcd21fd835dca48b556daef750952e917a2794fa20c025489e2e1f0f/wrapt-2.0.1-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:e2f84e9af2060e3904a32cea9bb6db23ce3f91cfd90c6b426757cf7cc01c45c7", size = 152696, upload-time = "2025-11-07T00:44:24.318Z" },+ { url = "https://files.pythonhosted.org/packages/62/1c/d9185500c1960d9f5f77b9c0b890b7fc62282b53af7ad1b6bd779157f714/wrapt-2.0.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e3612dc06b436968dfb9142c62e5dfa9eb5924f91120b3c8ff501ad878f90eb3", size = 158859, upload-time = "2025-11-07T00:44:25.494Z" },+ { url = "https://files.pythonhosted.org/packages/91/60/5d796ed0f481ec003220c7878a1d6894652efe089853a208ea0838c13086/wrapt-2.0.1-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6d2d947d266d99a1477cd005b23cbd09465276e302515e122df56bb9511aca1b", size = 146068, upload-time = "2025-11-07T00:44:22.81Z" },+ { url = "https://files.pythonhosted.org/packages/04/f8/75282dd72f102ddbfba137e1e15ecba47b40acff32c08ae97edbf53f469e/wrapt-2.0.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:7d539241e87b650cbc4c3ac9f32c8d1ac8a54e510f6dca3f6ab60dcfd48c9b10", size = 155724, upload-time = "2025-11-07T00:44:26.634Z" },+ { url = "https://files.pythonhosted.org/packages/5a/27/fe39c51d1b344caebb4a6a9372157bdb8d25b194b3561b52c8ffc40ac7d1/wrapt-2.0.1-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:4811e15d88ee62dbf5c77f2c3ff3932b1e3ac92323ba3912f51fc4016ce81ecf", size = 144413, upload-time = "2025-11-07T00:44:27.939Z" },+ { url = "https://files.pythonhosted.org/packages/83/2b/9f6b643fe39d4505c7bf926d7c2595b7cb4b607c8c6b500e56c6b36ac238/wrapt-2.0.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c1c91405fcf1d501fa5d55df21e58ea49e6b879ae829f1039faaf7e5e509b41e", size = 150325, upload-time = "2025-11-07T00:44:29.29Z" },+ { url = "https://files.pythonhosted.org/packages/bb/b6/20ffcf2558596a7f58a2e69c89597128781f0b88e124bf5a4cadc05b8139/wrapt-2.0.1-cp313-cp313t-win32.whl", hash = "sha256:e76e3f91f864e89db8b8d2a8311d57df93f01ad6bb1e9b9976d1f2e83e18315c", size = 59943, upload-time = "2025-11-07T00:44:33.211Z" },+ { url = "https://files.pythonhosted.org/packages/87/6a/0e56111cbb3320151eed5d3821ee1373be13e05b376ea0870711f18810c3/wrapt-2.0.1-cp313-cp313t-win_amd64.whl", hash = "sha256:83ce30937f0ba0d28818807b303a412440c4b63e39d3d8fc036a94764b728c92", size = 63240, upload-time = "2025-11-07T00:44:30.935Z" },+ { url = "https://files.pythonhosted.org/packages/1d/54/5ab4c53ea1f7f7e5c3e7c1095db92932cc32fd62359d285486d00c2884c3/wrapt-2.0.1-cp313-cp313t-win_arm64.whl", hash = "sha256:4b55cacc57e1dc2d0991dbe74c6419ffd415fb66474a02335cb10efd1aa3f84f", size = 60416, upload-time = "2025-11-07T00:44:32.002Z" },+ { url = "https://files.pythonhosted.org/packages/15/d1/b51471c11592ff9c012bd3e2f7334a6ff2f42a7aed2caffcf0bdddc9cb89/wrapt-2.0.1-py3-none-any.whl", hash = "sha256:4d2ce1bf1a48c5277d7969259232b57645aae5686dba1eaeade39442277afbca", size = 44046, upload-time = "2025-11-07T00:45:32.116Z" },+]+[[package]]name = "xxhash"version = "3.6.0"