diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..ce51f4b9643746ce3cf9f224a39eb9b55050eaa6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,21 @@ +.git +.venv +__pycache__/ +.pytest_cache/ +.mypy_cache/ +.ruff_cache/ + +data/generated/ +data/district_llm_dataset_v1/ +data/district_llm_dataset_v2/ +data/district_llm_dataset_v3/ + +artifacts/district_llm_adapter_v2/ +artifacts/dqn_shared/checkpoints/ +artifacts/dqn_shared/tensorboard/ +artifacts/llm_runtime_diagnosis/ +artifacts/quick_rl_llm_eval/ +artifacts/rl_guidance_eval/ +artifacts/rl_llm_wrapper_sweep/ + +notebooks/ diff --git a/.gitattributes b/.gitattributes index a6344aac8c09253b3b630fb776ae94478aa0275b..d84497a2f7b5373b7df60bc60848d02663f6934e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -33,3 +33,19 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text *tfevents* filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v2/checkpoint-100/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v2/checkpoint-150/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v2/checkpoint-200/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v2/checkpoint-250/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v2/checkpoint-300/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v2/checkpoint-50/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v2/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v3/main_run/adapter/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/tokenizer.json filter=lfs diff=lfs merge=lfs -text +artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/tokenizer.json filter=lfs diff=lfs merge=lfs -text +third_party/CityFlow/examples/replay.txt filter=lfs diff=lfs merge=lfs -text +third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.idx filter=lfs diff=lfs merge=lfs -text +third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.pack filter=lfs diff=lfs merge=lfs -text +third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.rev filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..9f6f8bc9dfd080d265c1a2407deb15910e64553a --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +__pycache__ +*.pyc +data/generated/* +.DS_Store +data/ +build/ +build-docker/ +local/ +.vs/ +.vscode/ +.idea/ +.DS_Store +__pycache__ +CMakeSettings.json +cmake-build-* +CityFlow.egg-info +frontend/replay/* +notebooks/unsloth_compiled_cache \ No newline at end of file diff --git a/Dockerfile.openenv-api b/Dockerfile.openenv-api new file mode 100644 index 0000000000000000000000000000000000000000..bac022764a798392596601818057c8c3cd91d485 --- /dev/null +++ b/Dockerfile.openenv-api @@ -0,0 +1,82 @@ +# OpenEnv API container +# +# Two-stage build: +# 1. builder - compiles the vendored CityFlow Python extension +# 2. runtime - installs the API dependencies and copies the repo-local data +# +# Runtime env vars: +# DATA_DIR generated CityFlow dataset root +# default: /app/data/generated +# SPLITS_DIR train/val/test split files +# default: /app/data/splits +# CHECKPOINT_PATH optional DQN checkpoint +# default: /app/artifacts/dqn_shared/best_validation.pt +# --------------------------------------------------------------------------- + +# ── Stage 1: Build CityFlow ───────────────────────────────────────────────── +FROM python:3.12-slim AS builder + +# Build tools needed by CityFlow's CMake build +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + cmake \ + libboost-all-dev \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /build + +# Copy only the CityFlow source (pybind11 is bundled as an extern submodule) +COPY third_party/CityFlow ./CityFlow + +# Build and install cityflow into the builder's site-packages +RUN rm -rf ./CityFlow/build +RUN pip install --no-cache-dir ./CityFlow + +# Locate the compiled .so so we can copy it to the runtime stage +RUN python -c "import cityflow, os; print(os.path.dirname(cityflow.__file__))" + + +# ── Stage 2: Runtime ──────────────────────────────────────────────────────── +FROM python:3.12-slim AS runtime + +WORKDIR /app + +# Copy the compiled cityflow extension from the builder +COPY --from=builder /usr/local/lib/python3.12/site-packages/cityflow* \ + /usr/local/lib/python3.12/site-packages/ + +# Install Python dependencies (no build tools needed here) +COPY openenv_app/requirements.txt ./requirements.txt +RUN pip install --no-cache-dir -r requirements.txt + +# Copy application source (only what the OpenEnv API needs at runtime) +COPY agents/ ./agents/ +COPY district_llm/ ./district_llm/ +COPY env/ ./env/ +COPY openenv_app/ ./openenv_app/ +COPY server/__init__.py ./server/__init__.py +COPY server/path_validators.py ./server/path_validators.py +COPY server/policy_runner.py ./server/policy_runner.py +COPY server/roadnet_matcher.py ./server/roadnet_matcher.py +COPY training/ ./training/ +COPY data/splits/ ./data/splits/ +COPY data/generated/city_0002/ ./data/generated/city_0002/ +COPY artifacts/dqn_shared/best_validation.pt ./artifacts/dqn_shared/best_validation.pt +COPY artifacts/district_llm_adapter_v3/main_run/adapter/ ./artifacts/district_llm_adapter_v3/main_run/adapter/ + +# Keep runtime paths present, but expect the actual generated dataset to be +# mounted or synced separately instead of baked into the image. +RUN mkdir -p /app/data/generated /app/data/splits + +# Default paths (overridable at runtime via env vars). +# DATA_DIR must point at a mounted/generated dataset root that contains city_*/ +# directories and scenario files; only data/splits is bundled here. +ENV DATA_DIR=/app/data/generated +ENV SPLITS_DIR=/app/data/splits +ENV CHECKPOINT_PATH=/app/artifacts/dqn_shared/best_validation.pt +ENV DISTRICT_LLM_ADAPTER_PATH=/app/artifacts/district_llm_adapter_v3/main_run/adapter + +# OpenEnv and HF Spaces commonly use port 7860. +EXPOSE 7860 + +CMD ["sh", "-c", "uvicorn openenv_app.app:app --host 0.0.0.0 --port ${PORT:-7860}"] diff --git a/Dockerfile.visualizer b/Dockerfile.visualizer new file mode 100644 index 0000000000000000000000000000000000000000..0ec28cd2aae39f8b0c3c7ae6ab4561fa6f2d386d --- /dev/null +++ b/Dockerfile.visualizer @@ -0,0 +1,41 @@ +# ── HF Space 2: Visualizer Dashboard ────────────────────────────────────── +# +# Lightweight image — no CityFlow C++ build, no torch. +# All simulation runs are delegated to Space 1 (OpenEnv API) via HTTP. +# +# HF Spaces expects the app to listen on port 7860. +# +# Required env vars (set in the Space settings or README front matter): +# OPENENV_API_URL URL of the OpenEnv API Space +# e.g. https://your-org-openenv-api.hf.space +# +# Optional: +# DATA_DIR city config root for roadnet matching (default: /app/data/bundled) +# REPLAY_ROOT where replays are cached on disk (default: /app/results/replays) +# --------------------------------------------------------------------------- + +FROM python:3.12-slim + +WORKDIR /app + +# Install dependencies (no cmake / build-essential needed) +COPY server/requirements.txt ./requirements.txt +RUN pip install --no-cache-dir -r requirements.txt + +# Application source +COPY server/ ./server/ +COPY third_party/CityFlow/frontend/ ./third_party/CityFlow/frontend/ + +# Bundled city data (for roadnet matching / city/scenario dropdowns) +COPY data/bundled/ ./data/bundled/ +COPY data/splits/ ./data/splits/ + +# Writable directory for cached replays +RUN mkdir -p /app/results/replays + +ENV DATA_DIR=/app/data/bundled +ENV REPLAY_ROOT=/app/results/replays + +EXPOSE 7860 + +CMD ["uvicorn", "server.visualizer_app:app", "--host", "0.0.0.0", "--port", "7860"] diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b0ba63c652e3ac8ce9b729798f151783848eb0ef --- /dev/null +++ b/README.md @@ -0,0 +1,199 @@ +--- +title: Agentic Traffic +emoji: 🏢 +colorFrom: green +colorTo: purple +sdk: docker +pinned: false +short_description: Agentic AI to control traffic lights +app_port: 7860 +--- + +# traffic-llm + +CityFlow-based traffic-control project with intersection-level multi-agent DQN training and district-aware policy variants. + +## OpenEnv UI + +For the deployed OpenEnv web interface: + +- Click `Reset` before using `Step`. +- Leave `Use Llm` unchecked for the fast, stable DQN-only path. +- Use `District Actions` = `{}` for a valid no-op step payload. +- Only enable `Use Llm` when you explicitly want district-level LLM guidance on top of the DQN executor. + +## Training + +The default local-policy trainer now uses parameter-shared dueling Double DQN with prioritized replay and n-step returns: + +```bash +python3 -m training.train_local_policy train +``` + +That trains against `data/generated`, uses `data/splits`, writes checkpoints to `artifacts/dqn_shared`, enables TensorBoard logging, uses parallel CPU rollout workers by default, shows `tqdm` progress bars, and now validates plus checkpoints every 40 updates by default. + +For a broader but still manageable validation pass: + +```bash +python3 -m training.train_local_policy train --max-val-cities 3 --val-scenarios-per-city 7 +``` + +That evaluates 3 validation cities across all 7 scenario types. This gives 21 learned-policy validation episodes per eval, or 63 total episodes if random and fixed baselines are also enabled. + +Phase-3-style full training with the same 40-update eval/checkpoint cadence: + +```bash +python3 -m training.train_local_policy train \ + --max-train-cities 70 \ + --max-val-cities 3 \ + --val-scenarios-per-city 7 \ + --policy-arch single_head_with_district_feature \ + --reward-variant wait_queue_throughput +``` + +Useful ablations: + +```bash +python3 -m training.train_local_policy train --policy-arch multi_head --reward-variant current +python3 -m training.train_local_policy train --policy-arch single_head --reward-variant current +python3 -m training.train_local_policy train --policy-arch single_head_with_district_feature --reward-variant wait_queue_throughput +``` + +For a fast phase-1 overfit run on one fixed world: + +```bash +python3 -m training.train_local_policy train \ + --total-updates 25 \ + --train-city-id city_0072 \ + --train-scenario-name normal \ + --overfit-val-on-train-scenario \ + --fast-overfit \ + --policy-arch single_head_with_district_feature \ + --reward-variant wait_queue_throughput +``` + +To create or refresh dataset splits: + +```bash +python3 -m training.train_local_policy make-splits +``` + +To evaluate the best checkpoint: + +```bash +python3 -m training.train_local_policy evaluate \ + --checkpoint artifacts/dqn_shared/best_validation.pt \ + --split val +``` + +To evaluate a heuristic baseline directly: + +```bash +python3 -m training.train_local_policy evaluate --baseline queue_greedy --split val +``` + +## TensorBoard + +TensorBoard logs are written to `artifacts/dqn_shared/tensorboard` by default. + +```bash +tensorboard --logdir artifacts/dqn_shared/tensorboard +``` + +## District LLM + +The district LLM stack lives under `district_llm/`. It treats the learned DQN local controller as the low-level executor, derives district-scale SFT labels automatically from DQN rollout windows, and defaults district-model fine-tuning to DQN-derived rows only. + +Generate district-LLM data from a learned checkpoint: + +```bash +python3 -m district_llm.generate_dataset \ + --controller rl_checkpoint \ + --checkpoint artifacts/dqn_shared/best_validation.pt \ + --episodes 100 \ + --decision-interval 10 \ + --use-checkpoint-env-config \ + --output data/district_llm_train.jsonl +``` + +Generate from fixed or heuristic baselines: + +```bash +python3 -m district_llm.generate_dataset --controller fixed --episodes 50 --decision-interval 10 --output data/district_llm_fixed.jsonl +python3 -m district_llm.generate_dataset --controller queue_greedy --episodes 50 --decision-interval 10 --output data/district_llm_heuristic.jsonl +python3 -m district_llm.generate_dataset --teacher-spec fixed --teacher-spec random --episodes 50 --decision-interval 10 --output data/district_llm_multi_teacher.jsonl +``` + +Train a first-pass district model with Unsloth/QLoRA: + +```bash +python3 -m training.train_district_llm \ + --dataset data/district_llm_train.jsonl \ + --output-dir artifacts/district_llm_qwen \ + --model-name Qwen/Qwen2.5-7B-Instruct \ + --load-in-4bit \ + --lora-rank 16 \ + --max-seq-length 1024 \ + --max-steps 1000 +``` + +Run single-sample inference: + +```bash +python3 -m district_llm.inference \ + --model artifacts/district_llm_qwen \ + --city-id city_0006 \ + --scenario-name accident \ + --district-id d_00 +``` + +Run the OpenEnv-compatible district wrapper on top of the current DQN stack: + +```bash +uvicorn openenv_app.app:app --reload +``` + +## Algorithm + +- Training algorithm: parameter-shared dueling Double DQN. +- Replay: prioritized replay over per-intersection transitions gathered from full CityFlow worlds. +- Return target: n-step bootstrap target with target-network updates. +- Execution: all controllable intersections act simultaneously every RL decision interval. +- Action space: `0 = hold current phase`, `1 = switch to next green phase`. +- Safety: `min_green_time` is enforced in the environment and exposed through action masking. + +Policy architecture modes: + +- `multi_head`: shared trunk with district-type-specific Q heads. +- `single_head`: one shared Q head for all intersections, with district type removed from the observation. +- `single_head_with_district_feature`: one shared Q head for all intersections, with district type left in the observation as an explicit feature. + +Reward variants: + +- `current`: backward-compatible waiting and queue penalty. +- `normalized_wait_queue`: normalized queue and waiting reduction reward. +- `wait_queue_throughput`: normalized queue/wait reduction plus throughput bonus and imbalance penalty. + +## Smoke Test + +To sanity-check one generated scenario with the real CityFlow environment: + +```bash +python3 scripts/smoke_test_env.py --city-id city_0001 --scenario-name normal --policy random +``` + +## Project layout + +- `agents/`: heuristic local policies and simple baselines. +- `env/`: CityFlow environment, topology parsing, observation building, and reward logic. +- `training/`: dataset utilities, replay-based DQN training, evaluation helpers, TensorBoard logging, and CLIs. +- `data/`: generated synthetic cities, split files, and dataset generation utilities. +- `scripts/`: utility scripts, including the CityFlow smoke test. +- `third_party/`: vendored dependencies, including CityFlow source. + +## Notes + +- The generated dataset is assumed to already exist under `data/generated`. +- District membership comes from `district_map.json`. +- District types come from `metadata.json`. +- Runtime training and evaluation require the `cityflow` Python module to be installed in the active environment. diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d93feec4eecab891dd955d691cecf9273d1e8139 --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +"""OpenEnv package root for the lean agentic traffic environment.""" diff --git a/agents/README.md b/agents/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0c9406c60b1b309b5bdb6751c335051ff1e0e43f --- /dev/null +++ b/agents/README.md @@ -0,0 +1,20 @@ +# agents + +Local traffic-control policies and compatibility shims. + +## Main files + +- [local_policy.py](/Users/aditya/Developer/traffic-llm/agents/local_policy.py) + Active v1 policy interfaces and simple baselines: + - `HoldPhasePolicy` + - `FixedCyclePolicy` + - `QueueGreedyPolicy` +- [district_controller.py](/Users/aditya/Developer/traffic-llm/agents/district_controller.py) + Older district-level prototype logic kept for compatibility. +- [district_coordinator.py](/Users/aditya/Developer/traffic-llm/agents/district_coordinator.py) + Import shim for older code paths. + +## Notes + +- The learned local-policy network itself lives in [training/models.py](/Users/aditya/Developer/traffic-llm/training/models.py), not here. +- For active training, use the parameter-shared DQN path in `training/`, not the district-controller prototypes. diff --git a/agents/__init__.py b/agents/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eae670e71cb4e723104379c0378003bb0293ee24 --- /dev/null +++ b/agents/__init__.py @@ -0,0 +1,15 @@ +from agents.local_policy import ( + BaseLocalPolicy, + FixedCyclePolicy, + HoldPhasePolicy, + QueueGreedyPolicy, + SharedHeuristicLocalPolicy, +) + +__all__ = [ + "BaseLocalPolicy", + "FixedCyclePolicy", + "HoldPhasePolicy", + "QueueGreedyPolicy", + "SharedHeuristicLocalPolicy", +] diff --git a/agents/district_controller.py b/agents/district_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..005b0afa7e4ea940dad02c36135b37a18c66b7b3 --- /dev/null +++ b/agents/district_controller.py @@ -0,0 +1,187 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod +from typing import Any, Callable + +from agents.message_protocol import DistrictDirective, parse_district_directive + + +class BaseDistrictCoordinator(ABC): + @abstractmethod + def decide(self, district_summary: dict[str, Any]) -> dict[str, Any]: + raise NotImplementedError + + +class RuleBasedDistrictCoordinator(BaseDistrictCoordinator): + """ + Fast, deterministic, and robust. + Good first coordinator and good fallback if the LLM output fails. + """ + + def __init__( + self, + imbalance_threshold: float = 0.15, + border_pressure_threshold: float = 0.65, + default_duration: int = 2, + ): + self.imbalance_threshold = imbalance_threshold + self.border_pressure_threshold = border_pressure_threshold + self.default_duration = default_duration + + def decide(self, district_summary: dict[str, Any]) -> dict[str, Any]: + district_id = district_summary.get("district_id", "unknown") + intersection_ids = district_summary.get("intersection_ids", []) + + emergency = district_summary.get("emergency_vehicle", {}) + if emergency.get("present", False): + return ( + DistrictDirective( + mode="emergency_route", + target_intersections=emergency.get("route", intersection_ids), + duration=2, + rationale=f"Emergency vehicle detected in district {district_id}.", + corridor=emergency.get("corridor"), + district_weight=1.0, + ) + .validate() + .to_dict() + ) + + corridor_loads = district_summary.get("corridor_loads", {}) + ns = float(corridor_loads.get("ns", corridor_loads.get("north_south", 0.0))) + ew = float(corridor_loads.get("ew", corridor_loads.get("east_west", 0.0))) + + border_pressure = district_summary.get("border_pressure", {}) + border_max = 0.0 + if isinstance(border_pressure, dict) and border_pressure: + border_max = max(float(v) for v in border_pressure.values()) + + if ew - ns > self.imbalance_threshold: + return ( + DistrictDirective( + mode="prioritize_ew", + target_intersections=intersection_ids, + duration=self.default_duration, + rationale="East-west corridor is currently more congested than north-south.", + corridor="ew", + district_weight=( + 0.7 if border_max < self.border_pressure_threshold else 0.9 + ), + ) + .validate() + .to_dict() + ) + + if ns - ew > self.imbalance_threshold: + return ( + DistrictDirective( + mode="prioritize_ns", + target_intersections=intersection_ids, + duration=self.default_duration, + rationale="North-south corridor is currently more congested than east-west.", + corridor="ns", + district_weight=( + 0.7 if border_max < self.border_pressure_threshold else 0.9 + ), + ) + .validate() + .to_dict() + ) + + if border_max >= self.border_pressure_threshold: + return ( + DistrictDirective( + mode="damp_border_inflow", + target_intersections=intersection_ids, + duration=2, + rationale="Border pressure is high; reduce spill-in and smooth cross-district flow.", + district_weight=0.8, + ) + .validate() + .to_dict() + ) + + return ( + DistrictDirective( + mode="none", + target_intersections=[], + duration=1, + rationale="District is reasonably balanced.", + district_weight=0.5, + ) + .validate() + .to_dict() + ) + + +class LLMDistrictCoordinator(BaseDistrictCoordinator): + """ + LLM-backed coordinator. + + `generator_fn` should accept a prompt string and return either: + - a JSON string, or + - a dict + + Example: + coordinator = LLMDistrictCoordinator(generator_fn=my_model_call) + """ + + def __init__( + self, + generator_fn: Callable[[str], str | dict[str, Any]], + fallback: BaseDistrictCoordinator | None = None, + max_prompt_chars: int = 4000, + ): + self.generator_fn = generator_fn + self.fallback = fallback or RuleBasedDistrictCoordinator() + self.max_prompt_chars = max_prompt_chars + + def decide(self, district_summary: dict[str, Any]) -> dict[str, Any]: + prompt = self.build_prompt(district_summary) + try: + raw = self.generator_fn(prompt) + directive = parse_district_directive(raw).to_dict() + + # If the LLM returns a no-op too often or malformed content, + # the parser still makes it safe. We keep that behavior. + return directive + except Exception: + return self.fallback.decide(district_summary) + + def build_prompt(self, district_summary: dict[str, Any]) -> str: + summary_text = repr(district_summary) + if len(summary_text) > self.max_prompt_chars: + summary_text = summary_text[: self.max_prompt_chars] + " ...[truncated]" + + return f"""You are a district-level traffic coordinator. + +Your job is to choose a single strategic directive for the next few cycles. + +Allowed modes: +- none +- prioritize_ns +- prioritize_ew +- green_wave +- emergency_route +- damp_border_inflow + +Return ONLY valid JSON with these fields: +{{ + "mode": string, + "target_intersections": list[string], + "duration": int, + "rationale": string, + "corridor": string or null, + "district_weight": float +}} + +Guidelines: +- Use emergency_route if an emergency vehicle is present. +- Use prioritize_ns or prioritize_ew when one corridor is clearly more congested. +- Use damp_border_inflow when cross-district border pressure is high. +- Keep duration between 1 and 5. +- district_weight should be between 0.0 and 1.0. + +District summary: +{summary_text} +""" diff --git a/agents/district_coordinator.py b/agents/district_coordinator.py new file mode 100644 index 0000000000000000000000000000000000000000..80b45ff57ea74f65e63351ea16e768470b1f2f3f --- /dev/null +++ b/agents/district_coordinator.py @@ -0,0 +1,11 @@ +from agents.district_controller import ( + BaseDistrictCoordinator, + LLMDistrictCoordinator, + RuleBasedDistrictCoordinator, +) + +__all__ = [ + "BaseDistrictCoordinator", + "LLMDistrictCoordinator", + "RuleBasedDistrictCoordinator", +] diff --git a/agents/heuristic_controller.py b/agents/heuristic_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..380850268672c82ce89b8a6c8687d3f51a9545bd --- /dev/null +++ b/agents/heuristic_controller.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from typing import Any + + +class HeuristicController: + """ + Simple local traffic-light controller. + + Action space: + 0 -> choose NS green + 1 -> choose EW green + + Assumes: + queue_lengths = [N, S, E, W] + waiting_counts = [N, S, E, W] + """ + + def __init__( + self, + min_green_steps: int = 5, + switch_margin: float = 1.0, + district_bonus_scale: float = 3.0, + neighbor_pressure_scale: float = 0.25, + ): + self.min_green_steps = min_green_steps + self.switch_margin = switch_margin + self.district_bonus_scale = district_bonus_scale + self.neighbor_pressure_scale = neighbor_pressure_scale + + def act(self, obs: dict[str, Any]) -> int: + queue_lengths = obs.get("queue_lengths", [0, 0, 0, 0]) + waiting_counts = obs.get("waiting_counts", [0, 0, 0, 0]) + current_phase = int(obs.get("current_phase", 0)) + time_since_switch = int(obs.get("time_since_switch", 0)) + district_mode = obs.get("district_mode", "none") + district_weight = float(obs.get("district_weight", 0.5)) + neighbor_pressure = obs.get("neighbor_pressure", [0.0, 0.0]) + + ns_score = ( + queue_lengths[0] + + queue_lengths[1] + + 1.5 * (waiting_counts[0] + waiting_counts[1]) + ) + ew_score = ( + queue_lengths[2] + + queue_lengths[3] + + 1.5 * (waiting_counts[2] + waiting_counts[3]) + ) + + # Optional small neighbor-pressure bias + if isinstance(neighbor_pressure, list) and len(neighbor_pressure) >= 2: + ns_score += self.neighbor_pressure_scale * float(neighbor_pressure[0]) + ew_score += self.neighbor_pressure_scale * float(neighbor_pressure[1]) + + # District-level strategic bias + district_bonus = self.district_bonus_scale * district_weight + if district_mode == "prioritize_ns": + ns_score += district_bonus + elif district_mode == "prioritize_ew": + ew_score += district_bonus + elif district_mode == "green_wave": + corridor = obs.get("district_corridor") + if corridor == "ns": + ns_score += district_bonus + elif corridor == "ew": + ew_score += district_bonus + elif district_mode == "emergency_route": + corridor = obs.get("district_corridor") + if corridor in {"north_to_south", "south_to_north", "ns"}: + ns_score += district_bonus * 1.5 + elif corridor in {"west_to_east", "east_to_west", "ew"}: + ew_score += district_bonus * 1.5 + + desired_phase = 0 if ns_score >= ew_score else 1 + + # Avoid thrashing + if time_since_switch < self.min_green_steps: + return current_phase + + # Only switch if the other phase is meaningfully better + current_score = ns_score if current_phase == 0 else ew_score + desired_score = ns_score if desired_phase == 0 else ew_score + + if ( + desired_phase != current_phase + and desired_score < current_score + self.switch_margin + ): + return current_phase + + return desired_phase diff --git a/agents/local_policy.py b/agents/local_policy.py new file mode 100644 index 0000000000000000000000000000000000000000..36ed5a38cbd7885b2c3466d19981a07c8c010859 --- /dev/null +++ b/agents/local_policy.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod + +import numpy as np + + +class BaseLocalPolicy(ABC): + @abstractmethod + def act(self, observation_batch: dict[str, np.ndarray]) -> np.ndarray: + raise NotImplementedError + + +class HoldPhasePolicy(BaseLocalPolicy): + def act(self, observation_batch: dict[str, np.ndarray]) -> np.ndarray: + intersection_count = len(observation_batch["intersection_ids"]) + return np.zeros(intersection_count, dtype=np.int64) + + +class RandomPhasePolicy(BaseLocalPolicy): + def __init__(self, seed: int = 7): + self.rng = np.random.default_rng(seed) + + def act(self, observation_batch: dict[str, np.ndarray]) -> np.ndarray: + action_mask = observation_batch["action_mask"] + actions = np.zeros(action_mask.shape[0], dtype=np.int64) + for row_index, mask in enumerate(action_mask): + valid_actions = np.flatnonzero(mask > 0.0) + actions[row_index] = int(self.rng.choice(valid_actions)) + return actions + + +class FixedCyclePolicy(BaseLocalPolicy): + def __init__(self, green_time: int = 20): + self.green_time = int(green_time) + + def act(self, observation_batch: dict[str, np.ndarray]) -> np.ndarray: + elapsed = observation_batch["phase_elapsed"] + action_mask = observation_batch["action_mask"] + should_switch = (elapsed >= self.green_time) & (action_mask[:, 1] > 0.0) + return should_switch.astype(np.int64) + + +class QueueGreedyPolicy(BaseLocalPolicy): + def __init__(self, switch_margin: float = 1.0): + self.switch_margin = float(switch_margin) + + def act(self, observation_batch: dict[str, np.ndarray]) -> np.ndarray: + counts = observation_batch["incoming_counts"] + waiting = observation_batch["incoming_waiting"] + lane_mask = observation_batch["lane_mask"] + current_phase = observation_batch["current_phase"] + action_mask = observation_batch["action_mask"] + + midpoint = counts.shape[1] // 2 + ns_score = ( + counts[:, :midpoint].sum(axis=1) + + 1.5 * waiting[:, :midpoint].sum(axis=1) + ) + ew_score = ( + counts[:, midpoint:].sum(axis=1) + + 1.5 * waiting[:, midpoint:].sum(axis=1) + ) + + valid_midpoint = lane_mask[:, :midpoint].sum(axis=1) > 0 + ns_score = np.where(valid_midpoint, ns_score, 0.0) + + desired_switch = np.where( + current_phase == 0, + ew_score > ns_score + self.switch_margin, + ns_score > ew_score + self.switch_margin, + ) + desired_switch = desired_switch & (action_mask[:, 1] > 0.0) + return desired_switch.astype(np.int64) + + +class SharedHeuristicLocalPolicy(QueueGreedyPolicy): + def __init__( + self, + min_green_steps: int = 5, + switch_margin: float = 1.0, + district_bonus_scale: float = 0.0, + neighbor_pressure_scale: float = 0.0, + ): + self.min_green_steps = int(min_green_steps) + del district_bonus_scale, neighbor_pressure_scale + super().__init__(switch_margin=switch_margin) + + def act_batch(self, observation_batch): + if "intersection_ids" in observation_batch: + return self.act(observation_batch) + + actions: dict[str, int] = {} + for intersection_id, payload in observation_batch.items(): + waiting = payload.get("waiting_counts", [0, 0, 0, 0]) + queues = payload.get("queue_lengths", [0, 0, 0, 0]) + current_phase = int(payload.get("current_phase", 0)) + time_since_switch = int(payload.get("time_since_switch", 0)) + + ns_score = float(sum(queues[:2]) + 1.5 * sum(waiting[:2])) + ew_score = float(sum(queues[2:4]) + 1.5 * sum(waiting[2:4])) + desired_phase = 0 if ns_score >= ew_score else 1 + + if time_since_switch < self.min_green_steps: + actions[intersection_id] = current_phase + elif desired_phase != current_phase and abs(ns_score - ew_score) <= self.switch_margin: + actions[intersection_id] = current_phase + else: + actions[intersection_id] = desired_phase + return actions diff --git a/agents/message_protocol.py b/agents/message_protocol.py new file mode 100644 index 0000000000000000000000000000000000000000..2459b7cea8603aed1ca20296da4570ecf89cd79a --- /dev/null +++ b/agents/message_protocol.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +import json +from dataclasses import asdict, dataclass, field +from typing import Any + + +VALID_MODES = { + "none", + "prioritize_ns", + "prioritize_ew", + "green_wave", + "emergency_route", + "damp_border_inflow", +} + + +@dataclass +class NeighborMessage: + sender_intersection: str + receiver_intersection: str + congestion_level: float + spillback_risk: bool + dominant_direction: str # "ns", "ew", or "balanced" + queue_total: int + + def to_dict(self) -> dict[str, Any]: + return asdict(self) + + +@dataclass +class DistrictDirective: + mode: str = "none" + target_intersections: list[str] = field(default_factory=list) + duration: int = 1 + rationale: str = "" + corridor: str | None = None + district_weight: float = 0.5 + + def validate(self) -> "DistrictDirective": + if self.mode not in VALID_MODES: + self.mode = "none" + + if not isinstance(self.target_intersections, list): + self.target_intersections = [] + + if not isinstance(self.duration, int): + self.duration = 1 + self.duration = max(1, min(self.duration, 10)) + + if not isinstance(self.rationale, str): + self.rationale = "" + + if self.corridor is not None and self.corridor not in { + "ns", + "ew", + "west_to_east", + "east_to_west", + "north_to_south", + "south_to_north", + }: + self.corridor = None + + if not isinstance(self.district_weight, (int, float)): + self.district_weight = 0.5 + self.district_weight = float(max(0.0, min(1.0, self.district_weight))) + + return self + + def to_dict(self) -> dict[str, Any]: + return asdict(self) + + +def parse_district_directive(payload: str | dict[str, Any]) -> DistrictDirective: + """ + Accept either raw JSON text or a dict and return a validated DistrictDirective. + Falls back safely to a no-op directive. + """ + try: + if isinstance(payload, str): + payload = payload.strip() + if not payload: + return DistrictDirective().validate() + + # Try direct JSON parse + try: + data = json.loads(payload) + except json.JSONDecodeError: + # Try to extract JSON object from surrounding text + start = payload.find("{") + end = payload.rfind("}") + if start == -1 or end == -1 or end <= start: + return DistrictDirective().validate() + data = json.loads(payload[start : end + 1]) + elif isinstance(payload, dict): + data = payload + else: + return DistrictDirective().validate() + + directive = DistrictDirective( + mode=data.get("mode", "none"), + target_intersections=data.get("target_intersections", []), + duration=data.get("duration", 1), + rationale=data.get("rationale", ""), + corridor=data.get("corridor"), + district_weight=data.get("district_weight", 0.5), + ) + return directive.validate() + except Exception: + return DistrictDirective().validate() + + +def safe_directive_dict(payload: str | dict[str, Any] | None) -> dict[str, Any]: + if payload is None: + return DistrictDirective().validate().to_dict() + return parse_district_directive(payload).to_dict() diff --git a/artifacts/README.md b/artifacts/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6e870a2702798868b58b790ffc211628595f5a8b --- /dev/null +++ b/artifacts/README.md @@ -0,0 +1,3 @@ +# Artifacts + +For our 3rd iteration of district LLM, 150 is the best. diff --git a/artifacts/district_llm_adapter_v2/README.md b/artifacts/district_llm_adapter_v2/README.md new file mode 100644 index 0000000000000000000000000000000000000000..af4d2ca0ee159307836342736dae0b6ca630e968 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/README.md @@ -0,0 +1,63 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +model_name: district_llm_adapter_v2 +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +licence: license +pipeline_tag: text-generation +--- + +# Model Card for district_llm_adapter_v2 + +This model is a fine-tuned version of [unsloth/llama-3.1-8b-unsloth-bnb-4bit](https://huggingface.co/unsloth/llama-3.1-8b-unsloth-bnb-4bit). +It has been trained using [TRL](https://github.com/huggingface/trl). + +## Quick start + +```python +from transformers import pipeline + +question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?" +generator = pipeline("text-generation", model="None", device="cuda") +output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0] +print(output["generated_text"]) +``` + +## Training procedure + + + + +This model was trained with SFT. + +### Framework versions + +- PEFT 0.18.1 +- TRL: 0.24.0 +- Transformers: 5.2.0 +- Pytorch: 2.10.0 +- Datasets: 4.3.0 +- Tokenizers: 0.22.2 + +## Citations + + + +Cite TRL as: + +```bibtex +@misc{vonwerra2022trl, + title = {{TRL: Transformer Reinforcement Learning}}, + author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec}, + year = 2020, + journal = {GitHub repository}, + publisher = {GitHub}, + howpublished = {\url{https://github.com/huggingface/trl}} +} +``` \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/adapter_config.json b/artifacts/district_llm_adapter_v2/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9e043f775ee4e1597a302e07a7f54fdaf11696fb --- /dev/null +++ b/artifacts/district_llm_adapter_v2/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "up_proj", + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/adapter_model.safetensors b/artifacts/district_llm_adapter_v2/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..e2324f2c871ec277e47b63bb816db9a5c160a36f --- /dev/null +++ b/artifacts/district_llm_adapter_v2/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18e9b835a17a3b1429550ea5e4afaa9b8ecc9301da476f35ece0679c9fb0203a +size 167832240 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-100/README.md b/artifacts/district_llm_adapter_v2/checkpoint-100/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-100/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-100/adapter_config.json b/artifacts/district_llm_adapter_v2/checkpoint-100/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9e043f775ee4e1597a302e07a7f54fdaf11696fb --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-100/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "up_proj", + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-100/adapter_model.safetensors b/artifacts/district_llm_adapter_v2/checkpoint-100/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..0169dad862c7a3afa3f422812fab9e2c2c6eedc0 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-100/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccc17edb05ab2ceffb808c495859a48e7eb78507264a0404bc0aa2cda8eab3f3 +size 167832240 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-100/optimizer.pt b/artifacts/district_llm_adapter_v2/checkpoint-100/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..ed166a36434885c449f7df21ad218aa320f456fb --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-100/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0e7cf928e3b2955b39d6a9e5b96926f624d9f53efd6b1703fdc8658bd792b5a +size 85728229 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-100/rng_state.pth b/artifacts/district_llm_adapter_v2/checkpoint-100/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..a18368651274f7c0847c1b9873fe8c9f4ac945ba --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-100/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c800b778fa7e115e4c34de8529902de8b61c9a1b4bab3eb8295d06dafff030e +size 14645 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-100/scheduler.pt b/artifacts/district_llm_adapter_v2/checkpoint-100/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..74bd2add5a5be0a37837393bbd87f72e18a66716 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-100/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f48b2993192172e90d469975ad49cfb293d165a9bc6f65da704bfab6cd3cab3 +size 1465 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-100/tokenizer.json b/artifacts/district_llm_adapter_v2/checkpoint-100/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-100/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-100/tokenizer_config.json b/artifacts/district_llm_adapter_v2/checkpoint-100/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-100/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-100/trainer_state.json b/artifacts/district_llm_adapter_v2/checkpoint-100/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..40b56476d87070814c47d92358b0f6685dbd4f23 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-100/trainer_state.json @@ -0,0 +1,174 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 0.5333333333333333, + "eval_steps": 50, + "global_step": 100, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.02666666666666667, + "grad_norm": 0.824774444103241, + "learning_rate": 4e-05, + "loss": 1.4378397941589356, + "step": 5 + }, + { + "epoch": 0.05333333333333334, + "grad_norm": 1.7167983055114746, + "learning_rate": 9e-05, + "loss": 1.087998867034912, + "step": 10 + }, + { + "epoch": 0.08, + "grad_norm": 0.7535544037818909, + "learning_rate": 0.00014, + "loss": 0.5613192558288574, + "step": 15 + }, + { + "epoch": 0.10666666666666667, + "grad_norm": 0.6983357071876526, + "learning_rate": 0.00019, + "loss": 0.28872098922729494, + "step": 20 + }, + { + "epoch": 0.13333333333333333, + "grad_norm": 0.8250440955162048, + "learning_rate": 0.00019989930665413147, + "loss": 0.22604494094848632, + "step": 25 + }, + { + "epoch": 0.16, + "grad_norm": 0.26267266273498535, + "learning_rate": 0.00019949058745487522, + "loss": 0.20742559432983398, + "step": 30 + }, + { + "epoch": 0.18666666666666668, + "grad_norm": 0.27337217330932617, + "learning_rate": 0.00019876883405951377, + "loss": 0.1870889902114868, + "step": 35 + }, + { + "epoch": 0.21333333333333335, + "grad_norm": 0.10534920543432236, + "learning_rate": 0.00019773631737125192, + "loss": 0.18097405433654784, + "step": 40 + }, + { + "epoch": 0.24, + "grad_norm": 0.13477347791194916, + "learning_rate": 0.00019639628606958533, + "loss": 0.17958487272262574, + "step": 45 + }, + { + "epoch": 0.26666666666666666, + "grad_norm": 0.1370360553264618, + "learning_rate": 0.0001947529563887529, + "loss": 0.16803257465362548, + "step": 50 + }, + { + "epoch": 0.29333333333333333, + "grad_norm": 0.1513640433549881, + "learning_rate": 0.0001928114988519039, + "loss": 0.16801449060440063, + "step": 55 + }, + { + "epoch": 0.32, + "grad_norm": 0.11957086622714996, + "learning_rate": 0.00019057802200271942, + "loss": 0.16269906759262084, + "step": 60 + }, + { + "epoch": 0.3466666666666667, + "grad_norm": 0.11077677458524704, + "learning_rate": 0.0001880595531856738, + "loss": 0.16706794500350952, + "step": 65 + }, + { + "epoch": 0.37333333333333335, + "grad_norm": 0.10614161193370819, + "learning_rate": 0.00018526401643540922, + "loss": 0.16436902284622193, + "step": 70 + }, + { + "epoch": 0.4, + "grad_norm": 0.13366934657096863, + "learning_rate": 0.00018220020754479102, + "loss": 0.15710221529006957, + "step": 75 + }, + { + "epoch": 0.4266666666666667, + "grad_norm": 0.1160494014620781, + "learning_rate": 0.00017887776639008914, + "loss": 0.16149884462356567, + "step": 80 + }, + { + "epoch": 0.4533333333333333, + "grad_norm": 0.09502895176410675, + "learning_rate": 0.00017530714660036112, + "loss": 0.16155229806900023, + "step": 85 + }, + { + "epoch": 0.48, + "grad_norm": 0.11183392256498337, + "learning_rate": 0.00017149958266646754, + "loss": 0.15782997608184815, + "step": 90 + }, + { + "epoch": 0.5066666666666667, + "grad_norm": 0.11126931011676788, + "learning_rate": 0.00016746705459320745, + "loss": 0.1604154586791992, + "step": 95 + }, + { + "epoch": 0.5333333333333333, + "grad_norm": 0.0941988080739975, + "learning_rate": 0.00016322225020579099, + "loss": 0.15799541473388673, + "step": 100 + } + ], + "logging_steps": 5, + "max_steps": 300, + "num_input_tokens_seen": 0, + "num_train_epochs": 2, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 3.3346529297301504e+16, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-100/training_args.bin b/artifacts/district_llm_adapter_v2/checkpoint-100/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..cddb89b36f807d780c00c645c9351d5655ff5384 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-100/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99acc664411451a603c8908d063cb9b0bf85f277436eb270d65909aea5df4002 +size 5777 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-150/README.md b/artifacts/district_llm_adapter_v2/checkpoint-150/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-150/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-150/adapter_config.json b/artifacts/district_llm_adapter_v2/checkpoint-150/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9e043f775ee4e1597a302e07a7f54fdaf11696fb --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-150/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "up_proj", + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-150/adapter_model.safetensors b/artifacts/district_llm_adapter_v2/checkpoint-150/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..33e07aded4c3b0d3426fe4604c4c683023250e68 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-150/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b43a432bd838d3078559afa204238c64fb87d6d49aa0f53747daa3495f20a201 +size 167832240 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-150/optimizer.pt b/artifacts/district_llm_adapter_v2/checkpoint-150/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..834969ffcf2d93db7a7e6092f7305b689cfe47a9 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-150/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8b98930b82c827773787056dc5ba8fcecee40c8b3331dd32053627319e71fee +size 85728229 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-150/rng_state.pth b/artifacts/district_llm_adapter_v2/checkpoint-150/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..a18368651274f7c0847c1b9873fe8c9f4ac945ba --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-150/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c800b778fa7e115e4c34de8529902de8b61c9a1b4bab3eb8295d06dafff030e +size 14645 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-150/scheduler.pt b/artifacts/district_llm_adapter_v2/checkpoint-150/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..8ef51e3e5e30ea8d246293a93d8c1a99b73f1d60 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-150/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f9a3661913848bed826a840dc7f1ea0f7872a368500bea34bbe970fd6d04f2e +size 1465 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-150/tokenizer.json b/artifacts/district_llm_adapter_v2/checkpoint-150/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-150/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-150/tokenizer_config.json b/artifacts/district_llm_adapter_v2/checkpoint-150/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-150/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-150/trainer_state.json b/artifacts/district_llm_adapter_v2/checkpoint-150/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..1a77c6671588abfe42ab8a543e59dcd2e647e3b1 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-150/trainer_state.json @@ -0,0 +1,244 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 0.8, + "eval_steps": 50, + "global_step": 150, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.02666666666666667, + "grad_norm": 0.824774444103241, + "learning_rate": 4e-05, + "loss": 1.4378397941589356, + "step": 5 + }, + { + "epoch": 0.05333333333333334, + "grad_norm": 1.7167983055114746, + "learning_rate": 9e-05, + "loss": 1.087998867034912, + "step": 10 + }, + { + "epoch": 0.08, + "grad_norm": 0.7535544037818909, + "learning_rate": 0.00014, + "loss": 0.5613192558288574, + "step": 15 + }, + { + "epoch": 0.10666666666666667, + "grad_norm": 0.6983357071876526, + "learning_rate": 0.00019, + "loss": 0.28872098922729494, + "step": 20 + }, + { + "epoch": 0.13333333333333333, + "grad_norm": 0.8250440955162048, + "learning_rate": 0.00019989930665413147, + "loss": 0.22604494094848632, + "step": 25 + }, + { + "epoch": 0.16, + "grad_norm": 0.26267266273498535, + "learning_rate": 0.00019949058745487522, + "loss": 0.20742559432983398, + "step": 30 + }, + { + "epoch": 0.18666666666666668, + "grad_norm": 0.27337217330932617, + "learning_rate": 0.00019876883405951377, + "loss": 0.1870889902114868, + "step": 35 + }, + { + "epoch": 0.21333333333333335, + "grad_norm": 0.10534920543432236, + "learning_rate": 0.00019773631737125192, + "loss": 0.18097405433654784, + "step": 40 + }, + { + "epoch": 0.24, + "grad_norm": 0.13477347791194916, + "learning_rate": 0.00019639628606958533, + "loss": 0.17958487272262574, + "step": 45 + }, + { + "epoch": 0.26666666666666666, + "grad_norm": 0.1370360553264618, + "learning_rate": 0.0001947529563887529, + "loss": 0.16803257465362548, + "step": 50 + }, + { + "epoch": 0.29333333333333333, + "grad_norm": 0.1513640433549881, + "learning_rate": 0.0001928114988519039, + "loss": 0.16801449060440063, + "step": 55 + }, + { + "epoch": 0.32, + "grad_norm": 0.11957086622714996, + "learning_rate": 0.00019057802200271942, + "loss": 0.16269906759262084, + "step": 60 + }, + { + "epoch": 0.3466666666666667, + "grad_norm": 0.11077677458524704, + "learning_rate": 0.0001880595531856738, + "loss": 0.16706794500350952, + "step": 65 + }, + { + "epoch": 0.37333333333333335, + "grad_norm": 0.10614161193370819, + "learning_rate": 0.00018526401643540922, + "loss": 0.16436902284622193, + "step": 70 + }, + { + "epoch": 0.4, + "grad_norm": 0.13366934657096863, + "learning_rate": 0.00018220020754479102, + "loss": 0.15710221529006957, + "step": 75 + }, + { + "epoch": 0.4266666666666667, + "grad_norm": 0.1160494014620781, + "learning_rate": 0.00017887776639008914, + "loss": 0.16149884462356567, + "step": 80 + }, + { + "epoch": 0.4533333333333333, + "grad_norm": 0.09502895176410675, + "learning_rate": 0.00017530714660036112, + "loss": 0.16155229806900023, + "step": 85 + }, + { + "epoch": 0.48, + "grad_norm": 0.11183392256498337, + "learning_rate": 0.00017149958266646754, + "loss": 0.15782997608184815, + "step": 90 + }, + { + "epoch": 0.5066666666666667, + "grad_norm": 0.11126931011676788, + "learning_rate": 0.00016746705459320745, + "loss": 0.1604154586791992, + "step": 95 + }, + { + "epoch": 0.5333333333333333, + "grad_norm": 0.0941988080739975, + "learning_rate": 0.00016322225020579099, + "loss": 0.15799541473388673, + "step": 100 + }, + { + "epoch": 0.56, + "grad_norm": 0.1058623343706131, + "learning_rate": 0.00015877852522924732, + "loss": 0.15690511465072632, + "step": 105 + }, + { + "epoch": 0.5866666666666667, + "grad_norm": 0.11555207520723343, + "learning_rate": 0.00015414986126637258, + "loss": 0.1615644574165344, + "step": 110 + }, + { + "epoch": 0.6133333333333333, + "grad_norm": 0.2579882740974426, + "learning_rate": 0.0001493508218064347, + "loss": 0.16159408092498778, + "step": 115 + }, + { + "epoch": 0.64, + "grad_norm": 0.11453735083341599, + "learning_rate": 0.00014439650640304822, + "loss": 0.1569008708000183, + "step": 120 + }, + { + "epoch": 0.6666666666666666, + "grad_norm": 0.12122868746519089, + "learning_rate": 0.00013930250316539238, + "loss": 0.15291671752929686, + "step": 125 + }, + { + "epoch": 0.6933333333333334, + "grad_norm": 0.12676002085208893, + "learning_rate": 0.0001340848397122525, + "loss": 0.14967869520187377, + "step": 130 + }, + { + "epoch": 0.72, + "grad_norm": 0.14859774708747864, + "learning_rate": 0.00012875993274320173, + "loss": 0.1521363615989685, + "step": 135 + }, + { + "epoch": 0.7466666666666667, + "grad_norm": 0.1960573047399521, + "learning_rate": 0.00012334453638559057, + "loss": 0.14652782678604126, + "step": 140 + }, + { + "epoch": 0.7733333333333333, + "grad_norm": 0.13388624787330627, + "learning_rate": 0.00011785568947986367, + "loss": 0.1499272108078003, + "step": 145 + }, + { + "epoch": 0.8, + "grad_norm": 0.16420726478099823, + "learning_rate": 0.0001123106619690643, + "loss": 0.14629043340682985, + "step": 150 + } + ], + "logging_steps": 5, + "max_steps": 300, + "num_input_tokens_seen": 0, + "num_train_epochs": 2, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 4.921437712999219e+16, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-150/training_args.bin b/artifacts/district_llm_adapter_v2/checkpoint-150/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..cddb89b36f807d780c00c645c9351d5655ff5384 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-150/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99acc664411451a603c8908d063cb9b0bf85f277436eb270d65909aea5df4002 +size 5777 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-200/README.md b/artifacts/district_llm_adapter_v2/checkpoint-200/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-200/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-200/adapter_config.json b/artifacts/district_llm_adapter_v2/checkpoint-200/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9e043f775ee4e1597a302e07a7f54fdaf11696fb --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-200/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "up_proj", + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-200/adapter_model.safetensors b/artifacts/district_llm_adapter_v2/checkpoint-200/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..562fce2477af40e4ebd6c8ddd5b0fe96106d3bda --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-200/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb70b0b07fb3077ba18082208727936bd4e80e731772e0483ce750854c14a75f +size 167832240 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-200/optimizer.pt b/artifacts/district_llm_adapter_v2/checkpoint-200/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..5bda88c2d5ebdddf306a61c4d31f2ecd17d0a222 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-200/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b10686233c23619155b5c07584d46c5a14e2afb65b7140a3782c4ee832a667df +size 85728229 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-200/rng_state.pth b/artifacts/district_llm_adapter_v2/checkpoint-200/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..9a2f1c6718be043c8a9bbc32d83f6f90b082c4d8 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-200/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:181c5f0270cf39930062ddfa3767a2481d0c360f120b11f8e25dbf533a1cdaba +size 14645 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-200/scheduler.pt b/artifacts/district_llm_adapter_v2/checkpoint-200/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..3362ce0203c5120f1b48b9780295364eaf686326 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-200/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:379326d22f10fb05f8f610d4844919bdb60346c7b0ec96a2613fb34ff5180597 +size 1465 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-200/tokenizer.json b/artifacts/district_llm_adapter_v2/checkpoint-200/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-200/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-200/tokenizer_config.json b/artifacts/district_llm_adapter_v2/checkpoint-200/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-200/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-200/trainer_state.json b/artifacts/district_llm_adapter_v2/checkpoint-200/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..a374710e3bd5f2ac9ace273a923a8bd6ad784762 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-200/trainer_state.json @@ -0,0 +1,314 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 1.064, + "eval_steps": 50, + "global_step": 200, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.02666666666666667, + "grad_norm": 0.824774444103241, + "learning_rate": 4e-05, + "loss": 1.4378397941589356, + "step": 5 + }, + { + "epoch": 0.05333333333333334, + "grad_norm": 1.7167983055114746, + "learning_rate": 9e-05, + "loss": 1.087998867034912, + "step": 10 + }, + { + "epoch": 0.08, + "grad_norm": 0.7535544037818909, + "learning_rate": 0.00014, + "loss": 0.5613192558288574, + "step": 15 + }, + { + "epoch": 0.10666666666666667, + "grad_norm": 0.6983357071876526, + "learning_rate": 0.00019, + "loss": 0.28872098922729494, + "step": 20 + }, + { + "epoch": 0.13333333333333333, + "grad_norm": 0.8250440955162048, + "learning_rate": 0.00019989930665413147, + "loss": 0.22604494094848632, + "step": 25 + }, + { + "epoch": 0.16, + "grad_norm": 0.26267266273498535, + "learning_rate": 0.00019949058745487522, + "loss": 0.20742559432983398, + "step": 30 + }, + { + "epoch": 0.18666666666666668, + "grad_norm": 0.27337217330932617, + "learning_rate": 0.00019876883405951377, + "loss": 0.1870889902114868, + "step": 35 + }, + { + "epoch": 0.21333333333333335, + "grad_norm": 0.10534920543432236, + "learning_rate": 0.00019773631737125192, + "loss": 0.18097405433654784, + "step": 40 + }, + { + "epoch": 0.24, + "grad_norm": 0.13477347791194916, + "learning_rate": 0.00019639628606958533, + "loss": 0.17958487272262574, + "step": 45 + }, + { + "epoch": 0.26666666666666666, + "grad_norm": 0.1370360553264618, + "learning_rate": 0.0001947529563887529, + "loss": 0.16803257465362548, + "step": 50 + }, + { + "epoch": 0.29333333333333333, + "grad_norm": 0.1513640433549881, + "learning_rate": 0.0001928114988519039, + "loss": 0.16801449060440063, + "step": 55 + }, + { + "epoch": 0.32, + "grad_norm": 0.11957086622714996, + "learning_rate": 0.00019057802200271942, + "loss": 0.16269906759262084, + "step": 60 + }, + { + "epoch": 0.3466666666666667, + "grad_norm": 0.11077677458524704, + "learning_rate": 0.0001880595531856738, + "loss": 0.16706794500350952, + "step": 65 + }, + { + "epoch": 0.37333333333333335, + "grad_norm": 0.10614161193370819, + "learning_rate": 0.00018526401643540922, + "loss": 0.16436902284622193, + "step": 70 + }, + { + "epoch": 0.4, + "grad_norm": 0.13366934657096863, + "learning_rate": 0.00018220020754479102, + "loss": 0.15710221529006957, + "step": 75 + }, + { + "epoch": 0.4266666666666667, + "grad_norm": 0.1160494014620781, + "learning_rate": 0.00017887776639008914, + "loss": 0.16149884462356567, + "step": 80 + }, + { + "epoch": 0.4533333333333333, + "grad_norm": 0.09502895176410675, + "learning_rate": 0.00017530714660036112, + "loss": 0.16155229806900023, + "step": 85 + }, + { + "epoch": 0.48, + "grad_norm": 0.11183392256498337, + "learning_rate": 0.00017149958266646754, + "loss": 0.15782997608184815, + "step": 90 + }, + { + "epoch": 0.5066666666666667, + "grad_norm": 0.11126931011676788, + "learning_rate": 0.00016746705459320745, + "loss": 0.1604154586791992, + "step": 95 + }, + { + "epoch": 0.5333333333333333, + "grad_norm": 0.0941988080739975, + "learning_rate": 0.00016322225020579099, + "loss": 0.15799541473388673, + "step": 100 + }, + { + "epoch": 0.56, + "grad_norm": 0.1058623343706131, + "learning_rate": 0.00015877852522924732, + "loss": 0.15690511465072632, + "step": 105 + }, + { + "epoch": 0.5866666666666667, + "grad_norm": 0.11555207520723343, + "learning_rate": 0.00015414986126637258, + "loss": 0.1615644574165344, + "step": 110 + }, + { + "epoch": 0.6133333333333333, + "grad_norm": 0.2579882740974426, + "learning_rate": 0.0001493508218064347, + "loss": 0.16159408092498778, + "step": 115 + }, + { + "epoch": 0.64, + "grad_norm": 0.11453735083341599, + "learning_rate": 0.00014439650640304822, + "loss": 0.1569008708000183, + "step": 120 + }, + { + "epoch": 0.6666666666666666, + "grad_norm": 0.12122868746519089, + "learning_rate": 0.00013930250316539238, + "loss": 0.15291671752929686, + "step": 125 + }, + { + "epoch": 0.6933333333333334, + "grad_norm": 0.12676002085208893, + "learning_rate": 0.0001340848397122525, + "loss": 0.14967869520187377, + "step": 130 + }, + { + "epoch": 0.72, + "grad_norm": 0.14859774708747864, + "learning_rate": 0.00012875993274320173, + "loss": 0.1521363615989685, + "step": 135 + }, + { + "epoch": 0.7466666666666667, + "grad_norm": 0.1960573047399521, + "learning_rate": 0.00012334453638559057, + "loss": 0.14652782678604126, + "step": 140 + }, + { + "epoch": 0.7733333333333333, + "grad_norm": 0.13388624787330627, + "learning_rate": 0.00011785568947986367, + "loss": 0.1499272108078003, + "step": 145 + }, + { + "epoch": 0.8, + "grad_norm": 0.16420726478099823, + "learning_rate": 0.0001123106619690643, + "loss": 0.14629043340682985, + "step": 150 + }, + { + "epoch": 0.8266666666666667, + "grad_norm": 0.14654554426670074, + "learning_rate": 0.00010672690056120399, + "loss": 0.14661697149276734, + "step": 155 + }, + { + "epoch": 0.8533333333333334, + "grad_norm": 0.14784203469753265, + "learning_rate": 0.0001011219738354646, + "loss": 0.13817673921585083, + "step": 160 + }, + { + "epoch": 0.88, + "grad_norm": 0.13851715624332428, + "learning_rate": 9.551351696494854e-05, + "loss": 0.14781265258789061, + "step": 165 + }, + { + "epoch": 0.9066666666666666, + "grad_norm": 0.17259690165519714, + "learning_rate": 8.991917622989956e-05, + "loss": 0.14397273063659669, + "step": 170 + }, + { + "epoch": 0.9333333333333333, + "grad_norm": 0.287122517824173, + "learning_rate": 8.435655349597689e-05, + "loss": 0.14055378437042237, + "step": 175 + }, + { + "epoch": 0.96, + "grad_norm": 0.15599672496318817, + "learning_rate": 7.884315083227373e-05, + "loss": 0.14050980806350707, + "step": 180 + }, + { + "epoch": 0.9866666666666667, + "grad_norm": 0.17161861062049866, + "learning_rate": 7.339631544333249e-05, + "loss": 0.13583474159240722, + "step": 185 + }, + { + "epoch": 1.0106666666666666, + "grad_norm": 0.17195405066013336, + "learning_rate": 6.803318508842187e-05, + "loss": 0.14056421518325807, + "step": 190 + }, + { + "epoch": 1.0373333333333334, + "grad_norm": 0.14843153953552246, + "learning_rate": 6.277063415980549e-05, + "loss": 0.14321362972259521, + "step": 195 + }, + { + "epoch": 1.064, + "grad_norm": 0.17835235595703125, + "learning_rate": 5.762522058966113e-05, + "loss": 0.13067924976348877, + "step": 200 + } + ], + "logging_steps": 5, + "max_steps": 300, + "num_input_tokens_seen": 0, + "num_train_epochs": 2, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 6.496001098695475e+16, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-200/training_args.bin b/artifacts/district_llm_adapter_v2/checkpoint-200/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..cddb89b36f807d780c00c645c9351d5655ff5384 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-200/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99acc664411451a603c8908d063cb9b0bf85f277436eb270d65909aea5df4002 +size 5777 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-250/README.md b/artifacts/district_llm_adapter_v2/checkpoint-250/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-250/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-250/adapter_config.json b/artifacts/district_llm_adapter_v2/checkpoint-250/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9e043f775ee4e1597a302e07a7f54fdaf11696fb --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-250/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "up_proj", + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-250/adapter_model.safetensors b/artifacts/district_llm_adapter_v2/checkpoint-250/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..ecdf353e284ddcddd6b602a2ae2b40b6f73690c1 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-250/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:370fe7e78339d9255ae243c4bfe349aef8da090eb1781a355884e64f7a1d2e3e +size 167832240 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-250/optimizer.pt b/artifacts/district_llm_adapter_v2/checkpoint-250/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..ce7dde3d62e88fff413218c95fdbca2a92c3f778 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-250/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:490f9203b242e62ea63edf085fde2eba58ea15b8b6871b6bbf2df865836d8ab0 +size 85728677 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-250/rng_state.pth b/artifacts/district_llm_adapter_v2/checkpoint-250/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..9a2f1c6718be043c8a9bbc32d83f6f90b082c4d8 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-250/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:181c5f0270cf39930062ddfa3767a2481d0c360f120b11f8e25dbf533a1cdaba +size 14645 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-250/scheduler.pt b/artifacts/district_llm_adapter_v2/checkpoint-250/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..da7bc0f8a579d83fc7407a21eea138c156f4a9c9 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-250/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bc437dc59fd07050374d67a2aa4fea5884bf6fdc14a7b3d745e13844eacf4de +size 1465 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-250/tokenizer.json b/artifacts/district_llm_adapter_v2/checkpoint-250/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-250/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-250/tokenizer_config.json b/artifacts/district_llm_adapter_v2/checkpoint-250/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-250/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-250/trainer_state.json b/artifacts/district_llm_adapter_v2/checkpoint-250/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..225bd00a5df92ab40db62175dba81975249ad3f1 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-250/trainer_state.json @@ -0,0 +1,384 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 1.3306666666666667, + "eval_steps": 50, + "global_step": 250, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.02666666666666667, + "grad_norm": 0.824774444103241, + "learning_rate": 4e-05, + "loss": 1.4378397941589356, + "step": 5 + }, + { + "epoch": 0.05333333333333334, + "grad_norm": 1.7167983055114746, + "learning_rate": 9e-05, + "loss": 1.087998867034912, + "step": 10 + }, + { + "epoch": 0.08, + "grad_norm": 0.7535544037818909, + "learning_rate": 0.00014, + "loss": 0.5613192558288574, + "step": 15 + }, + { + "epoch": 0.10666666666666667, + "grad_norm": 0.6983357071876526, + "learning_rate": 0.00019, + "loss": 0.28872098922729494, + "step": 20 + }, + { + "epoch": 0.13333333333333333, + "grad_norm": 0.8250440955162048, + "learning_rate": 0.00019989930665413147, + "loss": 0.22604494094848632, + "step": 25 + }, + { + "epoch": 0.16, + "grad_norm": 0.26267266273498535, + "learning_rate": 0.00019949058745487522, + "loss": 0.20742559432983398, + "step": 30 + }, + { + "epoch": 0.18666666666666668, + "grad_norm": 0.27337217330932617, + "learning_rate": 0.00019876883405951377, + "loss": 0.1870889902114868, + "step": 35 + }, + { + "epoch": 0.21333333333333335, + "grad_norm": 0.10534920543432236, + "learning_rate": 0.00019773631737125192, + "loss": 0.18097405433654784, + "step": 40 + }, + { + "epoch": 0.24, + "grad_norm": 0.13477347791194916, + "learning_rate": 0.00019639628606958533, + "loss": 0.17958487272262574, + "step": 45 + }, + { + "epoch": 0.26666666666666666, + "grad_norm": 0.1370360553264618, + "learning_rate": 0.0001947529563887529, + "loss": 0.16803257465362548, + "step": 50 + }, + { + "epoch": 0.29333333333333333, + "grad_norm": 0.1513640433549881, + "learning_rate": 0.0001928114988519039, + "loss": 0.16801449060440063, + "step": 55 + }, + { + "epoch": 0.32, + "grad_norm": 0.11957086622714996, + "learning_rate": 0.00019057802200271942, + "loss": 0.16269906759262084, + "step": 60 + }, + { + "epoch": 0.3466666666666667, + "grad_norm": 0.11077677458524704, + "learning_rate": 0.0001880595531856738, + "loss": 0.16706794500350952, + "step": 65 + }, + { + "epoch": 0.37333333333333335, + "grad_norm": 0.10614161193370819, + "learning_rate": 0.00018526401643540922, + "loss": 0.16436902284622193, + "step": 70 + }, + { + "epoch": 0.4, + "grad_norm": 0.13366934657096863, + "learning_rate": 0.00018220020754479102, + "loss": 0.15710221529006957, + "step": 75 + }, + { + "epoch": 0.4266666666666667, + "grad_norm": 0.1160494014620781, + "learning_rate": 0.00017887776639008914, + "loss": 0.16149884462356567, + "step": 80 + }, + { + "epoch": 0.4533333333333333, + "grad_norm": 0.09502895176410675, + "learning_rate": 0.00017530714660036112, + "loss": 0.16155229806900023, + "step": 85 + }, + { + "epoch": 0.48, + "grad_norm": 0.11183392256498337, + "learning_rate": 0.00017149958266646754, + "loss": 0.15782997608184815, + "step": 90 + }, + { + "epoch": 0.5066666666666667, + "grad_norm": 0.11126931011676788, + "learning_rate": 0.00016746705459320745, + "loss": 0.1604154586791992, + "step": 95 + }, + { + "epoch": 0.5333333333333333, + "grad_norm": 0.0941988080739975, + "learning_rate": 0.00016322225020579099, + "loss": 0.15799541473388673, + "step": 100 + }, + { + "epoch": 0.56, + "grad_norm": 0.1058623343706131, + "learning_rate": 0.00015877852522924732, + "loss": 0.15690511465072632, + "step": 105 + }, + { + "epoch": 0.5866666666666667, + "grad_norm": 0.11555207520723343, + "learning_rate": 0.00015414986126637258, + "loss": 0.1615644574165344, + "step": 110 + }, + { + "epoch": 0.6133333333333333, + "grad_norm": 0.2579882740974426, + "learning_rate": 0.0001493508218064347, + "loss": 0.16159408092498778, + "step": 115 + }, + { + "epoch": 0.64, + "grad_norm": 0.11453735083341599, + "learning_rate": 0.00014439650640304822, + "loss": 0.1569008708000183, + "step": 120 + }, + { + "epoch": 0.6666666666666666, + "grad_norm": 0.12122868746519089, + "learning_rate": 0.00013930250316539238, + "loss": 0.15291671752929686, + "step": 125 + }, + { + "epoch": 0.6933333333333334, + "grad_norm": 0.12676002085208893, + "learning_rate": 0.0001340848397122525, + "loss": 0.14967869520187377, + "step": 130 + }, + { + "epoch": 0.72, + "grad_norm": 0.14859774708747864, + "learning_rate": 0.00012875993274320173, + "loss": 0.1521363615989685, + "step": 135 + }, + { + "epoch": 0.7466666666666667, + "grad_norm": 0.1960573047399521, + "learning_rate": 0.00012334453638559057, + "loss": 0.14652782678604126, + "step": 140 + }, + { + "epoch": 0.7733333333333333, + "grad_norm": 0.13388624787330627, + "learning_rate": 0.00011785568947986367, + "loss": 0.1499272108078003, + "step": 145 + }, + { + "epoch": 0.8, + "grad_norm": 0.16420726478099823, + "learning_rate": 0.0001123106619690643, + "loss": 0.14629043340682985, + "step": 150 + }, + { + "epoch": 0.8266666666666667, + "grad_norm": 0.14654554426670074, + "learning_rate": 0.00010672690056120399, + "loss": 0.14661697149276734, + "step": 155 + }, + { + "epoch": 0.8533333333333334, + "grad_norm": 0.14784203469753265, + "learning_rate": 0.0001011219738354646, + "loss": 0.13817673921585083, + "step": 160 + }, + { + "epoch": 0.88, + "grad_norm": 0.13851715624332428, + "learning_rate": 9.551351696494854e-05, + "loss": 0.14781265258789061, + "step": 165 + }, + { + "epoch": 0.9066666666666666, + "grad_norm": 0.17259690165519714, + "learning_rate": 8.991917622989956e-05, + "loss": 0.14397273063659669, + "step": 170 + }, + { + "epoch": 0.9333333333333333, + "grad_norm": 0.287122517824173, + "learning_rate": 8.435655349597689e-05, + "loss": 0.14055378437042237, + "step": 175 + }, + { + "epoch": 0.96, + "grad_norm": 0.15599672496318817, + "learning_rate": 7.884315083227373e-05, + "loss": 0.14050980806350707, + "step": 180 + }, + { + "epoch": 0.9866666666666667, + "grad_norm": 0.17161861062049866, + "learning_rate": 7.339631544333249e-05, + "loss": 0.13583474159240722, + "step": 185 + }, + { + "epoch": 1.0106666666666666, + "grad_norm": 0.17195405066013336, + "learning_rate": 6.803318508842187e-05, + "loss": 0.14056421518325807, + "step": 190 + }, + { + "epoch": 1.0373333333333334, + "grad_norm": 0.14843153953552246, + "learning_rate": 6.277063415980549e-05, + "loss": 0.14321362972259521, + "step": 195 + }, + { + "epoch": 1.064, + "grad_norm": 0.17835235595703125, + "learning_rate": 5.762522058966113e-05, + "loss": 0.13067924976348877, + "step": 200 + }, + { + "epoch": 1.0906666666666667, + "grad_norm": 0.1632383018732071, + "learning_rate": 5.261313375270014e-05, + "loss": 0.12805129289627076, + "step": 205 + }, + { + "epoch": 1.1173333333333333, + "grad_norm": 0.20246480405330658, + "learning_rate": 4.7750143528405126e-05, + "loss": 0.13229013681411744, + "step": 210 + }, + { + "epoch": 1.144, + "grad_norm": 0.17673878371715546, + "learning_rate": 4.305155068315481e-05, + "loss": 0.12511093616485597, + "step": 215 + }, + { + "epoch": 1.1706666666666667, + "grad_norm": 0.1710599809885025, + "learning_rate": 3.853213872835228e-05, + "loss": 0.1257094621658325, + "step": 220 + }, + { + "epoch": 1.1973333333333334, + "grad_norm": 0.13819953799247742, + "learning_rate": 3.4206127406028745e-05, + "loss": 0.128010892868042, + "step": 225 + }, + { + "epoch": 1.224, + "grad_norm": 0.16602523624897003, + "learning_rate": 3.008712794827426e-05, + "loss": 0.12313305139541626, + "step": 230 + }, + { + "epoch": 1.2506666666666666, + "grad_norm": 0.1438591480255127, + "learning_rate": 2.6188100251265945e-05, + "loss": 0.1285737633705139, + "step": 235 + }, + { + "epoch": 1.2773333333333334, + "grad_norm": 0.14794988930225372, + "learning_rate": 2.2521312098639914e-05, + "loss": 0.12740954160690307, + "step": 240 + }, + { + "epoch": 1.304, + "grad_norm": 0.1795991212129593, + "learning_rate": 1.9098300562505266e-05, + "loss": 0.13193751573562623, + "step": 245 + }, + { + "epoch": 1.3306666666666667, + "grad_norm": 0.15640249848365784, + "learning_rate": 1.5929835703546993e-05, + "loss": 0.12582911252975465, + "step": 250 + } + ], + "logging_steps": 5, + "max_steps": 300, + "num_input_tokens_seen": 0, + "num_train_epochs": 2, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 8.08492768302121e+16, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-250/training_args.bin b/artifacts/district_llm_adapter_v2/checkpoint-250/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..cddb89b36f807d780c00c645c9351d5655ff5384 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-250/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99acc664411451a603c8908d063cb9b0bf85f277436eb270d65909aea5df4002 +size 5777 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-300/README.md b/artifacts/district_llm_adapter_v2/checkpoint-300/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-300/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-300/adapter_config.json b/artifacts/district_llm_adapter_v2/checkpoint-300/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9e043f775ee4e1597a302e07a7f54fdaf11696fb --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-300/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "up_proj", + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-300/adapter_model.safetensors b/artifacts/district_llm_adapter_v2/checkpoint-300/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..e2324f2c871ec277e47b63bb816db9a5c160a36f --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-300/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18e9b835a17a3b1429550ea5e4afaa9b8ecc9301da476f35ece0679c9fb0203a +size 167832240 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-300/optimizer.pt b/artifacts/district_llm_adapter_v2/checkpoint-300/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..b9af20b5dcf07e3827242e72ef6b697f201c85d8 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-300/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24a696d9e0c3f4a6024fd091ddd93110a0bd199d9c11ccd6b397c925a9d1188c +size 85728677 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-300/rng_state.pth b/artifacts/district_llm_adapter_v2/checkpoint-300/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..9a2f1c6718be043c8a9bbc32d83f6f90b082c4d8 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-300/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:181c5f0270cf39930062ddfa3767a2481d0c360f120b11f8e25dbf533a1cdaba +size 14645 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-300/scheduler.pt b/artifacts/district_llm_adapter_v2/checkpoint-300/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..b6da7d225462df6d5942117bd7e2c0db4ada8f19 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-300/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d15d3d1b8bb19162d239033d431d77f4eba28beb04ec2c0ba04b41fbc223a133 +size 1465 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-300/tokenizer.json b/artifacts/district_llm_adapter_v2/checkpoint-300/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-300/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-300/tokenizer_config.json b/artifacts/district_llm_adapter_v2/checkpoint-300/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-300/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-300/trainer_state.json b/artifacts/district_llm_adapter_v2/checkpoint-300/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..c692bc6bd24b24852fc306edb12ece7de04576e7 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-300/trainer_state.json @@ -0,0 +1,454 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 1.5973333333333333, + "eval_steps": 50, + "global_step": 300, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.02666666666666667, + "grad_norm": 0.824774444103241, + "learning_rate": 4e-05, + "loss": 1.4378397941589356, + "step": 5 + }, + { + "epoch": 0.05333333333333334, + "grad_norm": 1.7167983055114746, + "learning_rate": 9e-05, + "loss": 1.087998867034912, + "step": 10 + }, + { + "epoch": 0.08, + "grad_norm": 0.7535544037818909, + "learning_rate": 0.00014, + "loss": 0.5613192558288574, + "step": 15 + }, + { + "epoch": 0.10666666666666667, + "grad_norm": 0.6983357071876526, + "learning_rate": 0.00019, + "loss": 0.28872098922729494, + "step": 20 + }, + { + "epoch": 0.13333333333333333, + "grad_norm": 0.8250440955162048, + "learning_rate": 0.00019989930665413147, + "loss": 0.22604494094848632, + "step": 25 + }, + { + "epoch": 0.16, + "grad_norm": 0.26267266273498535, + "learning_rate": 0.00019949058745487522, + "loss": 0.20742559432983398, + "step": 30 + }, + { + "epoch": 0.18666666666666668, + "grad_norm": 0.27337217330932617, + "learning_rate": 0.00019876883405951377, + "loss": 0.1870889902114868, + "step": 35 + }, + { + "epoch": 0.21333333333333335, + "grad_norm": 0.10534920543432236, + "learning_rate": 0.00019773631737125192, + "loss": 0.18097405433654784, + "step": 40 + }, + { + "epoch": 0.24, + "grad_norm": 0.13477347791194916, + "learning_rate": 0.00019639628606958533, + "loss": 0.17958487272262574, + "step": 45 + }, + { + "epoch": 0.26666666666666666, + "grad_norm": 0.1370360553264618, + "learning_rate": 0.0001947529563887529, + "loss": 0.16803257465362548, + "step": 50 + }, + { + "epoch": 0.29333333333333333, + "grad_norm": 0.1513640433549881, + "learning_rate": 0.0001928114988519039, + "loss": 0.16801449060440063, + "step": 55 + }, + { + "epoch": 0.32, + "grad_norm": 0.11957086622714996, + "learning_rate": 0.00019057802200271942, + "loss": 0.16269906759262084, + "step": 60 + }, + { + "epoch": 0.3466666666666667, + "grad_norm": 0.11077677458524704, + "learning_rate": 0.0001880595531856738, + "loss": 0.16706794500350952, + "step": 65 + }, + { + "epoch": 0.37333333333333335, + "grad_norm": 0.10614161193370819, + "learning_rate": 0.00018526401643540922, + "loss": 0.16436902284622193, + "step": 70 + }, + { + "epoch": 0.4, + "grad_norm": 0.13366934657096863, + "learning_rate": 0.00018220020754479102, + "loss": 0.15710221529006957, + "step": 75 + }, + { + "epoch": 0.4266666666666667, + "grad_norm": 0.1160494014620781, + "learning_rate": 0.00017887776639008914, + "loss": 0.16149884462356567, + "step": 80 + }, + { + "epoch": 0.4533333333333333, + "grad_norm": 0.09502895176410675, + "learning_rate": 0.00017530714660036112, + "loss": 0.16155229806900023, + "step": 85 + }, + { + "epoch": 0.48, + "grad_norm": 0.11183392256498337, + "learning_rate": 0.00017149958266646754, + "loss": 0.15782997608184815, + "step": 90 + }, + { + "epoch": 0.5066666666666667, + "grad_norm": 0.11126931011676788, + "learning_rate": 0.00016746705459320745, + "loss": 0.1604154586791992, + "step": 95 + }, + { + "epoch": 0.5333333333333333, + "grad_norm": 0.0941988080739975, + "learning_rate": 0.00016322225020579099, + "loss": 0.15799541473388673, + "step": 100 + }, + { + "epoch": 0.56, + "grad_norm": 0.1058623343706131, + "learning_rate": 0.00015877852522924732, + "loss": 0.15690511465072632, + "step": 105 + }, + { + "epoch": 0.5866666666666667, + "grad_norm": 0.11555207520723343, + "learning_rate": 0.00015414986126637258, + "loss": 0.1615644574165344, + "step": 110 + }, + { + "epoch": 0.6133333333333333, + "grad_norm": 0.2579882740974426, + "learning_rate": 0.0001493508218064347, + "loss": 0.16159408092498778, + "step": 115 + }, + { + "epoch": 0.64, + "grad_norm": 0.11453735083341599, + "learning_rate": 0.00014439650640304822, + "loss": 0.1569008708000183, + "step": 120 + }, + { + "epoch": 0.6666666666666666, + "grad_norm": 0.12122868746519089, + "learning_rate": 0.00013930250316539238, + "loss": 0.15291671752929686, + "step": 125 + }, + { + "epoch": 0.6933333333333334, + "grad_norm": 0.12676002085208893, + "learning_rate": 0.0001340848397122525, + "loss": 0.14967869520187377, + "step": 130 + }, + { + "epoch": 0.72, + "grad_norm": 0.14859774708747864, + "learning_rate": 0.00012875993274320173, + "loss": 0.1521363615989685, + "step": 135 + }, + { + "epoch": 0.7466666666666667, + "grad_norm": 0.1960573047399521, + "learning_rate": 0.00012334453638559057, + "loss": 0.14652782678604126, + "step": 140 + }, + { + "epoch": 0.7733333333333333, + "grad_norm": 0.13388624787330627, + "learning_rate": 0.00011785568947986367, + "loss": 0.1499272108078003, + "step": 145 + }, + { + "epoch": 0.8, + "grad_norm": 0.16420726478099823, + "learning_rate": 0.0001123106619690643, + "loss": 0.14629043340682985, + "step": 150 + }, + { + "epoch": 0.8266666666666667, + "grad_norm": 0.14654554426670074, + "learning_rate": 0.00010672690056120399, + "loss": 0.14661697149276734, + "step": 155 + }, + { + "epoch": 0.8533333333333334, + "grad_norm": 0.14784203469753265, + "learning_rate": 0.0001011219738354646, + "loss": 0.13817673921585083, + "step": 160 + }, + { + "epoch": 0.88, + "grad_norm": 0.13851715624332428, + "learning_rate": 9.551351696494854e-05, + "loss": 0.14781265258789061, + "step": 165 + }, + { + "epoch": 0.9066666666666666, + "grad_norm": 0.17259690165519714, + "learning_rate": 8.991917622989956e-05, + "loss": 0.14397273063659669, + "step": 170 + }, + { + "epoch": 0.9333333333333333, + "grad_norm": 0.287122517824173, + "learning_rate": 8.435655349597689e-05, + "loss": 0.14055378437042237, + "step": 175 + }, + { + "epoch": 0.96, + "grad_norm": 0.15599672496318817, + "learning_rate": 7.884315083227373e-05, + "loss": 0.14050980806350707, + "step": 180 + }, + { + "epoch": 0.9866666666666667, + "grad_norm": 0.17161861062049866, + "learning_rate": 7.339631544333249e-05, + "loss": 0.13583474159240722, + "step": 185 + }, + { + "epoch": 1.0106666666666666, + "grad_norm": 0.17195405066013336, + "learning_rate": 6.803318508842187e-05, + "loss": 0.14056421518325807, + "step": 190 + }, + { + "epoch": 1.0373333333333334, + "grad_norm": 0.14843153953552246, + "learning_rate": 6.277063415980549e-05, + "loss": 0.14321362972259521, + "step": 195 + }, + { + "epoch": 1.064, + "grad_norm": 0.17835235595703125, + "learning_rate": 5.762522058966113e-05, + "loss": 0.13067924976348877, + "step": 200 + }, + { + "epoch": 1.0906666666666667, + "grad_norm": 0.1632383018732071, + "learning_rate": 5.261313375270014e-05, + "loss": 0.12805129289627076, + "step": 205 + }, + { + "epoch": 1.1173333333333333, + "grad_norm": 0.20246480405330658, + "learning_rate": 4.7750143528405126e-05, + "loss": 0.13229013681411744, + "step": 210 + }, + { + "epoch": 1.144, + "grad_norm": 0.17673878371715546, + "learning_rate": 4.305155068315481e-05, + "loss": 0.12511093616485597, + "step": 215 + }, + { + "epoch": 1.1706666666666667, + "grad_norm": 0.1710599809885025, + "learning_rate": 3.853213872835228e-05, + "loss": 0.1257094621658325, + "step": 220 + }, + { + "epoch": 1.1973333333333334, + "grad_norm": 0.13819953799247742, + "learning_rate": 3.4206127406028745e-05, + "loss": 0.128010892868042, + "step": 225 + }, + { + "epoch": 1.224, + "grad_norm": 0.16602523624897003, + "learning_rate": 3.008712794827426e-05, + "loss": 0.12313305139541626, + "step": 230 + }, + { + "epoch": 1.2506666666666666, + "grad_norm": 0.1438591480255127, + "learning_rate": 2.6188100251265945e-05, + "loss": 0.1285737633705139, + "step": 235 + }, + { + "epoch": 1.2773333333333334, + "grad_norm": 0.14794988930225372, + "learning_rate": 2.2521312098639914e-05, + "loss": 0.12740954160690307, + "step": 240 + }, + { + "epoch": 1.304, + "grad_norm": 0.1795991212129593, + "learning_rate": 1.9098300562505266e-05, + "loss": 0.13193751573562623, + "step": 245 + }, + { + "epoch": 1.3306666666666667, + "grad_norm": 0.15640249848365784, + "learning_rate": 1.5929835703546993e-05, + "loss": 0.12582911252975465, + "step": 250 + }, + { + "epoch": 1.3573333333333333, + "grad_norm": 0.14046503603458405, + "learning_rate": 1.3025886684430467e-05, + "loss": 0.12443705797195434, + "step": 255 + }, + { + "epoch": 1.384, + "grad_norm": 0.1310988962650299, + "learning_rate": 1.0395590403127486e-05, + "loss": 0.12070828676223755, + "step": 260 + }, + { + "epoch": 1.4106666666666667, + "grad_norm": 0.14466392993927002, + "learning_rate": 8.047222744854943e-06, + "loss": 0.12532821893692017, + "step": 265 + }, + { + "epoch": 1.4373333333333334, + "grad_norm": 0.14367958903312683, + "learning_rate": 5.988172543078097e-06, + "loss": 0.12803750038146972, + "step": 270 + }, + { + "epoch": 1.464, + "grad_norm": 0.1260901838541031, + "learning_rate": 4.224918331506955e-06, + "loss": 0.12919749021530152, + "step": 275 + }, + { + "epoch": 1.4906666666666666, + "grad_norm": 0.15448392927646637, + "learning_rate": 2.7630079602323442e-06, + "loss": 0.12034926414489747, + "step": 280 + }, + { + "epoch": 1.5173333333333332, + "grad_norm": 0.13099071383476257, + "learning_rate": 1.6070411401370334e-06, + "loss": 0.12202563285827636, + "step": 285 + }, + { + "epoch": 1.544, + "grad_norm": 0.12795273959636688, + "learning_rate": 7.606549705035937e-07, + "loss": 0.12639375925064086, + "step": 290 + }, + { + "epoch": 1.5706666666666667, + "grad_norm": 0.15154622495174408, + "learning_rate": 2.265124953543918e-07, + "loss": 0.11272999048233032, + "step": 295 + }, + { + "epoch": 1.5973333333333333, + "grad_norm": 0.13886292278766632, + "learning_rate": 6.294324529942941e-09, + "loss": 0.12506213188171386, + "step": 300 + } + ], + "logging_steps": 5, + "max_steps": 300, + "num_input_tokens_seen": 0, + "num_train_epochs": 2, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 9.67580135921664e+16, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-300/training_args.bin b/artifacts/district_llm_adapter_v2/checkpoint-300/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..cddb89b36f807d780c00c645c9351d5655ff5384 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-300/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99acc664411451a603c8908d063cb9b0bf85f277436eb270d65909aea5df4002 +size 5777 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-50/README.md b/artifacts/district_llm_adapter_v2/checkpoint-50/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-50/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-50/adapter_config.json b/artifacts/district_llm_adapter_v2/checkpoint-50/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9e043f775ee4e1597a302e07a7f54fdaf11696fb --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-50/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "up_proj", + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v2/checkpoint-50/adapter_model.safetensors b/artifacts/district_llm_adapter_v2/checkpoint-50/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..999475ad2150ed9475fac64a3452c1a7dda1d23b --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-50/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e192795dd1039515542e989f48ce129f96cfa0330319567c4e8d6375d69c5044 +size 167832240 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-50/optimizer.pt b/artifacts/district_llm_adapter_v2/checkpoint-50/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..c917937038db77fde0a409278e9250b48f47960a --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-50/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40fc490e841227a4f38f6c93ba8c5b7d878e19da0fa3ee0f8d28071d0fd81855 +size 85728229 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-50/rng_state.pth b/artifacts/district_llm_adapter_v2/checkpoint-50/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..a18368651274f7c0847c1b9873fe8c9f4ac945ba --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-50/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c800b778fa7e115e4c34de8529902de8b61c9a1b4bab3eb8295d06dafff030e +size 14645 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-50/scheduler.pt b/artifacts/district_llm_adapter_v2/checkpoint-50/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..f06afa8434ddd77729088c06008859fb7c87e0c5 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-50/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3741efadbdc0c4039f1c59c43ac4000b594d5d94baed9387268fa8be6a9b18c +size 1465 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-50/tokenizer.json b/artifacts/district_llm_adapter_v2/checkpoint-50/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-50/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v2/checkpoint-50/tokenizer_config.json b/artifacts/district_llm_adapter_v2/checkpoint-50/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-50/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-50/trainer_state.json b/artifacts/district_llm_adapter_v2/checkpoint-50/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..793322e011000b3f5229d44139921edfe2bcc356 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-50/trainer_state.json @@ -0,0 +1,104 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 0.26666666666666666, + "eval_steps": 50, + "global_step": 50, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.02666666666666667, + "grad_norm": 0.824774444103241, + "learning_rate": 4e-05, + "loss": 1.4378397941589356, + "step": 5 + }, + { + "epoch": 0.05333333333333334, + "grad_norm": 1.7167983055114746, + "learning_rate": 9e-05, + "loss": 1.087998867034912, + "step": 10 + }, + { + "epoch": 0.08, + "grad_norm": 0.7535544037818909, + "learning_rate": 0.00014, + "loss": 0.5613192558288574, + "step": 15 + }, + { + "epoch": 0.10666666666666667, + "grad_norm": 0.6983357071876526, + "learning_rate": 0.00019, + "loss": 0.28872098922729494, + "step": 20 + }, + { + "epoch": 0.13333333333333333, + "grad_norm": 0.8250440955162048, + "learning_rate": 0.00019989930665413147, + "loss": 0.22604494094848632, + "step": 25 + }, + { + "epoch": 0.16, + "grad_norm": 0.26267266273498535, + "learning_rate": 0.00019949058745487522, + "loss": 0.20742559432983398, + "step": 30 + }, + { + "epoch": 0.18666666666666668, + "grad_norm": 0.27337217330932617, + "learning_rate": 0.00019876883405951377, + "loss": 0.1870889902114868, + "step": 35 + }, + { + "epoch": 0.21333333333333335, + "grad_norm": 0.10534920543432236, + "learning_rate": 0.00019773631737125192, + "loss": 0.18097405433654784, + "step": 40 + }, + { + "epoch": 0.24, + "grad_norm": 0.13477347791194916, + "learning_rate": 0.00019639628606958533, + "loss": 0.17958487272262574, + "step": 45 + }, + { + "epoch": 0.26666666666666666, + "grad_norm": 0.1370360553264618, + "learning_rate": 0.0001947529563887529, + "loss": 0.16803257465362548, + "step": 50 + } + ], + "logging_steps": 5, + "max_steps": 300, + "num_input_tokens_seen": 0, + "num_train_epochs": 2, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1.7468312068374528e+16, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/artifacts/district_llm_adapter_v2/checkpoint-50/training_args.bin b/artifacts/district_llm_adapter_v2/checkpoint-50/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..cddb89b36f807d780c00c645c9351d5655ff5384 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/checkpoint-50/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99acc664411451a603c8908d063cb9b0bf85f277436eb270d65909aea5df4002 +size 5777 diff --git a/artifacts/district_llm_adapter_v2/tokenizer.json b/artifacts/district_llm_adapter_v2/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v2/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v2/tokenizer_config.json b/artifacts/district_llm_adapter_v2/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v2/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v3/main_run/adapter/README.md b/artifacts/district_llm_adapter_v3/main_run/adapter/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/adapter/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/adapter/adapter_config.json b/artifacts/district_llm_adapter_v3/main_run/adapter/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..50f3a53a1bba2b06c2c46aa88d0a38903b42b947 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/adapter/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0.05, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "q_proj", + "up_proj", + "gate_proj", + "v_proj", + "k_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/adapter/adapter_model.safetensors b/artifacts/district_llm_adapter_v3/main_run/adapter/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..4f28657b4363653b9489f2e6350941c23cf1dcc5 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/adapter/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69163c214c0ad5462dc64dfb110bea79e50a2c4d5affdf084a8b351352231777 +size 167832240 diff --git a/artifacts/district_llm_adapter_v3/main_run/adapter/tokenizer.json b/artifacts/district_llm_adapter_v3/main_run/adapter/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/adapter/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v3/main_run/adapter/tokenizer_config.json b/artifacts/district_llm_adapter_v3/main_run/adapter/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9cdc30156f5da686eee2345adc567d32685da6eb --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/adapter/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "left", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/README.md b/artifacts/district_llm_adapter_v3/main_run/checkpoints/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9dd1c9eebbff8456f17eee253fdf6270c54b4ee8 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/README.md @@ -0,0 +1,59 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: transformers +model_name: checkpoints +tags: +- generated_from_trainer +- sft +- unsloth +- trl +licence: license +--- + +# Model Card for checkpoints + +This model is a fine-tuned version of [unsloth/llama-3.1-8b-unsloth-bnb-4bit](https://huggingface.co/unsloth/llama-3.1-8b-unsloth-bnb-4bit). +It has been trained using [TRL](https://github.com/huggingface/trl). + +## Quick start + +```python +from transformers import pipeline + +question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?" +generator = pipeline("text-generation", model="None", device="cuda") +output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0] +print(output["generated_text"]) +``` + +## Training procedure + + + + +This model was trained with SFT. + +### Framework versions + +- TRL: 0.24.0 +- Transformers: 5.2.0 +- Pytorch: 2.10.0 +- Datasets: 4.3.0 +- Tokenizers: 0.22.2 + +## Citations + + + +Cite TRL as: + +```bibtex +@misc{vonwerra2022trl, + title = {{TRL: Transformer Reinforcement Learning}}, + author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec}, + year = 2020, + journal = {GitHub repository}, + publisher = {GitHub}, + howpublished = {\url{https://github.com/huggingface/trl}} +} +``` \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/README.md b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/adapter_config.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..50f3a53a1bba2b06c2c46aa88d0a38903b42b947 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0.05, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "q_proj", + "up_proj", + "gate_proj", + "v_proj", + "k_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/adapter_model.safetensors b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..af3d302dc061e11912a017fa2c7079e51009a84e --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f58d4660208b0b406189ed15912e5bc5fb78187213a5cd8d0ebcb2f094689f94 +size 167832240 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/optimizer.pt b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..07841ff6d15d03c1159a5d23590eb36bf159c730 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2bdc98b5b5cc860fe4aebef5573882e0207cd79a0af226da8d851651d1e8120 +size 85728229 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/rng_state.pth b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..802612a4cf7be7ea76b3e545abc71203baf78ae0 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21060fc9a9e5833b44cb71c077cb8b3440bccea91e973d703cd634c8f9510eac +size 14645 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/scheduler.pt b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..1ec198f2f990fb2d5073b05dace1d026a61e61f8 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d142ba80b173d78928f6e40d36b0ca82089205d05a9ad308e63a67c886938b4 +size 1465 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/tokenizer.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/tokenizer_config.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/trainer_state.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..25d6e25969fba4799f3ee3000974d9c2385b8267 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/trainer_state.json @@ -0,0 +1,120 @@ +{ + "best_global_step": 100, + "best_metric": 0.22948598861694336, + "best_model_checkpoint": "/root/aditya/agentic-traffic/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100", + "epoch": 0.32, + "eval_steps": 50, + "global_step": 100, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.032, + "grad_norm": 0.4361717700958252, + "learning_rate": 4.5e-05, + "loss": 1.4458722114562987, + "step": 10 + }, + { + "epoch": 0.064, + "grad_norm": 0.7532660365104675, + "learning_rate": 4.972369676503672e-05, + "loss": 1.093221950531006, + "step": 20 + }, + { + "epoch": 0.096, + "grad_norm": 0.5049856901168823, + "learning_rate": 4.877641290737884e-05, + "loss": 0.5069889545440673, + "step": 30 + }, + { + "epoch": 0.128, + "grad_norm": 0.30449649691581726, + "learning_rate": 4.71805704860903e-05, + "loss": 0.25573880672454835, + "step": 40 + }, + { + "epoch": 0.16, + "grad_norm": 0.1489340215921402, + "learning_rate": 4.497969992237312e-05, + "loss": 0.20137147903442382, + "step": 50 + }, + { + "epoch": 0.16, + "eval_loss": 0.2447669953107834, + "eval_runtime": 82.8539, + "eval_samples_per_second": 30.174, + "eval_steps_per_second": 3.778, + "step": 50 + }, + { + "epoch": 0.192, + "grad_norm": 0.11876446008682251, + "learning_rate": 4.223383522796415e-05, + "loss": 0.1905428647994995, + "step": 60 + }, + { + "epoch": 0.224, + "grad_norm": 0.15916739404201508, + "learning_rate": 3.901787643379182e-05, + "loss": 0.18608036041259765, + "step": 70 + }, + { + "epoch": 0.256, + "grad_norm": 0.15157724916934967, + "learning_rate": 3.5419546512382266e-05, + "loss": 0.18046131134033203, + "step": 80 + }, + { + "epoch": 0.288, + "grad_norm": 0.18097606301307678, + "learning_rate": 3.1536998523845494e-05, + "loss": 0.1746811866760254, + "step": 90 + }, + { + "epoch": 0.32, + "grad_norm": 0.20004506409168243, + "learning_rate": 2.7476138256261575e-05, + "loss": 0.16963083744049073, + "step": 100 + }, + { + "epoch": 0.32, + "eval_loss": 0.22948598861694336, + "eval_runtime": 83.228, + "eval_samples_per_second": 30.038, + "eval_steps_per_second": 3.761, + "step": 100 + } + ], + "logging_steps": 10, + "max_steps": 200, + "num_input_tokens_seen": 0, + "num_train_epochs": 1, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1.0912077909096038e+17, + "train_batch_size": 8, + "trial_name": null, + "trial_params": null +} diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/training_args.bin b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..b313a0bbd94984150fe176103a331d00ceb83207 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-100/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a6ec5fb0082134d16c0be60e6f43921ddfb94abdf98f5ba7ea0b76eecedc43b +size 5777 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/README.md b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/adapter_config.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..50f3a53a1bba2b06c2c46aa88d0a38903b42b947 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0.05, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "q_proj", + "up_proj", + "gate_proj", + "v_proj", + "k_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/adapter_model.safetensors b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..4f28657b4363653b9489f2e6350941c23cf1dcc5 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69163c214c0ad5462dc64dfb110bea79e50a2c4d5affdf084a8b351352231777 +size 167832240 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/optimizer.pt b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..3fc1e8cabef28360557d1d34e8f26d43504ee9f2 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30b3a2c9e7504b57e9fdb863efcbb0e541723eb7c79cdace0468f0fbd88ce568 +size 85728229 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/rng_state.pth b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..6fd642c6b5c4d713afcc5eb7308362ce621c3a60 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecf5c4346dc3635313582e24d7ca47683619d527be2a4cd695e1e199f3d7abfe +size 14645 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/scheduler.pt b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..8714f46e224aa26e38f10796adf82097d3570e0f --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b50376a88f5b3d808b238d0e32d5f70a438bafc8e07ed6cce46b8c632ae9ff9 +size 1465 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/tokenizer.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/tokenizer_config.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/trainer_state.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..6eaed968fc42baea8d7b7644903cffb6734bd112 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/trainer_state.json @@ -0,0 +1,163 @@ +{ + "best_global_step": 150, + "best_metric": 0.2247210443019867, + "best_model_checkpoint": "/root/aditya/agentic-traffic/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150", + "epoch": 0.48, + "eval_steps": 50, + "global_step": 150, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.032, + "grad_norm": 0.4361717700958252, + "learning_rate": 4.5e-05, + "loss": 1.4458722114562987, + "step": 10 + }, + { + "epoch": 0.064, + "grad_norm": 0.7532660365104675, + "learning_rate": 4.972369676503672e-05, + "loss": 1.093221950531006, + "step": 20 + }, + { + "epoch": 0.096, + "grad_norm": 0.5049856901168823, + "learning_rate": 4.877641290737884e-05, + "loss": 0.5069889545440673, + "step": 30 + }, + { + "epoch": 0.128, + "grad_norm": 0.30449649691581726, + "learning_rate": 4.71805704860903e-05, + "loss": 0.25573880672454835, + "step": 40 + }, + { + "epoch": 0.16, + "grad_norm": 0.1489340215921402, + "learning_rate": 4.497969992237312e-05, + "loss": 0.20137147903442382, + "step": 50 + }, + { + "epoch": 0.16, + "eval_loss": 0.2447669953107834, + "eval_runtime": 82.8539, + "eval_samples_per_second": 30.174, + "eval_steps_per_second": 3.778, + "step": 50 + }, + { + "epoch": 0.192, + "grad_norm": 0.11876446008682251, + "learning_rate": 4.223383522796415e-05, + "loss": 0.1905428647994995, + "step": 60 + }, + { + "epoch": 0.224, + "grad_norm": 0.15916739404201508, + "learning_rate": 3.901787643379182e-05, + "loss": 0.18608036041259765, + "step": 70 + }, + { + "epoch": 0.256, + "grad_norm": 0.15157724916934967, + "learning_rate": 3.5419546512382266e-05, + "loss": 0.18046131134033203, + "step": 80 + }, + { + "epoch": 0.288, + "grad_norm": 0.18097606301307678, + "learning_rate": 3.1536998523845494e-05, + "loss": 0.1746811866760254, + "step": 90 + }, + { + "epoch": 0.32, + "grad_norm": 0.20004506409168243, + "learning_rate": 2.7476138256261575e-05, + "loss": 0.16963083744049073, + "step": 100 + }, + { + "epoch": 0.32, + "eval_loss": 0.22948598861694336, + "eval_runtime": 83.228, + "eval_samples_per_second": 30.038, + "eval_steps_per_second": 3.761, + "step": 100 + }, + { + "epoch": 0.352, + "grad_norm": 0.19386710226535797, + "learning_rate": 2.334773539185752e-05, + "loss": 0.16312288045883178, + "step": 110 + }, + { + "epoch": 0.384, + "grad_norm": 0.13836602866649628, + "learning_rate": 1.9264401998831213e-05, + "loss": 0.16111031770706177, + "step": 120 + }, + { + "epoch": 0.416, + "grad_norm": 0.16113686561584473, + "learning_rate": 1.5337520767688703e-05, + "loss": 0.15699511766433716, + "step": 130 + }, + { + "epoch": 0.448, + "grad_norm": 0.15282206237316132, + "learning_rate": 1.1674206781800162e-05, + "loss": 0.15558167695999145, + "step": 140 + }, + { + "epoch": 0.48, + "grad_norm": 0.14266464114189148, + "learning_rate": 8.374385697153792e-06, + "loss": 0.15453630685806274, + "step": 150 + }, + { + "epoch": 0.48, + "eval_loss": 0.2247210443019867, + "eval_runtime": 82.9922, + "eval_samples_per_second": 30.123, + "eval_steps_per_second": 3.771, + "step": 150 + } + ], + "logging_steps": 10, + "max_steps": 200, + "num_input_tokens_seen": 0, + "num_train_epochs": 1, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1.6341059078836224e+17, + "train_batch_size": 8, + "trial_name": null, + "trial_params": null +} diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/training_args.bin b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..b313a0bbd94984150fe176103a331d00ceb83207 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a6ec5fb0082134d16c0be60e6f43921ddfb94abdf98f5ba7ea0b76eecedc43b +size 5777 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/README.md b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/adapter_config.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..50f3a53a1bba2b06c2c46aa88d0a38903b42b947 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0.05, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "q_proj", + "up_proj", + "gate_proj", + "v_proj", + "k_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/adapter_model.safetensors b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..d6913d4510c14466bc6f2c9a9b29a3e6910b4e55 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d056e064ed72c7ab69e18168d4c47c3e2c77bdeb5432279994748e97f1f794eb +size 167832240 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/optimizer.pt b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..35428110a0a22ad22aa661428c425e728ac4b316 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:729fdf2a68602248f4d5a679ece88a5f64e5c31bb6b090d5d1a3f77c4bdd635c +size 85728229 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/rng_state.pth b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..e0261438c6e22c32797398ebbe3a3ef4a63078b7 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:799cbbcaf268fe753691dd8a6055c770823858b95a3b51249f11acc476ff5b9c +size 14645 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/scheduler.pt b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..d74a7a4972be5eead9296121370d8d11f49abce5 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fa296abc5d84df05f0c53a8649e3e3fcb24d63cdc9ca21aa4cdd6ecf1b15277 +size 1465 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/tokenizer.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/tokenizer_config.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/trainer_state.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..a4caa64173f3a30c2c04a19e7b16fbad5567bd1e --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/trainer_state.json @@ -0,0 +1,206 @@ +{ + "best_global_step": 150, + "best_metric": 0.2247210443019867, + "best_model_checkpoint": "/root/aditya/agentic-traffic/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150", + "epoch": 0.64, + "eval_steps": 50, + "global_step": 200, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.032, + "grad_norm": 0.4361717700958252, + "learning_rate": 4.5e-05, + "loss": 1.4458722114562987, + "step": 10 + }, + { + "epoch": 0.064, + "grad_norm": 0.7532660365104675, + "learning_rate": 4.972369676503672e-05, + "loss": 1.093221950531006, + "step": 20 + }, + { + "epoch": 0.096, + "grad_norm": 0.5049856901168823, + "learning_rate": 4.877641290737884e-05, + "loss": 0.5069889545440673, + "step": 30 + }, + { + "epoch": 0.128, + "grad_norm": 0.30449649691581726, + "learning_rate": 4.71805704860903e-05, + "loss": 0.25573880672454835, + "step": 40 + }, + { + "epoch": 0.16, + "grad_norm": 0.1489340215921402, + "learning_rate": 4.497969992237312e-05, + "loss": 0.20137147903442382, + "step": 50 + }, + { + "epoch": 0.16, + "eval_loss": 0.2447669953107834, + "eval_runtime": 82.8539, + "eval_samples_per_second": 30.174, + "eval_steps_per_second": 3.778, + "step": 50 + }, + { + "epoch": 0.192, + "grad_norm": 0.11876446008682251, + "learning_rate": 4.223383522796415e-05, + "loss": 0.1905428647994995, + "step": 60 + }, + { + "epoch": 0.224, + "grad_norm": 0.15916739404201508, + "learning_rate": 3.901787643379182e-05, + "loss": 0.18608036041259765, + "step": 70 + }, + { + "epoch": 0.256, + "grad_norm": 0.15157724916934967, + "learning_rate": 3.5419546512382266e-05, + "loss": 0.18046131134033203, + "step": 80 + }, + { + "epoch": 0.288, + "grad_norm": 0.18097606301307678, + "learning_rate": 3.1536998523845494e-05, + "loss": 0.1746811866760254, + "step": 90 + }, + { + "epoch": 0.32, + "grad_norm": 0.20004506409168243, + "learning_rate": 2.7476138256261575e-05, + "loss": 0.16963083744049073, + "step": 100 + }, + { + "epoch": 0.32, + "eval_loss": 0.22948598861694336, + "eval_runtime": 83.228, + "eval_samples_per_second": 30.038, + "eval_steps_per_second": 3.761, + "step": 100 + }, + { + "epoch": 0.352, + "grad_norm": 0.19386710226535797, + "learning_rate": 2.334773539185752e-05, + "loss": 0.16312288045883178, + "step": 110 + }, + { + "epoch": 0.384, + "grad_norm": 0.13836602866649628, + "learning_rate": 1.9264401998831213e-05, + "loss": 0.16111031770706177, + "step": 120 + }, + { + "epoch": 0.416, + "grad_norm": 0.16113686561584473, + "learning_rate": 1.5337520767688703e-05, + "loss": 0.15699511766433716, + "step": 130 + }, + { + "epoch": 0.448, + "grad_norm": 0.15282206237316132, + "learning_rate": 1.1674206781800162e-05, + "loss": 0.15558167695999145, + "step": 140 + }, + { + "epoch": 0.48, + "grad_norm": 0.14266464114189148, + "learning_rate": 8.374385697153792e-06, + "loss": 0.15453630685806274, + "step": 150 + }, + { + "epoch": 0.48, + "eval_loss": 0.2247210443019867, + "eval_runtime": 82.9922, + "eval_samples_per_second": 30.123, + "eval_steps_per_second": 3.771, + "step": 150 + }, + { + "epoch": 0.512, + "grad_norm": 0.1306747943162918, + "learning_rate": 5.528068030947192e-06, + "loss": 0.1546689510345459, + "step": 160 + }, + { + "epoch": 0.544, + "grad_norm": 0.18957850337028503, + "learning_rate": 3.2128939093180655e-06, + "loss": 0.1539098620414734, + "step": 170 + }, + { + "epoch": 0.576, + "grad_norm": 0.1586650311946869, + "learning_rate": 1.4920152470959707e-06, + "loss": 0.15302098989486695, + "step": 180 + }, + { + "epoch": 0.608, + "grad_norm": 0.18621937930583954, + "learning_rate": 4.1237312819044085e-07, + "loss": 0.15011662244796753, + "step": 190 + }, + { + "epoch": 0.64, + "grad_norm": 0.18586257100105286, + "learning_rate": 3.417375188274896e-09, + "loss": 0.15452107191085815, + "step": 200 + }, + { + "epoch": 0.64, + "eval_loss": 0.22675427794456482, + "eval_runtime": 82.8856, + "eval_samples_per_second": 30.162, + "eval_steps_per_second": 3.776, + "step": 200 + } + ], + "logging_steps": 10, + "max_steps": 200, + "num_input_tokens_seen": 0, + "num_train_epochs": 1, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 2.176929763679355e+17, + "train_batch_size": 8, + "trial_name": null, + "trial_params": null +} diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/training_args.bin b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..b313a0bbd94984150fe176103a331d00ceb83207 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-200/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a6ec5fb0082134d16c0be60e6f43921ddfb94abdf98f5ba7ea0b76eecedc43b +size 5777 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/README.md b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/README.md new file mode 100644 index 0000000000000000000000000000000000000000..22fce89ff0be87e0b710c357bf5ebf0ef0c6b01b --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/README.md @@ -0,0 +1,210 @@ +--- +base_model: unsloth/llama-3.1-8b-unsloth-bnb-4bit +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/llama-3.1-8b-unsloth-bnb-4bit +- lora +- sft +- transformers +- trl +- unsloth +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.18.1 \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/adapter_config.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..50f3a53a1bba2b06c2c46aa88d0a38903b42b947 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/adapter_config.json @@ -0,0 +1,50 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": { + "base_model_class": "LlamaForCausalLM", + "parent_library": "transformers.models.llama.modeling_llama", + "unsloth_fixed": true + }, + "base_model_name_or_path": "unsloth/llama-3.1-8b-unsloth-bnb-4bit", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 16, + "lora_bias": false, + "lora_dropout": 0.05, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "peft_type": "LORA", + "peft_version": "0.18.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "down_proj", + "q_proj", + "up_proj", + "gate_proj", + "v_proj", + "k_proj", + "o_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/adapter_model.safetensors b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..9bb07f8536365a5be706c4ef7317556f0e977f51 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71cfa9ad2be2448f8f2c36b4471b446089835edf0cc7907f8b05c75f6ed4dfaf +size 167832240 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/optimizer.pt b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..96a0ff4adb5392d7338942555356ab97ee652b82 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe679430e480938173b05dc90938ccacceb4ea219e87f80eda1c253971a3dab2 +size 85728229 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/rng_state.pth b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..f5d5b669cd608c49087c9610ff4c1ae0e4839cc5 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d23716d67c810a0f2b9d37e4577a5038785e7847ceeecd93fb43ffd1994d9b7 +size 14645 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/scheduler.pt b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..3bf5cb127af0b595f635399613f0a7c8f96af0db --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42ecd629af138f1d22a5010f9e8a39f70bb393482ea08ae370fe2fda1f131cf7 +size 1465 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/tokenizer.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/tokenizer_config.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..f507e387a7a6fbf56356356db2d8bf588d34a30d --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/tokenizer_config.json @@ -0,0 +1,18 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|end_of_text|>", + "from_slow": true, + "is_local": false, + "legacy": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "right", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/trainer_state.json b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..3ba5e0261d71f18fbdbac5d90fffbf00f0bf5004 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/trainer_state.json @@ -0,0 +1,77 @@ +{ + "best_global_step": 50, + "best_metric": 0.2447669953107834, + "best_model_checkpoint": "/root/aditya/agentic-traffic/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50", + "epoch": 0.16, + "eval_steps": 50, + "global_step": 50, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.032, + "grad_norm": 0.4361717700958252, + "learning_rate": 4.5e-05, + "loss": 1.4458722114562987, + "step": 10 + }, + { + "epoch": 0.064, + "grad_norm": 0.7532660365104675, + "learning_rate": 4.972369676503672e-05, + "loss": 1.093221950531006, + "step": 20 + }, + { + "epoch": 0.096, + "grad_norm": 0.5049856901168823, + "learning_rate": 4.877641290737884e-05, + "loss": 0.5069889545440673, + "step": 30 + }, + { + "epoch": 0.128, + "grad_norm": 0.30449649691581726, + "learning_rate": 4.71805704860903e-05, + "loss": 0.25573880672454835, + "step": 40 + }, + { + "epoch": 0.16, + "grad_norm": 0.1489340215921402, + "learning_rate": 4.497969992237312e-05, + "loss": 0.20137147903442382, + "step": 50 + }, + { + "epoch": 0.16, + "eval_loss": 0.2447669953107834, + "eval_runtime": 82.8539, + "eval_samples_per_second": 30.174, + "eval_steps_per_second": 3.778, + "step": 50 + } + ], + "logging_steps": 10, + "max_steps": 200, + "num_input_tokens_seen": 0, + "num_train_epochs": 1, + "save_steps": 50, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 5.460130111534694e+16, + "train_batch_size": 8, + "trial_name": null, + "trial_params": null +} diff --git a/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/training_args.bin b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..b313a0bbd94984150fe176103a331d00ceb83207 --- /dev/null +++ b/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-50/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a6ec5fb0082134d16c0be60e6f43921ddfb94abdf98f5ba7ea0b76eecedc43b +size 5777 diff --git a/artifacts/dqn_shared/best_validation.pt b/artifacts/dqn_shared/best_validation.pt new file mode 100644 index 0000000000000000000000000000000000000000..bd53541aace128c6fc951cda29a868abb97f5fb3 --- /dev/null +++ b/artifacts/dqn_shared/best_validation.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a478cd3149c74ef0f0a57e5510bccd35262272a0a25bfb76b6aac2e8417af85 +size 1320091 diff --git a/artifacts/dqn_shared/checkpoints/update_0020.pt b/artifacts/dqn_shared/checkpoints/update_0020.pt new file mode 100644 index 0000000000000000000000000000000000000000..a9c71699651ba519c792be7705d44fbd1fa142eb --- /dev/null +++ b/artifacts/dqn_shared/checkpoints/update_0020.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55328bbff1032302d2defb0be19476b6aa5d7c33ea5d570b48cd2d0500d8eda3 +size 1319843 diff --git a/artifacts/dqn_shared/checkpoints/update_0040.pt b/artifacts/dqn_shared/checkpoints/update_0040.pt new file mode 100644 index 0000000000000000000000000000000000000000..560331e0c4db967d28a1eb8d14e744e7df59f2c4 --- /dev/null +++ b/artifacts/dqn_shared/checkpoints/update_0040.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81bd5cdc2768a678a1d20ebddf1df990e0986c001778ef0bbb0f5d6036b75224 +size 1319843 diff --git a/artifacts/dqn_shared/checkpoints/update_0060.pt b/artifacts/dqn_shared/checkpoints/update_0060.pt new file mode 100644 index 0000000000000000000000000000000000000000..94850754e73fd78d0eaa5442fef35bdcb42a9673 --- /dev/null +++ b/artifacts/dqn_shared/checkpoints/update_0060.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9072d3990a26e185a61279925c9332b8e5da6a111f9017db8e7016bb7f60ddb3 +size 1319843 diff --git a/artifacts/dqn_shared/checkpoints/update_0080.pt b/artifacts/dqn_shared/checkpoints/update_0080.pt new file mode 100644 index 0000000000000000000000000000000000000000..890fbce8742b481a4f1fc767e56641c8c87e3961 --- /dev/null +++ b/artifacts/dqn_shared/checkpoints/update_0080.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dc02c91f71b17aad22d1a994679fd773a8737dc9a63feb288f7adc9a03c224a +size 1319907 diff --git a/artifacts/dqn_shared/last.pt b/artifacts/dqn_shared/last.pt new file mode 100644 index 0000000000000000000000000000000000000000..51d122c0146b80058bf73b49d7ee46e70fc955b3 --- /dev/null +++ b/artifacts/dqn_shared/last.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59c5377cd84c05fdbd188798fb4eabb7e7a4c078acd7ed364204f7b643257cf0 +size 1318049 diff --git a/artifacts/dqn_shared/tensorboard/events.out.tfevents.1772888000.Adityas-MacBook-Pro.local.6461.0 b/artifacts/dqn_shared/tensorboard/events.out.tfevents.1772888000.Adityas-MacBook-Pro.local.6461.0 new file mode 100644 index 0000000000000000000000000000000000000000..93337d1dc37745860ae996eeb3b8699b582ac6fb --- /dev/null +++ b/artifacts/dqn_shared/tensorboard/events.out.tfevents.1772888000.Adityas-MacBook-Pro.local.6461.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e49dab4551916cc9ca6b661092497f8b6c99c2a8127a99faa0fcb3aac3d896fb +size 532724 diff --git a/artifacts/dqn_shared/training_log.jsonl b/artifacts/dqn_shared/training_log.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..07a793485bdd0585bd9350830f6b494adc10120c --- /dev/null +++ b/artifacts/dqn_shared/training_log.jsonl @@ -0,0 +1,80 @@ +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 8256.0, "episode_return": -0.009245977779307241, "total_episode_return": -74.10149090969935, "mean_waiting_vehicles": 4.78425931930542, "throughput": 1767.0, "mean_q_value": -0.061729479348286986, "epsilon": 0.9967573333333334, "num_episodes": 4.0, "mean_average_travel_time": 112.21466035101632, "mean_decision_steps": 128.0, "mean_episode_return": -0.009245977779307241, "mean_epsilon": 1.0, "mean_mean_incoming_vehicles": 10.352325081825256, "mean_mean_incoming_vehicles_commercial": 9.578174750010172, "mean_mean_incoming_vehicles_industrial": 10.405036767323812, "mean_mean_incoming_vehicles_mixed": 14.409151077270508, "mean_mean_incoming_vehicles_residential": 9.81446393330892, "mean_mean_q_value": 0.008397601189855664, "mean_mean_reward": -0.015820944201550446, "mean_mean_reward_commercial": -0.00878467969596386, "mean_mean_reward_industrial": 0.025571095951211948, "mean_mean_reward_mixed": -0.055966440588235855, "mean_mean_reward_residential": -0.020458053176601727, "mean_mean_step_intersection_reward": -0.009245977779307241, "mean_mean_waiting_vehicles": 4.78425931930542, "mean_mean_waiting_vehicles_commercial": 3.46486763159434, "mean_mean_waiting_vehicles_industrial": 4.441184997558594, "mean_mean_waiting_vehicles_mixed": 6.532399972279866, "mean_mean_waiting_vehicles_residential": 5.107657750447591, "mean_num_commercial_intersections": 17.333333333333332, "mean_num_controlled_intersections": 64.5, "mean_num_industrial_intersections": 21.333333333333332, "mean_num_mixed_intersections": 20.0, "mean_num_residential_intersections": 27.333333333333332, "mean_reward_component_mean_imbalance_term": -0.00042979863966974285, "mean_reward_component_mean_queue_level_term": -0.0037832247633389215, "mean_reward_component_mean_queue_term": -0.0019147731724884487, "mean_reward_component_mean_throughput_term": 0.0011729447369503987, "mean_reward_component_mean_wait_level_term": -0.0025824121796818034, "mean_reward_component_mean_wait_term": -0.0017087140475879892, "mean_reward_component_step_imbalance_term": -0.0008407275527133606, "mean_reward_component_step_queue_level_term": -0.006127274187747389, "mean_reward_component_step_queue_term": -0.004131993868213613, "mean_reward_component_step_throughput_term": 0.0012760979880113155, "mean_reward_component_step_wait_level_term": -0.005467885115649551, "mean_reward_component_step_wait_term": -0.0005291617126204073, "mean_running_vehicles": 672.5, "mean_throughput": 1767.0, "mean_total_episode_return": -74.10149090969935, "mean_total_incoming_vehicles": 609.2000045776367, "mean_total_waiting_vehicles": 264.3999938964844, "mean_transitions": 8256.0, "update": 1, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 33024.0, "td_loss": 0.0074481598730926635, "mean_abs_td_error": 0.18495294055901468, "mean_target_q": -0.07388796744089632, "beta": 0.401536, "gradient_steps": 128.0, "rolling_episode_return": -0.009245977779307241, "rolling_total_episode_return": -74.10149090969935, "rolling_mean_waiting_vehicles": 4.78425931930542, "rolling_throughput": 1767.0, "rolling_td_loss": 0.0074481598730926635, "rolling_mean_q_value": -0.061729479348286986, "rolling_mean_abs_td_error": 0.18495294055901468} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 14496.0, "episode_return": -0.0058934424625085215, "total_episode_return": -71.71119042451028, "mean_waiting_vehicles": 3.490135245025158, "throughput": 1585.25, "mean_q_value": -0.06471077547757886, "epsilon": 0.9935146666666667, "num_episodes": 4.0, "mean_average_travel_time": 119.68668681953528, "mean_decision_steps": 128.0, "mean_episode_return": -0.0058934424625085215, "mean_epsilon": 0.9967573333333334, "mean_mean_incoming_vehicles": 6.280213385820389, "mean_mean_incoming_vehicles_commercial": 5.555677086114883, "mean_mean_incoming_vehicles_industrial": 2.5810877680778503, "mean_mean_incoming_vehicles_mixed": 3.3007392436265945, "mean_mean_incoming_vehicles_residential": 8.950061351060867, "mean_mean_q_value": 0.26571738319944416, "mean_mean_reward": -0.006586258765310049, "mean_mean_reward_commercial": -0.010345645947381854, "mean_mean_reward_industrial": -0.0006519191277523836, "mean_mean_reward_mixed": 0.00587568839546293, "mean_mean_reward_residential": -0.013377956420299597, "mean_mean_step_intersection_reward": -0.0058934424625085215, "mean_mean_waiting_vehicles": 3.490135245025158, "mean_mean_waiting_vehicles_commercial": 3.144064888358116, "mean_mean_waiting_vehicles_industrial": 0.7880455652872721, "mean_mean_waiting_vehicles_mixed": 1.6356519106775522, "mean_mean_waiting_vehicles_residential": 5.038297235965729, "mean_num_commercial_intersections": 28.75, "mean_num_controlled_intersections": 113.25, "mean_num_industrial_intersections": 42.333333333333336, "mean_num_mixed_intersections": 17.75, "mean_num_residential_intersections": 35.0, "mean_reward_component_mean_imbalance_term": -0.00029709370013941694, "mean_reward_component_mean_queue_level_term": -0.002313138568579731, "mean_reward_component_mean_queue_term": -0.0009963859646688888, "mean_reward_component_mean_throughput_term": 0.0006496379014642173, "mean_reward_component_mean_wait_level_term": -0.0018819959642524253, "mean_reward_component_mean_wait_term": -0.0010544662520501902, "mean_reward_component_step_imbalance_term": -0.0005077433143014787, "mean_reward_component_step_queue_level_term": -0.0031884351337794214, "mean_reward_component_step_queue_term": -0.0006530283426400274, "mean_reward_component_step_throughput_term": 0.0007173649355536327, "mean_reward_component_step_wait_level_term": -0.003374292078660801, "mean_reward_component_step_wait_term": 0.00041987533040810376, "mean_running_vehicles": 631.0, "mean_throughput": 1585.25, "mean_total_episode_return": -71.71119042451028, "mean_total_incoming_vehicles": 613.4999885559082, "mean_total_waiting_vehicles": 318.49999618530273, "mean_transitions": 14496.0, "update": 2, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 91008.0, "td_loss": 0.0029375209041972994, "mean_abs_td_error": 0.11280576372519135, "mean_target_q": -0.0654855988395866, "beta": 0.40307200000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.007569710120907881, "rolling_total_episode_return": -72.90634066710481, "rolling_mean_waiting_vehicles": 4.137197282165289, "rolling_throughput": 1676.125, "rolling_td_loss": 0.005192840388644981, "rolling_mean_q_value": -0.06322012741293292, "rolling_mean_abs_td_error": 0.14887935214210302} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 10752.0, "episode_return": -0.006930199207728383, "total_episode_return": -71.09073231823277, "mean_waiting_vehicles": 3.4642895311117172, "throughput": 1905.5, "mean_q_value": -0.06875609897542745, "epsilon": 0.990272, "num_episodes": 4.0, "mean_average_travel_time": 114.88668128165168, "mean_decision_steps": 128.0, "mean_episode_return": -0.006930199207728383, "mean_epsilon": 0.9935146666666667, "mean_mean_incoming_vehicles": 7.001056909561157, "mean_mean_incoming_vehicles_commercial": 7.849189460277557, "mean_mean_incoming_vehicles_industrial": 5.392843842506409, "mean_mean_incoming_vehicles_mixed": 4.929925322532654, "mean_mean_incoming_vehicles_residential": 8.510711193084717, "mean_mean_q_value": -0.05156610783160431, "mean_mean_reward": -0.004773495253175497, "mean_mean_reward_commercial": -0.0031001834431663156, "mean_mean_reward_industrial": -0.002884741174057126, "mean_mean_reward_mixed": -0.013653912901645526, "mean_mean_reward_residential": -0.00680440803989768, "mean_mean_step_intersection_reward": -0.006930199207728383, "mean_mean_waiting_vehicles": 3.4642895311117172, "mean_mean_waiting_vehicles_commercial": 3.73275438323617, "mean_mean_waiting_vehicles_industrial": 2.266558438539505, "mean_mean_waiting_vehicles_mixed": 1.5302362143993378, "mean_mean_waiting_vehicles_residential": 4.573543772101402, "mean_num_commercial_intersections": 15.25, "mean_num_controlled_intersections": 84.0, "mean_num_industrial_intersections": 24.5, "mean_num_mixed_intersections": 14.0, "mean_num_residential_intersections": 30.25, "mean_reward_component_mean_imbalance_term": -0.00037059386952420503, "mean_reward_component_mean_queue_level_term": -0.0029704471109255337, "mean_reward_component_mean_queue_term": -0.001200797546215604, "mean_reward_component_mean_throughput_term": 0.0009139579875778736, "mean_reward_component_mean_wait_level_term": -0.0021979659455704237, "mean_reward_component_mean_wait_term": -0.001104352778943607, "mean_reward_component_step_imbalance_term": -0.0006036946069798432, "mean_reward_component_step_queue_level_term": -0.0038425520760938525, "mean_reward_component_step_queue_term": 0.000741667696274817, "mean_reward_component_step_throughput_term": 0.001089359589968808, "mean_reward_component_step_wait_level_term": -0.003535066673066467, "mean_reward_component_step_wait_term": 0.0013767897034995258, "mean_running_vehicles": 621.0, "mean_throughput": 1905.5, "mean_total_episode_return": -71.09073231823277, "mean_total_incoming_vehicles": 565.3499984741211, "mean_total_waiting_vehicles": 252.2500057220459, "mean_transitions": 10752.0, "update": 3, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 134016.0, "td_loss": 0.002595427376036241, "mean_abs_td_error": 0.10930319502949715, "mean_target_q": -0.07039610089850612, "beta": 0.404608, "gradient_steps": 128.0, "rolling_episode_return": -0.007356539816514715, "rolling_total_episode_return": -72.30113788414747, "rolling_mean_waiting_vehicles": 3.912894698480765, "rolling_throughput": 1752.5833333333333, "rolling_td_loss": 0.004327036051108735, "rolling_mean_q_value": -0.06506545126709777, "rolling_mean_abs_td_error": 0.1356872997712344} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 15136.0, "episode_return": -0.008105982210692428, "total_episode_return": -94.63505012495443, "mean_waiting_vehicles": 4.1224241852760315, "throughput": 2012.75, "mean_q_value": -0.07620334159582853, "epsilon": 0.9870293333333333, "num_episodes": 4.0, "mean_average_travel_time": 131.46964289592404, "mean_decision_steps": 128.0, "mean_episode_return": -0.008105982210692428, "mean_epsilon": 0.990272, "mean_mean_incoming_vehicles": 8.073700785636902, "mean_mean_incoming_vehicles_commercial": 8.03862977027893, "mean_mean_incoming_vehicles_industrial": 9.66587781906128, "mean_mean_incoming_vehicles_mixed": 6.946309447288513, "mean_mean_incoming_vehicles_residential": 6.282623767852783, "mean_mean_q_value": -0.05735446878148309, "mean_mean_reward": -0.010147340944968164, "mean_mean_reward_commercial": 0.0042033782810904086, "mean_mean_reward_industrial": -0.02881141845136881, "mean_mean_reward_mixed": -0.011551719988347031, "mean_mean_reward_residential": -0.008378465039034685, "mean_mean_step_intersection_reward": -0.008105982210692428, "mean_mean_waiting_vehicles": 4.1224241852760315, "mean_mean_waiting_vehicles_commercial": 3.8790206015110016, "mean_mean_waiting_vehicles_industrial": 5.485663096110026, "mean_mean_waiting_vehicles_mixed": 3.320833384990692, "mean_mean_waiting_vehicles_residential": 3.769723574320475, "mean_num_commercial_intersections": 28.5, "mean_num_controlled_intersections": 118.25, "mean_num_industrial_intersections": 27.333333333333332, "mean_num_mixed_intersections": 24.5, "mean_num_residential_intersections": 59.666666666666664, "mean_reward_component_mean_imbalance_term": -0.00043715732167062815, "mean_reward_component_mean_queue_level_term": -0.003312906689714623, "mean_reward_component_mean_queue_term": -0.001326881139853242, "mean_reward_component_mean_throughput_term": 0.0009486896616479612, "mean_reward_component_mean_wait_level_term": -0.0026825128612485427, "mean_reward_component_mean_wait_term": -0.001295213905307513, "mean_reward_component_step_imbalance_term": -0.0007059016352286562, "mean_reward_component_step_queue_level_term": -0.004246019758284092, "mean_reward_component_step_queue_term": -0.001150436801253818, "mean_reward_component_step_throughput_term": 0.0009227735863532871, "mean_reward_component_step_wait_level_term": -0.004139922617468983, "mean_reward_component_step_wait_term": -0.0008278338351033199, "mean_running_vehicles": 820.75, "mean_throughput": 2012.75, "mean_total_episode_return": -94.63505012495443, "mean_total_incoming_vehicles": 804.7999801635742, "mean_total_waiting_vehicles": 429.85001373291016, "mean_transitions": 15136.0, "update": 4, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 194560.0, "td_loss": 0.0020631058878279873, "mean_abs_td_error": 0.09569333272520453, "mean_target_q": -0.07726418739184737, "beta": 0.406144, "gradient_steps": 128.0, "rolling_episode_return": -0.0075439004150591425, "rolling_total_episode_return": -77.8846159443492, "rolling_mean_waiting_vehicles": 3.9652770701795816, "rolling_throughput": 1817.625, "rolling_td_loss": 0.003761053510288548, "rolling_mean_q_value": -0.06784992384928046, "rolling_mean_abs_td_error": 0.12568880800972693} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12256.0, "episode_return": -0.005533515587150502, "total_episode_return": -68.16749807004817, "mean_waiting_vehicles": 2.2956603169441223, "throughput": 1777.25, "mean_q_value": -0.07973894770839252, "epsilon": 0.9837866666666667, "num_episodes": 4.0, "mean_average_travel_time": 113.51294942104367, "mean_decision_steps": 128.0, "mean_episode_return": -0.005533515587150502, "mean_epsilon": 0.9870293333333333, "mean_mean_incoming_vehicles": 5.680135607719421, "mean_mean_incoming_vehicles_commercial": 7.447316110134125, "mean_mean_incoming_vehicles_industrial": 5.507692337036133, "mean_mean_incoming_vehicles_mixed": 3.924999952316284, "mean_mean_incoming_vehicles_residential": 4.887716472148895, "mean_mean_q_value": -0.0460269276973122, "mean_mean_reward": -0.0095013955142349, "mean_mean_reward_commercial": -0.011257848120294511, "mean_mean_reward_industrial": -0.02354195900261402, "mean_mean_reward_mixed": 0.06836207211017609, "mean_mean_reward_residential": -0.01172641001176089, "mean_mean_step_intersection_reward": -0.005533515587150502, "mean_mean_waiting_vehicles": 2.2956603169441223, "mean_mean_waiting_vehicles_commercial": 3.2143897712230682, "mean_mean_waiting_vehicles_industrial": 3.0615384578704834, "mean_mean_waiting_vehicles_mixed": 0.44999998807907104, "mean_mean_waiting_vehicles_residential": 1.8278013169765472, "mean_num_commercial_intersections": 29.0, "mean_num_controlled_intersections": 95.75, "mean_num_industrial_intersections": 26.0, "mean_num_mixed_intersections": 8.0, "mean_num_residential_intersections": 58.25, "mean_reward_component_mean_imbalance_term": -0.00028710721364699765, "mean_reward_component_mean_queue_level_term": -0.0025683500283975036, "mean_reward_component_mean_queue_term": -0.0010414883796166308, "mean_reward_component_mean_throughput_term": 0.0007579137549598158, "mean_reward_component_mean_wait_level_term": -0.0016053446936776794, "mean_reward_component_mean_wait_term": -0.0007891391578285223, "mean_reward_component_step_imbalance_term": -0.00044571735634235665, "mean_reward_component_step_queue_level_term": -0.0033327629207633436, "mean_reward_component_step_queue_term": -0.001252730464329943, "mean_reward_component_step_throughput_term": 0.0006778077658964321, "mean_reward_component_step_wait_level_term": -0.0025271200865972787, "mean_reward_component_step_wait_term": -0.002620873332489282, "mean_running_vehicles": 564.5, "mean_throughput": 1777.25, "mean_total_episode_return": -68.16749807004817, "mean_total_incoming_vehicles": 533.3999824523926, "mean_total_waiting_vehicles": 198.65000534057617, "mean_transitions": 12256.0, "update": 5, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 243584.0, "td_loss": 0.0020933141836394498, "mean_abs_td_error": 0.09751007612794638, "mean_target_q": -0.08116195461479947, "beta": 0.40768000000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.007141823449477415, "rolling_total_episode_return": -75.941192369489, "rolling_mean_waiting_vehicles": 3.63135371953249, "rolling_throughput": 1809.55, "rolling_td_loss": 0.0034275056449587283, "rolling_mean_q_value": -0.07022772862110287, "rolling_mean_abs_td_error": 0.12005306163337082} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12864.0, "episode_return": -0.0023846775378226805, "total_episode_return": -30.314969011815265, "mean_waiting_vehicles": 0.6254950799047947, "throughput": 1227.5, "mean_q_value": -0.08125416949042119, "epsilon": 0.980544, "num_episodes": 4.0, "mean_average_travel_time": 92.59423846546984, "mean_decision_steps": 128.0, "mean_episode_return": -0.0023846775378226805, "mean_epsilon": 0.9837866666666667, "mean_mean_incoming_vehicles": 2.5375039875507355, "mean_mean_incoming_vehicles_commercial": 2.3148148357868195, "mean_mean_incoming_vehicles_industrial": 2.3212953209877014, "mean_mean_incoming_vehicles_mixed": 2.272559324900309, "mean_mean_incoming_vehicles_residential": 2.606076270341873, "mean_mean_q_value": -0.03967760623709182, "mean_mean_reward": -0.0021222094364929944, "mean_mean_reward_commercial": -0.0019251160265412182, "mean_mean_reward_industrial": -0.006582244910532609, "mean_mean_reward_mixed": 0.003414109659691652, "mean_mean_reward_residential": 0.0008516744419466704, "mean_mean_step_intersection_reward": -0.0023846775378226805, "mean_mean_waiting_vehicles": 0.6254950799047947, "mean_mean_waiting_vehicles_commercial": 0.3861111141741276, "mean_mean_waiting_vehicles_industrial": 0.5791166257113218, "mean_mean_waiting_vehicles_mixed": 0.6073287799954414, "mean_mean_waiting_vehicles_residential": 0.5941326040774584, "mean_num_commercial_intersections": 30.75, "mean_num_controlled_intersections": 100.5, "mean_num_industrial_intersections": 21.0, "mean_num_mixed_intersections": 28.333333333333332, "mean_num_residential_intersections": 27.5, "mean_reward_component_mean_imbalance_term": -0.00011613771667595696, "mean_reward_component_mean_queue_level_term": -0.0014186981609931593, "mean_reward_component_mean_queue_term": -0.0005092002800887752, "mean_reward_component_mean_throughput_term": 0.0005085647509872615, "mean_reward_component_mean_wait_level_term": -0.0006026764182784916, "mean_reward_component_mean_wait_term": -0.00024652983703532527, "mean_reward_component_step_imbalance_term": -0.00014558153543475782, "mean_reward_component_step_queue_level_term": -0.0016294409142574295, "mean_reward_component_step_queue_term": -0.0007881521323724883, "mean_reward_component_step_throughput_term": 0.0005036137335991953, "mean_reward_component_step_wait_level_term": -0.0007888953587098513, "mean_reward_component_step_wait_term": 0.0007262472645379603, "mean_running_vehicles": 260.75, "mean_throughput": 1227.5, "mean_total_episode_return": -30.314969011815265, "mean_total_incoming_vehicles": 249.45000076293945, "mean_total_waiting_vehicles": 62.15000057220459, "mean_transitions": 12864.0, "update": 6, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 295040.0, "td_loss": 0.0016881967499102757, "mean_abs_td_error": 0.08684434206224978, "mean_target_q": -0.08213372327736579, "beta": 0.409216, "gradient_steps": 128.0, "rolling_episode_return": -0.00634896579753496, "rolling_total_episode_return": -68.33682180987671, "rolling_mean_waiting_vehicles": 3.1303772795945406, "rolling_throughput": 1712.5416666666667, "rolling_td_loss": 0.0031376208291173193, "rolling_mean_q_value": -0.07206546876598925, "rolling_mean_abs_td_error": 0.11451827503818397} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 16672.0, "episode_return": -0.003677837301222975, "total_episode_return": -57.221936200745404, "mean_waiting_vehicles": 2.0418460331857204, "throughput": 1387.5, "mean_q_value": -0.08913376356940717, "epsilon": 0.9773013333333334, "num_episodes": 4.0, "mean_average_travel_time": 121.01749575552743, "mean_decision_steps": 128.0, "mean_episode_return": -0.003677837301222975, "mean_epsilon": 0.980544, "mean_mean_incoming_vehicles": 4.083775013685226, "mean_mean_incoming_vehicles_commercial": 2.6395831257104874, "mean_mean_incoming_vehicles_industrial": 3.579228460788727, "mean_mean_incoming_vehicles_mixed": 4.553095042705536, "mean_mean_incoming_vehicles_residential": 4.676021367311478, "mean_mean_q_value": -0.06601126603709417, "mean_mean_reward": -0.0022022365737939253, "mean_mean_reward_commercial": 0.0008946378075052053, "mean_mean_reward_industrial": -0.0021795504435431212, "mean_mean_reward_mixed": -0.006623508408665657, "mean_mean_reward_residential": -0.003393029634025879, "mean_mean_step_intersection_reward": -0.003677837301222975, "mean_mean_waiting_vehicles": 2.0418460331857204, "mean_mean_waiting_vehicles_commercial": 0.9255952155217528, "mean_mean_waiting_vehicles_industrial": 1.6377446874976158, "mean_mean_waiting_vehicles_mixed": 2.66955653578043, "mean_mean_waiting_vehicles_residential": 2.5735975801944733, "mean_num_commercial_intersections": 19.25, "mean_num_controlled_intersections": 130.25, "mean_num_industrial_intersections": 40.75, "mean_num_mixed_intersections": 27.75, "mean_num_residential_intersections": 42.5, "mean_reward_component_mean_imbalance_term": -0.00018877778867754103, "mean_reward_component_mean_queue_level_term": -0.0015527342143819567, "mean_reward_component_mean_queue_term": -0.0006556878090481777, "mean_reward_component_mean_throughput_term": 0.00044033018101430343, "mean_reward_component_mean_wait_level_term": -0.0011058575144957672, "mean_reward_component_mean_wait_term": -0.0006151102374605255, "mean_reward_component_step_imbalance_term": -0.00032354625000152737, "mean_reward_component_step_queue_level_term": -0.0020982010173611343, "mean_reward_component_step_queue_term": 0.0004443315992830321, "mean_reward_component_step_throughput_term": 0.0006316438884823583, "mean_reward_component_step_wait_level_term": -0.0019683526988956146, "mean_reward_component_step_wait_term": 0.001111887104343623, "mean_running_vehicles": 508.0, "mean_throughput": 1387.5, "mean_total_episode_return": -57.221936200745404, "mean_total_incoming_vehicles": 496.15002059936523, "mean_total_waiting_vehicles": 244.15001249313354, "mean_transitions": 16672.0, "update": 7, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 361728.0, "td_loss": 0.0014464173873420805, "mean_abs_td_error": 0.07822402697638609, "mean_target_q": -0.08980548067484051, "beta": 0.410752, "gradient_steps": 128.0, "rolling_episode_return": -0.0059673760123475335, "rolling_total_episode_return": -66.74898100857224, "rolling_mean_waiting_vehicles": 2.974872815821852, "rolling_throughput": 1666.107142857143, "rolling_td_loss": 0.0028960203374351423, "rolling_mean_q_value": -0.07450379659504895, "rolling_mean_abs_td_error": 0.10933338245792713} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 18848.0, "episode_return": -0.006493816835544669, "total_episode_return": -108.58082492649555, "mean_waiting_vehicles": 3.7948518618941307, "throughput": 2141.25, "mean_q_value": -0.09422630729386583, "epsilon": 0.9740586666666666, "num_episodes": 4.0, "mean_average_travel_time": 121.00687245649851, "mean_decision_steps": 128.0, "mean_episode_return": -0.006493816835544669, "mean_epsilon": 0.9773013333333334, "mean_mean_incoming_vehicles": 7.72462397813797, "mean_mean_incoming_vehicles_commercial": 9.069815993309021, "mean_mean_incoming_vehicles_industrial": 3.5340930223464966, "mean_mean_incoming_vehicles_mixed": 3.4473636150360107, "mean_mean_incoming_vehicles_residential": 7.341940999031067, "mean_mean_q_value": -0.05896099974052049, "mean_mean_reward": -0.017349239467876032, "mean_mean_reward_commercial": -0.02902779937721789, "mean_mean_reward_industrial": 0.001799768457810084, "mean_mean_reward_mixed": -0.006251777755096555, "mean_mean_reward_residential": -0.016601473398623057, "mean_mean_step_intersection_reward": -0.006493816835544669, "mean_mean_waiting_vehicles": 3.7948518618941307, "mean_mean_waiting_vehicles_commercial": 3.944518208503723, "mean_mean_waiting_vehicles_industrial": 1.4517710258563359, "mean_mean_waiting_vehicles_mixed": 1.540363535284996, "mean_mean_waiting_vehicles_residential": 3.7008577585220337, "mean_num_commercial_intersections": 28.5, "mean_num_controlled_intersections": 147.25, "mean_num_industrial_intersections": 49.666666666666664, "mean_num_mixed_intersections": 34.5, "mean_num_residential_intersections": 64.25, "mean_reward_component_mean_imbalance_term": -0.00025861593241049974, "mean_reward_component_mean_queue_level_term": -0.002440599594166315, "mean_reward_component_mean_queue_term": -0.0014759848203366888, "mean_reward_component_mean_throughput_term": 0.0006181949421630861, "mean_reward_component_mean_wait_level_term": -0.0015079495612946303, "mean_reward_component_mean_wait_term": -0.001428862210343978, "mean_reward_component_step_imbalance_term": -0.0006662263531325152, "mean_reward_component_step_queue_level_term": -0.004723151447251439, "mean_reward_component_step_queue_term": -0.002434862135487492, "mean_reward_component_step_throughput_term": 0.000939076049689902, "mean_reward_component_step_wait_level_term": -0.004573342113872059, "mean_reward_component_step_wait_term": -0.005890734260901809, "mean_running_vehicles": 1060.75, "mean_throughput": 2141.25, "mean_total_episode_return": -108.58082492649555, "mean_total_incoming_vehicles": 989.5000457763672, "mean_total_waiting_vehicles": 453.95001220703125, "mean_transitions": 18848.0, "update": 8, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 437120.0, "td_loss": 0.0015107983169855288, "mean_abs_td_error": 0.08127503207651898, "mean_target_q": -0.09589129080995917, "beta": 0.41228800000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.006033181115247175, "rolling_total_episode_return": -71.97796149831265, "rolling_mean_waiting_vehicles": 3.077370196580887, "rolling_throughput": 1725.5, "rolling_td_loss": 0.0027228675848789408, "rolling_mean_q_value": -0.07696911043240107, "rolling_mean_abs_td_error": 0.10582608866025112} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 15200.0, "episode_return": -0.0036883215554928475, "total_episode_return": -56.819516436662525, "mean_waiting_vehicles": 1.5505008660256863, "throughput": 1515.25, "mean_q_value": -0.10067616478772834, "epsilon": 0.970816, "num_episodes": 4.0, "mean_average_travel_time": 112.86686478585962, "mean_decision_steps": 128.0, "mean_episode_return": -0.0036883215554928475, "mean_epsilon": 0.9740586666666666, "mean_mean_incoming_vehicles": 4.055868983268738, "mean_mean_incoming_vehicles_commercial": 3.555885136127472, "mean_mean_incoming_vehicles_industrial": 4.658242285251617, "mean_mean_incoming_vehicles_mixed": 3.8005669762690864, "mean_mean_incoming_vehicles_residential": 4.65579017996788, "mean_mean_q_value": -0.06256008090349496, "mean_mean_reward": -0.007266721957421396, "mean_mean_reward_commercial": -0.015672211215132847, "mean_mean_reward_industrial": -0.019853139645420015, "mean_mean_reward_mixed": -0.005045056731129686, "mean_mean_reward_residential": -0.004847969627007842, "mean_mean_step_intersection_reward": -0.0036883215554928475, "mean_mean_waiting_vehicles": 1.5505008660256863, "mean_mean_waiting_vehicles_commercial": 1.1126389753771946, "mean_mean_waiting_vehicles_industrial": 1.7124155424535275, "mean_mean_waiting_vehicles_mixed": 1.7039716293414433, "mean_mean_waiting_vehicles_residential": 1.9903547689318657, "mean_num_commercial_intersections": 27.75, "mean_num_controlled_intersections": 118.75, "mean_num_industrial_intersections": 18.75, "mean_num_mixed_intersections": 20.666666666666668, "mean_num_residential_intersections": 56.75, "mean_reward_component_mean_imbalance_term": -0.0001793963381573338, "mean_reward_component_mean_queue_level_term": -0.0017918059749675308, "mean_reward_component_mean_queue_term": -0.0007169413101982384, "mean_reward_component_mean_throughput_term": 0.0005074531650492986, "mean_reward_component_mean_wait_level_term": -0.001013873924497588, "mean_reward_component_mean_wait_term": -0.0004937574501065002, "mean_reward_component_step_imbalance_term": -0.000269436173766735, "mean_reward_component_step_queue_level_term": -0.002294212215929292, "mean_reward_component_step_queue_term": -0.0004536030719464179, "mean_reward_component_step_throughput_term": 0.0006925046036485583, "mean_reward_component_step_wait_level_term": -0.0015800236760696862, "mean_reward_component_step_wait_term": -0.003361951215993031, "mean_running_vehicles": 488.5, "mean_throughput": 1515.25, "mean_total_episode_return": -56.819516436662525, "mean_total_incoming_vehicles": 487.50000762939453, "mean_total_waiting_vehicles": 187.4500026702881, "mean_transitions": 15200.0, "update": 9, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 497920.0, "td_loss": 0.0015024316526250914, "mean_abs_td_error": 0.08027357165701687, "mean_target_q": -0.10197785176569596, "beta": 0.413824, "gradient_steps": 128.0, "rolling_episode_return": -0.005772641164163361, "rolling_total_episode_return": -70.29368982479598, "rolling_mean_waiting_vehicles": 2.9077180487414203, "rolling_throughput": 1702.138888888889, "rolling_td_loss": 0.002587263592406291, "rolling_mean_q_value": -0.07960322758299299, "rolling_mean_abs_td_error": 0.1029869201043362} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11200.0, "episode_return": -0.006293270621326436, "total_episode_return": -48.54432252632978, "mean_waiting_vehicles": 5.433562070131302, "throughput": 1237.75, "mean_q_value": -0.10568015452008694, "epsilon": 0.9675733333333333, "num_episodes": 4.0, "mean_average_travel_time": 97.39195232434491, "mean_decision_steps": 128.0, "mean_episode_return": -0.006293270621326436, "mean_epsilon": 0.970816, "mean_mean_incoming_vehicles": 9.534912645816803, "mean_mean_incoming_vehicles_commercial": 7.414296478033066, "mean_mean_incoming_vehicles_industrial": 9.993589371442795, "mean_mean_incoming_vehicles_mixed": 3.631008744239807, "mean_mean_incoming_vehicles_residential": 10.140126079320908, "mean_mean_q_value": -0.11031063020345755, "mean_mean_reward": -0.015903432737104595, "mean_mean_reward_commercial": -0.016901989292819053, "mean_mean_reward_industrial": -0.0010133204341400415, "mean_mean_reward_mixed": 0.03156200237572193, "mean_mean_reward_residential": -0.022883099649334326, "mean_mean_step_intersection_reward": -0.006293270621326436, "mean_mean_waiting_vehicles": 5.433562070131302, "mean_mean_waiting_vehicles_commercial": 3.4948938190937042, "mean_mean_waiting_vehicles_industrial": 5.666538618505001, "mean_mean_waiting_vehicles_mixed": 1.7450426518917084, "mean_mean_waiting_vehicles_residential": 6.190251901745796, "mean_num_commercial_intersections": 22.0, "mean_num_controlled_intersections": 87.5, "mean_num_industrial_intersections": 11.25, "mean_num_mixed_intersections": 27.0, "mean_num_residential_intersections": 27.25, "mean_reward_component_mean_imbalance_term": -0.00028843619803264886, "mean_reward_component_mean_queue_level_term": -0.001996192720028489, "mean_reward_component_mean_queue_term": -0.0014903884163430803, "mean_reward_component_mean_throughput_term": 0.0007367027812890115, "mean_reward_component_mean_wait_level_term": -0.0016494586696520486, "mean_reward_component_mean_wait_term": -0.0016054974990424853, "mean_reward_component_step_imbalance_term": -0.0007231822437461233, "mean_reward_component_step_queue_level_term": -0.004769242834299803, "mean_reward_component_step_queue_term": -0.0020510004210336774, "mean_reward_component_step_throughput_term": 0.001416742712535779, "mean_reward_component_step_wait_level_term": -0.005137591608217917, "mean_reward_component_step_wait_term": -0.004639159287762595, "mean_running_vehicles": 525.0, "mean_throughput": 1237.75, "mean_total_episode_return": -48.54432252632978, "mean_total_incoming_vehicles": 515.700008392334, "mean_total_waiting_vehicles": 287.24999713897705, "mean_transitions": 11200.0, "update": 10, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0013634656065732997, "mean_abs_td_error": 0.07757459001732059, "mean_target_q": -0.10697631916264072, "beta": 0.41536, "gradient_steps": 128.0, "rolling_episode_return": -0.005824704109879669, "rolling_total_episode_return": -68.11875309494935, "rolling_mean_waiting_vehicles": 3.1603024508804083, "rolling_throughput": 1655.7, "rolling_td_loss": 0.002464883793822992, "rolling_mean_q_value": -0.08221092027670238, "rolling_mean_abs_td_error": 0.10044568709563464} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 20000.0, "episode_return": -0.0033935037565750036, "total_episode_return": -67.02925408165902, "mean_waiting_vehicles": 1.6306398212909698, "throughput": 1562.25, "mean_q_value": -0.10338286141632125, "epsilon": 0.9643306666666667, "num_episodes": 4.0, "mean_average_travel_time": 125.98009075741933, "mean_decision_steps": 128.0, "mean_episode_return": -0.0033935037565750036, "mean_epsilon": 0.9675733333333333, "mean_mean_incoming_vehicles": 3.903714656829834, "mean_mean_incoming_vehicles_commercial": 4.486547499895096, "mean_mean_incoming_vehicles_industrial": 4.079344540834427, "mean_mean_incoming_vehicles_mixed": 3.299275577068329, "mean_mean_incoming_vehicles_residential": 3.055196702480316, "mean_mean_q_value": -0.07504192561827949, "mean_mean_reward": -0.0037122961948625743, "mean_mean_reward_commercial": -0.004903213079160196, "mean_mean_reward_industrial": 0.000983930891379714, "mean_mean_reward_mixed": -0.009220376668963581, "mean_mean_reward_residential": -0.00025407659995835274, "mean_mean_step_intersection_reward": -0.0033935037565750036, "mean_mean_waiting_vehicles": 1.6306398212909698, "mean_mean_waiting_vehicles_commercial": 1.9991667792201042, "mean_mean_waiting_vehicles_industrial": 1.7501628324389458, "mean_mean_waiting_vehicles_mixed": 1.1918280124664307, "mean_mean_waiting_vehicles_residential": 1.110645830631256, "mean_num_commercial_intersections": 24.0, "mean_num_controlled_intersections": 156.25, "mean_num_industrial_intersections": 45.0, "mean_num_mixed_intersections": 38.5, "mean_num_residential_intersections": 48.75, "mean_reward_component_mean_imbalance_term": -0.00016759745087824296, "mean_reward_component_mean_queue_level_term": -0.001542942804000802, "mean_reward_component_mean_queue_term": -0.000656892012408375, "mean_reward_component_mean_throughput_term": 0.00039480076176090506, "mean_reward_component_mean_wait_level_term": -0.0009209610682110458, "mean_reward_component_mean_wait_term": -0.0004999114607979749, "mean_reward_component_step_imbalance_term": -0.00028433834813768044, "mean_reward_component_step_queue_level_term": -0.002102054451825097, "mean_reward_component_step_queue_term": 0.00013706863683182746, "mean_reward_component_step_throughput_term": 0.000615908567851875, "mean_reward_component_step_wait_level_term": -0.0015997165173757821, "mean_reward_component_step_wait_term": -0.0004791647952515632, "mean_running_vehicles": 603.5, "mean_throughput": 1562.25, "mean_total_episode_return": -67.02925408165902, "mean_total_incoming_vehicles": 602.4500045776367, "mean_total_waiting_vehicles": 251.35000228881836, "mean_transitions": 20000.0, "update": 11, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0011973781784035964, "mean_abs_td_error": 0.06937011302215979, "mean_target_q": -0.10436566494172439, "beta": 0.41689600000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.00560368589594288, "rolling_total_episode_return": -68.01970773010477, "rolling_mean_waiting_vehicles": 3.021242211826823, "rolling_throughput": 1647.2045454545455, "rolling_td_loss": 0.0023496560106030465, "rolling_mean_q_value": -0.08413564219848592, "rolling_mean_abs_td_error": 0.09762063490713692} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 13344.0, "episode_return": -0.011095545069276857, "total_episode_return": -143.42342171887867, "mean_waiting_vehicles": 8.352016493678093, "throughput": 2236.25, "mean_q_value": -0.12296521349344403, "epsilon": 0.9610879999999999, "num_episodes": 4.0, "mean_average_travel_time": 108.71341036583601, "mean_decision_steps": 128.0, "mean_episode_return": -0.011095545069276857, "mean_epsilon": 0.9643306666666667, "mean_mean_incoming_vehicles": 14.427212834358215, "mean_mean_incoming_vehicles_commercial": 11.144082963466644, "mean_mean_incoming_vehicles_industrial": 13.312747418880463, "mean_mean_incoming_vehicles_mixed": 10.902777353922525, "mean_mean_incoming_vehicles_residential": 17.80386996269226, "mean_mean_q_value": -0.14285356775508262, "mean_mean_reward": -0.024315972405020148, "mean_mean_reward_commercial": -0.009523887936666142, "mean_mean_reward_industrial": -0.0009953658154699951, "mean_mean_reward_mixed": 0.0007579317316412926, "mean_mean_reward_residential": -0.048844921053387225, "mean_mean_step_intersection_reward": -0.011095545069276857, "mean_mean_waiting_vehicles": 8.352016493678093, "mean_mean_waiting_vehicles_commercial": 5.1114288084208965, "mean_mean_waiting_vehicles_industrial": 7.136661723256111, "mean_mean_waiting_vehicles_mixed": 5.544444660345714, "mean_mean_waiting_vehicles_residential": 11.426870733499527, "mean_num_commercial_intersections": 39.25, "mean_num_controlled_intersections": 104.25, "mean_num_industrial_intersections": 21.0, "mean_num_mixed_intersections": 9.333333333333334, "mean_num_residential_intersections": 37.0, "mean_reward_component_mean_imbalance_term": -0.0004583749710524998, "mean_reward_component_mean_queue_level_term": -0.0035060468926246813, "mean_reward_component_mean_queue_term": -0.002418958644417089, "mean_reward_component_mean_throughput_term": 0.0008769158605375083, "mean_reward_component_mean_wait_level_term": -0.0029106764660733475, "mean_reward_component_mean_wait_term": -0.002678404188337709, "mean_reward_component_step_imbalance_term": -0.0010853721614694223, "mean_reward_component_step_queue_level_term": -0.007740667380858213, "mean_reward_component_step_queue_term": -0.005413314139332215, "mean_reward_component_step_throughput_term": 0.0015452734514838085, "mean_reward_component_step_wait_level_term": -0.008566576885641553, "mean_reward_component_step_wait_term": -0.00305531601770781, "mean_running_vehicles": 1407.75, "mean_throughput": 2236.25, "mean_total_episode_return": -143.42342171887867, "mean_total_incoming_vehicles": 1370.2499771118164, "mean_total_waiting_vehicles": 813.5500154495239, "mean_transitions": 13344.0, "update": 12, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0015009815474513744, "mean_abs_td_error": 0.08219092810759321, "mean_target_q": -0.12559544714167714, "beta": 0.418432, "gradient_steps": 128.0, "rolling_episode_return": -0.006061340827054045, "rolling_total_episode_return": -74.3033505625026, "rolling_mean_waiting_vehicles": 3.4654734019810953, "rolling_throughput": 1696.2916666666667, "rolling_td_loss": 0.002278933138673741, "rolling_mean_q_value": -0.0873714398063991, "rolling_mean_abs_td_error": 0.09633482600717495} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 17088.0, "episode_return": -0.007109453250165861, "total_episode_return": -119.07447832636535, "mean_waiting_vehicles": 4.281304314732552, "throughput": 2096.75, "mean_q_value": -0.1352360519231297, "epsilon": 0.9578453333333333, "num_episodes": 4.0, "mean_average_travel_time": 123.51510455365828, "mean_decision_steps": 128.0, "mean_episode_return": -0.007109453250165861, "mean_epsilon": 0.9610879999999999, "mean_mean_incoming_vehicles": 8.657733023166656, "mean_mean_incoming_vehicles_commercial": 10.169220447540283, "mean_mean_incoming_vehicles_industrial": 9.363431006669998, "mean_mean_incoming_vehicles_mixed": 11.961804310480753, "mean_mean_incoming_vehicles_residential": 20.849215000867844, "mean_mean_q_value": -0.11613960063550621, "mean_mean_reward": -0.027871534854057245, "mean_mean_reward_commercial": -0.004482658056076616, "mean_mean_reward_industrial": 0.029724066176640918, "mean_mean_reward_mixed": -0.05544289333435396, "mean_mean_reward_residential": -0.06097989984846208, "mean_mean_step_intersection_reward": -0.007109453250165861, "mean_mean_waiting_vehicles": 4.281304314732552, "mean_mean_waiting_vehicles_commercial": 3.95826917886734, "mean_mean_waiting_vehicles_industrial": 3.975152589380741, "mean_mean_waiting_vehicles_mixed": 6.823181748390198, "mean_mean_waiting_vehicles_residential": 15.896860890090466, "mean_num_commercial_intersections": 36.75, "mean_num_controlled_intersections": 133.5, "mean_num_industrial_intersections": 29.25, "mean_num_mixed_intersections": 34.333333333333336, "mean_num_residential_intersections": 41.75, "mean_reward_component_mean_imbalance_term": -0.00027894935457672965, "mean_reward_component_mean_queue_level_term": -0.0025800952085148765, "mean_reward_component_mean_queue_term": -0.001601118986034347, "mean_reward_component_mean_throughput_term": 0.0006251630967035737, "mean_reward_component_mean_wait_level_term": -0.0017092829867921822, "mean_reward_component_mean_wait_term": -0.0015651699032580445, "mean_reward_component_step_imbalance_term": -0.0006837784676463343, "mean_reward_component_step_queue_level_term": -0.005096028529806063, "mean_reward_component_step_queue_term": -0.004981569451047108, "mean_reward_component_step_throughput_term": 0.0009072547109099105, "mean_reward_component_step_wait_level_term": -0.005016955896280706, "mean_reward_component_step_wait_term": -0.013000456790905446, "mean_running_vehicles": 1301.5, "mean_throughput": 2096.75, "mean_total_episode_return": -119.07447832636535, "mean_total_incoming_vehicles": 1133.3000106811523, "mean_total_waiting_vehicles": 559.0500068664551, "mean_transitions": 17088.0, "update": 13, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0015291265144696808, "mean_abs_td_error": 0.07899187298608012, "mean_target_q": -0.13676322082756087, "beta": 0.419968, "gradient_steps": 128.0, "rolling_episode_return": -0.006141964859601108, "rolling_total_episode_return": -77.74728346741512, "rolling_mean_waiting_vehicles": 3.5282296260389, "rolling_throughput": 1727.0961538461538, "rolling_td_loss": 0.0022212557060426593, "rolling_mean_q_value": -0.0910533330461476, "rolling_mean_abs_td_error": 0.09500075269785996} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 14112.0, "episode_return": -0.00513881294062844, "total_episode_return": -79.53583274908306, "mean_waiting_vehicles": 2.47049817442894, "throughput": 1696.25, "mean_q_value": -0.15488741570152342, "epsilon": 0.9546026666666667, "num_episodes": 4.0, "mean_average_travel_time": 118.04669136287157, "mean_decision_steps": 128.0, "mean_episode_return": -0.00513881294062844, "mean_epsilon": 0.9578453333333333, "mean_mean_incoming_vehicles": 5.170046329498291, "mean_mean_incoming_vehicles_commercial": 6.252595980962117, "mean_mean_incoming_vehicles_industrial": 5.796004623174667, "mean_mean_incoming_vehicles_mixed": 5.330019772052765, "mean_mean_incoming_vehicles_residential": 5.878322720527649, "mean_mean_q_value": -0.09838052485429216, "mean_mean_reward": -0.009238673956133425, "mean_mean_reward_commercial": -0.011360470050324997, "mean_mean_reward_industrial": -0.00279538391623646, "mean_mean_reward_mixed": -0.014144539483822882, "mean_mean_reward_residential": -0.011077442148234695, "mean_mean_step_intersection_reward": -0.00513881294062844, "mean_mean_waiting_vehicles": 2.47049817442894, "mean_mean_waiting_vehicles_commercial": 2.3820308248202005, "mean_mean_waiting_vehicles_industrial": 2.5775052160024643, "mean_mean_waiting_vehicles_mixed": 2.5164858996868134, "mean_mean_waiting_vehicles_residential": 3.2683358564972878, "mean_num_commercial_intersections": 13.0, "mean_num_controlled_intersections": 110.25, "mean_num_industrial_intersections": 32.5, "mean_num_mixed_intersections": 16.5, "mean_num_residential_intersections": 51.5, "mean_reward_component_mean_imbalance_term": -0.0002444109271397821, "mean_reward_component_mean_queue_level_term": -0.002221375124138447, "mean_reward_component_mean_queue_term": -0.000923879950294193, "mean_reward_component_mean_throughput_term": 0.0005865645282270293, "mean_reward_component_mean_wait_level_term": -0.001480041433364221, "mean_reward_component_mean_wait_term": -0.0008556701787689747, "mean_reward_component_step_imbalance_term": -0.0004331894979259232, "mean_reward_component_step_queue_level_term": -0.0029564157739514485, "mean_reward_component_step_queue_term": -0.00031605530239176005, "mean_reward_component_step_throughput_term": 0.0006299673877947498, "mean_reward_component_step_wait_level_term": -0.0027401605038903654, "mean_reward_component_step_wait_term": -0.0034228199801873416, "mean_running_vehicles": 677.75, "mean_throughput": 1696.25, "mean_total_episode_return": -79.53583274908306, "mean_total_incoming_vehicles": 648.600025177002, "mean_total_waiting_vehicles": 313.45000171661377, "mean_transitions": 14112.0, "update": 14, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0017352400009258417, "mean_abs_td_error": 0.08621679700445384, "mean_target_q": -0.15653461450710893, "beta": 0.42150400000000005, "gradient_steps": 128.0, "rolling_episode_return": -0.006070311151103061, "rolling_total_episode_return": -77.87503698753426, "rolling_mean_waiting_vehicles": 3.452677379495331, "rolling_throughput": 1724.892857142857, "rolling_td_loss": 0.002186540298534315, "rolling_mean_q_value": -0.09561291037867445, "rolling_mean_abs_td_error": 0.0943733272911881} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 16032.0, "episode_return": -0.0029446608853205564, "total_episode_return": -40.07848485298018, "mean_waiting_vehicles": 1.1096537485718727, "throughput": 1164.0, "mean_q_value": -0.1500733068678528, "epsilon": 0.95136, "num_episodes": 4.0, "mean_average_travel_time": 104.71381397242041, "mean_decision_steps": 128.0, "mean_episode_return": -0.0029446608853205564, "mean_epsilon": 0.9546026666666667, "mean_mean_incoming_vehicles": 3.1385478079319, "mean_mean_incoming_vehicles_commercial": 3.1105317026376724, "mean_mean_incoming_vehicles_industrial": 3.5849952399730682, "mean_mean_incoming_vehicles_mixed": 3.6677488883336387, "mean_mean_incoming_vehicles_residential": 2.4668503999710083, "mean_mean_q_value": -0.07469369241880486, "mean_mean_reward": -0.004224406380672008, "mean_mean_reward_commercial": 0.0020995710510760546, "mean_mean_reward_industrial": -0.008345413662027568, "mean_mean_reward_mixed": -0.005301685227702062, "mean_mean_reward_residential": -0.0019169379617475595, "mean_mean_step_intersection_reward": -0.0029446608853205564, "mean_mean_waiting_vehicles": 1.1096537485718727, "mean_mean_waiting_vehicles_commercial": 1.225975938141346, "mean_mean_waiting_vehicles_industrial": 1.1909781768918037, "mean_mean_waiting_vehicles_mixed": 1.3226406301061313, "mean_mean_waiting_vehicles_residential": 0.567162478963534, "mean_num_commercial_intersections": 22.75, "mean_num_controlled_intersections": 125.25, "mean_num_industrial_intersections": 33.5, "mean_num_mixed_intersections": 25.0, "mean_num_residential_intersections": 67.0, "mean_reward_component_mean_imbalance_term": -0.00015015220774050597, "mean_reward_component_mean_queue_level_term": -0.001443012833846069, "mean_reward_component_mean_queue_term": -0.0006017204702133227, "mean_reward_component_mean_throughput_term": 0.00044919011894961614, "mean_reward_component_mean_wait_level_term": -0.0007972381959202579, "mean_reward_component_mean_wait_term": -0.000401727747501468, "mean_reward_component_step_imbalance_term": -0.00023307345873035956, "mean_reward_component_step_queue_level_term": -0.001925505479448475, "mean_reward_component_step_queue_term": -0.0013119909490342252, "mean_reward_component_step_throughput_term": 0.0003235347703594016, "mean_reward_component_step_wait_level_term": -0.0012839259870816022, "mean_reward_component_step_wait_term": 0.00020655407570302486, "mean_running_vehicles": 339.25, "mean_throughput": 1164.0, "mean_total_episode_return": -40.07848485298018, "mean_total_incoming_vehicles": 332.4000053405762, "mean_total_waiting_vehicles": 86.44999599456787, "mean_transitions": 16032.0, "update": 15, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0017378474935867416, "mean_abs_td_error": 0.08240310361725278, "mean_target_q": -0.15185358707094565, "beta": 0.42304, "gradient_steps": 128.0, "rolling_episode_return": -0.0058619344667175605, "rolling_total_episode_return": -75.35526684523066, "rolling_mean_waiting_vehicles": 3.296475804100434, "rolling_throughput": 1687.5, "rolling_td_loss": 0.0021566274448711433, "rolling_mean_q_value": -0.099243603477953, "rolling_mean_abs_td_error": 0.0935753123795924} +{"city_id": "3_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 18208.0, "episode_return": -0.007284829145155688, "total_episode_return": -144.29259462091431, "mean_waiting_vehicles": 5.754824280738831, "throughput": 2344.5, "mean_q_value": -0.20067602233029902, "epsilon": 0.9481173333333334, "num_episodes": 4.0, "mean_average_travel_time": 124.26511190569578, "mean_decision_steps": 128.0, "mean_episode_return": -0.007284829145155688, "mean_epsilon": 0.95136, "mean_mean_incoming_vehicles": 9.654349267482758, "mean_mean_incoming_vehicles_commercial": 8.891575932502747, "mean_mean_incoming_vehicles_industrial": 7.920345783233643, "mean_mean_incoming_vehicles_mixed": 6.644322633743286, "mean_mean_incoming_vehicles_residential": 12.639007210731506, "mean_mean_q_value": -0.19826209612074308, "mean_mean_reward": -0.014217957752407528, "mean_mean_reward_commercial": -0.0032755782303866, "mean_mean_reward_industrial": -0.021434953989228234, "mean_mean_reward_mixed": -0.005911032174481079, "mean_mean_reward_residential": -0.022889750252943486, "mean_mean_step_intersection_reward": -0.007284829145155688, "mean_mean_waiting_vehicles": 5.754824280738831, "mean_mean_waiting_vehicles_commercial": 4.766918838024139, "mean_mean_waiting_vehicles_industrial": 4.141774624586105, "mean_mean_waiting_vehicles_mixed": 3.4665778279304504, "mean_mean_waiting_vehicles_residential": 8.949307650327682, "mean_num_commercial_intersections": 58.0, "mean_num_controlled_intersections": 142.25, "mean_num_industrial_intersections": 28.75, "mean_num_mixed_intersections": 20.0, "mean_num_residential_intersections": 35.5, "mean_reward_component_mean_imbalance_term": -0.00032585291369430225, "mean_reward_component_mean_queue_level_term": -0.0024303607970495023, "mean_reward_component_mean_queue_term": -0.0014583306038380428, "mean_reward_component_mean_throughput_term": 0.0006164174676150935, "mean_reward_component_mean_wait_level_term": -0.002041883021846269, "mean_reward_component_mean_wait_term": -0.0016448193589706506, "mean_reward_component_step_imbalance_term": -0.0007081042931531556, "mean_reward_component_step_queue_level_term": -0.004666658147471026, "mean_reward_component_step_queue_term": -0.0013768217868346255, "mean_reward_component_step_throughput_term": 0.0009239877399522811, "mean_reward_component_step_wait_level_term": -0.005264407693175599, "mean_reward_component_step_wait_term": -0.0031259519164450467, "mean_running_vehicles": 1518.5, "mean_throughput": 2344.5, "mean_total_episode_return": -144.29259462091431, "mean_total_incoming_vehicles": 1504.8500671386719, "mean_total_waiting_vehicles": 902.0499725341797, "mean_transitions": 18208.0, "update": 16, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0016988222473628412, "mean_abs_td_error": 0.08650242042494938, "mean_target_q": -0.2020412142155692, "beta": 0.424576, "gradient_steps": 128.0, "rolling_episode_return": -0.005950865384119944, "rolling_total_episode_return": -79.66384983121088, "rolling_mean_waiting_vehicles": 3.4501225838903338, "rolling_throughput": 1728.5625, "rolling_td_loss": 0.0021280146200268746, "rolling_mean_q_value": -0.10558312965622463, "rolling_mean_abs_td_error": 0.09313325663242722} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 18016.0, "episode_return": -0.005729788792374603, "total_episode_return": -95.31182172335684, "mean_waiting_vehicles": 2.1470587849617004, "throughput": 2286.0, "mean_q_value": -0.19887742341961712, "epsilon": 0.9448746666666666, "num_episodes": 4.0, "mean_average_travel_time": 130.72337882383314, "mean_decision_steps": 128.0, "mean_episode_return": -0.005729788792374603, "mean_epsilon": 0.9481173333333334, "mean_mean_incoming_vehicles": 5.752004325389862, "mean_mean_incoming_vehicles_commercial": 7.397869825363159, "mean_mean_incoming_vehicles_industrial": 13.279569784800211, "mean_mean_incoming_vehicles_mixed": 3.5936854680379233, "mean_mean_incoming_vehicles_residential": 6.299675464630127, "mean_mean_q_value": -0.12748945793282473, "mean_mean_reward": -0.008386648842133582, "mean_mean_reward_commercial": -0.005995932151563466, "mean_mean_reward_industrial": -0.006460017214218776, "mean_mean_reward_mixed": -0.005178469543655713, "mean_mean_reward_residential": -0.006199128809385002, "mean_mean_step_intersection_reward": -0.005729788792374603, "mean_mean_waiting_vehicles": 2.1470587849617004, "mean_mean_waiting_vehicles_commercial": 2.6959935128688812, "mean_mean_waiting_vehicles_industrial": 5.679569919904073, "mean_mean_waiting_vehicles_mixed": 1.331446349620819, "mean_mean_waiting_vehicles_residential": 2.3996315002441406, "mean_num_commercial_intersections": 63.75, "mean_num_controlled_intersections": 140.75, "mean_num_industrial_intersections": 21.666666666666668, "mean_num_mixed_intersections": 36.0, "mean_num_residential_intersections": 33.75, "mean_reward_component_mean_imbalance_term": -0.0002735730006619974, "mean_reward_component_mean_queue_level_term": -0.0027118990378731667, "mean_reward_component_mean_queue_term": -0.0010818930295679596, "mean_reward_component_mean_throughput_term": 0.0006958086777331118, "mean_reward_component_mean_wait_level_term": -0.0015618127336489707, "mean_reward_component_mean_wait_term": -0.0007964199736747446, "mean_reward_component_step_imbalance_term": -0.0004375998250907287, "mean_reward_component_step_queue_level_term": -0.003462057647993788, "mean_reward_component_step_queue_term": -0.0009489193398621865, "mean_reward_component_step_throughput_term": 0.0007089030186762102, "mean_reward_component_step_wait_level_term": -0.0025485435617156327, "mean_reward_component_step_wait_term": -0.001698431558907032, "mean_running_vehicles": 823.0, "mean_throughput": 2286.0, "mean_total_episode_return": -95.31182172335684, "mean_total_incoming_vehicles": 756.75, "mean_total_waiting_vehicles": 287.6000061035156, "mean_transitions": 18016.0, "update": 17, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0019473140355330543, "mean_abs_td_error": 0.0901306452578865, "mean_target_q": -0.20046785718295723, "beta": 0.42611200000000005, "gradient_steps": 128.0, "rolling_episode_return": -0.005937860878723159, "rolling_total_episode_return": -80.584318766043, "rolling_mean_waiting_vehicles": 3.3734717721886494, "rolling_throughput": 1761.3529411764705, "rolling_td_loss": 0.002117385173880179, "rolling_mean_q_value": -0.11107102928936537, "rolling_mean_abs_td_error": 0.09295663243392482} +{"city_id": "3_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 16288.0, "episode_return": -0.008375700361780876, "total_episode_return": -149.19500509416685, "mean_waiting_vehicles": 6.7672741413116455, "throughput": 1943.75, "mean_q_value": -0.25299348891712725, "epsilon": 0.941632, "num_episodes": 4.0, "mean_average_travel_time": 126.57945695295398, "mean_decision_steps": 128.0, "mean_episode_return": -0.008375700361780876, "mean_epsilon": 0.9448746666666666, "mean_mean_incoming_vehicles": 11.166362285614014, "mean_mean_incoming_vehicles_commercial": 9.382276177406311, "mean_mean_incoming_vehicles_industrial": 11.122029105822245, "mean_mean_incoming_vehicles_mixed": 19.01037057240804, "mean_mean_incoming_vehicles_residential": 9.645899415016174, "mean_mean_q_value": -0.19945504376664758, "mean_mean_reward": -0.02843363769352436, "mean_mean_reward_commercial": -0.04403433055267669, "mean_mean_reward_industrial": -0.015188930245737234, "mean_mean_reward_mixed": -0.04310779979762932, "mean_mean_reward_residential": -0.026662846328690648, "mean_mean_step_intersection_reward": -0.008375700361780876, "mean_mean_waiting_vehicles": 6.7672741413116455, "mean_mean_waiting_vehicles_commercial": 4.297201037406921, "mean_mean_waiting_vehicles_industrial": 5.798261006673177, "mean_mean_waiting_vehicles_mixed": 12.542221387227377, "mean_mean_waiting_vehicles_residential": 6.125606030225754, "mean_num_commercial_intersections": 19.75, "mean_num_controlled_intersections": 127.25, "mean_num_industrial_intersections": 18.666666666666668, "mean_num_mixed_intersections": 39.0, "mean_num_residential_intersections": 64.25, "mean_reward_component_mean_imbalance_term": -0.0003395328794050245, "mean_reward_component_mean_queue_level_term": -0.0026606727461135904, "mean_reward_component_mean_queue_term": -0.0017132311052145965, "mean_reward_component_mean_throughput_term": 0.0005753512845885211, "mean_reward_component_mean_wait_level_term": -0.0022759469617199546, "mean_reward_component_mean_wait_term": -0.0019616681522052204, "mean_reward_component_step_imbalance_term": -0.0007643257995368913, "mean_reward_component_step_queue_level_term": -0.005482339765876532, "mean_reward_component_step_queue_term": -0.004585840743857261, "mean_reward_component_step_throughput_term": 0.0007543377214460634, "mean_reward_component_step_wait_level_term": -0.006277337670326233, "mean_reward_component_step_wait_term": -0.01207813122891821, "mean_running_vehicles": 1603.25, "mean_throughput": 1943.75, "mean_total_episode_return": -149.19500509416685, "mean_total_incoming_vehicles": 1565.8999557495117, "mean_total_waiting_vehicles": 958.7500305175781, "mean_transitions": 16288.0, "update": 18, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0021650868675351376, "mean_abs_td_error": 0.09945241792593151, "mean_target_q": -0.25493753980845213, "beta": 0.42764800000000003, "gradient_steps": 128.0, "rolling_episode_return": -0.006073296405559698, "rolling_total_episode_return": -84.39602356204988, "rolling_mean_waiting_vehicles": 3.562016348251038, "rolling_throughput": 1771.486111111111, "rolling_td_loss": 0.002120035267972121, "rolling_mean_q_value": -0.11895561037979657, "rolling_mean_abs_td_error": 0.09331750940570298} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 18112.0, "episode_return": -0.0040715464781070805, "total_episode_return": -81.22966121893842, "mean_waiting_vehicles": 1.7165993601083755, "throughput": 1609.75, "mean_q_value": -0.24199478211812675, "epsilon": 0.9383893333333333, "num_episodes": 4.0, "mean_average_travel_time": 130.72188732148382, "mean_decision_steps": 128.0, "mean_episode_return": -0.0040715464781070805, "mean_epsilon": 0.941632, "mean_mean_incoming_vehicles": 4.201545745134354, "mean_mean_incoming_vehicles_commercial": 3.681652083992958, "mean_mean_incoming_vehicles_industrial": 2.6469284147024155, "mean_mean_incoming_vehicles_mixed": 5.654855117201805, "mean_mean_incoming_vehicles_residential": 4.565154194831848, "mean_mean_q_value": -0.11331277021963615, "mean_mean_reward": -0.003253689021221362, "mean_mean_reward_commercial": -0.0028947804821655154, "mean_mean_reward_industrial": 0.009041320125106722, "mean_mean_reward_mixed": -0.0052570475527318195, "mean_mean_reward_residential": -0.01603726646862924, "mean_mean_step_intersection_reward": -0.0040715464781070805, "mean_mean_waiting_vehicles": 1.7165993601083755, "mean_mean_waiting_vehicles_commercial": 1.4206261858344078, "mean_mean_waiting_vehicles_industrial": 0.7737857475876808, "mean_mean_waiting_vehicles_mixed": 2.7723873928189278, "mean_mean_waiting_vehicles_residential": 2.0427610129117966, "mean_num_commercial_intersections": 19.5, "mean_num_controlled_intersections": 141.5, "mean_num_industrial_intersections": 38.5, "mean_num_mixed_intersections": 30.5, "mean_num_residential_intersections": 53.0, "mean_reward_component_mean_imbalance_term": -0.00020227057659394365, "mean_reward_component_mean_queue_level_term": -0.0018305146739727718, "mean_reward_component_mean_queue_term": -0.0007378930561788843, "mean_reward_component_mean_throughput_term": 0.0004268219162568698, "mean_reward_component_mean_wait_level_term": -0.0011649097882826531, "mean_reward_component_mean_wait_term": -0.0005627806296377713, "mean_reward_component_step_imbalance_term": -0.00030229751428123564, "mean_reward_component_step_queue_level_term": -0.002361257778829895, "mean_reward_component_step_queue_term": -0.0003052551292057615, "mean_reward_component_step_throughput_term": 0.0005866092142241541, "mean_reward_component_step_wait_level_term": -0.0018016991525655612, "mean_reward_component_step_wait_term": 0.000930210982915014, "mean_running_vehicles": 688.25, "mean_throughput": 1609.75, "mean_total_episode_return": -81.22966121893842, "mean_total_incoming_vehicles": 663.9499740600586, "mean_total_waiting_vehicles": 278.9499979019165, "mean_transitions": 18112.0, "update": 19, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.002208070317919919, "mean_abs_td_error": 0.09765357687138021, "mean_target_q": -0.24396390083711594, "beta": 0.429184, "gradient_steps": 128.0, "rolling_episode_return": -0.005967941146220086, "rolling_total_episode_return": -84.22937291241243, "rolling_mean_waiting_vehicles": 3.4648891383487928, "rolling_throughput": 1762.9736842105262, "rolling_td_loss": 0.0021246686916535844, "rolling_mean_q_value": -0.12543135626076132, "rolling_mean_abs_td_error": 0.09354572348284389} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 10272.0, "episode_return": -0.001727551688997184, "total_episode_return": -20.305398797048838, "mean_waiting_vehicles": 0.6815368011593819, "throughput": 766.0, "mean_q_value": -0.25036877451930195, "epsilon": 0.9351466666666667, "num_episodes": 4.0, "mean_average_travel_time": 95.60558677340634, "mean_decision_steps": 128.0, "mean_episode_return": -0.001727551688997184, "mean_epsilon": 0.9383893333333333, "mean_mean_incoming_vehicles": 1.9248484075069427, "mean_mean_incoming_vehicles_commercial": 1.9597052931785583, "mean_mean_incoming_vehicles_industrial": 2.47428568204244, "mean_mean_incoming_vehicles_mixed": 1.2911509275436401, "mean_mean_incoming_vehicles_residential": 2.1970959504445395, "mean_mean_q_value": -0.08880062519165222, "mean_mean_reward": -0.0013698649127036333, "mean_mean_reward_commercial": 0.003010161337442696, "mean_mean_reward_industrial": -0.01934811061558624, "mean_mean_reward_mixed": -0.00029040122171863914, "mean_mean_reward_residential": 0.005432384554296732, "mean_mean_step_intersection_reward": -0.001727551688997184, "mean_mean_waiting_vehicles": 0.6815368011593819, "mean_mean_waiting_vehicles_commercial": 0.5892895013093948, "mean_mean_waiting_vehicles_industrial": 1.1365078886349995, "mean_mean_waiting_vehicles_mixed": 0.435363482683897, "mean_mean_waiting_vehicles_residential": 0.8792508641878763, "mean_num_commercial_intersections": 30.0, "mean_num_controlled_intersections": 80.25, "mean_num_industrial_intersections": 18.666666666666668, "mean_num_mixed_intersections": 19.25, "mean_num_residential_intersections": 22.666666666666668, "mean_reward_component_mean_imbalance_term": -9.086588560647257e-05, "mean_reward_component_mean_queue_level_term": -0.0009312814074000642, "mean_reward_component_mean_queue_term": -0.0003529419970653581, "mean_reward_component_mean_throughput_term": 0.00033815271331150143, "mean_reward_component_mean_wait_level_term": -0.0004565574094588243, "mean_reward_component_mean_wait_term": -0.00023405786400057987, "mean_reward_component_step_imbalance_term": -0.00014448831825575326, "mean_reward_component_step_queue_level_term": -0.0011294144205749035, "mean_reward_component_step_queue_term": 0.0002158007882826496, "mean_reward_component_step_throughput_term": 0.0003235931035305839, "mean_reward_component_step_wait_level_term": -0.0007489850031561218, "mean_reward_component_step_wait_term": 0.00011362944496795535, "mean_running_vehicles": 181.5, "mean_throughput": 766.0, "mean_total_episode_return": -20.305398797048838, "mean_total_incoming_vehicles": 175.85000038146973, "mean_total_waiting_vehicles": 63.50000238418579, "mean_transitions": 10272.0, "update": 20, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.002268388482661976, "mean_abs_td_error": 0.09798374224919826, "mean_target_q": -0.2529006260447204, "beta": 0.43072000000000005, "gradient_steps": 128.0, "rolling_episode_return": -0.005755921673358941, "rolling_total_episode_return": -81.03317420664425, "rolling_mean_waiting_vehicles": 3.325721521489322, "rolling_throughput": 1713.125, "rolling_td_loss": 0.002131854681204004, "rolling_mean_q_value": -0.13167822717368835, "rolling_mean_abs_td_error": 0.0937676244211616} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12576.0, "episode_return": -0.00879978652573509, "total_episode_return": -70.34513108385727, "mean_waiting_vehicles": 5.723278105258942, "throughput": 1447.75, "mean_q_value": -0.27588134654797614, "epsilon": 0.9319040000000001, "num_episodes": 4.0, "mean_average_travel_time": 112.58171453589168, "mean_decision_steps": 128.0, "mean_episode_return": -0.00879978652573509, "mean_epsilon": 0.9351466666666667, "mean_mean_incoming_vehicles": 8.963731855154037, "mean_mean_incoming_vehicles_commercial": 11.887166202068329, "mean_mean_incoming_vehicles_industrial": 3.3861587842305503, "mean_mean_incoming_vehicles_mixed": 3.991110344727834, "mean_mean_incoming_vehicles_residential": 7.069574862718582, "mean_mean_q_value": -0.28076489184604725, "mean_mean_reward": -0.016554639965761453, "mean_mean_reward_commercial": -0.02830936951795593, "mean_mean_reward_industrial": -0.003043171794464191, "mean_mean_reward_mixed": -0.011224602504322926, "mean_mean_reward_residential": -0.0068425151985138655, "mean_mean_step_intersection_reward": -0.00879978652573509, "mean_mean_waiting_vehicles": 5.723278105258942, "mean_mean_waiting_vehicles_commercial": 7.7346157394349575, "mean_mean_waiting_vehicles_industrial": 1.5057776421308517, "mean_mean_waiting_vehicles_mixed": 2.3966645474235215, "mean_mean_waiting_vehicles_residential": 4.247813504189253, "mean_num_commercial_intersections": 28.75, "mean_num_controlled_intersections": 98.25, "mean_num_industrial_intersections": 20.333333333333332, "mean_num_mixed_intersections": 34.666666666666664, "mean_num_residential_intersections": 28.25, "mean_reward_component_mean_imbalance_term": -0.00039079276250653106, "mean_reward_component_mean_queue_level_term": -0.003095215592516354, "mean_reward_component_mean_queue_term": -0.0014619273979032954, "mean_reward_component_mean_throughput_term": 0.0007858798486708451, "mean_reward_component_mean_wait_level_term": -0.0028756131948206587, "mean_reward_component_mean_wait_term": -0.0017621172464937617, "mean_reward_component_step_imbalance_term": -0.0007034884829408838, "mean_reward_component_step_queue_level_term": -0.004678167693782598, "mean_reward_component_step_queue_term": -0.001055345761415083, "mean_reward_component_step_throughput_term": 0.0008400272236031014, "mean_reward_component_step_wait_level_term": -0.005638774964609183, "mean_reward_component_step_wait_term": -0.005318892013747245, "mean_running_vehicles": 588.75, "mean_throughput": 1447.75, "mean_total_episode_return": -70.34513108385727, "mean_total_incoming_vehicles": 583.3999671936035, "mean_total_waiting_vehicles": 341.99999380111694, "mean_transitions": 12576.0, "update": 21, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.002192157980061893, "mean_abs_td_error": 0.09795495489379391, "mean_target_q": -0.27766571659594774, "beta": 0.43225600000000003, "gradient_steps": 128.0, "rolling_episode_return": -0.005733612110680334, "rolling_total_episode_return": -80.84535621535215, "rolling_mean_waiting_vehicles": 3.3726724607869984, "rolling_throughput": 1697.1625, "rolling_td_loss": 0.0018690545865524654, "rolling_mean_q_value": -0.14238582053367282, "rolling_mean_abs_td_error": 0.08941772513790056} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12000.0, "episode_return": -0.010069556470427279, "total_episode_return": -81.77862826129422, "mean_waiting_vehicles": 5.563663825392723, "throughput": 1812.75, "mean_q_value": -0.31016106728930026, "epsilon": 0.9286613333333333, "num_episodes": 4.0, "mean_average_travel_time": 123.70618348009634, "mean_decision_steps": 128.0, "mean_episode_return": -0.010069556470427279, "mean_epsilon": 0.9319040000000001, "mean_mean_incoming_vehicles": 9.61871337890625, "mean_mean_incoming_vehicles_commercial": 7.969918489456177, "mean_mean_incoming_vehicles_industrial": 10.241617123285929, "mean_mean_incoming_vehicles_mixed": 6.743682861328125, "mean_mean_incoming_vehicles_residential": 13.164242595434189, "mean_mean_q_value": -0.2891105258167954, "mean_mean_reward": -0.01859214113210328, "mean_mean_reward_commercial": -0.014533234760165215, "mean_mean_reward_industrial": -0.050957493328799806, "mean_mean_reward_mixed": -0.011232704229769297, "mean_mean_reward_residential": -0.02435353002510965, "mean_mean_step_intersection_reward": -0.010069556470427279, "mean_mean_waiting_vehicles": 5.563663825392723, "mean_mean_waiting_vehicles_commercial": 4.718404859304428, "mean_mean_waiting_vehicles_industrial": 7.154645840326945, "mean_mean_waiting_vehicles_mixed": 2.695198144763708, "mean_mean_waiting_vehicles_residential": 8.500971421599388, "mean_num_commercial_intersections": 34.0, "mean_num_controlled_intersections": 93.75, "mean_num_industrial_intersections": 16.666666666666668, "mean_num_mixed_intersections": 22.75, "mean_num_residential_intersections": 24.5, "mean_reward_component_mean_imbalance_term": -0.0004694778778797648, "mean_reward_component_mean_queue_level_term": -0.00381820415555012, "mean_reward_component_mean_queue_term": -0.0016472107669383007, "mean_reward_component_mean_throughput_term": 0.001012510214916773, "mean_reward_component_mean_wait_level_term": -0.0033170151153285587, "mean_reward_component_mean_wait_term": -0.0018301586365563338, "mean_reward_component_step_imbalance_term": -0.0007536900193372276, "mean_reward_component_step_queue_level_term": -0.005271074100164697, "mean_reward_component_step_queue_term": -0.0009923115067067556, "mean_reward_component_step_throughput_term": 0.0012775745999533683, "mean_reward_component_step_wait_level_term": -0.005824592735734768, "mean_reward_component_step_wait_term": -0.007028044463368133, "mean_running_vehicles": 650.0, "mean_throughput": 1812.75, "mean_total_episode_return": -81.77862826129422, "mean_total_incoming_vehicles": 623.4500122070312, "mean_total_waiting_vehicles": 332.5999946594238, "mean_transitions": 12000.0, "update": 22, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0024641199333927943, "mean_abs_td_error": 0.10497826070059091, "mean_target_q": -0.31293891894165426, "beta": 0.433792, "gradient_steps": 128.0, "rolling_episode_return": -0.0059424178110762714, "rolling_total_episode_return": -81.34872810719135, "rolling_mean_waiting_vehicles": 3.4763488898053767, "rolling_throughput": 1708.5375, "rolling_td_loss": 0.0018453845380122403, "rolling_mean_q_value": -0.1546583351242589, "rolling_mean_abs_td_error": 0.08902634998667054} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 9952.0, "episode_return": -0.006569571774707485, "total_episode_return": -47.19838527496904, "mean_waiting_vehicles": 3.728001780807972, "throughput": 1597.5, "mean_q_value": -0.32438470574561507, "epsilon": 0.9254186666666666, "num_episodes": 4.0, "mean_average_travel_time": 100.92965020906736, "mean_decision_steps": 128.0, "mean_episode_return": -0.006569571774707485, "mean_epsilon": 0.9286613333333333, "mean_mean_incoming_vehicles": 6.931395173072815, "mean_mean_incoming_vehicles_commercial": 10.587840557098389, "mean_mean_incoming_vehicles_industrial": 7.0327693819999695, "mean_mean_incoming_vehicles_mixed": 6.889058947563171, "mean_mean_incoming_vehicles_residential": 5.695212483406067, "mean_mean_q_value": -0.22165424592458294, "mean_mean_reward": -0.0055135455913841724, "mean_mean_reward_commercial": 0.014118506282102317, "mean_mean_reward_industrial": -0.006818745343480259, "mean_mean_reward_mixed": 0.002606963738799095, "mean_mean_reward_residential": -0.015047506276459899, "mean_mean_step_intersection_reward": -0.006569571774707485, "mean_mean_waiting_vehicles": 3.728001780807972, "mean_mean_waiting_vehicles_commercial": 6.027573689818382, "mean_mean_waiting_vehicles_industrial": 3.7378461956977844, "mean_mean_waiting_vehicles_mixed": 3.335141137242317, "mean_mean_waiting_vehicles_residential": 3.2211213558912277, "mean_num_commercial_intersections": 14.5, "mean_num_controlled_intersections": 77.75, "mean_num_industrial_intersections": 11.0, "mean_num_mixed_intersections": 30.25, "mean_num_residential_intersections": 22.0, "mean_reward_component_mean_imbalance_term": -0.00036771851861150395, "mean_reward_component_mean_queue_level_term": -0.0028177038679899624, "mean_reward_component_mean_queue_term": -0.0011405546550982137, "mean_reward_component_mean_throughput_term": 0.000989721830556789, "mean_reward_component_mean_wait_level_term": -0.00210222734774268, "mean_reward_component_mean_wait_term": -0.0011310894421642714, "mean_reward_component_step_imbalance_term": -0.0006126516454969533, "mean_reward_component_step_queue_level_term": -0.003649774909717962, "mean_reward_component_step_queue_term": 0.00013317653156263987, "mean_reward_component_step_throughput_term": 0.0011713582061929628, "mean_reward_component_step_wait_level_term": -0.003619486218667589, "mean_reward_component_step_wait_term": 0.001063832431100309, "mean_running_vehicles": 396.25, "mean_throughput": 1597.5, "mean_total_episode_return": -47.19838527496904, "mean_total_incoming_vehicles": 381.5500030517578, "mean_total_waiting_vehicles": 167.69999980926514, "mean_transitions": 9952.0, "update": 23, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0026789864868987934, "mean_abs_td_error": 0.1098036554758437, "mean_target_q": -0.32773707062005997, "beta": 0.43532800000000005, "gradient_steps": 128.0, "rolling_episode_return": -0.005924386439425227, "rolling_total_episode_return": -80.15411075502816, "rolling_mean_waiting_vehicles": 3.4895345022901894, "rolling_throughput": 1693.1375, "rolling_td_loss": 0.001849562493555368, "rolling_mean_q_value": -0.16743976546276826, "rolling_mean_abs_td_error": 0.08905137300898787} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11872.0, "episode_return": -0.00575529690715321, "total_episode_return": -65.45947192673339, "mean_waiting_vehicles": 3.4337320178747177, "throughput": 1537.5, "mean_q_value": -0.35132360202260315, "epsilon": 0.922176, "num_episodes": 4.0, "mean_average_travel_time": 109.52568206358245, "mean_decision_steps": 128.0, "mean_episode_return": -0.00575529690715321, "mean_epsilon": 0.9254186666666666, "mean_mean_incoming_vehicles": 6.4407302141189575, "mean_mean_incoming_vehicles_commercial": 8.928472916285196, "mean_mean_incoming_vehicles_industrial": 3.869629700978597, "mean_mean_incoming_vehicles_mixed": 5.355898539225261, "mean_mean_incoming_vehicles_residential": 8.255511224269867, "mean_mean_q_value": -0.2263603495375719, "mean_mean_reward": -0.011342675308696926, "mean_mean_reward_commercial": -0.008094095469762882, "mean_mean_reward_industrial": -0.012074857639769713, "mean_mean_reward_mixed": 0.008152793782452742, "mean_mean_reward_residential": -0.023197060683742166, "mean_mean_step_intersection_reward": -0.00575529690715321, "mean_mean_waiting_vehicles": 3.4337320178747177, "mean_mean_waiting_vehicles_commercial": 4.626360177993774, "mean_mean_waiting_vehicles_industrial": 2.2177778283754983, "mean_mean_waiting_vehicles_mixed": 2.85513902703921, "mean_mean_waiting_vehicles_residential": 4.726778507232666, "mean_num_commercial_intersections": 47.666666666666664, "mean_num_controlled_intersections": 92.75, "mean_num_industrial_intersections": 12.333333333333334, "mean_num_mixed_intersections": 24.333333333333332, "mean_num_residential_intersections": 29.5, "mean_reward_component_mean_imbalance_term": -0.0003094351439941745, "mean_reward_component_mean_queue_level_term": -0.0022478384209527746, "mean_reward_component_mean_queue_term": -0.001047526582002245, "mean_reward_component_mean_throughput_term": 0.0006839902840738432, "mean_reward_component_mean_wait_level_term": -0.0017787452280892957, "mean_reward_component_mean_wait_term": -0.001055742041316421, "mean_reward_component_step_imbalance_term": -0.0005628749659081222, "mean_reward_component_step_queue_level_term": -0.0033520849974593148, "mean_reward_component_step_queue_term": -0.0005470054911711486, "mean_reward_component_step_throughput_term": 0.0008129752823151648, "mean_reward_component_step_wait_level_term": -0.0033760594233172014, "mean_reward_component_step_wait_term": -0.004317626531701535, "mean_running_vehicles": 567.25, "mean_throughput": 1537.5, "mean_total_episode_return": -65.45947192673339, "mean_total_incoming_vehicles": 562.6999998092651, "mean_total_waiting_vehicles": 264.19999074935913, "mean_transitions": 11872.0, "update": 24, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.00265000987201347, "mean_abs_td_error": 0.11171135382028297, "mean_target_q": -0.35418777889572084, "beta": 0.43686400000000003, "gradient_steps": 128.0, "rolling_episode_return": -0.0058068521742482655, "rolling_total_episode_return": -78.69533184511711, "rolling_mean_waiting_vehicles": 3.4550998939201234, "rolling_throughput": 1669.375, "rolling_td_loss": 0.001878907692764642, "rolling_mean_q_value": -0.181195778484107, "rolling_mean_abs_td_error": 0.08985227406374179} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 16288.0, "episode_return": -0.0051320192084073546, "total_episode_return": -77.91695266333409, "mean_waiting_vehicles": 2.7914075702428818, "throughput": 1430.5, "mean_q_value": -0.33158530469518155, "epsilon": 0.9189333333333334, "num_episodes": 4.0, "mean_average_travel_time": 124.36876474996947, "mean_decision_steps": 128.0, "mean_episode_return": -0.0051320192084073546, "mean_epsilon": 0.922176, "mean_mean_incoming_vehicles": 5.106063276529312, "mean_mean_incoming_vehicles_commercial": 5.137267857789993, "mean_mean_incoming_vehicles_industrial": 5.470018625259399, "mean_mean_incoming_vehicles_mixed": 1.443657398223877, "mean_mean_incoming_vehicles_residential": 5.603653073310852, "mean_mean_q_value": -0.1920623681799043, "mean_mean_reward": -0.005445162387331948, "mean_mean_reward_commercial": -0.012610577869054396, "mean_mean_reward_industrial": 0.0021903765155002475, "mean_mean_reward_mixed": -0.00014192797243595123, "mean_mean_reward_residential": -0.005559422657825053, "mean_mean_step_intersection_reward": -0.0051320192084073546, "mean_mean_waiting_vehicles": 2.7914075702428818, "mean_mean_waiting_vehicles_commercial": 2.501554414629936, "mean_mean_waiting_vehicles_industrial": 3.377665404230356, "mean_mean_waiting_vehicles_mixed": 0.5953240767121315, "mean_mean_waiting_vehicles_residential": 3.1180713921785355, "mean_num_commercial_intersections": 30.25, "mean_num_controlled_intersections": 127.25, "mean_num_industrial_intersections": 24.25, "mean_num_mixed_intersections": 23.25, "mean_num_residential_intersections": 49.5, "mean_reward_component_mean_imbalance_term": -0.0002452801453014519, "mean_reward_component_mean_queue_level_term": -0.002005302238884177, "mean_reward_component_mean_queue_term": -0.0008737709213861855, "mean_reward_component_mean_throughput_term": 0.00047193212654406125, "mean_reward_component_mean_wait_level_term": -0.001579285131523278, "mean_reward_component_mean_wait_term": -0.000900313136893871, "mean_reward_component_step_imbalance_term": -0.0004270797853678232, "mean_reward_component_step_queue_level_term": -0.0027960670995526016, "mean_reward_component_step_queue_term": 0.00015876031466177665, "mean_reward_component_step_throughput_term": 0.0005896491875319043, "mean_reward_component_step_wait_level_term": -0.002881608626921661, "mean_reward_component_step_wait_term": -8.881677786121145e-05, "mean_running_vehicles": 621.0, "mean_throughput": 1430.5, "mean_total_episode_return": -77.91695266333409, "mean_total_incoming_vehicles": 609.6499862670898, "mean_total_waiting_vehicles": 333.4999895095825, "mean_transitions": 16288.0, "update": 25, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0024908048289944418, "mean_abs_td_error": 0.1066467848722823, "mean_target_q": -0.33439550118055195, "beta": 0.4384, "gradient_steps": 128.0, "rolling_episode_return": -0.0057867773553111086, "rolling_total_episode_return": -79.1828045747814, "rolling_mean_waiting_vehicles": 3.4798872565850614, "rolling_throughput": 1652.0375, "rolling_td_loss": 0.0018987822250323915, "rolling_mean_q_value": -0.19378809633344646, "rolling_mean_abs_td_error": 0.09030910950095858} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 8896.0, "episode_return": -0.006854423002420507, "total_episode_return": -65.8207152960822, "mean_waiting_vehicles": 5.158095091581345, "throughput": 1382.75, "mean_q_value": -0.38574137445539236, "epsilon": 0.9156906666666667, "num_episodes": 4.0, "mean_average_travel_time": 98.13207559109378, "mean_decision_steps": 128.0, "mean_episode_return": -0.006854423002420507, "mean_epsilon": 0.9189333333333334, "mean_mean_incoming_vehicles": 9.320824354887009, "mean_mean_incoming_vehicles_commercial": 8.186868041753769, "mean_mean_incoming_vehicles_industrial": 5.889318138360977, "mean_mean_incoming_vehicles_mixed": 12.901513457298279, "mean_mean_incoming_vehicles_residential": 14.449077010154724, "mean_mean_q_value": -0.24029206404520664, "mean_mean_reward": -0.020517769822617993, "mean_mean_reward_commercial": -0.01925966070848517, "mean_mean_reward_industrial": 0.00878328294493258, "mean_mean_reward_mixed": -0.04389957412786316, "mean_mean_reward_residential": -0.039390308083966374, "mean_mean_step_intersection_reward": -0.006854423002420507, "mean_mean_waiting_vehicles": 5.158095091581345, "mean_mean_waiting_vehicles_commercial": 3.9901222586631775, "mean_mean_waiting_vehicles_industrial": 2.3500001076608896, "mean_mean_waiting_vehicles_mixed": 7.453030973672867, "mean_mean_waiting_vehicles_residential": 9.331441193819046, "mean_num_commercial_intersections": 21.75, "mean_num_controlled_intersections": 69.5, "mean_num_industrial_intersections": 15.0, "mean_num_mixed_intersections": 21.5, "mean_num_residential_intersections": 22.0, "mean_reward_component_mean_imbalance_term": -0.0003360542237547115, "mean_reward_component_mean_queue_level_term": -0.0022664462773178684, "mean_reward_component_mean_queue_term": -0.0015411245519069139, "mean_reward_component_mean_throughput_term": 0.0007763327362937389, "mean_reward_component_mean_wait_level_term": -0.0019052145804772103, "mean_reward_component_mean_wait_term": -0.0015819163335759612, "mean_reward_component_step_imbalance_term": -0.000746751840779325, "mean_reward_component_step_queue_level_term": -0.004931598305120133, "mean_reward_component_step_queue_term": -0.0027066437469329685, "mean_reward_component_step_throughput_term": 0.001345846711046761, "mean_reward_component_step_wait_level_term": -0.0050621322297956795, "mean_reward_component_step_wait_term": -0.008416494376660921, "mean_running_vehicles": 737.0, "mean_throughput": 1382.75, "mean_total_episode_return": -65.8207152960822, "mean_total_incoming_vehicles": 717.2500114440918, "mean_total_waiting_vehicles": 396.9999771118164, "mean_transitions": 8896.0, "update": 26, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.002918090442108223, "mean_abs_td_error": 0.11982985795475543, "mean_target_q": -0.38919762591831386, "beta": 0.439936, "gradient_steps": 128.0, "rolling_episode_return": -0.006010264628541, "rolling_total_episode_return": -80.95809188899474, "rolling_mean_waiting_vehicles": 3.706517257168889, "rolling_throughput": 1659.8, "rolling_td_loss": 0.001960276909642289, "rolling_mean_q_value": -0.209012456581695, "rolling_mean_abs_td_error": 0.09195838529558387} +{"city_id": "3_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 16608.0, "episode_return": -0.007303915202866575, "total_episode_return": -105.91297500021756, "mean_waiting_vehicles": 4.450353771448135, "throughput": 2238.5, "mean_q_value": -0.3845308491727337, "epsilon": 0.912448, "num_episodes": 4.0, "mean_average_travel_time": 113.63211412523097, "mean_decision_steps": 128.0, "mean_episode_return": -0.007303915202866575, "mean_epsilon": 0.9156906666666667, "mean_mean_incoming_vehicles": 8.689630270004272, "mean_mean_incoming_vehicles_commercial": 8.166203796863556, "mean_mean_incoming_vehicles_industrial": 5.596428155899048, "mean_mean_incoming_vehicles_mixed": 3.2173611323038735, "mean_mean_incoming_vehicles_residential": 11.840520799160004, "mean_mean_q_value": -0.20658036848180927, "mean_mean_reward": -0.016630242393148364, "mean_mean_reward_commercial": -0.020790531634702347, "mean_mean_reward_industrial": -0.003997332726915677, "mean_mean_reward_mixed": -0.012213720008730888, "mean_mean_reward_residential": -0.017799517314415425, "mean_mean_step_intersection_reward": -0.007303915202866575, "mean_mean_waiting_vehicles": 4.450353771448135, "mean_mean_waiting_vehicles_commercial": 3.6088316440582275, "mean_mean_waiting_vehicles_industrial": 2.6488094329833984, "mean_mean_waiting_vehicles_mixed": 1.0624999403953552, "mean_mean_waiting_vehicles_residential": 6.924267023801804, "mean_num_commercial_intersections": 31.5, "mean_num_controlled_intersections": 129.75, "mean_num_industrial_intersections": 20.666666666666668, "mean_num_mixed_intersections": 27.333333333333332, "mean_num_residential_intersections": 62.25, "mean_reward_component_mean_imbalance_term": -0.00030308915793364477, "mean_reward_component_mean_queue_level_term": -0.0028181091701995342, "mean_reward_component_mean_queue_term": -0.0015408159682954725, "mean_reward_component_mean_throughput_term": 0.0007455018501900668, "mean_reward_component_mean_wait_level_term": -0.0019243227921865724, "mean_reward_component_mean_wait_term": -0.0014630801304617335, "mean_reward_component_step_imbalance_term": -0.0006251101149246097, "mean_reward_component_step_queue_level_term": -0.004930611525196582, "mean_reward_component_step_queue_term": -0.0016530824868823402, "mean_reward_component_step_throughput_term": 0.0010542505697230808, "mean_reward_component_step_wait_level_term": -0.004677237011492252, "mean_reward_component_step_wait_term": -0.005798454469186254, "mean_running_vehicles": 1013.5, "mean_throughput": 2238.5, "mean_total_episode_return": -105.91297500021756, "mean_total_incoming_vehicles": 978.1000518798828, "mean_total_waiting_vehicles": 497.49998474121094, "mean_transitions": 16608.0, "update": 27, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0030095991560301627, "mean_abs_td_error": 0.11871191149111837, "mean_target_q": -0.38807277323212475, "beta": 0.44147200000000003, "gradient_steps": 128.0, "rolling_episode_return": -0.006191568523623179, "rolling_total_episode_return": -83.39264382896836, "rolling_mean_waiting_vehicles": 3.82694264408201, "rolling_throughput": 1702.35, "rolling_td_loss": 0.0020384359980766932, "rolling_mean_q_value": -0.22378231086186134, "rolling_mean_abs_td_error": 0.09398277952132048} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 10464.0, "episode_return": -0.00756275258914526, "total_episode_return": -83.36654551251559, "mean_waiting_vehicles": 4.863904416561127, "throughput": 1615.5, "mean_q_value": -0.39284034608863294, "epsilon": 0.9092053333333333, "num_episodes": 4.0, "mean_average_travel_time": 107.43533937582288, "mean_decision_steps": 128.0, "mean_episode_return": -0.00756275258914526, "mean_epsilon": 0.912448, "mean_mean_incoming_vehicles": 8.334218919277191, "mean_mean_incoming_vehicles_commercial": 5.8607964515686035, "mean_mean_incoming_vehicles_industrial": 5.621850937604904, "mean_mean_incoming_vehicles_mixed": 6.024359464645386, "mean_mean_incoming_vehicles_residential": 14.457459330558777, "mean_mean_q_value": -0.24997783645812888, "mean_mean_reward": -0.01567540894029662, "mean_mean_reward_commercial": 0.0007446087353552381, "mean_mean_reward_industrial": -0.02463295379129704, "mean_mean_reward_mixed": -0.02414899319410324, "mean_mean_reward_residential": -0.024679482856299728, "mean_mean_step_intersection_reward": -0.00756275258914526, "mean_mean_waiting_vehicles": 4.863904416561127, "mean_mean_waiting_vehicles_commercial": 2.336135824521383, "mean_mean_waiting_vehicles_industrial": 2.546093173325062, "mean_mean_waiting_vehicles_mixed": 2.086538553237915, "mean_mean_waiting_vehicles_residential": 10.428743600845337, "mean_num_commercial_intersections": 22.666666666666668, "mean_num_controlled_intersections": 81.75, "mean_num_industrial_intersections": 24.5, "mean_num_mixed_intersections": 12.5, "mean_num_residential_intersections": 34.0, "mean_reward_component_mean_imbalance_term": -0.00035441400666591516, "mean_reward_component_mean_queue_level_term": -0.0026553921319418805, "mean_reward_component_mean_queue_term": -0.0015331549950836632, "mean_reward_component_mean_throughput_term": 0.0007867574463205074, "mean_reward_component_mean_wait_level_term": -0.0020737970050075383, "mean_reward_component_mean_wait_term": -0.0017327521511560917, "mean_reward_component_step_imbalance_term": -0.000831667632155586, "mean_reward_component_step_queue_level_term": -0.004906096030026674, "mean_reward_component_step_queue_term": -0.001759559425408952, "mean_reward_component_step_throughput_term": 0.0010626878211041912, "mean_reward_component_step_wait_level_term": -0.005544806917896494, "mean_reward_component_step_wait_term": -0.0036959676072001457, "mean_running_vehicles": 739.25, "mean_throughput": 1615.5, "mean_total_episode_return": -83.36654551251559, "mean_total_incoming_vehicles": 729.4499893188477, "mean_total_waiting_vehicles": 427.3000068664551, "mean_transitions": 10464.0, "update": 28, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0031067019372130744, "mean_abs_td_error": 0.12487009319011122, "mean_target_q": -0.3971344407182187, "beta": 0.443008, "gradient_steps": 128.0, "rolling_episode_return": -0.00624501531130321, "rolling_total_episode_return": -82.13192985826936, "rolling_mean_waiting_vehicles": 3.8803952718153596, "rolling_throughput": 1676.0625, "rolling_td_loss": 0.0021182311790880703, "rolling_mean_q_value": -0.23871301280159968, "rolling_mean_abs_td_error": 0.0961625325770001} +{"city_id": "3_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12608.0, "episode_return": -0.0037463540565646314, "total_episode_return": -35.98860396076634, "mean_waiting_vehicles": 2.556924134492874, "throughput": 1060.5, "mean_q_value": -0.3955231758300215, "epsilon": 0.9059626666666667, "num_episodes": 4.0, "mean_average_travel_time": 106.67059277436321, "mean_decision_steps": 128.0, "mean_episode_return": -0.0037463540565646314, "mean_epsilon": 0.9092053333333333, "mean_mean_incoming_vehicles": 4.42971208691597, "mean_mean_incoming_vehicles_commercial": 4.3245366513729095, "mean_mean_incoming_vehicles_industrial": 13.119999885559082, "mean_mean_incoming_vehicles_mixed": 2.3600000143051147, "mean_mean_incoming_vehicles_residential": 3.511770337820053, "mean_mean_q_value": -0.23832073360972572, "mean_mean_reward": 0.0001262621590285562, "mean_mean_reward_commercial": 0.005245655658654869, "mean_mean_reward_industrial": -0.01589708961546421, "mean_mean_reward_mixed": -0.005783861153759062, "mean_mean_reward_residential": -0.010848681442439556, "mean_mean_step_intersection_reward": -0.0037463540565646314, "mean_mean_waiting_vehicles": 2.556924134492874, "mean_mean_waiting_vehicles_commercial": 2.584266770631075, "mean_mean_waiting_vehicles_industrial": 10.319999694824219, "mean_mean_waiting_vehicles_mixed": 1.291428565979004, "mean_mean_waiting_vehicles_residential": 1.3020050302147865, "mean_num_commercial_intersections": 29.75, "mean_num_controlled_intersections": 98.5, "mean_num_industrial_intersections": 5.0, "mean_num_mixed_intersections": 35.0, "mean_num_residential_intersections": 50.0, "mean_reward_component_mean_imbalance_term": -0.00022692763591258824, "mean_reward_component_mean_queue_level_term": -0.001476434421604722, "mean_reward_component_mean_queue_term": -0.0006520892173617466, "mean_reward_component_mean_throughput_term": 0.0005598396052732824, "mean_reward_component_mean_wait_level_term": -0.001249447682760696, "mean_reward_component_mean_wait_term": -0.0007012946436457668, "mean_reward_component_step_imbalance_term": -0.00039778326026862487, "mean_reward_component_step_queue_level_term": -0.0020866855629719794, "mean_reward_component_step_queue_term": -0.00024430922348983586, "mean_reward_component_step_throughput_term": 0.0005329545638232958, "mean_reward_component_step_wait_level_term": -0.002244142859126441, "mean_reward_component_step_wait_term": 0.004566228541079909, "mean_running_vehicles": 340.0, "mean_throughput": 1060.5, "mean_total_episode_return": -35.98860396076634, "mean_total_incoming_vehicles": 338.79998779296875, "mean_total_waiting_vehicles": 170.30000638961792, "mean_transitions": 12608.0, "update": 29, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0030154370124364505, "mean_abs_td_error": 0.11647658626316115, "mean_target_q": -0.39876095298677683, "beta": 0.44454400000000005, "gradient_steps": 128.0, "rolling_episode_return": -0.0062479169363567994, "rolling_total_episode_return": -81.09038423447456, "rolling_mean_waiting_vehicles": 3.930716435238719, "rolling_throughput": 1653.325, "rolling_td_loss": 0.0021938814470786384, "rolling_mean_q_value": -0.2534553633537143, "rolling_mean_abs_td_error": 0.09797268330730731} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 13376.0, "episode_return": -0.007035776795411241, "total_episode_return": -103.66250294937345, "mean_waiting_vehicles": 4.281667351722717, "throughput": 2117.5, "mean_q_value": -0.466407872736454, "epsilon": 0.90272, "num_episodes": 4.0, "mean_average_travel_time": 125.54321464031231, "mean_decision_steps": 128.0, "mean_episode_return": -0.007035776795411241, "mean_epsilon": 0.9059626666666667, "mean_mean_incoming_vehicles": 7.702799379825592, "mean_mean_incoming_vehicles_commercial": 8.500019311904907, "mean_mean_incoming_vehicles_industrial": 8.104485750198364, "mean_mean_incoming_vehicles_mixed": 11.209348837534586, "mean_mean_incoming_vehicles_residential": 9.62396988272667, "mean_mean_q_value": -0.3387086917209672, "mean_mean_reward": -0.008009791024960577, "mean_mean_reward_commercial": -0.005237068969108805, "mean_mean_reward_industrial": -0.014066334969053665, "mean_mean_reward_mixed": -0.017086469568312168, "mean_mean_reward_residential": -0.0025009046075865626, "mean_mean_step_intersection_reward": -0.007035776795411241, "mean_mean_waiting_vehicles": 4.281667351722717, "mean_mean_waiting_vehicles_commercial": 4.825035244226456, "mean_mean_waiting_vehicles_industrial": 4.182215253512065, "mean_mean_waiting_vehicles_mixed": 6.770093599955241, "mean_mean_waiting_vehicles_residential": 5.760795012116432, "mean_num_commercial_intersections": 26.5, "mean_num_controlled_intersections": 104.5, "mean_num_industrial_intersections": 28.0, "mean_num_mixed_intersections": 27.0, "mean_num_residential_intersections": 36.75, "mean_reward_component_mean_imbalance_term": -0.00037636706603150216, "mean_reward_component_mean_queue_level_term": -0.002748018817278819, "mean_reward_component_mean_queue_term": -0.0011827696775514873, "mean_reward_component_mean_throughput_term": 0.0007676231615505458, "mean_reward_component_mean_wait_level_term": -0.0022604886365842347, "mean_reward_component_mean_wait_term": -0.0012357557150579623, "mean_reward_component_step_imbalance_term": -0.0006286414500209503, "mean_reward_component_step_queue_level_term": -0.003784862841712311, "mean_reward_component_step_queue_term": 0.00046550937986467034, "mean_reward_component_step_throughput_term": 0.0007634307257831097, "mean_reward_component_step_wait_level_term": -0.003954418207285926, "mean_reward_component_step_wait_term": -0.0008708085952093825, "mean_running_vehicles": 922.25, "mean_throughput": 2117.5, "mean_total_episode_return": -103.66250294937345, "mean_total_incoming_vehicles": 889.0000190734863, "mean_total_waiting_vehicles": 485.49999046325684, "mean_transitions": 13376.0, "update": 30, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.003220517895897501, "mean_abs_td_error": 0.1295472767087631, "mean_target_q": -0.4701081165112555, "beta": 0.44608000000000003, "gradient_steps": 128.0, "rolling_episode_return": -0.00628504224506104, "rolling_total_episode_return": -83.84629325562673, "rolling_mean_waiting_vehicles": 3.8731216993182898, "rolling_throughput": 1697.3125, "rolling_td_loss": 0.0022867340615448485, "rolling_mean_q_value": -0.2714917492645327, "rolling_mean_abs_td_error": 0.10057131764187943} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 13504.0, "episode_return": -0.0076811707967946894, "total_episode_return": -68.84357756515965, "mean_waiting_vehicles": 5.568176701664925, "throughput": 1497.25, "mean_q_value": -0.4624327786732465, "epsilon": 0.8994773333333334, "num_episodes": 4.0, "mean_average_travel_time": 117.41047559671517, "mean_decision_steps": 128.0, "mean_episode_return": -0.0076811707967946894, "mean_epsilon": 0.90272, "mean_mean_incoming_vehicles": 8.438968539237976, "mean_mean_incoming_vehicles_commercial": 10.484825491905212, "mean_mean_incoming_vehicles_industrial": 6.453719973564148, "mean_mean_incoming_vehicles_mixed": 6.6378844529390335, "mean_mean_incoming_vehicles_residential": 8.987103283405304, "mean_mean_q_value": -0.4311707013112027, "mean_mean_reward": -0.015678402640332934, "mean_mean_reward_commercial": -0.008442469115834683, "mean_mean_reward_industrial": -0.00892209805897437, "mean_mean_reward_mixed": -0.021914428798481822, "mean_mean_reward_residential": -0.019288703027996235, "mean_mean_step_intersection_reward": -0.0076811707967946894, "mean_mean_waiting_vehicles": 5.568176701664925, "mean_mean_waiting_vehicles_commercial": 6.778363764286041, "mean_mean_waiting_vehicles_industrial": 3.8571754097938538, "mean_mean_waiting_vehicles_mixed": 4.1026443019509315, "mean_mean_waiting_vehicles_residential": 6.254265695810318, "mean_num_commercial_intersections": 31.0, "mean_num_controlled_intersections": 105.5, "mean_num_industrial_intersections": 30.0, "mean_num_mixed_intersections": 13.5, "mean_num_residential_intersections": 31.0, "mean_reward_component_mean_imbalance_term": -0.0004447002161203084, "mean_reward_component_mean_queue_level_term": -0.0026353990099039493, "mean_reward_component_mean_queue_term": -0.0012440963878233013, "mean_reward_component_mean_throughput_term": 0.0008309935188002271, "mean_reward_component_mean_wait_level_term": -0.0025874987989003007, "mean_reward_component_mean_wait_term": -0.001600470171403856, "mean_reward_component_step_imbalance_term": -0.0008234651322709396, "mean_reward_component_step_queue_level_term": -0.003981108471634798, "mean_reward_component_step_queue_term": 0.0004708929845946841, "mean_reward_component_step_throughput_term": 0.000990672318948782, "mean_reward_component_step_wait_level_term": -0.00512150461145211, "mean_reward_component_step_wait_term": -0.007213890035927761, "mean_running_vehicles": 598.5, "mean_throughput": 1497.25, "mean_total_episode_return": -68.84357756515965, "mean_total_incoming_vehicles": 593.7499923706055, "mean_total_waiting_vehicles": 373.6000099182129, "mean_transitions": 13504.0, "update": 31, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0032257437815133017, "mean_abs_td_error": 0.12440101901302114, "mean_target_q": -0.4661317856516689, "beta": 0.447616, "gradient_steps": 128.0, "rolling_episode_return": -0.006499425597072024, "rolling_total_episode_return": -83.93700942980176, "rolling_mean_waiting_vehicles": 4.069998543336988, "rolling_throughput": 1694.0625, "rolling_td_loss": 0.0023881523417003335, "rolling_mean_q_value": -0.289444245127379, "rolling_mean_abs_td_error": 0.1033228629414225} +{"city_id": "3_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 15712.0, "episode_return": -0.0044347736594089636, "total_episode_return": -55.94468951714225, "mean_waiting_vehicles": 2.478629231452942, "throughput": 1366.5, "mean_q_value": -0.42886605812236667, "epsilon": 0.8962346666666666, "num_episodes": 4.0, "mean_average_travel_time": 121.98016362822042, "mean_decision_steps": 128.0, "mean_episode_return": -0.0044347736594089636, "mean_epsilon": 0.8994773333333334, "mean_mean_incoming_vehicles": 4.967267543077469, "mean_mean_incoming_vehicles_commercial": 4.953355669975281, "mean_mean_incoming_vehicles_industrial": 5.015842795372009, "mean_mean_incoming_vehicles_mixed": 2.109175463517507, "mean_mean_incoming_vehicles_residential": 5.469900608062744, "mean_mean_q_value": -0.25292381500185, "mean_mean_reward": -0.0015065882471390069, "mean_mean_reward_commercial": -0.00190281483810395, "mean_mean_reward_industrial": -0.0072213211096823215, "mean_mean_reward_mixed": -0.003282520667805026, "mean_mean_reward_residential": 0.0032321449543815106, "mean_mean_step_intersection_reward": -0.0044347736594089636, "mean_mean_waiting_vehicles": 2.478629231452942, "mean_mean_waiting_vehicles_commercial": 2.488292023539543, "mean_mean_waiting_vehicles_industrial": 2.724082867304484, "mean_mean_waiting_vehicles_mixed": 0.6119628449281057, "mean_mean_waiting_vehicles_residential": 2.8868540227413177, "mean_num_commercial_intersections": 25.75, "mean_num_controlled_intersections": 122.75, "mean_num_industrial_intersections": 49.0, "mean_num_mixed_intersections": 32.0, "mean_num_residential_intersections": 36.25, "mean_reward_component_mean_imbalance_term": -0.00024345978380635458, "mean_reward_component_mean_queue_level_term": -0.0018835918877009306, "mean_reward_component_mean_queue_term": -0.000791332422484223, "mean_reward_component_mean_throughput_term": 0.0005647593061794964, "mean_reward_component_mean_wait_level_term": -0.0013715085256866821, "mean_reward_component_mean_wait_term": -0.0007096405746767065, "mean_reward_component_step_imbalance_term": -0.0003829041997960303, "mean_reward_component_step_queue_level_term": -0.002532263650209643, "mean_reward_component_step_queue_term": -0.0004876624370808713, "mean_reward_component_step_throughput_term": 0.0006449635766330175, "mean_reward_component_step_wait_level_term": -0.002270849756314419, "mean_reward_component_step_wait_term": 0.0035221277794335037, "mean_running_vehicles": 498.25, "mean_throughput": 1366.5, "mean_total_episode_return": -55.94468951714225, "mean_total_incoming_vehicles": 496.74998474121094, "mean_total_waiting_vehicles": 252.59999465942383, "mean_transitions": 15712.0, "update": 32, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0027847625397043885, "mean_abs_td_error": 0.11552342149661854, "mean_target_q": -0.43272114219143987, "beta": 0.449152, "gradient_steps": 128.0, "rolling_episode_return": -0.006166387026578629, "rolling_total_episode_return": -79.56307281971495, "rolling_mean_waiting_vehicles": 3.77632918022573, "rolling_throughput": 1650.575, "rolling_td_loss": 0.0024523413913129844, "rolling_mean_q_value": -0.3047392873588251, "rolling_mean_abs_td_error": 0.10498948761087376} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 13856.0, "episode_return": -0.004766707202433373, "total_episode_return": -61.22791572380811, "mean_waiting_vehicles": 2.543284237384796, "throughput": 1781.0, "mean_q_value": -0.45128515805117786, "epsilon": 0.892992, "num_episodes": 4.0, "mean_average_travel_time": 108.52282011466426, "mean_decision_steps": 128.0, "mean_episode_return": -0.004766707202433373, "mean_epsilon": 0.8962346666666666, "mean_mean_incoming_vehicles": 5.470771014690399, "mean_mean_incoming_vehicles_commercial": 5.1743950843811035, "mean_mean_incoming_vehicles_industrial": 5.0646573305130005, "mean_mean_incoming_vehicles_mixed": 6.9557167291641235, "mean_mean_incoming_vehicles_residential": 5.5054808259010315, "mean_mean_q_value": -0.23077010373526718, "mean_mean_reward": -0.0019859877065755427, "mean_mean_reward_commercial": 0.0010267190518788993, "mean_mean_reward_industrial": 0.02123693926841952, "mean_mean_reward_mixed": -0.015016081975772977, "mean_mean_reward_residential": -0.012237812799867243, "mean_mean_step_intersection_reward": -0.004766707202433373, "mean_mean_waiting_vehicles": 2.543284237384796, "mean_mean_waiting_vehicles_commercial": 2.268105685710907, "mean_mean_waiting_vehicles_industrial": 1.9493853747844696, "mean_mean_waiting_vehicles_mixed": 3.6691727191209793, "mean_mean_waiting_vehicles_residential": 2.6631840467453003, "mean_num_commercial_intersections": 23.5, "mean_num_controlled_intersections": 108.25, "mean_num_industrial_intersections": 20.75, "mean_num_mixed_intersections": 29.5, "mean_num_residential_intersections": 34.5, "mean_reward_component_mean_imbalance_term": -0.0002483156353569882, "mean_reward_component_mean_queue_level_term": -0.0021340350954872633, "mean_reward_component_mean_queue_term": -0.0009179310664619855, "mean_reward_component_mean_throughput_term": 0.0007121898068049859, "mean_reward_component_mean_wait_level_term": -0.0014028761383686472, "mean_reward_component_mean_wait_term": -0.0007757393079224073, "mean_reward_component_step_imbalance_term": -0.00043219462531851605, "mean_reward_component_step_queue_level_term": -0.0029373793804552406, "mean_reward_component_step_queue_term": -0.0007928773120511323, "mean_reward_component_step_throughput_term": 0.0008303962604259141, "mean_reward_component_step_wait_level_term": -0.0024813324853312224, "mean_reward_component_step_wait_term": 0.003827400405498338, "mean_running_vehicles": 555.25, "mean_throughput": 1781.0, "mean_total_episode_return": -61.22791572380811, "mean_total_incoming_vehicles": 549.6999969482422, "mean_total_waiting_vehicles": 237.9000015258789, "mean_transitions": 13856.0, "update": 33, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0029804331770719728, "mean_abs_td_error": 0.12267582211643457, "mean_target_q": -0.4545566705055535, "beta": 0.45068800000000003, "gradient_steps": 128.0, "rolling_episode_return": -0.006049249724192005, "rolling_total_episode_return": -76.67074468958708, "rolling_mean_waiting_vehicles": 3.689428176358342, "rolling_throughput": 1634.7875, "rolling_td_loss": 0.0025249067244430988, "rolling_mean_q_value": -0.3205417426652275, "rolling_mean_abs_td_error": 0.10717368506739149} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 14880.0, "episode_return": -0.0025135829886396687, "total_episode_return": -42.89070470993465, "mean_waiting_vehicles": 1.3957832604646683, "throughput": 1206.0, "mean_q_value": -0.43994373618625104, "epsilon": 0.8897493333333334, "num_episodes": 4.0, "mean_average_travel_time": 103.10437431032253, "mean_decision_steps": 128.0, "mean_episode_return": -0.0025135829886396687, "mean_epsilon": 0.892992, "mean_mean_incoming_vehicles": 2.8827737867832184, "mean_mean_incoming_vehicles_commercial": 3.076571971178055, "mean_mean_incoming_vehicles_industrial": 2.82767661412557, "mean_mean_incoming_vehicles_mixed": 2.0395235866308212, "mean_mean_incoming_vehicles_residential": 3.3784987330436707, "mean_mean_q_value": -0.16567662019951968, "mean_mean_reward": -0.004713457718025893, "mean_mean_reward_commercial": -0.00517521653091535, "mean_mean_reward_industrial": -0.0023157004034146667, "mean_mean_reward_mixed": 0.0024793539578240598, "mean_mean_reward_residential": -0.009520270628854632, "mean_mean_step_intersection_reward": -0.0025135829886396687, "mean_mean_waiting_vehicles": 1.3957832604646683, "mean_mean_waiting_vehicles_commercial": 1.6247356906533241, "mean_mean_waiting_vehicles_industrial": 1.5647528171539307, "mean_mean_waiting_vehicles_mixed": 0.9542078860104084, "mean_mean_waiting_vehicles_residential": 1.6166686937212944, "mean_num_commercial_intersections": 35.0, "mean_num_controlled_intersections": 116.25, "mean_num_industrial_intersections": 33.333333333333336, "mean_num_mixed_intersections": 22.25, "mean_num_residential_intersections": 34.0, "mean_reward_component_mean_imbalance_term": -0.00014274972377281703, "mean_reward_component_mean_queue_level_term": -0.0011393648655602107, "mean_reward_component_mean_queue_term": -0.000474696013560896, "mean_reward_component_mean_throughput_term": 0.0003996046064500547, "mean_reward_component_mean_wait_level_term": -0.0007304841797208805, "mean_reward_component_mean_wait_term": -0.00042589304810825013, "mean_reward_component_step_imbalance_term": -0.0002549005366745405, "mean_reward_component_step_queue_level_term": -0.0015190271806204692, "mean_reward_component_step_queue_term": -0.0002929358306573704, "mean_reward_component_step_throughput_term": 0.0005039133757236414, "mean_reward_component_step_wait_level_term": -0.0013628575979964808, "mean_reward_component_step_wait_term": -0.0017876501178761828, "mean_running_vehicles": 389.75, "mean_throughput": 1206.0, "mean_total_episode_return": -42.89070470993465, "mean_total_incoming_vehicles": 383.69999504089355, "mean_total_waiting_vehicles": 193.19999980926514, "mean_transitions": 14880.0, "update": 34, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.002724666370340856, "mean_abs_td_error": 0.11240587569773197, "mean_target_q": -0.4439000019337982, "beta": 0.452224, "gradient_steps": 128.0, "rolling_episode_return": -0.005917988226592566, "rolling_total_episode_return": -74.83848828762966, "rolling_mean_waiting_vehicles": 3.6356924306601286, "rolling_throughput": 1610.275, "rolling_td_loss": 0.0025743780429138496, "rolling_mean_q_value": -0.3347945586894639, "rolling_mean_abs_td_error": 0.10848313900205539} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12352.0, "episode_return": -0.0032370889249441993, "total_episode_return": -42.556020228705165, "mean_waiting_vehicles": 1.9854723885655403, "throughput": 904.75, "mean_q_value": -0.4718762340489775, "epsilon": 0.8865066666666667, "num_episodes": 4.0, "mean_average_travel_time": 111.24508420741921, "mean_decision_steps": 128.0, "mean_episode_return": -0.0032370889249441993, "mean_epsilon": 0.8897493333333334, "mean_mean_incoming_vehicles": 3.564934343099594, "mean_mean_incoming_vehicles_commercial": 1.1580610473950703, "mean_mean_incoming_vehicles_industrial": 3.1844958662986755, "mean_mean_incoming_vehicles_mixed": 7.064634760220845, "mean_mean_incoming_vehicles_residential": 3.6765349904696145, "mean_mean_q_value": -0.1928980724478606, "mean_mean_reward": -0.0017602364969206974, "mean_mean_reward_commercial": 0.004251872160239145, "mean_mean_reward_industrial": -0.016797625125036575, "mean_mean_reward_mixed": 0.0022894208474705615, "mean_mean_reward_residential": -0.0011341562882686655, "mean_mean_step_intersection_reward": -0.0032370889249441993, "mean_mean_waiting_vehicles": 1.9854723885655403, "mean_mean_waiting_vehicles_commercial": 0.38067808250586194, "mean_mean_waiting_vehicles_industrial": 1.2357142865657806, "mean_mean_waiting_vehicles_mixed": 4.79212733109792, "mean_mean_waiting_vehicles_residential": 2.0311289181311927, "mean_num_commercial_intersections": 40.666666666666664, "mean_num_controlled_intersections": 96.5, "mean_num_industrial_intersections": 14.75, "mean_num_mixed_intersections": 23.666666666666668, "mean_num_residential_intersections": 44.666666666666664, "mean_reward_component_mean_imbalance_term": -0.0001493464250492682, "mean_reward_component_mean_queue_level_term": -0.00128637773372553, "mean_reward_component_mean_queue_term": -0.0005833686432283325, "mean_reward_component_mean_throughput_term": 0.00035418392149466627, "mean_reward_component_mean_wait_level_term": -0.0009796097285583727, "mean_reward_component_mean_wait_term": -0.0005925704447431457, "mean_reward_component_step_imbalance_term": -0.0002621829007694032, "mean_reward_component_step_queue_level_term": -0.0018667797703528777, "mean_reward_component_step_queue_term": -0.0004629815375665203, "mean_reward_component_step_throughput_term": 0.0006069303381082136, "mean_reward_component_step_wait_level_term": -0.0018962254107464105, "mean_reward_component_step_wait_term": 0.00212100257340353, "mean_running_vehicles": 378.75, "mean_throughput": 904.75, "mean_total_episode_return": -42.556020228705165, "mean_total_incoming_vehicles": 365.44998931884766, "mean_total_waiting_vehicles": 203.3499994277954, "mean_transitions": 12352.0, "update": 35, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0029615298781209276, "mean_abs_td_error": 0.1198605279205367, "mean_target_q": -0.47573930374346673, "beta": 0.45376, "gradient_steps": 128.0, "rolling_episode_return": -0.005932609628573748, "rolling_total_episode_return": -74.9623650564159, "rolling_mean_waiting_vehicles": 3.679483362659812, "rolling_throughput": 1597.3125, "rolling_td_loss": 0.002635562162140559, "rolling_mean_q_value": -0.3508847050485201, "rolling_mean_abs_td_error": 0.1103560102172196} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12736.0, "episode_return": -0.009898260090850264, "total_episode_return": -117.14097590371966, "mean_waiting_vehicles": 6.737787842750549, "throughput": 2225.5, "mean_q_value": -0.5173744382336736, "epsilon": 0.883264, "num_episodes": 4.0, "mean_average_travel_time": 116.80335348438753, "mean_decision_steps": 128.0, "mean_episode_return": -0.009898260090850264, "mean_epsilon": 0.8865066666666667, "mean_mean_incoming_vehicles": 11.961854934692383, "mean_mean_incoming_vehicles_commercial": 11.35415005683899, "mean_mean_incoming_vehicles_industrial": 5.339438160260518, "mean_mean_incoming_vehicles_mixed": 9.435385823249817, "mean_mean_incoming_vehicles_residential": 18.66635835170746, "mean_mean_q_value": -0.4393430448981235, "mean_mean_reward": -0.036313496239017695, "mean_mean_reward_commercial": -0.035521626472473145, "mean_mean_reward_industrial": -0.0093904755388697, "mean_mean_reward_mixed": -0.005325341364368796, "mean_mean_reward_residential": -0.06863899089512415, "mean_mean_step_intersection_reward": -0.009898260090850264, "mean_mean_waiting_vehicles": 6.737787842750549, "mean_mean_waiting_vehicles_commercial": 5.764126121997833, "mean_mean_waiting_vehicles_industrial": 2.5491086641947427, "mean_mean_waiting_vehicles_mixed": 3.986453115940094, "mean_mean_waiting_vehicles_residential": 13.202090799808502, "mean_num_commercial_intersections": 34.0, "mean_num_controlled_intersections": 99.5, "mean_num_industrial_intersections": 17.333333333333332, "mean_num_mixed_intersections": 17.0, "mean_num_residential_intersections": 35.5, "mean_reward_component_mean_imbalance_term": -0.000436015484801322, "mean_reward_component_mean_queue_level_term": -0.003422781404069042, "mean_reward_component_mean_queue_term": -0.002128144785686459, "mean_reward_component_mean_throughput_term": 0.0010010983981381116, "mean_reward_component_mean_wait_level_term": -0.002627755339415616, "mean_reward_component_mean_wait_term": -0.002284661784221894, "mean_reward_component_step_imbalance_term": -0.0010753317328635603, "mean_reward_component_step_queue_level_term": -0.006810062739532441, "mean_reward_component_step_queue_term": -0.004959056750521995, "mean_reward_component_step_throughput_term": 0.0013004797947360203, "mean_reward_component_step_wait_level_term": -0.007331750763114542, "mean_reward_component_step_wait_term": -0.017437774018617347, "mean_running_vehicles": 1099.0, "mean_throughput": 2225.5, "mean_total_episode_return": -117.14097590371966, "mean_total_incoming_vehicles": 1084.0500183105469, "mean_total_waiting_vehicles": 609.3499984741211, "mean_transitions": 12736.0, "update": 36, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.003101361115113832, "mean_abs_td_error": 0.1290659349760972, "mean_target_q": -0.5236851323861629, "beta": 0.45529600000000003, "gradient_steps": 128.0, "rolling_episode_return": -0.006063281175858477, "rolling_total_episode_return": -73.60478412055618, "rolling_mean_waiting_vehicles": 3.728631540760398, "rolling_throughput": 1591.3625, "rolling_td_loss": 0.0027056891055281087, "rolling_mean_q_value": -0.36671962584368883, "rolling_mean_abs_td_error": 0.11248418594477698} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11360.0, "episode_return": -0.0067488107228510855, "total_episode_return": -64.3750352957286, "mean_waiting_vehicles": 4.718791872262955, "throughput": 1598.75, "mean_q_value": -0.5038363477215171, "epsilon": 0.8800213333333333, "num_episodes": 4.0, "mean_average_travel_time": 105.57372495406382, "mean_decision_steps": 128.0, "mean_episode_return": -0.0067488107228510855, "mean_epsilon": 0.883264, "mean_mean_incoming_vehicles": 9.27783876657486, "mean_mean_incoming_vehicles_commercial": 13.107205152511597, "mean_mean_incoming_vehicles_industrial": 9.698610842227936, "mean_mean_incoming_vehicles_mixed": 7.192464530467987, "mean_mean_incoming_vehicles_residential": 10.023080348968506, "mean_mean_q_value": -0.3276196141523542, "mean_mean_reward": -0.017699482617899776, "mean_mean_reward_commercial": -0.021348853362724185, "mean_mean_reward_industrial": -0.002781815332127735, "mean_mean_reward_mixed": -0.004757425922434777, "mean_mean_reward_residential": -0.027421355451224372, "mean_mean_step_intersection_reward": -0.0067488107228510855, "mean_mean_waiting_vehicles": 4.718791872262955, "mean_mean_waiting_vehicles_commercial": 7.125490128993988, "mean_mean_waiting_vehicles_industrial": 5.349206328392029, "mean_mean_waiting_vehicles_mixed": 3.4545431435108185, "mean_mean_waiting_vehicles_residential": 5.117924690246582, "mean_num_commercial_intersections": 15.5, "mean_num_controlled_intersections": 88.75, "mean_num_industrial_intersections": 15.0, "mean_num_mixed_intersections": 25.75, "mean_num_residential_intersections": 32.5, "mean_reward_component_mean_imbalance_term": -0.0003411128642760719, "mean_reward_component_mean_queue_level_term": -0.002355436483533424, "mean_reward_component_mean_queue_term": -0.0014903106951358325, "mean_reward_component_mean_throughput_term": 0.0007612294485852544, "mean_reward_component_mean_wait_level_term": -0.0018631745401229693, "mean_reward_component_mean_wait_term": -0.0014600058556339945, "mean_reward_component_step_imbalance_term": -0.0007488061310141347, "mean_reward_component_step_queue_level_term": -0.004768994229380041, "mean_reward_component_step_queue_term": -0.0034339359335717745, "mean_reward_component_step_throughput_term": 0.0011455753337941132, "mean_reward_component_step_wait_level_term": -0.004672018607379869, "mean_reward_component_step_wait_term": -0.005221303028520197, "mean_running_vehicles": 689.25, "mean_throughput": 1598.75, "mean_total_episode_return": -64.3750352957286, "mean_total_incoming_vehicles": 649.0500030517578, "mean_total_waiting_vehicles": 325.8000068664551, "mean_transitions": 11360.0, "update": 37, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0028572696155606536, "mean_abs_td_error": 0.12324375251773745, "mean_target_q": -0.509847900364548, "beta": 0.456832, "gradient_steps": 128.0, "rolling_episode_return": -0.0061142322723823014, "rolling_total_episode_return": -72.05794479917476, "rolling_mean_waiting_vehicles": 3.8572181951254607, "rolling_throughput": 1557.0, "rolling_td_loss": 0.0027511868845294884, "rolling_mean_q_value": -0.38196757205878384, "rolling_mean_abs_td_error": 0.11413984130776952} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 16736.0, "episode_return": -0.003856223883398734, "total_episode_return": -69.16359523055144, "mean_waiting_vehicles": 2.142008900642395, "throughput": 1614.0, "mean_q_value": -0.48538186657242477, "epsilon": 0.8767786666666667, "num_episodes": 4.0, "mean_average_travel_time": 121.88342820844228, "mean_decision_steps": 128.0, "mean_episode_return": -0.003856223883398734, "mean_epsilon": 0.8800213333333333, "mean_mean_incoming_vehicles": 4.49461555480957, "mean_mean_incoming_vehicles_commercial": 4.861955046653748, "mean_mean_incoming_vehicles_industrial": 4.903556048870087, "mean_mean_incoming_vehicles_mixed": 2.7036432921886444, "mean_mean_incoming_vehicles_residential": 4.604273200035095, "mean_mean_q_value": -0.24836751134716906, "mean_mean_reward": -0.004644007189199328, "mean_mean_reward_commercial": -0.010388847324065864, "mean_mean_reward_industrial": 0.0010722492952481844, "mean_mean_reward_mixed": -0.00852188654243946, "mean_mean_reward_residential": -0.007958426314871758, "mean_mean_step_intersection_reward": -0.003856223883398734, "mean_mean_waiting_vehicles": 2.142008900642395, "mean_mean_waiting_vehicles_commercial": 2.3778795152902603, "mean_mean_waiting_vehicles_industrial": 2.2088529746979475, "mean_mean_waiting_vehicles_mixed": 0.8238123655319214, "mean_mean_waiting_vehicles_residential": 2.4423437118530273, "mean_num_commercial_intersections": 27.25, "mean_num_controlled_intersections": 130.75, "mean_num_industrial_intersections": 29.5, "mean_num_mixed_intersections": 24.5, "mean_num_residential_intersections": 49.5, "mean_reward_component_mean_imbalance_term": -0.00020997645578657576, "mean_reward_component_mean_queue_level_term": -0.0016661140954070675, "mean_reward_component_mean_queue_term": -0.0007142752978128719, "mean_reward_component_mean_throughput_term": 0.0004785326405887247, "mean_reward_component_mean_wait_level_term": -0.0011225386412898608, "mean_reward_component_mean_wait_term": -0.0006218522762022616, "mean_reward_component_step_imbalance_term": -0.00036776034176000394, "mean_reward_component_step_queue_level_term": -0.0022856809955555946, "mean_reward_component_step_queue_term": -0.0010225514333797037, "mean_reward_component_step_throughput_term": 0.0006469829968409613, "mean_reward_component_step_wait_level_term": -0.001989927186514251, "mean_reward_component_step_wait_term": 0.0003749295228772098, "mean_running_vehicles": 622.5, "mean_throughput": 1614.0, "mean_total_episode_return": -69.16359523055144, "mean_total_incoming_vehicles": 617.1499786376953, "mean_total_waiting_vehicles": 291.55000495910645, "mean_transitions": 16736.0, "update": 38, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.002715218069624825, "mean_abs_td_error": 0.11738706642063335, "mean_target_q": -0.49020064412616193, "beta": 0.458368, "gradient_steps": 128.0, "rolling_episode_return": -0.005888258448463193, "rolling_total_episode_return": -68.056374305994, "rolling_mean_waiting_vehicles": 3.625954933091998, "rolling_throughput": 1540.5125, "rolling_td_loss": 0.002778693444633973, "rolling_mean_q_value": -0.3935869909415487, "rolling_mean_abs_td_error": 0.11503657373250462} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11104.0, "episode_return": -0.006336343756648863, "total_episode_return": -66.71288267080672, "mean_waiting_vehicles": 4.425664514303207, "throughput": 1430.5, "mean_q_value": -0.5561428153887391, "epsilon": 0.873536, "num_episodes": 4.0, "mean_average_travel_time": 114.7772558966393, "mean_decision_steps": 128.0, "mean_episode_return": -0.006336343756648863, "mean_epsilon": 0.8767786666666667, "mean_mean_incoming_vehicles": 7.016047984361649, "mean_mean_incoming_vehicles_commercial": 6.905449599027634, "mean_mean_incoming_vehicles_industrial": 4.948888659477234, "mean_mean_incoming_vehicles_mixed": 6.286424835522969, "mean_mean_incoming_vehicles_residential": 7.885963350534439, "mean_mean_q_value": -0.46273630773066543, "mean_mean_reward": -0.010743996826931834, "mean_mean_reward_commercial": -0.012067976698745042, "mean_mean_reward_industrial": 0.0031672862824052572, "mean_mean_reward_mixed": -0.0018192277057096362, "mean_mean_reward_residential": -0.015201389614958316, "mean_mean_step_intersection_reward": -0.006336343756648863, "mean_mean_waiting_vehicles": 4.425664514303207, "mean_mean_waiting_vehicles_commercial": 4.310265436768532, "mean_mean_waiting_vehicles_industrial": 3.0344444513320923, "mean_mean_waiting_vehicles_mixed": 3.813243846098582, "mean_mean_waiting_vehicles_residential": 5.096243247389793, "mean_num_commercial_intersections": 23.75, "mean_num_controlled_intersections": 86.75, "mean_num_industrial_intersections": 16.5, "mean_num_mixed_intersections": 25.666666666666668, "mean_num_residential_intersections": 35.5, "mean_reward_component_mean_imbalance_term": -0.0003449729747684316, "mean_reward_component_mean_queue_level_term": -0.0022665134058090786, "mean_reward_component_mean_queue_term": -0.0010389945519069244, "mean_reward_component_mean_throughput_term": 0.0006976963895581889, "mean_reward_component_mean_wait_level_term": -0.0021062229244979136, "mean_reward_component_mean_wait_term": -0.001277336246458205, "mean_reward_component_step_imbalance_term": -0.000633983472653199, "mean_reward_component_step_queue_level_term": -0.003324782504932955, "mean_reward_component_step_queue_term": -0.0006732317924615927, "mean_reward_component_step_throughput_term": 0.0005207294088904746, "mean_reward_component_step_wait_level_term": -0.004087475972482935, "mean_reward_component_step_wait_term": -0.002545252296840772, "mean_running_vehicles": 590.25, "mean_throughput": 1430.5, "mean_total_episode_return": -66.71288267080672, "mean_total_incoming_vehicles": 585.5000038146973, "mean_total_waiting_vehicles": 358.94998931884766, "mean_transitions": 11104.0, "update": 39, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.003043502121727215, "mean_abs_td_error": 0.1280443116556853, "mean_target_q": -0.5619135065935552, "beta": 0.45990400000000003, "gradient_steps": 128.0, "rolling_episode_return": -0.006001498312390283, "rolling_total_episode_return": -67.33053537858741, "rolling_mean_waiting_vehicles": 3.7614081908017396, "rolling_throughput": 1531.55, "rolling_td_loss": 0.0028204650348243377, "rolling_mean_q_value": -0.4092943926050793, "rolling_mean_abs_td_error": 0.11655611047171988} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 9856.0, "episode_return": -0.004053569149441345, "total_episode_return": -35.01571588602383, "mean_waiting_vehicles": 2.161358419805765, "throughput": 1216.75, "mean_q_value": -0.5033067937474698, "epsilon": 0.8702933333333334, "num_episodes": 4.0, "mean_average_travel_time": 94.5374598135288, "mean_decision_steps": 128.0, "mean_episode_return": -0.004053569149441345, "mean_epsilon": 0.873536, "mean_mean_incoming_vehicles": 4.278388261795044, "mean_mean_incoming_vehicles_commercial": 3.869794115424156, "mean_mean_incoming_vehicles_industrial": 5.860925992329915, "mean_mean_incoming_vehicles_mixed": 5.762251138687134, "mean_mean_incoming_vehicles_residential": 5.01616008579731, "mean_mean_q_value": -0.2376637931811274, "mean_mean_reward": -0.00992860199403367, "mean_mean_reward_commercial": -0.004821383074158803, "mean_mean_reward_industrial": -0.018355016596615314, "mean_mean_reward_mixed": -0.007210999436210841, "mean_mean_reward_residential": -0.01706617588206427, "mean_mean_step_intersection_reward": -0.004053569149441345, "mean_mean_waiting_vehicles": 2.161358419805765, "mean_mean_waiting_vehicles_commercial": 1.7729759691283107, "mean_mean_waiting_vehicles_industrial": 2.9331480860710144, "mean_mean_waiting_vehicles_mixed": 2.7845886747042337, "mean_mean_waiting_vehicles_residential": 2.98513269983232, "mean_num_commercial_intersections": 23.75, "mean_num_controlled_intersections": 77.0, "mean_num_industrial_intersections": 20.666666666666668, "mean_num_mixed_intersections": 9.333333333333334, "mean_num_residential_intersections": 30.75, "mean_reward_component_mean_imbalance_term": -0.00023474029933900908, "mean_reward_component_mean_queue_level_term": -0.0018667782772485708, "mean_reward_component_mean_queue_term": -0.0007516291095033267, "mean_reward_component_mean_throughput_term": 0.0007157184368935532, "mean_reward_component_mean_wait_level_term": -0.0012285712280739602, "mean_reward_component_mean_wait_term": -0.0006875687952003773, "mean_reward_component_step_imbalance_term": -0.0004018415920654661, "mean_reward_component_step_queue_level_term": -0.0024052132648648694, "mean_reward_component_step_queue_term": 0.0004503344462136738, "mean_reward_component_step_throughput_term": 0.0007137063930713339, "mean_reward_component_step_wait_level_term": -0.0022002197001711465, "mean_reward_component_step_wait_term": -0.0060853677459817845, "mean_running_vehicles": 318.75, "mean_throughput": 1216.75, "mean_total_episode_return": -35.01571588602383, "mean_total_incoming_vehicles": 288.44999504089355, "mean_total_waiting_vehicles": 132.04999780654907, "mean_transitions": 9856.0, "update": 40, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0029516196491385926, "mean_abs_td_error": 0.12191454292042181, "mean_target_q": -0.5095739527605474, "beta": 0.46144, "gradient_steps": 128.0, "rolling_episode_return": -0.006117799185412491, "rolling_total_episode_return": -68.06605123303616, "rolling_mean_waiting_vehicles": 3.835399271734059, "rolling_throughput": 1554.0875, "rolling_td_loss": 0.0028546265931481685, "rolling_mean_q_value": -0.42194129356648774, "rolling_mean_abs_td_error": 0.11775265050528105} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 13312.0, "episode_return": -0.0050839207532480234, "total_episode_return": -49.32470317115076, "mean_waiting_vehicles": 3.624021217226982, "throughput": 1052.75, "mean_q_value": -0.504245868884027, "epsilon": 0.8670506666666666, "num_episodes": 4.0, "mean_average_travel_time": 118.96310694002783, "mean_decision_steps": 128.0, "mean_episode_return": -0.0050839207532480234, "mean_epsilon": 0.8702933333333334, "mean_mean_incoming_vehicles": 5.786289304494858, "mean_mean_incoming_vehicles_commercial": 7.726434081792831, "mean_mean_incoming_vehicles_industrial": 2.475342571735382, "mean_mean_incoming_vehicles_mixed": 2.416068434715271, "mean_mean_incoming_vehicles_residential": 4.075639337301254, "mean_mean_q_value": -0.3755327542166924, "mean_mean_reward": -0.007046195154543966, "mean_mean_reward_commercial": -0.007378958282060921, "mean_mean_reward_industrial": 0.001056355278706178, "mean_mean_reward_mixed": -0.007256504458685716, "mean_mean_reward_residential": -0.012599847163073719, "mean_mean_step_intersection_reward": -0.0050839207532480234, "mean_mean_waiting_vehicles": 3.624021217226982, "mean_mean_waiting_vehicles_commercial": 5.081330090761185, "mean_mean_waiting_vehicles_industrial": 0.8705829828977585, "mean_mean_waiting_vehicles_mixed": 0.930341919263204, "mean_mean_waiting_vehicles_residential": 2.265052944421768, "mean_num_commercial_intersections": 29.25, "mean_num_controlled_intersections": 104.0, "mean_num_industrial_intersections": 25.5, "mean_num_mixed_intersections": 16.0, "mean_num_residential_intersections": 37.25, "mean_reward_component_mean_imbalance_term": -0.0002708941821355504, "mean_reward_component_mean_queue_level_term": -0.0018359928417623905, "mean_reward_component_mean_queue_term": -0.0008501736997694742, "mean_reward_component_mean_throughput_term": 0.0005595738360391067, "mean_reward_component_mean_wait_level_term": -0.0016925242560523746, "mean_reward_component_mean_wait_term": -0.0009939097112123515, "mean_reward_component_step_imbalance_term": -0.00045516468162531964, "mean_reward_component_step_queue_level_term": -0.0027205559017602354, "mean_reward_component_step_queue_term": -0.0026179993874393404, "mean_reward_component_step_throughput_term": 0.0006174227510200581, "mean_reward_component_step_wait_level_term": -0.003180511135724373, "mean_reward_component_step_wait_term": 0.0013106123078614473, "mean_running_vehicles": 445.0, "mean_throughput": 1052.75, "mean_total_episode_return": -49.32470317115076, "mean_total_incoming_vehicles": 441.1500129699707, "mean_total_waiting_vehicles": 237.600004196167, "mean_transitions": 13312.0, "update": 41, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.00289461468855734, "mean_abs_td_error": 0.11775841086637229, "mean_target_q": -0.5095581943169236, "beta": 0.462976, "gradient_steps": 128.0, "rolling_episode_return": -0.005932005896788137, "rolling_total_episode_return": -67.01502983740083, "rolling_mean_waiting_vehicles": 3.730436427332461, "rolling_throughput": 1534.3375, "rolling_td_loss": 0.0028897494285729406, "rolling_mean_q_value": -0.4333595196832903, "rolling_mean_abs_td_error": 0.11874282330390998} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11904.0, "episode_return": -0.004153606393720333, "total_episode_return": -51.272261711303145, "mean_waiting_vehicles": 2.129070073366165, "throughput": 1400.75, "mean_q_value": -0.5137725665699691, "epsilon": 0.863808, "num_episodes": 4.0, "mean_average_travel_time": 104.291263912199, "mean_decision_steps": 128.0, "mean_episode_return": -0.004153606393720333, "mean_epsilon": 0.8670506666666666, "mean_mean_incoming_vehicles": 4.260326027870178, "mean_mean_incoming_vehicles_commercial": 5.411428451538086, "mean_mean_incoming_vehicles_industrial": 4.461874842643738, "mean_mean_incoming_vehicles_mixed": 3.4059156576792398, "mean_mean_incoming_vehicles_residential": 4.763063271840413, "mean_mean_q_value": -0.20142183637653943, "mean_mean_reward": -0.005927694495767355, "mean_mean_reward_commercial": 0.010513414978049695, "mean_mean_reward_industrial": -0.009841234306804836, "mean_mean_reward_mixed": 0.009545479125032822, "mean_mean_reward_residential": -0.011958935530856252, "mean_mean_step_intersection_reward": -0.004153606393720333, "mean_mean_waiting_vehicles": 2.129070073366165, "mean_mean_waiting_vehicles_commercial": 2.639821410179138, "mean_mean_waiting_vehicles_industrial": 2.283666715025902, "mean_mean_waiting_vehicles_mixed": 1.2973597049713135, "mean_mean_waiting_vehicles_residential": 2.6238739093144736, "mean_num_commercial_intersections": 18.25, "mean_num_controlled_intersections": 93.0, "mean_num_industrial_intersections": 25.0, "mean_num_mixed_intersections": 23.666666666666668, "mean_num_residential_intersections": 42.666666666666664, "mean_reward_component_mean_imbalance_term": -0.00022875473502381727, "mean_reward_component_mean_queue_level_term": -0.0018241684412885206, "mean_reward_component_mean_queue_term": -0.000760765004510213, "mean_reward_component_mean_throughput_term": 0.0006303804214269348, "mean_reward_component_mean_wait_level_term": -0.0012500472640288862, "mean_reward_component_mean_wait_term": -0.0007202516003133042, "mean_reward_component_step_imbalance_term": -0.00039992769598029554, "mean_reward_component_step_queue_level_term": -0.0024344482517335564, "mean_reward_component_step_queue_term": -0.0008403233605349669, "mean_reward_component_step_throughput_term": 0.0007222142376122065, "mean_reward_component_step_wait_level_term": -0.002304805035237223, "mean_reward_component_step_wait_term": -0.0006704051629640162, "mean_running_vehicles": 440.75, "mean_throughput": 1400.75, "mean_total_episode_return": -51.272261711303145, "mean_total_incoming_vehicles": 406.75001335144043, "mean_total_waiting_vehicles": 200.55000114440918, "mean_transitions": 11904.0, "update": 42, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.002974234077555593, "mean_abs_td_error": 0.12541995343053713, "mean_target_q": -0.5203852609265596, "beta": 0.46451200000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.00563620839295279, "rolling_total_episode_return": -65.48971150990128, "rolling_mean_waiting_vehicles": 3.558706739731133, "rolling_throughput": 1513.7375, "rolling_td_loss": 0.0029152551357810807, "rolling_mean_q_value": -0.4435400946473237, "rolling_mean_abs_td_error": 0.11976490794040728} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 15648.0, "episode_return": -0.0029661424453343212, "total_episode_return": -43.55294312025944, "mean_waiting_vehicles": 1.0413435995578766, "throughput": 1498.75, "mean_q_value": -0.4837546315975487, "epsilon": 0.8605653333333333, "num_episodes": 4.0, "mean_average_travel_time": 107.54419827728458, "mean_decision_steps": 128.0, "mean_episode_return": -0.0029661424453343212, "mean_epsilon": 0.863808, "mean_mean_incoming_vehicles": 3.104226529598236, "mean_mean_incoming_vehicles_commercial": 5.879794031381607, "mean_mean_incoming_vehicles_industrial": 3.9774893124898276, "mean_mean_incoming_vehicles_mixed": 2.02323309580485, "mean_mean_incoming_vehicles_residential": 2.8056905567646027, "mean_mean_q_value": -0.1542888394469628, "mean_mean_reward": -0.002341215673368424, "mean_mean_reward_commercial": -0.0010034617152996361, "mean_mean_reward_industrial": -0.02816606972677012, "mean_mean_reward_mixed": 0.000891498479177244, "mean_mean_reward_residential": -0.004437579947989434, "mean_mean_step_intersection_reward": -0.0029661424453343212, "mean_mean_waiting_vehicles": 1.0413435995578766, "mean_mean_waiting_vehicles_commercial": 2.20160099118948, "mean_mean_waiting_vehicles_industrial": 1.3457431495189667, "mean_mean_waiting_vehicles_mixed": 0.5215605000654856, "mean_mean_waiting_vehicles_residential": 0.9217005968093872, "mean_num_commercial_intersections": 32.75, "mean_num_controlled_intersections": 122.25, "mean_num_industrial_intersections": 16.0, "mean_num_mixed_intersections": 35.333333333333336, "mean_num_residential_intersections": 51.0, "mean_reward_component_mean_imbalance_term": -0.00015717850685392776, "mean_reward_component_mean_queue_level_term": -0.0015151096877126236, "mean_reward_component_mean_queue_term": -0.0005849235481951709, "mean_reward_component_mean_throughput_term": 0.0005059088382424193, "mean_reward_component_mean_wait_level_term": -0.0008369370285756794, "mean_reward_component_mean_wait_term": -0.0003779027615191666, "mean_reward_component_step_imbalance_term": -0.00023003020760370418, "mean_reward_component_step_queue_level_term": -0.0018717553903115913, "mean_reward_component_step_queue_term": -0.0004358018368293415, "mean_reward_component_step_throughput_term": 0.0006680669139313977, "mean_reward_component_step_wait_level_term": -0.0012092886463506147, "mean_reward_component_step_wait_term": 0.0007375936693279073, "mean_running_vehicles": 424.75, "mean_throughput": 1498.75, "mean_total_episode_return": -43.55294312025944, "mean_total_incoming_vehicles": 360.95001220703125, "mean_total_waiting_vehicles": 119.09999942779541, "mean_transitions": 15648.0, "update": 43, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.00280334979743202, "mean_abs_td_error": 0.1172777876490727, "mean_target_q": -0.48986131348647177, "beta": 0.466048, "gradient_steps": 128.0, "rolling_episode_return": -0.005456036926484132, "rolling_total_episode_return": -65.3074394021658, "rolling_mean_waiting_vehicles": 3.424373830668628, "rolling_throughput": 1508.8, "rolling_td_loss": 0.002921473301307742, "rolling_mean_q_value": -0.4515085909399204, "rolling_mean_abs_td_error": 0.12013861454906874} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 13696.0, "episode_return": -0.003589273170130035, "total_episode_return": -44.86270141368732, "mean_waiting_vehicles": 2.061608672142029, "throughput": 1281.75, "mean_q_value": -0.5230515687726438, "epsilon": 0.8573226666666667, "num_episodes": 4.0, "mean_average_travel_time": 108.61980016632393, "mean_decision_steps": 128.0, "mean_episode_return": -0.003589273170130035, "mean_epsilon": 0.8605653333333333, "mean_mean_incoming_vehicles": 3.96963232755661, "mean_mean_incoming_vehicles_commercial": 3.5729629397392273, "mean_mean_incoming_vehicles_industrial": 3.8247501254081726, "mean_mean_incoming_vehicles_mixed": 3.6474597454071045, "mean_mean_incoming_vehicles_residential": 3.949049949645996, "mean_mean_q_value": -0.23667646416288335, "mean_mean_reward": -0.004523924493696541, "mean_mean_reward_commercial": 0.003640271839685738, "mean_mean_reward_industrial": -0.006931312498636544, "mean_mean_reward_mixed": -0.006082832405809313, "mean_mean_reward_residential": -0.00718742556637153, "mean_mean_step_intersection_reward": -0.003589273170130035, "mean_mean_waiting_vehicles": 2.061608672142029, "mean_mean_waiting_vehicles_commercial": 1.829004693776369, "mean_mean_waiting_vehicles_industrial": 2.045235812664032, "mean_mean_waiting_vehicles_mixed": 1.6858064830303192, "mean_mean_waiting_vehicles_residential": 1.9219838380813599, "mean_num_commercial_intersections": 20.5, "mean_num_controlled_intersections": 107.0, "mean_num_industrial_intersections": 34.25, "mean_num_mixed_intersections": 24.75, "mean_num_residential_intersections": 27.5, "mean_reward_component_mean_imbalance_term": -0.00020385313254100978, "mean_reward_component_mean_queue_level_term": -0.001526613054704029, "mean_reward_component_mean_queue_term": -0.0006669401741439263, "mean_reward_component_mean_throughput_term": 0.0005062124715529137, "mean_reward_component_mean_wait_level_term": -0.0010418435637711276, "mean_reward_component_mean_wait_term": -0.0006562358281110292, "mean_reward_component_step_imbalance_term": -0.00040015284321270883, "mean_reward_component_step_queue_level_term": -0.0021342086838558316, "mean_reward_component_step_queue_term": 0.0007303526617761236, "mean_reward_component_step_throughput_term": 0.0005878681331523694, "mean_reward_component_step_wait_level_term": -0.0020999545231461525, "mean_reward_component_step_wait_term": -0.0012078297149855644, "mean_running_vehicles": 404.0, "mean_throughput": 1281.75, "mean_total_episode_return": -44.86270141368732, "mean_total_incoming_vehicles": 390.75, "mean_total_waiting_vehicles": 193.8499984741211, "mean_transitions": 13696.0, "update": 44, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0031729889451526105, "mean_abs_td_error": 0.12442570884013548, "mean_target_q": -0.5294306320138276, "beta": 0.467584, "gradient_steps": 128.0, "rolling_episode_return": -0.005347735739632974, "rolling_total_episode_return": -64.2776008765135, "rolling_mean_waiting_vehicles": 3.355767663381994, "rolling_throughput": 1496.0125, "rolling_td_loss": 0.002947622254964699, "rolling_mean_q_value": -0.46009498927742243, "rolling_mean_abs_td_error": 0.12077433230006136} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 9248.0, "episode_return": -0.004676050133635259, "total_episode_return": -44.55165180837503, "mean_waiting_vehicles": 2.426810532808304, "throughput": 1352.75, "mean_q_value": -0.5467582498677075, "epsilon": 0.85408, "num_episodes": 4.0, "mean_average_travel_time": 99.63146552057543, "mean_decision_steps": 128.0, "mean_episode_return": -0.004676050133635259, "mean_epsilon": 0.8573226666666667, "mean_mean_incoming_vehicles": 4.958908975124359, "mean_mean_incoming_vehicles_commercial": 5.731793463230133, "mean_mean_incoming_vehicles_industrial": 4.651039679845174, "mean_mean_incoming_vehicles_mixed": 3.0284219284852347, "mean_mean_incoming_vehicles_residential": 4.9324005246162415, "mean_mean_q_value": -0.27934316780010704, "mean_mean_reward": -0.010118987876921892, "mean_mean_reward_commercial": -0.002701607358176261, "mean_mean_reward_industrial": -0.008786021537768344, "mean_mean_reward_mixed": 0.008939099032431841, "mean_mean_reward_residential": -0.016639408888295293, "mean_mean_step_intersection_reward": -0.004676050133635259, "mean_mean_waiting_vehicles": 2.426810532808304, "mean_mean_waiting_vehicles_commercial": 3.1621075570583344, "mean_mean_waiting_vehicles_industrial": 1.973906695842743, "mean_mean_waiting_vehicles_mixed": 1.1401917934417725, "mean_mean_waiting_vehicles_residential": 2.163012519478798, "mean_num_commercial_intersections": 13.5, "mean_num_controlled_intersections": 72.25, "mean_num_industrial_intersections": 18.666666666666668, "mean_num_mixed_intersections": 23.0, "mean_num_residential_intersections": 27.5, "mean_reward_component_mean_imbalance_term": -0.00026181504996825034, "mean_reward_component_mean_queue_level_term": -0.0021045631971219336, "mean_reward_component_mean_queue_term": -0.0008659757107922772, "mean_reward_component_mean_throughput_term": 0.0007420666499129425, "mean_reward_component_mean_wait_level_term": -0.0014047450787195714, "mean_reward_component_mean_wait_term": -0.0007810177634013371, "mean_reward_component_step_imbalance_term": -0.0004605900358001236, "mean_reward_component_step_queue_level_term": -0.0027711224392987788, "mean_reward_component_step_queue_term": -5.156744737178087e-05, "mean_reward_component_step_throughput_term": 0.0010575530686764978, "mean_reward_component_step_wait_level_term": -0.0024985847558127716, "mean_reward_component_step_wait_term": -0.005394676234573126, "mean_running_vehicles": 379.5, "mean_throughput": 1352.75, "mean_total_episode_return": -44.55165180837503, "mean_total_incoming_vehicles": 355.5499954223633, "mean_total_waiting_vehicles": 154.50000381469727, "mean_transitions": 9248.0, "update": 45, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0034715898927970557, "mean_abs_td_error": 0.13552028051344678, "mean_target_q": -0.5548384166322649, "beta": 0.46912000000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.005324937285894368, "rolling_total_episode_return": -62.60933583376554, "rolling_mean_waiting_vehicles": 3.337537811510265, "rolling_throughput": 1492.125, "rolling_td_loss": 0.0029966615081548297, "rolling_mean_q_value": -0.4708536365360487, "rolling_mean_abs_td_error": 0.12221800708211958} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11776.0, "episode_return": -0.001862466835714921, "total_episode_return": -22.352412806125358, "mean_waiting_vehicles": 0.5803165510296822, "throughput": 854.5, "mean_q_value": -0.440697064390406, "epsilon": 0.8508373333333333, "num_episodes": 4.0, "mean_average_travel_time": 93.07662414760073, "mean_decision_steps": 128.0, "mean_episode_return": -0.001862466835714921, "mean_epsilon": 0.85408, "mean_mean_incoming_vehicles": 2.0524712800979614, "mean_mean_incoming_vehicles_commercial": 1.6892304122447968, "mean_mean_incoming_vehicles_industrial": 1.5531214475631714, "mean_mean_incoming_vehicles_mixed": 2.4875001311302185, "mean_mean_incoming_vehicles_residential": 2.100675731897354, "mean_mean_q_value": -0.15349779570533428, "mean_mean_reward": -0.0014540595147991553, "mean_mean_reward_commercial": -0.003984909955761395, "mean_mean_reward_industrial": -0.005896941351238638, "mean_mean_reward_mixed": 0.01875323709100485, "mean_mean_reward_residential": -0.0034153942833654583, "mean_mean_step_intersection_reward": -0.001862466835714921, "mean_mean_waiting_vehicles": 0.5803165510296822, "mean_mean_waiting_vehicles_commercial": 0.43132223933935165, "mean_mean_waiting_vehicles_industrial": 0.1900000013411045, "mean_mean_waiting_vehicles_mixed": 0.893750011920929, "mean_mean_waiting_vehicles_residential": 0.6932647228240967, "mean_num_commercial_intersections": 35.5, "mean_num_controlled_intersections": 92.0, "mean_num_industrial_intersections": 14.0, "mean_num_mixed_intersections": 10.5, "mean_num_residential_intersections": 37.25, "mean_reward_component_mean_imbalance_term": -9.604440540578185e-05, "mean_reward_component_mean_queue_level_term": -0.001091781113114365, "mean_reward_component_mean_queue_term": -0.00040419355690870563, "mean_reward_component_mean_throughput_term": 0.00040607316566365625, "mean_reward_component_mean_wait_level_term": -0.0004665040232687545, "mean_reward_component_mean_wait_term": -0.00021001717677648912, "mean_reward_component_step_imbalance_term": -0.00013730978389503434, "mean_reward_component_step_queue_level_term": -0.0012934194382978603, "mean_reward_component_step_queue_term": -0.0006629413910559379, "mean_reward_component_step_throughput_term": 0.000460745875898283, "mean_reward_component_step_wait_level_term": -0.000672054746246431, "mean_reward_component_step_wait_term": 0.0008509199979016557, "mean_running_vehicles": 192.5, "mean_throughput": 854.5, "mean_total_episode_return": -22.352412806125358, "mean_total_incoming_vehicles": 187.6500072479248, "mean_total_waiting_vehicles": 44.64999866485596, "mean_transitions": 11776.0, "update": 46, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0023889920225883543, "mean_abs_td_error": 0.10722026665462181, "mean_target_q": -0.44477293733507395, "beta": 0.470656, "gradient_steps": 128.0, "rolling_episode_return": -0.005075339477559089, "rolling_total_episode_return": -60.435920709267705, "rolling_mean_waiting_vehicles": 3.108648884482682, "rolling_throughput": 1465.7125, "rolling_td_loss": 0.0029702065871788363, "rolling_mean_q_value": -0.4736014210327994, "rolling_mean_abs_td_error": 0.12158752751711291} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11456.0, "episode_return": -0.00417707587006191, "total_episode_return": -39.78491683327593, "mean_waiting_vehicles": 2.357529580593109, "throughput": 1156.5, "mean_q_value": -0.45581681351177394, "epsilon": 0.8475946666666667, "num_episodes": 4.0, "mean_average_travel_time": 107.60760372528647, "mean_decision_steps": 128.0, "mean_episode_return": -0.00417707587006191, "mean_epsilon": 0.8508373333333333, "mean_mean_incoming_vehicles": 4.537377864122391, "mean_mean_incoming_vehicles_commercial": 4.841984927654266, "mean_mean_incoming_vehicles_industrial": 5.321110934019089, "mean_mean_incoming_vehicles_mixed": 2.8466667334238687, "mean_mean_incoming_vehicles_residential": 3.9151883721351624, "mean_mean_q_value": -0.3579230880859541, "mean_mean_reward": -0.009613156133127632, "mean_mean_reward_commercial": -0.019809146149782464, "mean_mean_reward_industrial": -0.007681606279220432, "mean_mean_reward_mixed": -0.006719722140890856, "mean_mean_reward_residential": -0.0012379125982988626, "mean_mean_step_intersection_reward": -0.00417707587006191, "mean_mean_waiting_vehicles": 2.357529580593109, "mean_mean_waiting_vehicles_commercial": 2.5004340410232544, "mean_mean_waiting_vehicles_industrial": 3.1779293566942215, "mean_mean_waiting_vehicles_mixed": 1.2824999789396923, "mean_mean_waiting_vehicles_residential": 1.5326487869024277, "mean_num_commercial_intersections": 30.25, "mean_num_controlled_intersections": 89.5, "mean_num_industrial_intersections": 24.25, "mean_num_mixed_intersections": 10.333333333333334, "mean_num_residential_intersections": 27.25, "mean_reward_component_mean_imbalance_term": -0.00024507984689925433, "mean_reward_component_mean_queue_level_term": -0.0017872347803766786, "mean_reward_component_mean_queue_term": -0.000760263880901418, "mean_reward_component_mean_throughput_term": 0.0006179375775126061, "mean_reward_component_mean_wait_level_term": -0.0012789367473249325, "mean_reward_component_mean_wait_term": -0.0007234982764781073, "mean_reward_component_step_imbalance_term": -0.00044222913129488006, "mean_reward_component_step_queue_level_term": -0.0024328445579158142, "mean_reward_component_step_queue_term": -0.0009807573733269237, "mean_reward_component_step_throughput_term": 0.0006573718565050513, "mean_reward_component_step_wait_level_term": -0.002315194404218346, "mean_reward_component_step_wait_term": -0.004099503101315349, "mean_running_vehicles": 335.25, "mean_throughput": 1156.5, "mean_total_episode_return": -39.78491683327593, "mean_total_incoming_vehicles": 332.45000076293945, "mean_total_waiting_vehicles": 142.20000076293945, "mean_transitions": 11456.0, "update": 47, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.002347595449009532, "mean_abs_td_error": 0.11105527344625443, "mean_target_q": -0.4593555114697665, "beta": 0.472192, "gradient_steps": 128.0, "rolling_episode_return": -0.004918997510918856, "rolling_total_episode_return": -57.129517800920624, "rolling_mean_waiting_vehicles": 3.0040076749399303, "rolling_throughput": 1411.6125, "rolling_td_loss": 0.0029371064018278046, "rolling_mean_q_value": -0.47716571924975143, "rolling_mean_abs_td_error": 0.12120469561486971} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 19392.0, "episode_return": -0.006992649970211868, "total_episode_return": -166.0639000700321, "mean_waiting_vehicles": 4.094967387616634, "throughput": 2432.25, "mean_q_value": -0.5346627936232835, "epsilon": 0.844352, "num_episodes": 4.0, "mean_average_travel_time": 114.80211801558019, "mean_decision_steps": 128.0, "mean_episode_return": -0.006992649970211868, "mean_epsilon": 0.8475946666666667, "mean_mean_incoming_vehicles": 7.944174528121948, "mean_mean_incoming_vehicles_commercial": 6.471045970916748, "mean_mean_incoming_vehicles_industrial": 6.397780120372772, "mean_mean_incoming_vehicles_mixed": 3.2149999539057412, "mean_mean_incoming_vehicles_residential": 10.405631363391876, "mean_mean_q_value": -0.3398846710624639, "mean_mean_reward": -0.011305070482194424, "mean_mean_reward_commercial": -0.007889776607044041, "mean_mean_reward_industrial": -0.0029008901037741452, "mean_mean_reward_mixed": 0.003347845127185186, "mean_mean_reward_residential": -0.025380588369444013, "mean_mean_step_intersection_reward": -0.006992649970211868, "mean_mean_waiting_vehicles": 4.094967387616634, "mean_mean_waiting_vehicles_commercial": 2.3924510031938553, "mean_mean_waiting_vehicles_industrial": 2.4759550392627716, "mean_mean_waiting_vehicles_mixed": 1.4266666571299236, "mean_mean_waiting_vehicles_residential": 6.842628695070744, "mean_num_commercial_intersections": 33.75, "mean_num_controlled_intersections": 151.5, "mean_num_industrial_intersections": 51.75, "mean_num_mixed_intersections": 21.666666666666668, "mean_num_residential_intersections": 49.75, "mean_reward_component_mean_imbalance_term": -0.0002718158679957394, "mean_reward_component_mean_queue_level_term": -0.002547965642961003, "mean_reward_component_mean_queue_term": -0.001543063267490652, "mean_reward_component_mean_throughput_term": 0.0005808623971041982, "mean_reward_component_mean_wait_level_term": -0.0016350155769098151, "mean_reward_component_mean_wait_term": -0.001575652368837055, "mean_reward_component_step_imbalance_term": -0.0007165153256210033, "mean_reward_component_step_queue_level_term": -0.004937802208587527, "mean_reward_component_step_queue_term": -0.0015736195782665163, "mean_reward_component_step_throughput_term": 0.0008111354109132662, "mean_reward_component_step_wait_level_term": -0.005037622744566761, "mean_reward_component_step_wait_term": 0.00014935535728000104, "mean_running_vehicles": 1484.75, "mean_throughput": 2432.25, "mean_total_episode_return": -166.0639000700321, "mean_total_incoming_vehicles": 1477.0500030517578, "mean_total_waiting_vehicles": 790.2500019073486, "mean_transitions": 19392.0, "update": 48, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.00340830580353213, "mean_abs_td_error": 0.13301364751532674, "mean_target_q": -0.5417695348151028, "beta": 0.47372800000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.004890492379972187, "rolling_total_episode_return": -61.264385528796446, "rolling_mean_waiting_vehicles": 2.965560823492706, "rolling_throughput": 1452.45, "rolling_td_loss": 0.0029521865951437575, "rolling_mean_q_value": -0.48425684162648397, "rolling_mean_abs_td_error": 0.12161187333113048} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 15872.0, "episode_return": -0.0032207585149641883, "total_episode_return": -61.57343976438278, "mean_waiting_vehicles": 1.395504206418991, "throughput": 1472.75, "mean_q_value": -0.4888031934387982, "epsilon": 0.8411093333333334, "num_episodes": 4.0, "mean_average_travel_time": 116.25965459101295, "mean_decision_steps": 128.0, "mean_episode_return": -0.0032207585149641883, "mean_epsilon": 0.844352, "mean_mean_incoming_vehicles": 3.6023110449314117, "mean_mean_incoming_vehicles_commercial": 3.713305413722992, "mean_mean_incoming_vehicles_industrial": 3.008483350276947, "mean_mean_incoming_vehicles_mixed": 2.339650789896647, "mean_mean_incoming_vehicles_residential": 5.395717223485311, "mean_mean_q_value": -0.24864017612708267, "mean_mean_reward": 3.728759475052357e-05, "mean_mean_reward_commercial": 0.006868303200462833, "mean_mean_reward_industrial": -0.004400103003717959, "mean_mean_reward_mixed": -0.005881543698099752, "mean_mean_reward_residential": -0.002265186766938617, "mean_mean_step_intersection_reward": -0.0032207585149641883, "mean_mean_waiting_vehicles": 1.395504206418991, "mean_mean_waiting_vehicles_commercial": 1.2624364867806435, "mean_mean_waiting_vehicles_industrial": 1.0150361061096191, "mean_mean_waiting_vehicles_mixed": 1.1834285855293274, "mean_mean_waiting_vehicles_residential": 2.313755770524343, "mean_num_commercial_intersections": 33.5, "mean_num_controlled_intersections": 124.0, "mean_num_industrial_intersections": 31.25, "mean_num_mixed_intersections": 19.333333333333332, "mean_num_residential_intersections": 59.666666666666664, "mean_reward_component_mean_imbalance_term": -0.00015911407793600674, "mean_reward_component_mean_queue_level_term": -0.0015465667297718255, "mean_reward_component_mean_queue_term": -0.0006222774007031973, "mean_reward_component_mean_throughput_term": 0.0004099594086355296, "mean_reward_component_mean_wait_level_term": -0.0008673110234758141, "mean_reward_component_mean_wait_term": -0.0004354488997551087, "mean_reward_component_step_imbalance_term": -0.0002522559661883861, "mean_reward_component_step_queue_level_term": -0.0019912876014132053, "mean_reward_component_step_queue_term": 0.00045140160364098847, "mean_reward_component_step_throughput_term": 0.00048532608343521133, "mean_reward_component_step_wait_level_term": -0.0013934364105807617, "mean_reward_component_step_wait_term": 0.0027375398785807192, "mean_running_vehicles": 545.75, "mean_throughput": 1472.75, "mean_total_episode_return": -61.57343976438278, "mean_total_incoming_vehicles": 542.0499906539917, "mean_total_waiting_vehicles": 205.64999389648438, "mean_transitions": 15872.0, "update": 49, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.003459566207311582, "mean_abs_td_error": 0.13032646890496835, "mean_target_q": -0.49390033376403153, "beta": 0.475264, "gradient_steps": 128.0, "rolling_episode_return": -0.004864212602892165, "rolling_total_episode_return": -62.54362731897727, "rolling_mean_waiting_vehicles": 2.9074898270890115, "rolling_throughput": 1473.0625, "rolling_td_loss": 0.0029743930548875143, "rolling_mean_q_value": -0.4889208425069228, "rolling_mean_abs_td_error": 0.12230436746322085} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 16320.0, "episode_return": -0.0045003067750809195, "total_episode_return": -73.51094186579576, "mean_waiting_vehicles": 2.3492006920278072, "throughput": 1876.0, "mean_q_value": -0.5103150433860719, "epsilon": 0.8378666666666666, "num_episodes": 4.0, "mean_average_travel_time": 118.56375155909178, "mean_decision_steps": 128.0, "mean_episode_return": -0.0045003067750809195, "mean_epsilon": 0.8411093333333334, "mean_mean_incoming_vehicles": 5.053094133734703, "mean_mean_incoming_vehicles_commercial": 3.8818222880363464, "mean_mean_incoming_vehicles_industrial": 4.033756777644157, "mean_mean_incoming_vehicles_mixed": 5.165579229593277, "mean_mean_incoming_vehicles_residential": 6.24688233435154, "mean_mean_q_value": -0.3542984831001377, "mean_mean_reward": -0.005677686363924295, "mean_mean_reward_commercial": -0.0009320634417235851, "mean_mean_reward_industrial": 0.0019923427316825837, "mean_mean_reward_mixed": 2.786354161798954e-05, "mean_mean_reward_residential": -0.0129361453873571, "mean_mean_step_intersection_reward": -0.0045003067750809195, "mean_mean_waiting_vehicles": 2.3492006920278072, "mean_mean_waiting_vehicles_commercial": 1.6917327493429184, "mean_mean_waiting_vehicles_industrial": 1.7075131982564926, "mean_mean_waiting_vehicles_mixed": 2.0582659915089607, "mean_mean_waiting_vehicles_residential": 3.423916654661298, "mean_num_commercial_intersections": 24.5, "mean_num_controlled_intersections": 127.5, "mean_num_industrial_intersections": 25.5, "mean_num_mixed_intersections": 36.0, "mean_num_residential_intersections": 41.5, "mean_reward_component_mean_imbalance_term": -0.0002322326968877686, "mean_reward_component_mean_queue_level_term": -0.0019841231355162137, "mean_reward_component_mean_queue_term": -0.000829057229353225, "mean_reward_component_mean_throughput_term": 0.0005701488708353963, "mean_reward_component_mean_wait_level_term": -0.0013247256029538246, "mean_reward_component_mean_wait_term": -0.000700317051137489, "mean_reward_component_step_imbalance_term": -0.00037635719854733907, "mean_reward_component_step_queue_level_term": -0.0026529830502113327, "mean_reward_component_step_queue_term": -0.0002417202340438962, "mean_reward_component_step_throughput_term": 0.000667844753479585, "mean_reward_component_step_wait_level_term": -0.00224101469211746, "mean_reward_component_step_wait_term": -0.0008334554149769247, "mean_running_vehicles": 652.25, "mean_throughput": 1876.0, "mean_total_episode_return": -73.51094186579576, "mean_total_incoming_vehicles": 642.1500186920166, "mean_total_waiting_vehicles": 285.4000015258789, "mean_transitions": 16320.0, "update": 50, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0036496429920589435, "mean_abs_td_error": 0.13666709477547556, "mean_target_q": -0.5160392811521888, "beta": 0.4768, "gradient_steps": 128.0, "rolling_episode_return": -0.004737439101875649, "rolling_total_episode_return": -61.036049264798386, "rolling_mean_waiting_vehicles": 2.8108664941042663, "rolling_throughput": 1460.9875, "rolling_td_loss": 0.002995849309695586, "rolling_mean_q_value": -0.4911162010394037, "rolling_mean_abs_td_error": 0.12266035836655646} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 10400.0, "episode_return": -0.00915978181102199, "total_episode_return": -105.12131136842072, "mean_waiting_vehicles": 6.53146767616272, "throughput": 1815.25, "mean_q_value": -0.6532643148675561, "epsilon": 0.834624, "num_episodes": 4.0, "mean_average_travel_time": 105.62065376674951, "mean_decision_steps": 128.0, "mean_episode_return": -0.00915978181102199, "mean_epsilon": 0.8378666666666666, "mean_mean_incoming_vehicles": 11.18635892868042, "mean_mean_incoming_vehicles_commercial": 16.185347239176433, "mean_mean_incoming_vehicles_industrial": 17.273889660835266, "mean_mean_incoming_vehicles_mixed": 10.347581704457602, "mean_mean_incoming_vehicles_residential": 14.782387137413025, "mean_mean_q_value": -0.5680187342950376, "mean_mean_reward": -0.030293705640360713, "mean_mean_reward_commercial": -0.037050288558627166, "mean_mean_reward_industrial": -0.10818424436729401, "mean_mean_reward_mixed": -0.016142023416856926, "mean_mean_reward_residential": -0.05988508812151849, "mean_mean_step_intersection_reward": -0.00915978181102199, "mean_mean_waiting_vehicles": 6.53146767616272, "mean_mean_waiting_vehicles_commercial": 8.558599869410196, "mean_mean_waiting_vehicles_industrial": 8.034999907016754, "mean_mean_waiting_vehicles_mixed": 5.967472930749257, "mean_mean_waiting_vehicles_residential": 9.422207236289978, "mean_num_commercial_intersections": 26.333333333333332, "mean_num_controlled_intersections": 81.25, "mean_num_industrial_intersections": 9.5, "mean_num_mixed_intersections": 33.666666666666664, "mean_num_residential_intersections": 26.75, "mean_reward_component_mean_imbalance_term": -0.0004096884066639994, "mean_reward_component_mean_queue_level_term": -0.002931171975461666, "mean_reward_component_mean_queue_term": -0.0019834554234705593, "mean_reward_component_mean_throughput_term": 0.0008839909131523882, "mean_reward_component_mean_wait_level_term": -0.0024200326317798115, "mean_reward_component_mean_wait_term": -0.0022994243841687177, "mean_reward_component_step_imbalance_term": -0.0010681915591703728, "mean_reward_component_step_queue_level_term": -0.006347057700622827, "mean_reward_component_step_queue_term": -0.006106297056248877, "mean_reward_component_step_throughput_term": 0.0009437767585041001, "mean_reward_component_step_wait_level_term": -0.007372826337814331, "mean_reward_component_step_wait_term": -0.010343111876863986, "mean_running_vehicles": 1095.5, "mean_throughput": 1815.25, "mean_total_episode_return": -105.12131136842072, "mean_total_incoming_vehicles": 1026.2500076293945, "mean_total_waiting_vehicles": 599.4999847412109, "mean_transitions": 10400.0, "update": 51, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.004948375912135816, "mean_abs_td_error": 0.1709115196717903, "mean_target_q": -0.665194392669946, "beta": 0.47833600000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.004811369652587013, "rolling_total_episode_return": -62.84993595496144, "rolling_mean_waiting_vehicles": 2.859031042829156, "rolling_throughput": 1476.8875, "rolling_td_loss": 0.003081980916226712, "rolling_mean_q_value": -0.5006577778491191, "rolling_mean_abs_td_error": 0.12498588339949493} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12608.0, "episode_return": -0.006210856916881537, "total_episode_return": -86.16889757546596, "mean_waiting_vehicles": 3.1529869437217712, "throughput": 1918.75, "mean_q_value": -0.6982536665163934, "epsilon": 0.8313813333333333, "num_episodes": 4.0, "mean_average_travel_time": 117.67828006750855, "mean_decision_steps": 128.0, "mean_episode_return": -0.006210856916881537, "mean_epsilon": 0.834624, "mean_mean_incoming_vehicles": 6.513439297676086, "mean_mean_incoming_vehicles_commercial": 5.770833447575569, "mean_mean_incoming_vehicles_industrial": 4.5958406527837115, "mean_mean_incoming_vehicles_mixed": 7.669451028108597, "mean_mean_incoming_vehicles_residential": 6.68339030444622, "mean_mean_q_value": -0.49044514828710817, "mean_mean_reward": -0.010109436116181314, "mean_mean_reward_commercial": -0.014777167700231075, "mean_mean_reward_industrial": -0.010354349700113138, "mean_mean_reward_mixed": -0.009014620329253376, "mean_mean_reward_residential": -0.012161765713244677, "mean_mean_step_intersection_reward": -0.006210856916881537, "mean_mean_waiting_vehicles": 3.1529869437217712, "mean_mean_waiting_vehicles_commercial": 2.3892239928245544, "mean_mean_waiting_vehicles_industrial": 1.8279772649208705, "mean_mean_waiting_vehicles_mixed": 3.997248698025942, "mean_mean_waiting_vehicles_residential": 3.4560273736715317, "mean_num_commercial_intersections": 17.0, "mean_num_controlled_intersections": 98.5, "mean_num_industrial_intersections": 19.666666666666668, "mean_num_mixed_intersections": 23.25, "mean_num_residential_intersections": 43.5, "mean_reward_component_mean_imbalance_term": -0.000310660743388147, "mean_reward_component_mean_queue_level_term": -0.0026539823265991913, "mean_reward_component_mean_queue_term": -0.0010951312310406422, "mean_reward_component_mean_throughput_term": 0.0007251420380640639, "mean_reward_component_mean_wait_level_term": -0.0018834433293015707, "mean_reward_component_mean_wait_term": -0.000992781470309012, "mean_reward_component_step_imbalance_term": -0.0005025058380851988, "mean_reward_component_step_queue_level_term": -0.0035044198157265782, "mean_reward_component_step_queue_term": -0.0003629305200385201, "mean_reward_component_step_throughput_term": 0.0008083814245765097, "mean_reward_component_step_wait_level_term": -0.0031692475749878213, "mean_reward_component_step_wait_term": -0.003378714609425515, "mean_running_vehicles": 739.75, "mean_throughput": 1918.75, "mean_total_episode_return": -86.16889757546596, "mean_total_incoming_vehicles": 710.7499942779541, "mean_total_waiting_vehicles": 353.1500153541565, "mean_transitions": 12608.0, "update": 52, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.005236351946223294, "mean_abs_td_error": 0.17505406454438344, "mean_target_q": -0.7085796929895878, "beta": 0.479872, "gradient_steps": 128.0, "rolling_episode_return": -0.004900173815460642, "rolling_total_episode_return": -64.36114635787763, "rolling_mean_waiting_vehicles": 2.8927489284425976, "rolling_throughput": 1504.5, "rolling_td_loss": 0.0032045603865526575, "rolling_mean_q_value": -0.5141271582688205, "rolling_mean_abs_td_error": 0.12796241555188317} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 16864.0, "episode_return": -0.0042813612822084676, "total_episode_return": -74.27019764529541, "mean_waiting_vehicles": 2.7435028553009033, "throughput": 1579.25, "mean_q_value": -0.7047132039442658, "epsilon": 0.8281386666666667, "num_episodes": 4.0, "mean_average_travel_time": 128.84350192433664, "mean_decision_steps": 128.0, "mean_episode_return": -0.0042813612822084676, "mean_epsilon": 0.8313813333333333, "mean_mean_incoming_vehicles": 4.99657666683197, "mean_mean_incoming_vehicles_commercial": 5.1498703956604, "mean_mean_incoming_vehicles_industrial": 3.05239138007164, "mean_mean_incoming_vehicles_mixed": 4.277740180492401, "mean_mean_incoming_vehicles_residential": 6.182329475879669, "mean_mean_q_value": -0.4183263842132874, "mean_mean_reward": -0.006158623393275775, "mean_mean_reward_commercial": -0.005726461880840361, "mean_mean_reward_industrial": -0.0015452203224413097, "mean_mean_reward_mixed": -0.016063839429989457, "mean_mean_reward_residential": -0.00885247066617012, "mean_mean_step_intersection_reward": -0.0042813612822084676, "mean_mean_waiting_vehicles": 2.7435028553009033, "mean_mean_waiting_vehicles_commercial": 2.871110200881958, "mean_mean_waiting_vehicles_industrial": 1.0913175642490387, "mean_mean_waiting_vehicles_mixed": 2.62143474817276, "mean_mean_waiting_vehicles_residential": 3.8095305263996124, "mean_num_commercial_intersections": 47.5, "mean_num_controlled_intersections": 131.75, "mean_num_industrial_intersections": 27.75, "mean_num_mixed_intersections": 18.25, "mean_num_residential_intersections": 38.25, "mean_reward_component_mean_imbalance_term": -0.00024295884045247296, "mean_reward_component_mean_queue_level_term": -0.0016583794368720817, "mean_reward_component_mean_queue_term": -0.0007507344313251174, "mean_reward_component_mean_throughput_term": 0.00046854278603447597, "mean_reward_component_mean_wait_level_term": -0.0013162994851451115, "mean_reward_component_mean_wait_term": -0.0007815320332458242, "mean_reward_component_step_imbalance_term": -0.000459806906292215, "mean_reward_component_step_queue_level_term": -0.0024023501900956035, "mean_reward_component_step_queue_term": -0.0006987080323597183, "mean_reward_component_step_throughput_term": 0.0005174544348847121, "mean_reward_component_step_wait_level_term": -0.002500902453903109, "mean_reward_component_step_wait_term": -0.0006143102655187249, "mean_running_vehicles": 685.0, "mean_throughput": 1579.25, "mean_total_episode_return": -74.27019764529541, "mean_total_incoming_vehicles": 680.0, "mean_total_waiting_vehicles": 366.6499786376953, "mean_transitions": 16864.0, "update": 53, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.005184454756999912, "mean_abs_td_error": 0.16559530032100156, "mean_target_q": -0.7155435546301305, "beta": 0.481408, "gradient_steps": 128.0, "rolling_episode_return": -0.004875906519449397, "rolling_total_episode_return": -65.01326045395199, "rolling_mean_waiting_vehicles": 2.9027598593384027, "rolling_throughput": 1494.4125, "rolling_td_loss": 0.0033147614655490544, "rolling_mean_q_value": -0.5267985605634748, "rolling_mean_abs_td_error": 0.1301083894621115} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12064.0, "episode_return": -0.010370081725644964, "total_episode_return": -100.22177615948021, "mean_waiting_vehicles": 6.093063533306122, "throughput": 1854.5, "mean_q_value": -0.8503955458290875, "epsilon": 0.824896, "num_episodes": 4.0, "mean_average_travel_time": 114.35886003086043, "mean_decision_steps": 128.0, "mean_episode_return": -0.010370081725644964, "mean_epsilon": 0.8281386666666667, "mean_mean_incoming_vehicles": 10.671141147613525, "mean_mean_incoming_vehicles_commercial": 5.874690850575765, "mean_mean_incoming_vehicles_industrial": 10.970215559005737, "mean_mean_incoming_vehicles_mixed": 5.648989995320638, "mean_mean_incoming_vehicles_residential": 15.113221019506454, "mean_mean_q_value": -0.7605811834364431, "mean_mean_reward": -0.033236662624403834, "mean_mean_reward_commercial": -0.004275716530779998, "mean_mean_reward_industrial": -0.025665154331363738, "mean_mean_reward_mixed": -0.003305900104654332, "mean_mean_reward_residential": -0.05773092817980796, "mean_mean_step_intersection_reward": -0.010370081725644964, "mean_mean_waiting_vehicles": 6.093063533306122, "mean_mean_waiting_vehicles_commercial": 2.3966049750645957, "mean_mean_waiting_vehicles_industrial": 5.8566839918494225, "mean_mean_waiting_vehicles_mixed": 2.182323137919108, "mean_mean_waiting_vehicles_residential": 10.581109158694744, "mean_num_commercial_intersections": 26.0, "mean_num_controlled_intersections": 94.25, "mean_num_industrial_intersections": 29.75, "mean_num_mixed_intersections": 16.333333333333332, "mean_num_residential_intersections": 32.75, "mean_reward_component_mean_imbalance_term": -0.0004583178585422787, "mean_reward_component_mean_queue_level_term": -0.0036843106498487543, "mean_reward_component_mean_queue_term": -0.002003550475246474, "mean_reward_component_mean_throughput_term": 0.0009662804707204486, "mean_reward_component_mean_wait_level_term": -0.002951373839531257, "mean_reward_component_mean_wait_term": -0.0022388096699863524, "mean_reward_component_step_imbalance_term": -0.0010044986993307248, "mean_reward_component_step_queue_level_term": -0.00641136133344844, "mean_reward_component_step_queue_term": -0.0027111887975479476, "mean_reward_component_step_throughput_term": 0.001204978416353697, "mean_reward_component_step_wait_level_term": -0.007164190930780023, "mean_reward_component_step_wait_term": -0.017150402476545423, "mean_running_vehicles": 866.75, "mean_throughput": 1854.5, "mean_total_episode_return": -100.22177615948021, "mean_total_incoming_vehicles": 846.4499740600586, "mean_total_waiting_vehicles": 476.7999801635742, "mean_transitions": 12064.0, "update": 54, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.006745521731318149, "mean_abs_td_error": 0.19966865319292992, "mean_target_q": -0.8640475170686841, "beta": 0.48294400000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.005268731456299662, "rolling_total_episode_return": -67.87981402642927, "rolling_mean_waiting_vehicles": 3.1376238729804755, "rolling_throughput": 1526.8375, "rolling_td_loss": 0.0035158042335979188, "rolling_mean_q_value": -0.5473211510456167, "rolling_mean_abs_td_error": 0.13447152833687143} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 10752.0, "episode_return": -0.0033088135029801903, "total_episode_return": -41.85526294221199, "mean_waiting_vehicles": 1.210595279932022, "throughput": 1297.25, "mean_q_value": -0.8381541832350194, "epsilon": 0.8216533333333333, "num_episodes": 4.0, "mean_average_travel_time": 97.19833748126734, "mean_decision_steps": 128.0, "mean_episode_return": -0.0033088135029801903, "mean_epsilon": 0.824896, "mean_mean_incoming_vehicles": 3.574231833219528, "mean_mean_incoming_vehicles_commercial": 3.0293222069740295, "mean_mean_incoming_vehicles_industrial": 2.901911675930023, "mean_mean_incoming_vehicles_mixed": 5.929090857505798, "mean_mean_incoming_vehicles_residential": 3.416170746088028, "mean_mean_q_value": -0.21833041925856378, "mean_mean_reward": -0.002436013281112537, "mean_mean_reward_commercial": -0.008322663061941663, "mean_mean_reward_industrial": 0.003600862342864275, "mean_mean_reward_mixed": -0.0006129923858679831, "mean_mean_reward_residential": -0.0014130375056993216, "mean_mean_step_intersection_reward": -0.0033088135029801903, "mean_mean_waiting_vehicles": 1.210595279932022, "mean_mean_waiting_vehicles_commercial": 0.6441242396831512, "mean_mean_waiting_vehicles_industrial": 1.3118137568235397, "mean_mean_waiting_vehicles_mixed": 2.9694544225931168, "mean_mean_waiting_vehicles_residential": 0.9830356910824776, "mean_num_commercial_intersections": 43.0, "mean_num_controlled_intersections": 84.0, "mean_num_industrial_intersections": 11.5, "mean_num_mixed_intersections": 18.0, "mean_num_residential_intersections": 31.25, "mean_reward_component_mean_imbalance_term": -0.00017158373006409544, "mean_reward_component_mean_queue_level_term": -0.0017713869257232062, "mean_reward_component_mean_queue_term": -0.0006635159911845268, "mean_reward_component_mean_throughput_term": 0.0006103882127064253, "mean_reward_component_mean_wait_level_term": -0.0009127409329976466, "mean_reward_component_mean_wait_term": -0.0003999742763886745, "mean_reward_component_step_imbalance_term": -0.0002379191864747554, "mean_reward_component_step_queue_level_term": -0.0021232511790003628, "mean_reward_component_step_queue_term": -0.00021234738233033568, "mean_reward_component_step_throughput_term": 0.0006583694230357651, "mean_reward_component_step_wait_level_term": -0.0012799174583051354, "mean_reward_component_step_wait_term": 0.0007590522291138768, "mean_running_vehicles": 356.25, "mean_throughput": 1297.25, "mean_total_episode_return": -41.85526294221199, "mean_total_incoming_vehicles": 353.80001068115234, "mean_total_waiting_vehicles": 121.64999198913574, "mean_transitions": 10752.0, "update": 55, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.006857748579932377, "mean_abs_td_error": 0.20479681924916804, "mean_target_q": -0.8528600046411157, "beta": 0.48448, "gradient_steps": 128.0, "rolling_episode_return": -0.00527231768520146, "rolling_total_episode_return": -67.84477616210461, "rolling_mean_waiting_vehicles": 3.0988800175487996, "rolling_throughput": 1546.4625, "rolling_td_loss": 0.0037106151686884916, "rolling_mean_q_value": -0.5656350485049189, "rolling_mean_abs_td_error": 0.13871834290330298} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 15936.0, "episode_return": -0.004878447925984839, "total_episode_return": -84.04511117655784, "mean_waiting_vehicles": 2.4600130915641785, "throughput": 1820.0, "mean_q_value": -0.8696816577576101, "epsilon": 0.8184106666666666, "num_episodes": 4.0, "mean_average_travel_time": 128.64771359931927, "mean_decision_steps": 128.0, "mean_episode_return": -0.004878447925984839, "mean_epsilon": 0.8216533333333333, "mean_mean_incoming_vehicles": 5.427795231342316, "mean_mean_incoming_vehicles_commercial": 4.380406618118286, "mean_mean_incoming_vehicles_industrial": 7.221060276031494, "mean_mean_incoming_vehicles_mixed": 8.29732871055603, "mean_mean_incoming_vehicles_residential": 5.164193511009216, "mean_mean_q_value": -0.3777801153919427, "mean_mean_reward": -0.005371787119656801, "mean_mean_reward_commercial": -0.0033584579068701714, "mean_mean_reward_industrial": -0.011623892933130264, "mean_mean_reward_mixed": -0.019035580878456432, "mean_mean_reward_residential": -0.0009576395968906581, "mean_mean_step_intersection_reward": -0.004878447925984839, "mean_mean_waiting_vehicles": 2.4600130915641785, "mean_mean_waiting_vehicles_commercial": 1.723655566573143, "mean_mean_waiting_vehicles_industrial": 3.9102580547332764, "mean_mean_waiting_vehicles_mixed": 4.629006206989288, "mean_mean_waiting_vehicles_residential": 2.0485018491744995, "mean_num_commercial_intersections": 21.5, "mean_num_controlled_intersections": 124.5, "mean_num_industrial_intersections": 43.5, "mean_num_mixed_intersections": 32.0, "mean_num_residential_intersections": 57.25, "mean_reward_component_mean_imbalance_term": -0.00023852342957630945, "mean_reward_component_mean_queue_level_term": -0.002222044960205949, "mean_reward_component_mean_queue_term": -0.0008858253120376247, "mean_reward_component_mean_throughput_term": 0.0005995265904523706, "mean_reward_component_mean_wait_level_term": -0.0014036049722341293, "mean_reward_component_mean_wait_term": -0.0007279760532933703, "mean_reward_component_step_imbalance_term": -0.00037750844421680085, "mean_reward_component_step_queue_level_term": -0.0028346409962978214, "mean_reward_component_step_queue_term": -0.0006386346067301929, "mean_reward_component_step_throughput_term": 0.0006415247335098684, "mean_reward_component_step_wait_level_term": -0.002329523063963279, "mean_reward_component_step_wait_term": 0.00016699497064109892, "mean_running_vehicles": 763.5, "mean_throughput": 1820.0, "mean_total_episode_return": -84.04511117655784, "mean_total_incoming_vehicles": 741.5000076293945, "mean_total_waiting_vehicles": 360.1500015258789, "mean_transitions": 15936.0, "update": 56, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.006534578547871206, "mean_abs_td_error": 0.1953841199283488, "mean_target_q": -0.883017142303288, "beta": 0.486016, "gradient_steps": 128.0, "rolling_episode_return": -0.005021327076958191, "rolling_total_episode_return": -66.18998292574652, "rolling_mean_waiting_vehicles": 2.884991279989481, "rolling_throughput": 1526.1875, "rolling_td_loss": 0.00388227604032636, "rolling_mean_q_value": -0.5832504094811156, "rolling_mean_abs_td_error": 0.14203425215091556} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 13408.0, "episode_return": -0.0031985958823267623, "total_episode_return": -48.1798718017526, "mean_waiting_vehicles": 1.8176788985729218, "throughput": 1363.5, "mean_q_value": -0.8379735313355923, "epsilon": 0.815168, "num_episodes": 4.0, "mean_average_travel_time": 108.980752293893, "mean_decision_steps": 128.0, "mean_episode_return": -0.0031985958823267623, "mean_epsilon": 0.8184106666666666, "mean_mean_incoming_vehicles": 3.588601440191269, "mean_mean_incoming_vehicles_commercial": 4.777012884616852, "mean_mean_incoming_vehicles_industrial": 3.9023962914943695, "mean_mean_incoming_vehicles_mixed": 4.585591554641724, "mean_mean_incoming_vehicles_residential": 3.380339354276657, "mean_mean_q_value": -0.32023822417249903, "mean_mean_reward": -0.0036866320297122, "mean_mean_reward_commercial": -0.00940690225979779, "mean_mean_reward_industrial": 0.00035355504223844036, "mean_mean_reward_mixed": -0.004868725819202761, "mean_mean_reward_residential": -0.0022517943289130926, "mean_mean_step_intersection_reward": -0.0031985958823267623, "mean_mean_waiting_vehicles": 1.8176788985729218, "mean_mean_waiting_vehicles_commercial": 2.583595037460327, "mean_mean_waiting_vehicles_industrial": 1.886966958642006, "mean_mean_waiting_vehicles_mixed": 2.462078809738159, "mean_mean_waiting_vehicles_residential": 1.8483239859342575, "mean_num_commercial_intersections": 22.25, "mean_num_controlled_intersections": 104.75, "mean_num_industrial_intersections": 19.25, "mean_num_mixed_intersections": 29.0, "mean_num_residential_intersections": 41.5, "mean_reward_component_mean_imbalance_term": -0.00019071838790618578, "mean_reward_component_mean_queue_level_term": -0.0014031916465029326, "mean_reward_component_mean_queue_term": -0.0005699769532752086, "mean_reward_component_mean_throughput_term": 0.0004798031076340692, "mean_reward_component_mean_wait_level_term": -0.0009757914376793408, "mean_reward_component_mean_wait_term": -0.0005387208031750745, "mean_reward_component_step_imbalance_term": -0.0003361466333444696, "mean_reward_component_step_queue_level_term": -0.0018239263445138931, "mean_reward_component_step_queue_term": 0.0010591872487566434, "mean_reward_component_step_throughput_term": 0.0005642549658659846, "mean_reward_component_step_wait_level_term": -0.001723906461847946, "mean_reward_component_step_wait_term": -0.0014260955904319417, "mean_running_vehicles": 447.0, "mean_throughput": 1363.5, "mean_total_episode_return": -48.1798718017526, "mean_total_incoming_vehicles": 428.4500045776367, "mean_total_waiting_vehicles": 217.9999942779541, "mean_transitions": 13408.0, "update": 57, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.006067070650715323, "mean_abs_td_error": 0.182628977810964, "mean_target_q": -0.8494774252176285, "beta": 0.487552, "gradient_steps": 128.0, "rolling_episode_return": -0.004843816334931974, "rolling_total_episode_return": -65.38022475104772, "rolling_mean_waiting_vehicles": 2.7399356313049794, "rolling_throughput": 1514.425, "rolling_td_loss": 0.0040427660920840935, "rolling_mean_q_value": -0.5999572686618194, "rolling_mean_abs_td_error": 0.14500351341557688} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 15488.0, "episode_return": -0.010595068922079919, "total_episode_return": -145.62639397569, "mean_waiting_vehicles": 7.051007181406021, "throughput": 2615.75, "mean_q_value": -0.9412085581570864, "epsilon": 0.8119253333333334, "num_episodes": 4.0, "mean_average_travel_time": 115.12158606484589, "mean_decision_steps": 128.0, "mean_episode_return": -0.010595068922079919, "mean_epsilon": 0.815168, "mean_mean_incoming_vehicles": 12.858661770820618, "mean_mean_incoming_vehicles_commercial": 12.450300455093384, "mean_mean_incoming_vehicles_industrial": 8.2396040558815, "mean_mean_incoming_vehicles_mixed": 13.090340673923492, "mean_mean_incoming_vehicles_residential": 17.19521337747574, "mean_mean_q_value": -0.8544442157872254, "mean_mean_reward": -0.0245931722856767, "mean_mean_reward_commercial": -0.0264896503649652, "mean_mean_reward_industrial": -0.010456513206008822, "mean_mean_reward_mixed": 0.0005014639464206994, "mean_mean_reward_residential": -0.04629756638314575, "mean_mean_step_intersection_reward": -0.010595068922079919, "mean_mean_waiting_vehicles": 7.051007181406021, "mean_mean_waiting_vehicles_commercial": 6.673796251416206, "mean_mean_waiting_vehicles_industrial": 3.390429198741913, "mean_mean_waiting_vehicles_mixed": 6.448011327534914, "mean_mean_waiting_vehicles_residential": 11.263021647930145, "mean_num_commercial_intersections": 30.75, "mean_num_controlled_intersections": 121.0, "mean_num_industrial_intersections": 32.75, "mean_num_mixed_intersections": 18.75, "mean_num_residential_intersections": 38.75, "mean_reward_component_mean_imbalance_term": -0.000445069113132468, "mean_reward_component_mean_queue_level_term": -0.003659737726955825, "mean_reward_component_mean_queue_term": -0.00226292065017919, "mean_reward_component_mean_throughput_term": 0.0009524027562299864, "mean_reward_component_mean_wait_level_term": -0.002809294899124959, "mean_reward_component_mean_wait_term": -0.0023704495392774527, "mean_reward_component_step_imbalance_term": -0.0010439304605824873, "mean_reward_component_step_queue_level_term": -0.007241346349474043, "mean_reward_component_step_queue_term": -0.0033609569654799998, "mean_reward_component_step_throughput_term": 0.001550058921566233, "mean_reward_component_step_wait_level_term": -0.007585839033708908, "mean_reward_component_step_wait_term": -0.006911159085575491, "mean_running_vehicles": 1480.0, "mean_throughput": 2615.75, "mean_total_episode_return": -145.62639397569, "mean_total_incoming_vehicles": 1459.9000396728516, "mean_total_waiting_vehicles": 739.8999576568604, "mean_transitions": 15488.0, "update": 58, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.00727048481348902, "mean_abs_td_error": 0.21553641138598323, "mean_target_q": -0.9636476524174213, "beta": 0.489088, "gradient_steps": 128.0, "rolling_episode_return": -0.005180758586866033, "rolling_total_episode_return": -69.20336468830465, "rolling_mean_waiting_vehicles": 2.985385545343161, "rolling_throughput": 1564.5125, "rolling_td_loss": 0.004270529429277303, "rolling_mean_q_value": -0.6227486032410525, "rolling_mean_abs_td_error": 0.1499109806638444} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12704.0, "episode_return": -0.0052050888339031515, "total_episode_return": -54.28695258963853, "mean_waiting_vehicles": 3.8961558043956757, "throughput": 1356.25, "mean_q_value": -0.9274480603635311, "epsilon": 0.8086826666666667, "num_episodes": 4.0, "mean_average_travel_time": 102.05910794104543, "mean_decision_steps": 128.0, "mean_episode_return": -0.0052050888339031515, "mean_epsilon": 0.8119253333333334, "mean_mean_incoming_vehicles": 7.503728240728378, "mean_mean_incoming_vehicles_commercial": 5.856011092662811, "mean_mean_incoming_vehicles_industrial": 7.702383279800415, "mean_mean_incoming_vehicles_mixed": 3.7065600156784058, "mean_mean_incoming_vehicles_residential": 11.370359629392624, "mean_mean_q_value": -0.37983827549032867, "mean_mean_reward": -0.017400941054802388, "mean_mean_reward_commercial": -0.010842341929674149, "mean_mean_reward_industrial": -0.01035370669948558, "mean_mean_reward_mixed": -0.0025862406473606825, "mean_mean_reward_residential": -0.0323334265340236, "mean_mean_step_intersection_reward": -0.0052050888339031515, "mean_mean_waiting_vehicles": 3.8961558043956757, "mean_mean_waiting_vehicles_commercial": 2.5140540450811386, "mean_mean_waiting_vehicles_industrial": 3.3511009514331818, "mean_mean_waiting_vehicles_mixed": 1.5606383569538593, "mean_mean_waiting_vehicles_residential": 6.983037851750851, "mean_num_commercial_intersections": 27.5, "mean_num_controlled_intersections": 99.25, "mean_num_industrial_intersections": 19.0, "mean_num_mixed_intersections": 29.5, "mean_num_residential_intersections": 42.75, "mean_reward_component_mean_imbalance_term": -0.00023789880266567032, "mean_reward_component_mean_queue_level_term": -0.001806336659248231, "mean_reward_component_mean_queue_term": -0.0012576565981755605, "mean_reward_component_mean_throughput_term": 0.0006133584643919221, "mean_reward_component_mean_wait_level_term": -0.0012989610713529665, "mean_reward_component_mean_wait_term": -0.001217594420690915, "mean_reward_component_step_imbalance_term": -0.0005555900115723489, "mean_reward_component_step_queue_level_term": -0.0040245011477964, "mean_reward_component_step_queue_term": -0.003000237797095906, "mean_reward_component_step_throughput_term": 0.0009943578425009036, "mean_reward_component_step_wait_level_term": -0.0038963018596405163, "mean_reward_component_step_wait_term": -0.0069186673645162955, "mean_running_vehicles": 599.75, "mean_throughput": 1356.25, "mean_total_episode_return": -54.28695258963853, "mean_total_incoming_vehicles": 584.1499862670898, "mean_total_waiting_vehicles": 295.1499996185303, "mean_transitions": 12704.0, "update": 59, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.007794339739120915, "mean_abs_td_error": 0.21897771034855396, "mean_target_q": -0.9530650121159852, "beta": 0.490624, "gradient_steps": 128.0, "rolling_episode_return": -0.005124195840728747, "rolling_total_episode_return": -68.58206818424624, "rolling_mean_waiting_vehicles": 2.958910109847784, "rolling_throughput": 1560.8, "rolling_td_loss": 0.004508071310146989, "rolling_mean_q_value": -0.6413138654897921, "rolling_mean_abs_td_error": 0.15445765059848782} +{"city_id": "3_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 10976.0, "episode_return": -0.005634762627173362, "total_episode_return": -66.47089060407598, "mean_waiting_vehicles": 3.8457276225090027, "throughput": 1531.5, "mean_q_value": -0.9941293522715569, "epsilon": 0.8054399999999999, "num_episodes": 4.0, "mean_average_travel_time": 114.05823876811395, "mean_decision_steps": 128.0, "mean_episode_return": -0.005634762627173362, "mean_epsilon": 0.8086826666666667, "mean_mean_incoming_vehicles": 6.5251559019088745, "mean_mean_incoming_vehicles_commercial": 7.126616358757019, "mean_mean_incoming_vehicles_industrial": 4.530504544576009, "mean_mean_incoming_vehicles_mixed": 3.616071365773678, "mean_mean_incoming_vehicles_residential": 7.762751340866089, "mean_mean_q_value": -0.6409209095872939, "mean_mean_reward": -0.002199182694312185, "mean_mean_reward_commercial": -0.01279547531157732, "mean_mean_reward_industrial": 0.006161755203114201, "mean_mean_reward_mixed": -0.004739457624964416, "mean_mean_reward_residential": -0.0017290757677983493, "mean_mean_step_intersection_reward": -0.005634762627173362, "mean_mean_waiting_vehicles": 3.8457276225090027, "mean_mean_waiting_vehicles_commercial": 4.074461281299591, "mean_mean_waiting_vehicles_industrial": 2.5353535612424216, "mean_mean_waiting_vehicles_mixed": 1.7314285039901733, "mean_mean_waiting_vehicles_residential": 4.87884795665741, "mean_num_commercial_intersections": 19.25, "mean_num_controlled_intersections": 85.75, "mean_num_industrial_intersections": 25.333333333333332, "mean_num_mixed_intersections": 21.5, "mean_num_residential_intersections": 36.75, "mean_reward_component_mean_imbalance_term": -0.00031339565068488895, "mean_reward_component_mean_queue_level_term": -0.002100709649583976, "mean_reward_component_mean_queue_term": -0.0009639794393190848, "mean_reward_component_mean_throughput_term": 0.0006593273818467082, "mean_reward_component_mean_wait_level_term": -0.0018313326299170818, "mean_reward_component_mean_wait_term": -0.0010846725706388227, "mean_reward_component_step_imbalance_term": -0.0005843057369929738, "mean_reward_component_step_queue_level_term": -0.0030847340676700696, "mean_reward_component_step_queue_term": 0.0005219069771555951, "mean_reward_component_step_throughput_term": 0.0006657562335021794, "mean_reward_component_step_wait_level_term": -0.003470952302450314, "mean_reward_component_step_wait_term": 0.0037531470006797463, "mean_running_vehicles": 613.0, "mean_throughput": 1531.5, "mean_total_episode_return": -66.47089060407598, "mean_total_incoming_vehicles": 605.600004196167, "mean_total_waiting_vehicles": 351.95002365112305, "mean_transitions": 10976.0, "update": 60, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.007183148052718025, "mean_abs_td_error": 0.21508198941592127, "mean_target_q": -1.015665511135012, "beta": 0.49216000000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.005203255514615348, "rolling_total_episode_return": -70.15482692014885, "rolling_mean_waiting_vehicles": 3.043128569982946, "rolling_throughput": 1576.5375, "rolling_td_loss": 0.00471964773032596, "rolling_mean_q_value": -0.6658549934159964, "rolling_mean_abs_td_error": 0.1591160229232628} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 18784.0, "episode_return": -0.007804761605603717, "total_episode_return": -148.63010129705071, "mean_waiting_vehicles": 5.857796400785446, "throughput": 2134.75, "mean_q_value": -0.9800933874212205, "epsilon": 0.8021973333333333, "num_episodes": 4.0, "mean_average_travel_time": 127.0573990727347, "mean_decision_steps": 128.0, "mean_episode_return": -0.007804761605603717, "mean_epsilon": 0.8054399999999999, "mean_mean_incoming_vehicles": 9.824639558792114, "mean_mean_incoming_vehicles_commercial": 9.055014908313751, "mean_mean_incoming_vehicles_industrial": 7.931103050708771, "mean_mean_incoming_vehicles_mixed": 5.50500001013279, "mean_mean_incoming_vehicles_residential": 12.217156827449799, "mean_mean_q_value": -0.6121347885637078, "mean_mean_reward": -0.02102459699381143, "mean_mean_reward_commercial": -0.020294587360695004, "mean_mean_reward_industrial": 0.0003031357773579657, "mean_mean_reward_mixed": -0.007151918776798993, "mean_mean_reward_residential": -0.03496289858594537, "mean_mean_step_intersection_reward": -0.007804761605603717, "mean_mean_waiting_vehicles": 5.857796400785446, "mean_mean_waiting_vehicles_commercial": 4.273417234420776, "mean_mean_waiting_vehicles_industrial": 3.993613451719284, "mean_mean_waiting_vehicles_mixed": 2.0548958275467157, "mean_mean_waiting_vehicles_residential": 8.438318639993668, "mean_num_commercial_intersections": 36.75, "mean_num_controlled_intersections": 146.75, "mean_num_industrial_intersections": 33.0, "mean_num_mixed_intersections": 16.0, "mean_num_residential_intersections": 61.0, "mean_reward_component_mean_imbalance_term": -0.0003307585861437312, "mean_reward_component_mean_queue_level_term": -0.002440878361380072, "mean_reward_component_mean_queue_term": -0.0016709402027998976, "mean_reward_component_mean_throughput_term": 0.0005900063589372451, "mean_reward_component_mean_wait_level_term": -0.0020278637290116475, "mean_reward_component_mean_wait_term": -0.001924327293547634, "mean_reward_component_step_imbalance_term": -0.0008473432317259721, "mean_reward_component_step_queue_level_term": -0.005347008467651904, "mean_reward_component_step_queue_term": -0.004058393715240527, "mean_reward_component_step_throughput_term": 0.0010712383445934393, "mean_reward_component_step_wait_level_term": -0.0061548140947707, "mean_reward_component_step_wait_term": -0.005688273304258473, "mean_running_vehicles": 1536.5, "mean_throughput": 2134.75, "mean_total_episode_return": -148.63010129705071, "mean_total_incoming_vehicles": 1479.5999908447266, "mean_total_waiting_vehicles": 862.9000244140625, "mean_transitions": 18784.0, "update": 61, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.007579363951663254, "mean_abs_td_error": 0.21342635969631374, "mean_target_q": -1.0032303701154888, "beta": 0.493696, "gradient_steps": 128.0, "rolling_episode_return": -0.005339297557233132, "rolling_total_episode_return": -75.12009682644384, "rolling_mean_waiting_vehicles": 3.154817329160869, "rolling_throughput": 1630.6375, "rolling_td_loss": 0.004953885193481255, "rolling_mean_q_value": -0.6896473693428561, "rolling_mean_abs_td_error": 0.16389942036475985} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11424.0, "episode_return": -0.004678536385506996, "total_episode_return": -54.6313089041505, "mean_waiting_vehicles": 2.1223581433296204, "throughput": 1599.5, "mean_q_value": -1.033998794388026, "epsilon": 0.7989546666666667, "num_episodes": 4.0, "mean_average_travel_time": 110.65106668031711, "mean_decision_steps": 128.0, "mean_episode_return": -0.004678536385506996, "mean_epsilon": 0.8021973333333333, "mean_mean_incoming_vehicles": 5.134909808635712, "mean_mean_incoming_vehicles_commercial": 6.194904923439026, "mean_mean_incoming_vehicles_industrial": 3.43666664759318, "mean_mean_incoming_vehicles_mixed": 6.461246430873871, "mean_mean_incoming_vehicles_residential": 5.1963218450546265, "mean_mean_q_value": -0.41961163305677474, "mean_mean_reward": -0.005223932705121115, "mean_mean_reward_commercial": 0.0006592724821530282, "mean_mean_reward_industrial": -0.0022671236656606197, "mean_mean_reward_mixed": -0.012482519494369626, "mean_mean_reward_residential": 0.0007235883094836026, "mean_mean_step_intersection_reward": -0.004678536385506996, "mean_mean_waiting_vehicles": 2.1223581433296204, "mean_mean_waiting_vehicles_commercial": 2.52287894487381, "mean_mean_waiting_vehicles_industrial": 1.3842857281366985, "mean_mean_waiting_vehicles_mixed": 2.52149361371994, "mean_mean_waiting_vehicles_residential": 2.452740967273712, "mean_num_commercial_intersections": 22.0, "mean_num_controlled_intersections": 89.25, "mean_num_industrial_intersections": 26.666666666666668, "mean_num_mixed_intersections": 16.0, "mean_num_residential_intersections": 31.25, "mean_reward_component_mean_imbalance_term": -0.0002537525392041218, "mean_reward_component_mean_queue_level_term": -0.0022156043360439526, "mean_reward_component_mean_queue_term": -0.000898379561403928, "mean_reward_component_mean_throughput_term": 0.0007194767599898455, "mean_reward_component_mean_wait_level_term": -0.0013381312660474265, "mean_reward_component_mean_wait_term": -0.0006921453578110359, "mean_reward_component_step_imbalance_term": -0.00041832410352071747, "mean_reward_component_step_queue_level_term": -0.0028748145850840956, "mean_reward_component_step_queue_term": -0.000971997797023505, "mean_reward_component_step_throughput_term": 0.0009123361523961648, "mean_reward_component_step_wait_level_term": -0.002214864915004, "mean_reward_component_step_wait_term": 0.0003437333507463336, "mean_running_vehicles": 509.25, "mean_throughput": 1599.5, "mean_total_episode_return": -54.6313089041505, "mean_total_incoming_vehicles": 465.7999954223633, "mean_total_waiting_vehicles": 190.70000457763672, "mean_transitions": 11424.0, "update": 62, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.008844497337122448, "mean_abs_td_error": 0.2397493215976283, "mean_target_q": -1.0607110154815018, "beta": 0.495232, "gradient_steps": 128.0, "rolling_episode_return": -0.005365544056822465, "rolling_total_episode_return": -75.28804918608621, "rolling_mean_waiting_vehicles": 3.154481732659042, "rolling_throughput": 1640.575, "rolling_td_loss": 0.005247398356459598, "rolling_mean_q_value": -0.7156586807337589, "rolling_mean_abs_td_error": 0.16961588877311443} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 16608.0, "episode_return": -0.0025962885534783257, "total_episode_return": -43.24089436605573, "mean_waiting_vehicles": 0.8011775761842728, "throughput": 1356.25, "mean_q_value": -0.8393822279758751, "epsilon": 0.795712, "num_episodes": 4.0, "mean_average_travel_time": 117.10318752484996, "mean_decision_steps": 128.0, "mean_episode_return": -0.0025962885534783257, "mean_epsilon": 0.7989546666666667, "mean_mean_incoming_vehicles": 2.84360933303833, "mean_mean_incoming_vehicles_commercial": 2.847026437520981, "mean_mean_incoming_vehicles_industrial": 4.6735518872737885, "mean_mean_incoming_vehicles_mixed": 2.246052622795105, "mean_mean_incoming_vehicles_residential": 3.0962566137313843, "mean_mean_q_value": -0.19182545434159692, "mean_mean_reward": -0.0045401257229968905, "mean_mean_reward_commercial": -0.003985042731073918, "mean_mean_reward_industrial": 0.0016332290833815932, "mean_mean_reward_mixed": 0.009743694041389972, "mean_mean_reward_residential": -0.007281855097971857, "mean_mean_step_intersection_reward": -0.0025962885534783257, "mean_mean_waiting_vehicles": 0.8011775761842728, "mean_mean_waiting_vehicles_commercial": 0.7253635823726654, "mean_mean_waiting_vehicles_industrial": 1.9877591654658318, "mean_mean_waiting_vehicles_mixed": 0.24934212118387222, "mean_mean_waiting_vehicles_residential": 0.8925314769148827, "mean_num_commercial_intersections": 51.25, "mean_num_controlled_intersections": 129.75, "mean_num_industrial_intersections": 19.0, "mean_num_mixed_intersections": 23.0, "mean_num_residential_intersections": 48.0, "mean_reward_component_mean_imbalance_term": -0.00012417456825375428, "mean_reward_component_mean_queue_level_term": -0.0014278104514033885, "mean_reward_component_mean_queue_term": -0.0005398940477588812, "mean_reward_component_mean_throughput_term": 0.0004097934961748706, "mean_reward_component_mean_wait_level_term": -0.000636786874899542, "mean_reward_component_mean_wait_term": -0.00027741641209720163, "mean_reward_component_step_imbalance_term": -0.0001717311479296768, "mean_reward_component_step_queue_level_term": -0.0017276608268730342, "mean_reward_component_step_queue_term": -5.994752427795902e-05, "mean_reward_component_step_throughput_term": 0.0005198372746235691, "mean_reward_component_step_wait_level_term": -0.0008877323125489056, "mean_reward_component_step_wait_term": -0.0022128919226815924, "mean_running_vehicles": 399.25, "mean_throughput": 1356.25, "mean_total_episode_return": -43.24089436605573, "mean_total_incoming_vehicles": 369.69998931884766, "mean_total_waiting_vehicles": 103.50000190734863, "mean_transitions": 16608.0, "update": 63, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.00744277239391522, "mean_abs_td_error": 0.20161177887348458, "mean_target_q": -0.8639592691324651, "beta": 0.49676800000000004, "gradient_steps": 128.0, "rolling_episode_return": -0.005347051362229665, "rolling_total_episode_return": -75.27244674837603, "rolling_mean_waiting_vehicles": 3.1424734314903615, "rolling_throughput": 1633.45, "rolling_td_loss": 0.0054793694862837585, "rolling_mean_q_value": -0.7334400605526753, "rolling_mean_abs_td_error": 0.17383258833433501} +{"city_id": "3_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11008.0, "episode_return": -0.009076076546491531, "total_episode_return": -85.20622496446595, "mean_waiting_vehicles": 7.172311902046204, "throughput": 1921.0, "mean_q_value": -1.1156502617523074, "epsilon": 0.7924693333333334, "num_episodes": 4.0, "mean_average_travel_time": 104.34734576123304, "mean_decision_steps": 128.0, "mean_episode_return": -0.009076076546491531, "mean_epsilon": 0.795712, "mean_mean_incoming_vehicles": 12.064483046531677, "mean_mean_incoming_vehicles_commercial": 9.204107761383057, "mean_mean_incoming_vehicles_industrial": 11.415350317955017, "mean_mean_incoming_vehicles_mixed": 6.676219463348389, "mean_mean_incoming_vehicles_residential": 18.393643736839294, "mean_mean_q_value": -1.8018109863332938, "mean_mean_reward": -0.025348026189021766, "mean_mean_reward_commercial": -0.009643145487643778, "mean_mean_reward_industrial": -0.02582533733220771, "mean_mean_reward_mixed": -0.016926743555814028, "mean_mean_reward_residential": -0.061847948978538625, "mean_mean_step_intersection_reward": -0.009076076546491531, "mean_mean_waiting_vehicles": 7.172311902046204, "mean_mean_waiting_vehicles_commercial": 5.287499904632568, "mean_mean_waiting_vehicles_industrial": 6.365175783634186, "mean_mean_waiting_vehicles_mixed": 3.9268293380737305, "mean_mean_waiting_vehicles_residential": 11.857299387454987, "mean_num_commercial_intersections": 28.5, "mean_num_controlled_intersections": 86.0, "mean_num_industrial_intersections": 24.25, "mean_num_mixed_intersections": 24.5, "mean_num_residential_intersections": 21.0, "mean_reward_component_mean_imbalance_term": -0.0004741231167941784, "mean_reward_component_mean_queue_level_term": -0.002947405288018956, "mean_reward_component_mean_queue_term": -0.0018814844812311549, "mean_reward_component_mean_throughput_term": 0.0010071478155246893, "mean_reward_component_mean_wait_level_term": -0.0026524333191793037, "mean_reward_component_mean_wait_term": -0.002127778330162755, "mean_reward_component_step_imbalance_term": -0.0010552236926741898, "mean_reward_component_step_queue_level_term": -0.0060207503265701234, "mean_reward_component_step_queue_term": -0.0054937479144427925, "mean_reward_component_step_throughput_term": 0.001327335776295513, "mean_reward_component_step_wait_level_term": -0.006808890262618661, "mean_reward_component_step_wait_term": -0.007296750205568969, "mean_running_vehicles": 889.25, "mean_throughput": 1921.0, "mean_total_episode_return": -85.20622496446595, "mean_total_incoming_vehicles": 874.3499908447266, "mean_total_waiting_vehicles": 500.450008392334, "mean_transitions": 11008.0, "update": 64, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.009105562410695711, "mean_abs_td_error": 0.2521785250864923, "mean_target_q": -1.147290026769042, "beta": 0.498304, "gradient_steps": 128.0, "rolling_episode_return": -0.005621391531047741, "rolling_total_episode_return": -77.28962292591495, "rolling_mean_waiting_vehicles": 3.3980085929855703, "rolling_throughput": 1665.4125, "rolling_td_loss": 0.005775998159560913, "rolling_mean_q_value": -0.7630699952016584, "rolling_mean_abs_td_error": 0.18022022914665287} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 8672.0, "episode_return": -0.0047289287256350315, "total_episode_return": -44.85925577767193, "mean_waiting_vehicles": 2.9068118929862976, "throughput": 1268.25, "mean_q_value": -1.1154867885634303, "epsilon": 0.7892266666666667, "num_episodes": 4.0, "mean_average_travel_time": 98.65568144400658, "mean_decision_steps": 128.0, "mean_episode_return": -0.0047289287256350315, "mean_epsilon": 0.7924693333333334, "mean_mean_incoming_vehicles": 5.511643767356873, "mean_mean_incoming_vehicles_commercial": 5.873904347419739, "mean_mean_incoming_vehicles_industrial": 6.132173538208008, "mean_mean_incoming_vehicles_mixed": 11.675000190734863, "mean_mean_incoming_vehicles_residential": 4.567497909069061, "mean_mean_q_value": -0.5089994131994899, "mean_mean_reward": -0.007057084410917014, "mean_mean_reward_commercial": -0.0022336863330565393, "mean_mean_reward_industrial": -0.01944299282816549, "mean_mean_reward_mixed": -0.00806544627994299, "mean_mean_reward_residential": -0.009900483884848654, "mean_mean_step_intersection_reward": -0.0047289287256350315, "mean_mean_waiting_vehicles": 2.9068118929862976, "mean_mean_waiting_vehicles_commercial": 3.0364867746829987, "mean_mean_waiting_vehicles_industrial": 3.632141868273417, "mean_mean_waiting_vehicles_mixed": 7.425000190734863, "mean_mean_waiting_vehicles_residential": 2.2405753433704376, "mean_num_commercial_intersections": 23.75, "mean_num_controlled_intersections": 67.75, "mean_num_industrial_intersections": 12.333333333333334, "mean_num_mixed_intersections": 8.0, "mean_num_residential_intersections": 32.75, "mean_reward_component_mean_imbalance_term": -0.00026712197143363703, "mean_reward_component_mean_queue_level_term": -0.0020262552275234214, "mean_reward_component_mean_queue_term": -0.0008993348068120355, "mean_reward_component_mean_throughput_term": 0.0007424802883946313, "mean_reward_component_mean_wait_level_term": -0.001419283221367973, "mean_reward_component_mean_wait_term": -0.000859413883368158, "mean_reward_component_step_imbalance_term": -0.0005079280308564194, "mean_reward_component_step_queue_level_term": -0.002877871535019949, "mean_reward_component_step_queue_term": -0.00048307319957530126, "mean_reward_component_step_throughput_term": 0.0008681584149599075, "mean_reward_component_step_wait_level_term": -0.0027501242293510586, "mean_reward_component_step_wait_term": -0.0013062461221124977, "mean_running_vehicles": 396.75, "mean_throughput": 1268.25, "mean_total_episode_return": -44.85925577767193, "mean_total_incoming_vehicles": 393.3000030517578, "mean_total_waiting_vehicles": 156.5, "mean_transitions": 8672.0, "update": 65, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.009930018008162733, "mean_abs_td_error": 0.26104883395601064, "mean_target_q": -1.1499619195237756, "beta": 0.49984, "gradient_steps": 128.0, "rolling_episode_return": -0.0056240354606477295, "rolling_total_episode_return": -77.3050031243798, "rolling_mean_waiting_vehicles": 3.42200866099447, "rolling_throughput": 1661.1875, "rolling_td_loss": 0.006098919565329197, "rolling_mean_q_value": -0.7915064221364446, "rolling_mean_abs_td_error": 0.18649665681878105} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 14112.0, "episode_return": -0.00992426668122545, "total_episode_return": -150.68942045676522, "mean_waiting_vehicles": 8.093340054154396, "throughput": 2142.25, "mean_q_value": -1.3196975169703364, "epsilon": 0.785984, "num_episodes": 4.0, "mean_average_travel_time": 103.56117826041839, "mean_decision_steps": 128.0, "mean_episode_return": -0.00992426668122545, "mean_epsilon": 0.7892266666666667, "mean_mean_incoming_vehicles": 13.615207552909851, "mean_mean_incoming_vehicles_commercial": 10.618322551250458, "mean_mean_incoming_vehicles_industrial": 10.962051153182983, "mean_mean_incoming_vehicles_mixed": 9.855530560016632, "mean_mean_incoming_vehicles_residential": 21.25415627161662, "mean_mean_q_value": -0.8687566415319452, "mean_mean_reward": -0.022680156835122034, "mean_mean_reward_commercial": -0.004353796168288682, "mean_mean_reward_industrial": -0.04939767438918352, "mean_mean_reward_mixed": -0.0337937597068958, "mean_mean_reward_residential": -0.03889225128417214, "mean_mean_step_intersection_reward": -0.00992426668122545, "mean_mean_waiting_vehicles": 8.093340054154396, "mean_mean_waiting_vehicles_commercial": 4.953661412000656, "mean_mean_waiting_vehicles_industrial": 5.817435905337334, "mean_mean_waiting_vehicles_mixed": 5.216131426393986, "mean_mean_waiting_vehicles_residential": 14.643821577231089, "mean_num_commercial_intersections": 29.75, "mean_num_controlled_intersections": 110.25, "mean_num_industrial_intersections": 19.0, "mean_num_mixed_intersections": 23.0, "mean_num_residential_intersections": 51.333333333333336, "mean_reward_component_mean_imbalance_term": -0.0003854460255551806, "mean_reward_component_mean_queue_level_term": -0.0030100116828819523, "mean_reward_component_mean_queue_term": -0.0022368820487557173, "mean_reward_component_mean_throughput_term": 0.0008049439112483014, "mean_reward_component_mean_wait_level_term": -0.0025528458549564093, "mean_reward_component_mean_wait_term": -0.0025440253692763713, "mean_reward_component_step_imbalance_term": -0.000987601379165426, "mean_reward_component_step_queue_level_term": -0.00715802246122621, "mean_reward_component_step_queue_term": -0.0038522343111253576, "mean_reward_component_step_throughput_term": 0.0013607128857984208, "mean_reward_component_step_wait_level_term": -0.008137974204146303, "mean_reward_component_step_wait_term": -0.0039050368941389024, "mean_running_vehicles": 1665.75, "mean_throughput": 2142.25, "mean_total_episode_return": -150.68942045676522, "mean_total_incoming_vehicles": 1624.2000617980957, "mean_total_waiting_vehicles": 976.3999500274658, "mean_transitions": 14112.0, "update": 66, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.011594723186135525, "mean_abs_td_error": 0.29063247330486774, "mean_target_q": -1.3618914391845465, "beta": 0.501376, "gradient_steps": 128.0, "rolling_episode_return": -0.006027125452923256, "rolling_total_episode_return": -83.7218535069118, "rolling_mean_waiting_vehicles": 3.797659836150706, "rolling_throughput": 1725.575, "rolling_td_loss": 0.006559206123506555, "rolling_mean_q_value": -0.8354564447654411, "rolling_mean_abs_td_error": 0.19566726715129334} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 13760.0, "episode_return": -0.0052366049007831405, "total_episode_return": -65.24202787969261, "mean_waiting_vehicles": 3.4884081035852432, "throughput": 1604.0, "mean_q_value": -1.271428017411381, "epsilon": 0.7827413333333333, "num_episodes": 4.0, "mean_average_travel_time": 116.80894947775289, "mean_decision_steps": 128.0, "mean_episode_return": -0.0052366049007831405, "mean_epsilon": 0.785984, "mean_mean_incoming_vehicles": 6.035797595977783, "mean_mean_incoming_vehicles_commercial": 6.8123544454574585, "mean_mean_incoming_vehicles_industrial": 4.304502964019775, "mean_mean_incoming_vehicles_mixed": 4.386636137962341, "mean_mean_incoming_vehicles_residential": 6.378201216459274, "mean_mean_q_value": -0.6189043634221889, "mean_mean_reward": -0.006795230932766572, "mean_mean_reward_commercial": -0.006990155030507594, "mean_mean_reward_industrial": -0.003945915397101392, "mean_mean_reward_mixed": -0.003961075330153108, "mean_mean_reward_residential": -0.006600450724363327, "mean_mean_step_intersection_reward": -0.0052366049007831405, "mean_mean_waiting_vehicles": 3.4884081035852432, "mean_mean_waiting_vehicles_commercial": 4.137777656316757, "mean_mean_waiting_vehicles_industrial": 2.201812982559204, "mean_mean_waiting_vehicles_mixed": 2.3799903243780136, "mean_mean_waiting_vehicles_residential": 3.695147305727005, "mean_num_commercial_intersections": 22.0, "mean_num_controlled_intersections": 107.5, "mean_num_industrial_intersections": 28.0, "mean_num_mixed_intersections": 30.0, "mean_num_residential_intersections": 34.5, "mean_reward_component_mean_imbalance_term": -0.0002857231769723967, "mean_reward_component_mean_queue_level_term": -0.0020252732591519162, "mean_reward_component_mean_queue_term": -0.0009041008003581458, "mean_reward_component_mean_throughput_term": 0.0006388959907681624, "mean_reward_component_mean_wait_level_term": -0.001675567518230503, "mean_reward_component_mean_wait_term": -0.0009848363267508375, "mean_reward_component_step_imbalance_term": -0.0005118473418406211, "mean_reward_component_step_queue_level_term": -0.002893122480600141, "mean_reward_component_step_queue_term": -0.0009361318443552591, "mean_reward_component_step_throughput_term": 0.0006616108657908626, "mean_reward_component_step_wait_level_term": -0.003151476092170924, "mean_reward_component_step_wait_term": 3.573599678929895e-05, "mean_running_vehicles": 608.25, "mean_throughput": 1604.0, "mean_total_episode_return": -65.24202787969261, "mean_total_incoming_vehicles": 601.6500053405762, "mean_total_waiting_vehicles": 329.64999198913574, "mean_transitions": 13760.0, "update": 67, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.011099530076535302, "mean_abs_td_error": 0.28000119200441986, "mean_target_q": -1.3119084513746202, "beta": 0.502912, "gradient_steps": 128.0, "rolling_episode_return": -0.006080101904459317, "rolling_total_episode_return": -84.99470905923263, "rolling_mean_waiting_vehicles": 3.8542037623003127, "rolling_throughput": 1747.95, "rolling_td_loss": 0.006996802854882844, "rolling_mean_q_value": -0.8762370049604215, "rolling_mean_abs_td_error": 0.20411456307920162} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 15008.0, "episode_return": -0.01061949885028631, "total_episode_return": -119.70495478902012, "mean_waiting_vehicles": 7.7760381400585175, "throughput": 1943.0, "mean_q_value": -1.399129031226039, "epsilon": 0.7794986666666667, "num_episodes": 4.0, "mean_average_travel_time": 127.57871137049011, "mean_decision_steps": 128.0, "mean_episode_return": -0.01061949885028631, "mean_epsilon": 0.7827413333333333, "mean_mean_incoming_vehicles": 12.228623777627945, "mean_mean_incoming_vehicles_commercial": 9.972186595201492, "mean_mean_incoming_vehicles_industrial": 15.115598171949387, "mean_mean_incoming_vehicles_mixed": 6.278202623128891, "mean_mean_incoming_vehicles_residential": 16.824803054332733, "mean_mean_q_value": -1.426992411899846, "mean_mean_reward": -0.02485256566433236, "mean_mean_reward_commercial": -0.02039018814684823, "mean_mean_reward_industrial": -0.03520683629903942, "mean_mean_reward_mixed": -0.0023881533415988088, "mean_mean_reward_residential": -0.03979085199534893, "mean_mean_step_intersection_reward": -0.01061949885028631, "mean_mean_waiting_vehicles": 7.7760381400585175, "mean_mean_waiting_vehicles_commercial": 5.4268715381622314, "mean_mean_waiting_vehicles_industrial": 9.806581005454063, "mean_mean_waiting_vehicles_mixed": 3.3838836401700974, "mean_mean_waiting_vehicles_residential": 11.74357557296753, "mean_num_commercial_intersections": 32.0, "mean_num_controlled_intersections": 117.25, "mean_num_industrial_intersections": 15.5, "mean_num_mixed_intersections": 25.75, "mean_num_residential_intersections": 44.0, "mean_reward_component_mean_imbalance_term": -0.00045212979764475136, "mean_reward_component_mean_queue_level_term": -0.0034175379211083268, "mean_reward_component_mean_queue_term": -0.0019133835130755728, "mean_reward_component_mean_throughput_term": 0.0008299121861981007, "mean_reward_component_mean_wait_level_term": -0.0033003046269164393, "mean_reward_component_mean_wait_term": -0.0023660552561679538, "mean_reward_component_step_imbalance_term": -0.0008690154299983988, "mean_reward_component_step_queue_level_term": -0.006122827224317007, "mean_reward_component_step_queue_term": -0.0012755337374983355, "mean_reward_component_step_throughput_term": 0.0010883494032896124, "mean_reward_component_step_wait_level_term": -0.007536422068369575, "mean_reward_component_step_wait_term": -0.010137114630197175, "mean_running_vehicles": 1190.0, "mean_throughput": 1943.0, "mean_total_episode_return": -119.70495478902012, "mean_total_incoming_vehicles": 1181.6500663757324, "mean_total_waiting_vehicles": 702.0000114440918, "mean_transitions": 15008.0, "update": 68, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.011282532585028093, "mean_abs_td_error": 0.2753858984215185, "mean_target_q": -1.4258229294791818, "beta": 0.504448, "gradient_steps": 128.0, "rolling_episode_return": -0.006261444348463039, "rolling_total_episode_return": -82.67676179518203, "rolling_mean_waiting_vehicles": 4.038257299922407, "rolling_throughput": 1723.4875, "rolling_td_loss": 0.007390514193957642, "rolling_mean_q_value": -0.9194603168405593, "rolling_mean_abs_td_error": 0.21123317562451122} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 14144.0, "episode_return": -0.008418833116781804, "total_episode_return": -77.03636816027574, "mean_waiting_vehicles": 7.251238755881786, "throughput": 1687.25, "mean_q_value": -1.3947348734363914, "epsilon": 0.7762560000000001, "num_episodes": 4.0, "mean_average_travel_time": 101.43417141640171, "mean_decision_steps": 128.0, "mean_episode_return": -0.008418833116781804, "mean_epsilon": 0.7794986666666667, "mean_mean_incoming_vehicles": 11.953975915908813, "mean_mean_incoming_vehicles_commercial": 10.251088380813599, "mean_mean_incoming_vehicles_industrial": 8.92142903804779, "mean_mean_incoming_vehicles_mixed": 6.249707301457723, "mean_mean_incoming_vehicles_residential": 16.78597342967987, "mean_mean_q_value": -0.7820540347020142, "mean_mean_reward": -0.03615269577130675, "mean_mean_reward_commercial": -0.03280163136514602, "mean_mean_reward_industrial": -0.041529323905706406, "mean_mean_reward_mixed": -0.02495328150689602, "mean_mean_reward_residential": -0.03995992068666965, "mean_mean_step_intersection_reward": -0.008418833116781804, "mean_mean_waiting_vehicles": 7.251238755881786, "mean_mean_waiting_vehicles_commercial": 5.481393083930016, "mean_mean_waiting_vehicles_industrial": 5.447142869234085, "mean_mean_waiting_vehicles_mixed": 2.4039725263913474, "mean_mean_waiting_vehicles_residential": 11.68177142739296, "mean_num_commercial_intersections": 37.25, "mean_num_controlled_intersections": 110.5, "mean_num_industrial_intersections": 37.5, "mean_num_mixed_intersections": 23.333333333333332, "mean_num_residential_intersections": 37.0, "mean_reward_component_mean_imbalance_term": -0.0002977568528206298, "mean_reward_component_mean_queue_level_term": -0.0026599214522384784, "mean_reward_component_mean_queue_term": -0.002113597266829803, "mean_reward_component_mean_throughput_term": 0.0008867998681836298, "mean_reward_component_mean_wait_level_term": -0.0018201610408474789, "mean_reward_component_mean_wait_term": -0.0024141965889370454, "mean_reward_component_step_imbalance_term": -0.0010237873248115648, "mean_reward_component_step_queue_level_term": -0.006763511337339878, "mean_reward_component_step_queue_term": -0.007849377110687783, "mean_reward_component_step_throughput_term": 0.0009967403966584243, "mean_reward_component_step_wait_level_term": -0.007725428833509795, "mean_reward_component_step_wait_term": -0.013787330855848268, "mean_running_vehicles": 812.5, "mean_throughput": 1687.25, "mean_total_episode_return": -77.03636816027574, "mean_total_incoming_vehicles": 801.8499908447266, "mean_total_waiting_vehicles": 427.29999351501465, "mean_transitions": 14144.0, "update": 69, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.012521802787887282, "mean_abs_td_error": 0.2969309751642868, "mean_target_q": -1.439663112629205, "beta": 0.505984, "gradient_steps": 128.0, "rolling_episode_return": -0.006521348078553919, "rolling_total_episode_return": -83.44990821497667, "rolling_mean_waiting_vehicles": 4.331044027395547, "rolling_throughput": 1734.2125, "rolling_td_loss": 0.007843626022986428, "rolling_mean_q_value": -0.9647569008404389, "rolling_mean_abs_td_error": 0.21956340093747712} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 13984.0, "episode_return": -0.01566859005900525, "total_episode_return": -196.25686633447185, "mean_waiting_vehicles": 9.05588299036026, "throughput": 2623.0, "mean_q_value": -1.8486459450796247, "epsilon": 0.7730133333333333, "num_episodes": 4.0, "mean_average_travel_time": 117.96970909567585, "mean_decision_steps": 128.0, "mean_episode_return": -0.01566859005900525, "mean_epsilon": 0.7762560000000001, "mean_mean_incoming_vehicles": 14.442602038383484, "mean_mean_incoming_vehicles_commercial": 12.381705522537231, "mean_mean_incoming_vehicles_industrial": 12.233116775751114, "mean_mean_incoming_vehicles_mixed": 15.214544216791788, "mean_mean_incoming_vehicles_residential": 13.243058860301971, "mean_mean_q_value": -2.1624277759110555, "mean_mean_reward": -0.025877531617879868, "mean_mean_reward_commercial": -0.04914417443796992, "mean_mean_reward_industrial": 0.020082348957657814, "mean_mean_reward_mixed": -0.03876890583584706, "mean_mean_reward_residential": -0.01404674001969397, "mean_mean_step_intersection_reward": -0.01566859005900525, "mean_mean_waiting_vehicles": 9.05588299036026, "mean_mean_waiting_vehicles_commercial": 6.878761410713196, "mean_mean_waiting_vehicles_industrial": 6.116008698940277, "mean_mean_waiting_vehicles_mixed": 11.686666131019592, "mean_mean_waiting_vehicles_residential": 8.281417518854141, "mean_num_commercial_intersections": 24.25, "mean_num_controlled_intersections": 109.25, "mean_num_industrial_intersections": 38.5, "mean_num_mixed_intersections": 8.333333333333334, "mean_num_residential_intersections": 40.25, "mean_reward_component_mean_imbalance_term": -0.0006736258710984266, "mean_reward_component_mean_queue_level_term": -0.005031855408802244, "mean_reward_component_mean_queue_term": -0.0028648835150951145, "mean_reward_component_mean_throughput_term": 0.0010730005243857477, "mean_reward_component_mean_wait_level_term": -0.004540872882055957, "mean_reward_component_mean_wait_term": -0.0036303531641710407, "mean_reward_component_step_imbalance_term": -0.001573346889927052, "mean_reward_component_step_queue_level_term": -0.00916762711131014, "mean_reward_component_step_queue_term": -0.002683431943296455, "mean_reward_component_step_throughput_term": 0.0011764395603677258, "mean_reward_component_step_wait_level_term": -0.011619510652963072, "mean_reward_component_step_wait_term": -0.0020100518013350666, "mean_running_vehicles": 1667.5, "mean_throughput": 2623.0, "mean_total_episode_return": -196.25686633447185, "mean_total_incoming_vehicles": 1655.499984741211, "mean_total_waiting_vehicles": 938.8999691009521, "mean_transitions": 13984.0, "update": 70, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.014326135262308526, "mean_abs_td_error": 0.36314698541536927, "mean_target_q": -1.8878587344661355, "beta": 0.50752, "gradient_steps": 128.0, "rolling_episode_return": -0.007079762242750136, "rolling_total_episode_return": -89.58720443841048, "rolling_mean_waiting_vehicles": 4.666378142312169, "rolling_throughput": 1771.5625, "rolling_td_loss": 0.008377450636498907, "rolling_mean_q_value": -1.0316734459251165, "rolling_mean_abs_td_error": 0.23088739546947182} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12128.0, "episode_return": -0.007313259853143756, "total_episode_return": -76.34615837200545, "mean_waiting_vehicles": 4.463784605264664, "throughput": 1807.25, "mean_q_value": -1.7508031791076064, "epsilon": 0.7697706666666667, "num_episodes": 4.0, "mean_average_travel_time": 120.02874785178912, "mean_decision_steps": 128.0, "mean_episode_return": -0.007313259853143756, "mean_epsilon": 0.7730133333333333, "mean_mean_incoming_vehicles": 7.887915253639221, "mean_mean_incoming_vehicles_commercial": 12.015632152557373, "mean_mean_incoming_vehicles_industrial": 4.906858325004578, "mean_mean_incoming_vehicles_mixed": 9.771999835968018, "mean_mean_incoming_vehicles_residential": 10.76180785894394, "mean_mean_q_value": -0.8655393429799005, "mean_mean_reward": -0.014266899670474231, "mean_mean_reward_commercial": -0.03749306593090296, "mean_mean_reward_industrial": 0.006827330798842013, "mean_mean_reward_mixed": -0.016347472555935383, "mean_mean_reward_residential": -0.019957796670496464, "mean_mean_step_intersection_reward": -0.007313259853143756, "mean_mean_waiting_vehicles": 4.463784605264664, "mean_mean_waiting_vehicles_commercial": 7.406028827031453, "mean_mean_waiting_vehicles_industrial": 2.225475460290909, "mean_mean_waiting_vehicles_mixed": 6.022000074386597, "mean_mean_waiting_vehicles_residential": 6.952311813831329, "mean_num_commercial_intersections": 25.0, "mean_num_controlled_intersections": 94.75, "mean_num_industrial_intersections": 22.75, "mean_num_mixed_intersections": 17.5, "mean_num_residential_intersections": 44.5, "mean_reward_component_mean_imbalance_term": -0.000399375185085038, "mean_reward_component_mean_queue_level_term": -0.0028572619668096877, "mean_reward_component_mean_queue_term": -0.0012626044061212482, "mean_reward_component_mean_throughput_term": 0.0008360853213815744, "mean_reward_component_mean_wait_level_term": -0.002288432846845545, "mean_reward_component_mean_wait_term": -0.0013416709724936027, "mean_reward_component_step_imbalance_term": -0.0006954323762329295, "mean_reward_component_step_queue_level_term": -0.004040334024466574, "mean_reward_component_step_queue_term": -0.0018409813565085642, "mean_reward_component_step_throughput_term": 0.0007541651066276245, "mean_reward_component_step_wait_level_term": -0.004293346923077479, "mean_reward_component_step_wait_term": -0.004150969150941819, "mean_running_vehicles": 653.25, "mean_throughput": 1807.25, "mean_total_episode_return": -76.34615837200545, "mean_total_incoming_vehicles": 645.3499908447266, "mean_total_waiting_vehicles": 317.00000381469727, "mean_transitions": 12128.0, "update": 71, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.01518337946254178, "mean_abs_td_error": 0.35307945078238845, "mean_target_q": -1.7936020120978355, "beta": 0.5090560000000001, "gradient_steps": 128.0, "rolling_episode_return": -0.006987436144856226, "rolling_total_episode_return": -88.14844678858972, "rolling_mean_waiting_vehicles": 4.562993988767266, "rolling_throughput": 1771.1625, "rolling_td_loss": 0.008889200814019204, "rolling_mean_q_value": -1.086550389137119, "rolling_mean_abs_td_error": 0.2399957920250017} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 10592.0, "episode_return": -0.005547177298373144, "total_episode_return": -50.26226742612198, "mean_waiting_vehicles": 3.2519944682717323, "throughput": 1324.25, "mean_q_value": -1.834017270244658, "epsilon": 0.766528, "num_episodes": 4.0, "mean_average_travel_time": 114.72837456019505, "mean_decision_steps": 128.0, "mean_episode_return": -0.005547177298373144, "mean_epsilon": 0.7697706666666667, "mean_mean_incoming_vehicles": 5.931244254112244, "mean_mean_incoming_vehicles_commercial": 8.081860542297363, "mean_mean_incoming_vehicles_industrial": 6.838234901428223, "mean_mean_incoming_vehicles_mixed": 4.073499838511149, "mean_mean_incoming_vehicles_residential": 5.573894530534744, "mean_mean_q_value": -0.8061398970894516, "mean_mean_reward": -0.004789968312252313, "mean_mean_reward_commercial": -0.005491587643822034, "mean_mean_reward_industrial": -0.015591308008879423, "mean_mean_reward_mixed": -0.003641209021831552, "mean_mean_reward_residential": 0.00413074640891864, "mean_mean_step_intersection_reward": -0.005547177298373144, "mean_mean_waiting_vehicles": 3.2519944682717323, "mean_mean_waiting_vehicles_commercial": 3.6670875549316406, "mean_mean_waiting_vehicles_industrial": 4.545588716864586, "mean_mean_waiting_vehicles_mixed": 3.024333347876867, "mean_mean_waiting_vehicles_residential": 2.654322311282158, "mean_num_commercial_intersections": 18.666666666666668, "mean_num_controlled_intersections": 82.75, "mean_num_industrial_intersections": 18.5, "mean_num_mixed_intersections": 16.333333333333332, "mean_num_residential_intersections": 47.25, "mean_reward_component_mean_imbalance_term": -0.00033278733933728155, "mean_reward_component_mean_queue_level_term": -0.0021542776503498118, "mean_reward_component_mean_queue_term": -0.0009452826995284269, "mean_reward_component_mean_throughput_term": 0.0006824963849680898, "mean_reward_component_mean_wait_level_term": -0.001802175328899036, "mean_reward_component_mean_wait_term": -0.0009951509296968197, "mean_reward_component_step_imbalance_term": -0.000587515165534569, "mean_reward_component_step_queue_level_term": -0.0030249047122197226, "mean_reward_component_step_queue_term": -0.00027017172033083625, "mean_reward_component_step_throughput_term": 0.0009531044997856952, "mean_reward_component_step_wait_level_term": -0.0031844828990870155, "mean_reward_component_step_wait_term": 0.0013240010594017804, "mean_running_vehicles": 451.0, "mean_throughput": 1324.25, "mean_total_episode_return": -50.26226742612198, "mean_total_incoming_vehicles": 421.7499942779541, "mean_total_waiting_vehicles": 207.10000610351562, "mean_transitions": 10592.0, "update": 72, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.015882204948866274, "mean_abs_td_error": 0.36727315082680434, "mean_target_q": -1.8800117569044232, "beta": 0.510592, "gradient_steps": 128.0, "rolling_episode_return": -0.006954252163930806, "rolling_total_episode_return": -86.35311528112251, "rolling_mean_waiting_vehicles": 4.567944364994764, "rolling_throughput": 1741.4375, "rolling_td_loss": 0.009421493464151354, "rolling_mean_q_value": -1.1433385693235323, "rolling_mean_abs_td_error": 0.24960674633912278} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12544.0, "episode_return": -0.00369238126757219, "total_episode_return": -49.4611404229654, "mean_waiting_vehicles": 2.465605527162552, "throughput": 1189.5, "mean_q_value": -1.8300049919635057, "epsilon": 0.7632853333333334, "num_episodes": 4.0, "mean_average_travel_time": 109.38188301198517, "mean_decision_steps": 128.0, "mean_episode_return": -0.00369238126757219, "mean_epsilon": 0.766528, "mean_mean_incoming_vehicles": 4.231138348579407, "mean_mean_incoming_vehicles_commercial": 6.529330343008041, "mean_mean_incoming_vehicles_industrial": 4.10342009862264, "mean_mean_incoming_vehicles_mixed": 3.412071486314138, "mean_mean_incoming_vehicles_residential": 3.601943224668503, "mean_mean_q_value": -0.5169585015682969, "mean_mean_reward": -0.006264453171752393, "mean_mean_reward_commercial": -1.2936710845679045e-05, "mean_mean_reward_industrial": -0.007856182909260193, "mean_mean_reward_mixed": -0.0054290636132160825, "mean_mean_reward_residential": -0.008150709443725646, "mean_mean_step_intersection_reward": -0.00369238126757219, "mean_mean_waiting_vehicles": 2.465605527162552, "mean_mean_waiting_vehicles_commercial": 3.9587583616375923, "mean_mean_waiting_vehicles_industrial": 2.463809529940287, "mean_mean_waiting_vehicles_mixed": 2.165095324317614, "mean_mean_waiting_vehicles_residential": 1.810805581510067, "mean_num_commercial_intersections": 32.5, "mean_num_controlled_intersections": 98.0, "mean_num_industrial_intersections": 28.0, "mean_num_mixed_intersections": 18.333333333333332, "mean_num_residential_intersections": 30.75, "mean_reward_component_mean_imbalance_term": -0.00021388568848879075, "mean_reward_component_mean_queue_level_term": -0.0014823402068167013, "mean_reward_component_mean_queue_term": -0.0006404087868958383, "mean_reward_component_mean_throughput_term": 0.000498472273203987, "mean_reward_component_mean_wait_level_term": -0.0011654744984375132, "mean_reward_component_mean_wait_term": -0.0006887444403913534, "mean_reward_component_step_imbalance_term": -0.00037225967389531434, "mean_reward_component_step_queue_level_term": -0.0020493081101449206, "mean_reward_component_step_queue_term": -0.00033197148877661675, "mean_reward_component_step_throughput_term": 0.0005537554970942438, "mean_reward_component_step_wait_level_term": -0.002203982148785144, "mean_reward_component_step_wait_term": -0.0018606875819386914, "mean_running_vehicles": 442.25, "mean_throughput": 1189.5, "mean_total_episode_return": -49.4611404229654, "mean_total_incoming_vehicles": 438.25000190734863, "mean_total_waiting_vehicles": 247.1999979019165, "mean_transitions": 12544.0, "update": 73, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0163100341851532, "mean_abs_td_error": 0.3597272279439494, "mean_target_q": -1.875034686177969, "beta": 0.512128, "gradient_steps": 128.0, "rolling_episode_return": -0.006924803163198992, "rolling_total_episode_return": -85.11266242000602, "rolling_mean_waiting_vehicles": 4.554049498587847, "rolling_throughput": 1721.95, "rolling_td_loss": 0.009977772435559019, "rolling_mean_q_value": -1.1996031587244942, "rolling_mean_abs_td_error": 0.2593133427202702} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 14912.0, "episode_return": -0.006361564186085029, "total_episode_return": -89.77010023640469, "mean_waiting_vehicles": 3.7375782430171967, "throughput": 1894.5, "mean_q_value": -1.8417415777221322, "epsilon": 0.7600426666666666, "num_episodes": 4.0, "mean_average_travel_time": 120.61539202060078, "mean_decision_steps": 128.0, "mean_episode_return": -0.006361564186085029, "mean_epsilon": 0.7632853333333334, "mean_mean_incoming_vehicles": 6.429332971572876, "mean_mean_incoming_vehicles_commercial": 4.558218419551849, "mean_mean_incoming_vehicles_industrial": 5.603259563446045, "mean_mean_incoming_vehicles_mixed": 4.674241224924724, "mean_mean_incoming_vehicles_residential": 9.317617654800415, "mean_mean_q_value": -0.7604747023433447, "mean_mean_reward": -0.007937848571600625, "mean_mean_reward_commercial": 0.003495342389214784, "mean_mean_reward_industrial": -0.012329213263001293, "mean_mean_reward_mixed": 0.0004041758365929127, "mean_mean_reward_residential": -0.01949983066879213, "mean_mean_step_intersection_reward": -0.006361564186085029, "mean_mean_waiting_vehicles": 3.7375782430171967, "mean_mean_waiting_vehicles_commercial": 1.8627335876226425, "mean_mean_waiting_vehicles_industrial": 3.35095477104187, "mean_mean_waiting_vehicles_mixed": 2.373209377129873, "mean_mean_waiting_vehicles_residential": 6.1178924441337585, "mean_num_commercial_intersections": 39.25, "mean_num_controlled_intersections": 116.5, "mean_num_industrial_intersections": 30.25, "mean_num_mixed_intersections": 22.333333333333332, "mean_num_residential_intersections": 30.25, "mean_reward_component_mean_imbalance_term": -0.0003132638379922392, "mean_reward_component_mean_queue_level_term": -0.0024230824242081894, "mean_reward_component_mean_queue_term": -0.0011375221348552955, "mean_reward_component_mean_throughput_term": 0.0006503516229230399, "mean_reward_component_mean_wait_level_term": -0.001856068097997543, "mean_reward_component_mean_wait_term": -0.0012819795625436115, "mean_reward_component_step_imbalance_term": -0.0006278482542256825, "mean_reward_component_step_queue_level_term": -0.003640070674009621, "mean_reward_component_step_queue_term": -0.001830115870689042, "mean_reward_component_step_throughput_term": 0.0006971781695028767, "mean_reward_component_step_wait_level_term": -0.004102959210285917, "mean_reward_component_step_wait_term": 0.0015659674536436796, "mean_running_vehicles": 751.0, "mean_throughput": 1894.5, "mean_total_episode_return": -89.77010023640469, "mean_total_incoming_vehicles": 715.1999969482422, "mean_total_waiting_vehicles": 390.1500053405762, "mean_transitions": 14912.0, "update": 74, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.014988520659244386, "mean_abs_td_error": 0.3555823005735874, "mean_target_q": -1.8826230522245169, "beta": 0.513664, "gradient_steps": 128.0, "rolling_episode_return": -0.006724377286220995, "rolling_total_episode_return": -84.59007862385224, "rolling_mean_waiting_vehicles": 4.436275234073401, "rolling_throughput": 1723.95, "rolling_td_loss": 0.01038992238195533, "rolling_mean_q_value": -1.2491704603191465, "rolling_mean_abs_td_error": 0.267109025089303} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11232.0, "episode_return": -0.006788934770626029, "total_episode_return": -95.02272087393794, "mean_waiting_vehicles": 5.11880411952734, "throughput": 1737.5, "mean_q_value": -2.0207624919712543, "epsilon": 0.7568, "num_episodes": 4.0, "mean_average_travel_time": 103.09068481766012, "mean_decision_steps": 128.0, "mean_episode_return": -0.006788934770626029, "mean_epsilon": 0.7600426666666666, "mean_mean_incoming_vehicles": 9.839185014367104, "mean_mean_incoming_vehicles_commercial": 7.849523901939392, "mean_mean_incoming_vehicles_industrial": 9.27014210820198, "mean_mean_incoming_vehicles_mixed": 10.355260213216146, "mean_mean_incoming_vehicles_residential": 11.96166205406189, "mean_mean_q_value": -0.8786832234181929, "mean_mean_reward": -0.017207423899549212, "mean_mean_reward_commercial": -0.013760658970568329, "mean_mean_reward_industrial": -0.010625568334944546, "mean_mean_reward_mixed": -0.01607112679630518, "mean_mean_reward_residential": -0.030639884324045852, "mean_mean_step_intersection_reward": -0.006788934770626029, "mean_mean_waiting_vehicles": 5.11880411952734, "mean_mean_waiting_vehicles_commercial": 3.3771429657936096, "mean_mean_waiting_vehicles_industrial": 4.434587884694338, "mean_mean_waiting_vehicles_mixed": 5.16859229405721, "mean_mean_waiting_vehicles_residential": 7.177840366959572, "mean_num_commercial_intersections": 19.0, "mean_num_controlled_intersections": 87.75, "mean_num_industrial_intersections": 18.0, "mean_num_mixed_intersections": 23.666666666666668, "mean_num_residential_intersections": 33.0, "mean_reward_component_mean_imbalance_term": -0.00031596888908225207, "mean_reward_component_mean_queue_level_term": -0.002297358943721406, "mean_reward_component_mean_queue_term": -0.0014998543620050597, "mean_reward_component_mean_throughput_term": 0.0006941959979798185, "mean_reward_component_mean_wait_level_term": -0.0018834406068717335, "mean_reward_component_mean_wait_term": -0.0014865081198394137, "mean_reward_component_step_imbalance_term": -0.00068581776577048, "mean_reward_component_step_queue_level_term": -0.004799534137418959, "mean_reward_component_step_queue_term": -0.004270638928574044, "mean_reward_component_step_throughput_term": 0.001012761626043357, "mean_reward_component_step_wait_level_term": -0.004756825597723946, "mean_reward_component_step_wait_term": -0.00370736833428964, "mean_running_vehicles": 1086.0, "mean_throughput": 1737.5, "mean_total_episode_return": -95.02272087393794, "mean_total_incoming_vehicles": 1073.399935722351, "mean_total_waiting_vehicles": 554.8499755859375, "mean_transitions": 11232.0, "update": 75, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.0177957852029067, "mean_abs_td_error": 0.3860005254391581, "mean_target_q": -2.0678695729002357, "beta": 0.5152, "gradient_steps": 128.0, "rolling_episode_return": -0.006898383349603287, "rolling_total_episode_return": -87.24845152043854, "rolling_mean_waiting_vehicles": 4.631685676053166, "rolling_throughput": 1745.9625, "rolling_td_loss": 0.010936824213104046, "rolling_mean_q_value": -1.3083008757559582, "rolling_mean_abs_td_error": 0.27616921039880254} +{"city_id": "4_cities", "scenario_name": "2_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 13696.0, "episode_return": -0.008949455808342228, "total_episode_return": -99.81094225402921, "mean_waiting_vehicles": 6.314529478549957, "throughput": 2012.75, "mean_q_value": -1.9309981735423207, "epsilon": 0.7535573333333334, "num_episodes": 4.0, "mean_average_travel_time": 109.46781254545792, "mean_decision_steps": 128.0, "mean_episode_return": -0.008949455808342228, "mean_epsilon": 0.7568, "mean_mean_incoming_vehicles": 10.997432947158813, "mean_mean_incoming_vehicles_commercial": 11.883683741092682, "mean_mean_incoming_vehicles_industrial": 17.76944464445114, "mean_mean_incoming_vehicles_mixed": 9.488261580467224, "mean_mean_incoming_vehicles_residential": 17.735209703445435, "mean_mean_q_value": -1.0541313643625472, "mean_mean_reward": -0.033458933292422444, "mean_mean_reward_commercial": -0.037316128611564636, "mean_mean_reward_industrial": 0.030807214956439566, "mean_mean_reward_mixed": -0.026562584680505097, "mean_mean_reward_residential": -0.08213256939779967, "mean_mean_step_intersection_reward": -0.008949455808342228, "mean_mean_waiting_vehicles": 6.314529478549957, "mean_mean_waiting_vehicles_commercial": 5.926996044814587, "mean_mean_waiting_vehicles_industrial": 6.100694507360458, "mean_mean_waiting_vehicles_mixed": 5.656287863850594, "mean_mean_waiting_vehicles_residential": 11.932936310768127, "mean_num_commercial_intersections": 31.25, "mean_num_controlled_intersections": 107.0, "mean_num_industrial_intersections": 11.0, "mean_num_mixed_intersections": 37.75, "mean_num_residential_intersections": 27.0, "mean_reward_component_mean_imbalance_term": -0.00042907343049947144, "mean_reward_component_mean_queue_level_term": -0.0028859015327995508, "mean_reward_component_mean_queue_term": -0.0019544963413435923, "mean_reward_component_mean_throughput_term": 0.0008566147059383411, "mean_reward_component_mean_wait_level_term": -0.00235717488083953, "mean_reward_component_mean_wait_term": -0.002179424413380815, "mean_reward_component_step_imbalance_term": -0.0010392742515250575, "mean_reward_component_step_queue_level_term": -0.00625438813585788, "mean_reward_component_step_queue_term": -0.0069634109968319535, "mean_reward_component_step_throughput_term": 0.000951014444581233, "mean_reward_component_step_wait_level_term": -0.006974158139200881, "mean_reward_component_step_wait_term": -0.013178715598769486, "mean_running_vehicles": 1083.75, "mean_throughput": 2012.75, "mean_total_episode_return": -99.81094225402921, "mean_total_incoming_vehicles": 982.9499816894531, "mean_total_waiting_vehicles": 523.8000030517578, "mean_transitions": 13696.0, "update": 76, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.016337793014827184, "mean_abs_td_error": 0.3875797975342721, "mean_target_q": -1.9859928963705897, "beta": 0.5167360000000001, "gradient_steps": 128.0, "rolling_episode_return": -0.007101933743721157, "rolling_total_episode_return": -88.03674307431211, "rolling_mean_waiting_vehicles": 4.8244114954024555, "rolling_throughput": 1755.6, "rolling_td_loss": 0.011426984936451844, "rolling_mean_q_value": -1.3613667015451938, "rolling_mean_abs_td_error": 0.2857789942790987} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 18080.0, "episode_return": -0.00885962894577288, "total_episode_return": -153.275933817029, "mean_waiting_vehicles": 5.228673726320267, "throughput": 2993.25, "mean_q_value": -1.8748062709346414, "epsilon": 0.7503146666666667, "num_episodes": 4.0, "mean_average_travel_time": 119.84233610692476, "mean_decision_steps": 128.0, "mean_episode_return": -0.00885962894577288, "mean_epsilon": 0.7535573333333334, "mean_mean_incoming_vehicles": 11.0682532787323, "mean_mean_incoming_vehicles_commercial": 10.462309718132019, "mean_mean_incoming_vehicles_industrial": 7.683369994163513, "mean_mean_incoming_vehicles_mixed": 9.002727508544922, "mean_mean_incoming_vehicles_residential": 13.837347865104675, "mean_mean_q_value": -1.1040273129474372, "mean_mean_reward": -0.026471716817468405, "mean_mean_reward_commercial": -0.015545919188298285, "mean_mean_reward_industrial": -0.02245273790322244, "mean_mean_reward_mixed": 0.001521432539448142, "mean_mean_reward_residential": -0.043659126036800444, "mean_mean_step_intersection_reward": -0.00885962894577288, "mean_mean_waiting_vehicles": 5.228673726320267, "mean_mean_waiting_vehicles_commercial": 4.3621343821287155, "mean_mean_waiting_vehicles_industrial": 2.3960806503891945, "mean_mean_waiting_vehicles_mixed": 3.960429146885872, "mean_mean_waiting_vehicles_residential": 7.7128090262413025, "mean_num_commercial_intersections": 23.25, "mean_num_controlled_intersections": 141.25, "mean_num_industrial_intersections": 38.25, "mean_num_mixed_intersections": 22.25, "mean_num_residential_intersections": 57.5, "mean_reward_component_mean_imbalance_term": -0.0003345928976178636, "mean_reward_component_mean_queue_level_term": -0.0034183692352982575, "mean_reward_component_mean_queue_term": -0.0020635963779485067, "mean_reward_component_mean_throughput_term": 0.0008756274908812145, "mean_reward_component_mean_wait_level_term": -0.002078222264597751, "mean_reward_component_mean_wait_term": -0.0018404758921324316, "mean_reward_component_step_imbalance_term": -0.000839281619846588, "mean_reward_component_step_queue_level_term": -0.006603508722037077, "mean_reward_component_step_queue_term": -0.004953256517183036, "mean_reward_component_step_throughput_term": 0.0011321319470880553, "mean_reward_component_step_wait_level_term": -0.005890848347917199, "mean_reward_component_step_wait_term": -0.009316954703535885, "mean_running_vehicles": 1488.75, "mean_throughput": 2993.25, "mean_total_episode_return": -153.275933817029, "mean_total_incoming_vehicles": 1465.7500305175781, "mean_total_waiting_vehicles": 705.0500183105469, "mean_transitions": 18080.0, "update": 77, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.01805050202528946, "mean_abs_td_error": 0.4084227231796831, "mean_target_q": -1.9367902390658855, "beta": 0.5182720000000001, "gradient_steps": 128.0, "rolling_episode_return": -0.007384985396893462, "rolling_total_episode_return": -93.29154617507592, "rolling_mean_waiting_vehicles": 4.994961236789822, "rolling_throughput": 1837.0875, "rolling_td_loss": 0.012026156505180552, "rolling_mean_q_value": -1.4132083385251462, "rolling_mean_abs_td_error": 0.29706868154753463} +{"city_id": "3_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 9248.0, "episode_return": -0.00789509300111253, "total_episode_return": -59.1147540085949, "mean_waiting_vehicles": 6.256998240947723, "throughput": 1527.25, "mean_q_value": -2.0065642734989524, "epsilon": 0.747072, "num_episodes": 4.0, "mean_average_travel_time": 95.71129899430441, "mean_decision_steps": 128.0, "mean_episode_return": -0.00789509300111253, "mean_epsilon": 0.7503146666666667, "mean_mean_incoming_vehicles": 10.771189630031586, "mean_mean_incoming_vehicles_commercial": 12.67162698507309, "mean_mean_incoming_vehicles_industrial": 9.095195412635803, "mean_mean_incoming_vehicles_mixed": 7.714375257492065, "mean_mean_incoming_vehicles_residential": 9.65862911939621, "mean_mean_q_value": -1.1120343150978442, "mean_mean_reward": -0.02864648262038827, "mean_mean_reward_commercial": -0.03517402934085112, "mean_mean_reward_industrial": -0.021626305300742388, "mean_mean_reward_mixed": -0.011144787073135376, "mean_mean_reward_residential": -0.033650441095232964, "mean_mean_step_intersection_reward": -0.00789509300111253, "mean_mean_waiting_vehicles": 6.256998240947723, "mean_mean_waiting_vehicles_commercial": 7.406547635793686, "mean_mean_waiting_vehicles_industrial": 4.00355376675725, "mean_mean_waiting_vehicles_mixed": 2.711249828338623, "mean_mean_waiting_vehicles_residential": 5.7972394824028015, "mean_num_commercial_intersections": 18.25, "mean_num_controlled_intersections": 72.25, "mean_num_industrial_intersections": 12.75, "mean_num_mixed_intersections": 21.0, "mean_num_residential_intersections": 30.75, "mean_reward_component_mean_imbalance_term": -0.00038649363180498497, "mean_reward_component_mean_queue_level_term": -0.002705210631972932, "mean_reward_component_mean_queue_term": -0.001720322667280172, "mean_reward_component_mean_throughput_term": 0.001019956000263278, "mean_reward_component_mean_wait_level_term": -0.0022657304331969996, "mean_reward_component_mean_wait_term": -0.0018372917886857465, "mean_reward_component_step_imbalance_term": -0.0008482760968036018, "mean_reward_component_step_queue_level_term": -0.005505032371729612, "mean_reward_component_step_queue_term": -0.003948194265831262, "mean_reward_component_step_throughput_term": 0.0014561344505636953, "mean_reward_component_step_wait_level_term": -0.0058793336793314666, "mean_reward_component_step_wait_term": -0.013921783887781203, "mean_running_vehicles": 666.25, "mean_throughput": 1527.25, "mean_total_episode_return": -59.1147540085949, "mean_total_incoming_vehicles": 650.1499824523926, "mean_total_waiting_vehicles": 345.24999237060547, "mean_transitions": 9248.0, "update": 78, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.021105764906678814, "mean_abs_td_error": 0.4445016933605075, "mean_target_q": -2.0755239306017756, "beta": 0.519808, "gradient_steps": 128.0, "rolling_episode_return": -0.007249986600845093, "rolling_total_episode_return": -88.96596417672117, "rolling_mean_waiting_vehicles": 4.955260789766908, "rolling_throughput": 1782.6625, "rolling_td_loss": 0.012717920509840042, "rolling_mean_q_value": -1.4664761242922395, "rolling_mean_abs_td_error": 0.30851694564626087} +{"city_id": "4_cities", "scenario_name": "3_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 11296.0, "episode_return": -0.010350090050443263, "total_episode_return": -110.95469488250092, "mean_waiting_vehicles": 7.997423529624939, "throughput": 2054.0, "mean_q_value": -2.0676371874287724, "epsilon": 0.7438293333333333, "num_episodes": 4.0, "mean_average_travel_time": 112.95358554332216, "mean_decision_steps": 128.0, "mean_episode_return": -0.010350090050443263, "mean_epsilon": 0.747072, "mean_mean_incoming_vehicles": 13.640885710716248, "mean_mean_incoming_vehicles_commercial": 14.018928587436676, "mean_mean_incoming_vehicles_industrial": 14.226158857345581, "mean_mean_incoming_vehicles_mixed": 17.28074073791504, "mean_mean_incoming_vehicles_residential": 12.766164660453796, "mean_mean_q_value": -1.5102878136967774, "mean_mean_reward": -0.01701025216607377, "mean_mean_reward_commercial": -0.01618341403082013, "mean_mean_reward_industrial": -0.02654225784499431, "mean_mean_reward_mixed": -0.029239532848199207, "mean_mean_reward_residential": -0.012764387283823453, "mean_mean_step_intersection_reward": -0.010350090050443263, "mean_mean_waiting_vehicles": 7.997423529624939, "mean_mean_waiting_vehicles_commercial": 8.405714243650436, "mean_mean_waiting_vehicles_industrial": 8.306739270687103, "mean_mean_waiting_vehicles_mixed": 9.795555432637533, "mean_mean_waiting_vehicles_residential": 7.43580287694931, "mean_num_commercial_intersections": 18.0, "mean_num_controlled_intersections": 88.25, "mean_num_industrial_intersections": 13.25, "mean_num_mixed_intersections": 26.666666666666668, "mean_num_residential_intersections": 37.0, "mean_reward_component_mean_imbalance_term": -0.0005319721478783124, "mean_reward_component_mean_queue_level_term": -0.0034001528372229473, "mean_reward_component_mean_queue_term": -0.0020505144119422614, "mean_reward_component_mean_throughput_term": 0.0010527907572566164, "mean_reward_component_mean_wait_level_term": -0.003114300463616715, "mean_reward_component_mean_wait_term": -0.0023059409572123712, "mean_reward_component_step_imbalance_term": -0.0011136079192510806, "mean_reward_component_step_queue_level_term": -0.006561646179761738, "mean_reward_component_step_queue_term": -0.0023248905963555444, "mean_reward_component_step_throughput_term": 0.0016453597490908578, "mean_reward_component_step_wait_level_term": -0.007379010843578726, "mean_reward_component_step_wait_term": -0.0012764561688527465, "mean_running_vehicles": 1213.75, "mean_throughput": 2054.0, "mean_total_episode_return": -110.95469488250092, "mean_total_incoming_vehicles": 1199.3000106811523, "mean_total_waiting_vehicles": 667.5000152587891, "mean_transitions": 11296.0, "update": 79, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.019874932302627712, "mean_abs_td_error": 0.44815457658842206, "mean_target_q": -2.14049238525331, "beta": 0.521344, "gradient_steps": 128.0, "rolling_episode_return": -0.007507236661672098, "rolling_total_episode_return": -91.79935129136429, "rolling_mean_waiting_vehicles": 5.160324176028371, "rolling_throughput": 1817.55, "rolling_td_loss": 0.013321950138015381, "rolling_mean_q_value": -1.5234855806455017, "rolling_mean_abs_td_error": 0.3199757889582543} +{"city_id": "4_cities", "scenario_name": "4_scenarios", "num_rollout_episodes": 4.0, "decision_steps": 128.0, "transitions": 12800.0, "episode_return": -0.008553038049031896, "total_episode_return": -72.97343589412048, "mean_waiting_vehicles": 3.674327477812767, "throughput": 1888.25, "mean_q_value": -1.8019103184342384, "epsilon": 0.7405866666666667, "num_episodes": 4.0, "mean_average_travel_time": 117.3921986329904, "mean_decision_steps": 128.0, "mean_episode_return": -0.008553038049031896, "mean_epsilon": 0.7438293333333333, "mean_mean_incoming_vehicles": 7.933563530445099, "mean_mean_incoming_vehicles_commercial": 3.9162046909332275, "mean_mean_incoming_vehicles_industrial": 13.338647544384003, "mean_mean_incoming_vehicles_mixed": 6.625935435295105, "mean_mean_incoming_vehicles_residential": 12.830679774284363, "mean_mean_q_value": -1.480342154565733, "mean_mean_reward": -0.004182606062386185, "mean_mean_reward_commercial": 0.00186158437281847, "mean_mean_reward_industrial": -0.0018850043998099864, "mean_mean_reward_mixed": 0.00038173096254467964, "mean_mean_reward_residential": -0.017549556301673874, "mean_mean_step_intersection_reward": -0.008553038049031896, "mean_mean_waiting_vehicles": 3.674327477812767, "mean_mean_waiting_vehicles_commercial": 0.8921485940615336, "mean_mean_waiting_vehicles_industrial": 8.127536356449127, "mean_mean_waiting_vehicles_mixed": 2.251069486141205, "mean_mean_waiting_vehicles_residential": 7.8835038766264915, "mean_num_commercial_intersections": 54.333333333333336, "mean_num_controlled_intersections": 100.0, "mean_num_industrial_intersections": 16.0, "mean_num_mixed_intersections": 28.0, "mean_num_residential_intersections": 37.25, "mean_reward_component_mean_imbalance_term": -0.0004267985681717379, "mean_reward_component_mean_queue_level_term": -0.0037108379763139965, "mean_reward_component_mean_queue_term": -0.0014608717308970398, "mean_reward_component_mean_throughput_term": 0.0010020013334894884, "mean_reward_component_mean_wait_level_term": -0.0026745929004157176, "mean_reward_component_mean_wait_term": -0.001281938353880463, "mean_reward_component_step_imbalance_term": -0.0006554250576300547, "mean_reward_component_step_queue_level_term": -0.0046747897868044674, "mean_reward_component_step_queue_term": 0.0009391493676957907, "mean_reward_component_step_throughput_term": 0.0013597936485894024, "mean_reward_component_step_wait_level_term": -0.0041035612230189145, "mean_reward_component_step_wait_term": 0.0029522262630052865, "mean_running_vehicles": 586.75, "mean_throughput": 1888.25, "mean_total_episode_return": -72.97343589412048, "mean_total_incoming_vehicles": 545.6999816894531, "mean_total_waiting_vehicles": 221.45000076293945, "mean_transitions": 12800.0, "update": 80, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "replay_size": 500000.0, "td_loss": 0.018148912393371575, "mean_abs_td_error": 0.41114025993738323, "mean_target_q": -1.8681088481098413, "beta": 0.52288, "gradient_steps": 128.0, "rolling_episode_return": -0.007653150432765025, "rolling_total_episode_return": -92.12447855586652, "rolling_mean_waiting_vehicles": 5.151754168793559, "rolling_throughput": 1835.3875, "rolling_td_loss": 0.013870238355048059, "rolling_mean_q_value": -1.5638746289536356, "rolling_mean_abs_td_error": 0.3297787024843274} diff --git a/artifacts/dqn_shared/validation_log.jsonl b/artifacts/dqn_shared/validation_log.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..b889c70235d421cd6d8c3156739203ac09893f02 --- /dev/null +++ b/artifacts/dqn_shared/validation_log.jsonl @@ -0,0 +1,4 @@ +{"num_episodes": 21.0, "mean_average_travel_time": 1325.2023720793072, "mean_decision_steps": 720.0, "mean_episode_return": -0.08486834261121032, "mean_mean_incoming_vehicles": 80.98775954473587, "mean_mean_incoming_vehicles_commercial": 79.73018791562035, "mean_mean_incoming_vehicles_industrial": 67.6341381072998, "mean_mean_incoming_vehicles_mixed": 78.53968211582729, "mean_mean_incoming_vehicles_residential": 84.52773266746884, "mean_mean_reward": -0.1469953010479609, "mean_mean_reward_commercial": -0.14441016564766565, "mean_mean_reward_industrial": -0.14332230016589165, "mean_mean_reward_mixed": -0.14050068741752988, "mean_mean_reward_residential": -0.15189919762668155, "mean_mean_step_intersection_reward": -0.08486834261121032, "mean_mean_waiting_vehicles": 80.8872553507487, "mean_mean_waiting_vehicles_commercial": 79.62523632957821, "mean_mean_waiting_vehicles_industrial": 67.48728915623256, "mean_mean_waiting_vehicles_mixed": 78.42699850173224, "mean_mean_waiting_vehicles_residential": 84.43174816313244, "mean_num_commercial_intersections": 25.0, "mean_num_controlled_intersections": 143.66666666666666, "mean_num_industrial_intersections": 21.0, "mean_num_mixed_intersections": 18.333333333333332, "mean_num_residential_intersections": 86.33333333333333, "mean_reward_component_mean_imbalance_term": -0.004304083474237318, "mean_reward_component_mean_queue_level_term": -0.024984156730598468, "mean_reward_component_mean_queue_term": -0.0025508318218295544, "mean_reward_component_mean_throughput_term": 0.0002933895914949933, "mean_reward_component_mean_wait_level_term": -0.048224677652529066, "mean_reward_component_mean_wait_term": -0.005097983024928429, "mean_reward_component_step_imbalance_term": -0.007448913817781778, "mean_reward_component_step_queue_level_term": -0.045914972112292333, "mean_reward_component_step_queue_term": -0.0006100305915121377, "mean_reward_component_step_throughput_term": 2.3504274438545552e-05, "mean_reward_component_step_wait_level_term": -0.09171075178753763, "mean_reward_component_step_wait_term": -0.0013341393924271134, "mean_running_vehicles": 11833.52380952381, "mean_throughput": 6031.428571428572, "mean_total_episode_return": -8766.06676128968, "mean_total_incoming_vehicles": 11667.685732886905, "mean_total_waiting_vehicles": 11652.923851376489, "scenario_accident_num_episodes": 3.0, "scenario_accident_mean_average_travel_time": 1434.1053174603176, "scenario_accident_mean_decision_steps": 720.0, "scenario_accident_mean_episode_return": -0.09277033309770034, "scenario_accident_mean_mean_incoming_vehicles": 83.68321482340495, "scenario_accident_mean_mean_incoming_vehicles_commercial": 81.17738342285156, "scenario_accident_mean_mean_incoming_vehicles_industrial": 78.05514526367188, "scenario_accident_mean_mean_incoming_vehicles_mixed": 78.81481424967448, "scenario_accident_mean_mean_incoming_vehicles_residential": 86.68449147542317, "scenario_accident_mean_mean_reward": -0.1519314001003901, "scenario_accident_mean_mean_reward_commercial": -0.14384108781814575, "scenario_accident_mean_mean_reward_industrial": -0.16626879572868347, "scenario_accident_mean_mean_reward_mixed": -0.14385522156953812, "scenario_accident_mean_mean_reward_residential": -0.15540693203608194, "scenario_accident_mean_mean_step_intersection_reward": -0.09277033309770034, "scenario_accident_mean_mean_waiting_vehicles": 83.64150492350261, "scenario_accident_mean_mean_waiting_vehicles_commercial": 81.13660685221355, "scenario_accident_mean_mean_waiting_vehicles_industrial": 78.00220489501953, "scenario_accident_mean_mean_waiting_vehicles_mixed": 78.79862213134766, "scenario_accident_mean_mean_waiting_vehicles_residential": 86.64475758870442, "scenario_accident_mean_num_commercial_intersections": 25.0, "scenario_accident_mean_num_controlled_intersections": 143.66666666666666, "scenario_accident_mean_num_industrial_intersections": 21.0, "scenario_accident_mean_num_mixed_intersections": 18.333333333333332, "scenario_accident_mean_num_residential_intersections": 86.33333333333333, "scenario_accident_mean_reward_component_mean_imbalance_term": -0.00456545806185952, "scenario_accident_mean_reward_component_mean_queue_level_term": -0.02756982310033217, "scenario_accident_mean_reward_component_mean_queue_term": -0.002645141041110568, "scenario_accident_mean_reward_component_mean_throughput_term": 0.00034395347239397884, "scenario_accident_mean_reward_component_mean_wait_level_term": -0.05304208021167874, "scenario_accident_mean_reward_component_mean_wait_term": -0.005291787377962945, "scenario_accident_mean_reward_component_step_imbalance_term": -0.007617386989295483, "scenario_accident_mean_reward_component_step_queue_level_term": -0.04761253918210665, "scenario_accident_mean_reward_component_step_queue_term": -0.0003309840588675191, "scenario_accident_mean_reward_component_step_throughput_term": 0.0, "scenario_accident_mean_reward_component_step_wait_level_term": -0.09517321238915126, "scenario_accident_mean_reward_component_step_wait_term": -0.0011972793339130778, "scenario_accident_mean_running_vehicles": 12254.666666666666, "scenario_accident_mean_throughput": 7008.0, "scenario_accident_mean_total_episode_return": -9600.97696233044, "scenario_accident_mean_total_incoming_vehicles": 12074.466796875, "scenario_accident_mean_total_waiting_vehicles": 12068.2666015625, "scenario_construction_num_episodes": 3.0, "scenario_construction_mean_average_travel_time": 1371.0985035142337, "scenario_construction_mean_decision_steps": 720.0, "scenario_construction_mean_episode_return": -0.09205159140785842, "scenario_construction_mean_mean_incoming_vehicles": 82.84827677408855, "scenario_construction_mean_mean_incoming_vehicles_commercial": 76.82152303059895, "scenario_construction_mean_mean_incoming_vehicles_industrial": 69.01176452636719, "scenario_construction_mean_mean_incoming_vehicles_mixed": 80.12804158528645, "scenario_construction_mean_mean_incoming_vehicles_residential": 87.35991668701172, "scenario_construction_mean_mean_reward": -0.14887147148450217, "scenario_construction_mean_mean_reward_commercial": -0.13681984941164652, "scenario_construction_mean_mean_reward_industrial": -0.14481135085225105, "scenario_construction_mean_mean_reward_mixed": -0.14295037587483725, "scenario_construction_mean_mean_reward_residential": -0.15578887363274893, "scenario_construction_mean_mean_step_intersection_reward": -0.09205159140785842, "scenario_construction_mean_mean_waiting_vehicles": 82.75142669677734, "scenario_construction_mean_mean_waiting_vehicles_commercial": 76.69426981608073, "scenario_construction_mean_mean_waiting_vehicles_industrial": 68.89706039428711, "scenario_construction_mean_mean_waiting_vehicles_mixed": 80.02116394042969, "scenario_construction_mean_mean_waiting_vehicles_residential": 87.28385670979817, "scenario_construction_mean_num_commercial_intersections": 25.0, "scenario_construction_mean_num_controlled_intersections": 143.66666666666666, "scenario_construction_mean_num_industrial_intersections": 21.0, "scenario_construction_mean_num_mixed_intersections": 18.333333333333332, "scenario_construction_mean_num_residential_intersections": 86.33333333333333, "scenario_construction_mean_reward_component_mean_imbalance_term": -0.004694060825653819, "scenario_construction_mean_reward_component_mean_queue_level_term": -0.027350720928700833, "scenario_construction_mean_reward_component_mean_queue_term": -0.0026031210007120206, "scenario_construction_mean_reward_component_mean_throughput_term": 0.0003658551869867316, "scenario_construction_mean_reward_component_mean_wait_level_term": -0.05256648858605407, "scenario_construction_mean_reward_component_mean_wait_term": -0.005203055508965277, "scenario_construction_mean_reward_component_step_imbalance_term": -0.0076374183408916, "scenario_construction_mean_reward_component_step_queue_level_term": -0.04685617610812187, "scenario_construction_mean_reward_component_step_queue_term": -0.0004481977763740967, "scenario_construction_mean_reward_component_step_throughput_term": 2.1367525429620098e-05, "scenario_construction_mean_reward_component_step_wait_level_term": -0.0935974841316541, "scenario_construction_mean_reward_component_step_wait_term": -0.0003535638473598131, "scenario_construction_mean_running_vehicles": 12139.333333333334, "scenario_construction_mean_throughput": 7564.666666666667, "scenario_construction_mean_total_episode_return": -9542.592662516361, "scenario_construction_mean_total_incoming_vehicles": 11984.266927083334, "scenario_construction_mean_total_waiting_vehicles": 11970.066731770834, "scenario_district_overload_num_episodes": 3.0, "scenario_district_overload_mean_average_travel_time": 1321.631761904762, "scenario_district_overload_mean_decision_steps": 720.0, "scenario_district_overload_mean_episode_return": -0.09113791847966225, "scenario_district_overload_mean_mean_incoming_vehicles": 87.9266357421875, "scenario_district_overload_mean_mean_incoming_vehicles_commercial": 93.34952799479167, "scenario_district_overload_mean_mean_incoming_vehicles_industrial": 67.76544189453125, "scenario_district_overload_mean_mean_incoming_vehicles_mixed": 84.80581919352214, "scenario_district_overload_mean_mean_incoming_vehicles_residential": 90.90900166829427, "scenario_district_overload_mean_mean_reward": -0.15919040143489838, "scenario_district_overload_mean_mean_reward_commercial": -0.16925248503684998, "scenario_district_overload_mean_mean_reward_industrial": -0.14074310660362244, "scenario_district_overload_mean_mean_reward_mixed": -0.15265873074531555, "scenario_district_overload_mean_mean_reward_residential": -0.1631589730580648, "scenario_district_overload_mean_mean_step_intersection_reward": -0.09113791847966225, "scenario_district_overload_mean_mean_waiting_vehicles": 87.86712137858073, "scenario_district_overload_mean_mean_waiting_vehicles_commercial": 93.26918538411458, "scenario_district_overload_mean_mean_waiting_vehicles_industrial": 67.58676147460938, "scenario_district_overload_mean_mean_waiting_vehicles_mixed": 84.6847635904948, "scenario_district_overload_mean_mean_waiting_vehicles_residential": 90.85903676350911, "scenario_district_overload_mean_num_commercial_intersections": 25.0, "scenario_district_overload_mean_num_controlled_intersections": 143.66666666666666, "scenario_district_overload_mean_num_industrial_intersections": 21.0, "scenario_district_overload_mean_num_mixed_intersections": 18.333333333333332, "scenario_district_overload_mean_num_residential_intersections": 86.33333333333333, "scenario_district_overload_mean_reward_component_mean_imbalance_term": -0.004499694898201715, "scenario_district_overload_mean_reward_component_mean_queue_level_term": -0.026812501910274445, "scenario_district_overload_mean_reward_component_mean_queue_term": -0.002773250446938963, "scenario_district_overload_mean_reward_component_mean_throughput_term": 0.0002978298962143863, "scenario_district_overload_mean_reward_component_mean_wait_level_term": -0.05180333369168432, "scenario_district_overload_mean_reward_component_mean_wait_term": -0.005546968757534247, "scenario_district_overload_mean_reward_component_step_imbalance_term": -0.007903080899268389, "scenario_district_overload_mean_reward_component_step_queue_level_term": -0.04991850505272547, "scenario_district_overload_mean_reward_component_step_queue_term": -0.00034965363253528875, "scenario_district_overload_mean_reward_component_step_throughput_term": 8.401709177026835e-05, "scenario_district_overload_mean_reward_component_step_wait_level_term": -0.09976288676261902, "scenario_district_overload_mean_reward_component_step_wait_term": -0.0013403022118533652, "scenario_district_overload_mean_running_vehicles": 12859.333333333334, "scenario_district_overload_mean_throughput": 6169.333333333333, "scenario_district_overload_mean_total_episode_return": -9412.652553988, "scenario_district_overload_mean_total_incoming_vehicles": 12662.2666015625, "scenario_district_overload_mean_total_waiting_vehicles": 12653.466471354166, "scenario_evening_rush_num_episodes": 3.0, "scenario_evening_rush_mean_average_travel_time": 885.2436242084408, "scenario_evening_rush_mean_decision_steps": 720.0, "scenario_evening_rush_mean_episode_return": -0.0657032041964566, "scenario_evening_rush_mean_mean_incoming_vehicles": 91.86906178792317, "scenario_evening_rush_mean_mean_incoming_vehicles_commercial": 107.79419708251953, "scenario_evening_rush_mean_mean_incoming_vehicles_industrial": 96.92867660522461, "scenario_evening_rush_mean_mean_incoming_vehicles_mixed": 87.10581970214844, "scenario_evening_rush_mean_mean_incoming_vehicles_residential": 89.35035959879558, "scenario_evening_rush_mean_mean_reward": -0.1675482541322708, "scenario_evening_rush_mean_mean_reward_commercial": -0.19525809089342752, "scenario_evening_rush_mean_mean_reward_industrial": -0.19795610755681992, "scenario_evening_rush_mean_mean_reward_mixed": -0.15865648041168848, "scenario_evening_rush_mean_mean_reward_residential": -0.1617331157128016, "scenario_evening_rush_mean_mean_step_intersection_reward": -0.0657032041964566, "scenario_evening_rush_mean_mean_waiting_vehicles": 91.7703628540039, "scenario_evening_rush_mean_mean_waiting_vehicles_commercial": 107.75443267822266, "scenario_evening_rush_mean_mean_waiting_vehicles_industrial": 96.85220336914062, "scenario_evening_rush_mean_mean_waiting_vehicles_mixed": 86.86328125, "scenario_evening_rush_mean_mean_waiting_vehicles_residential": 89.24208323160808, "scenario_evening_rush_mean_num_commercial_intersections": 25.0, "scenario_evening_rush_mean_num_controlled_intersections": 143.66666666666666, "scenario_evening_rush_mean_num_industrial_intersections": 21.0, "scenario_evening_rush_mean_num_mixed_intersections": 18.333333333333332, "scenario_evening_rush_mean_num_residential_intersections": 86.33333333333333, "scenario_evening_rush_mean_reward_component_mean_imbalance_term": -0.0032557776655121142, "scenario_evening_rush_mean_reward_component_mean_queue_level_term": -0.01828810162636206, "scenario_evening_rush_mean_reward_component_mean_queue_term": -0.0029027873267907533, "scenario_evening_rush_mean_reward_component_mean_throughput_term": 0.00011552255801284949, "scenario_evening_rush_mean_reward_component_mean_wait_level_term": -0.03557006249260902, "scenario_evening_rush_mean_reward_component_mean_wait_term": -0.005801998404399246, "scenario_evening_rush_mean_reward_component_step_imbalance_term": -0.00796051478634278, "scenario_evening_rush_mean_reward_component_step_queue_level_term": -0.05225017418464025, "scenario_evening_rush_mean_reward_component_step_queue_term": -0.0011822618932152789, "scenario_evening_rush_mean_reward_component_step_throughput_term": 0.0, "scenario_evening_rush_mean_reward_component_step_wait_level_term": -0.10438264906406403, "scenario_evening_rush_mean_reward_component_step_wait_term": -0.001772658860621353, "scenario_evening_rush_mean_running_vehicles": 13475.666666666666, "scenario_evening_rush_mean_throughput": 2316.3333333333335, "scenario_evening_rush_mean_total_episode_return": -6818.957949910313, "scenario_evening_rush_mean_total_incoming_vehicles": 13288.0673828125, "scenario_evening_rush_mean_total_waiting_vehicles": 13273.733072916666, "scenario_event_spike_num_episodes": 3.0, "scenario_event_spike_mean_average_travel_time": 1332.7815238095238, "scenario_event_spike_mean_decision_steps": 720.0, "scenario_event_spike_mean_episode_return": -0.09497512888523263, "scenario_event_spike_mean_mean_incoming_vehicles": 90.73299916585286, "scenario_event_spike_mean_mean_incoming_vehicles_commercial": 92.61021169026692, "scenario_event_spike_mean_mean_incoming_vehicles_industrial": 77.0257339477539, "scenario_event_spike_mean_mean_incoming_vehicles_mixed": 91.61163838704427, "scenario_event_spike_mean_mean_incoming_vehicles_residential": 93.74669901529948, "scenario_event_spike_mean_mean_reward": -0.16392784814039865, "scenario_event_spike_mean_mean_reward_commercial": -0.16679694751898447, "scenario_event_spike_mean_mean_reward_industrial": -0.16338655352592468, "scenario_event_spike_mean_mean_reward_mixed": -0.16039084394772848, "scenario_event_spike_mean_mean_reward_residential": -0.16780628263950348, "scenario_event_spike_mean_mean_step_intersection_reward": -0.09497512888523263, "scenario_event_spike_mean_mean_waiting_vehicles": 90.64966837565105, "scenario_event_spike_mean_mean_waiting_vehicles_commercial": 92.50106302897136, "scenario_event_spike_mean_mean_waiting_vehicles_industrial": 76.95808792114258, "scenario_event_spike_mean_mean_waiting_vehicles_mixed": 91.57089742024739, "scenario_event_spike_mean_mean_waiting_vehicles_residential": 93.66334279378255, "scenario_event_spike_mean_num_commercial_intersections": 25.0, "scenario_event_spike_mean_num_controlled_intersections": 143.66666666666666, "scenario_event_spike_mean_num_industrial_intersections": 21.0, "scenario_event_spike_mean_num_mixed_intersections": 18.333333333333332, "scenario_event_spike_mean_num_residential_intersections": 86.33333333333333, "scenario_event_spike_mean_reward_component_mean_imbalance_term": -0.004638620888949497, "scenario_event_spike_mean_reward_component_mean_queue_level_term": -0.027936135217172437, "scenario_event_spike_mean_reward_component_mean_queue_term": -0.002854231635398418, "scenario_event_spike_mean_reward_component_mean_throughput_term": 0.0002847371864222455, "scenario_event_spike_mean_reward_component_mean_wait_level_term": -0.0541220359207616, "scenario_event_spike_mean_reward_component_mean_wait_term": -0.0057088411199695925, "scenario_event_spike_mean_reward_component_step_imbalance_term": -0.008042927831411362, "scenario_event_spike_mean_reward_component_step_queue_level_term": -0.051376170168320336, "scenario_event_spike_mean_reward_component_step_queue_term": -0.0006804824418698748, "scenario_event_spike_mean_reward_component_step_throughput_term": 0.0, "scenario_event_spike_mean_reward_component_step_wait_level_term": -0.10265526672204335, "scenario_event_spike_mean_reward_component_step_wait_term": -0.0011729970186327894, "scenario_event_spike_mean_running_vehicles": 13274.333333333334, "scenario_event_spike_mean_throughput": 5840.0, "scenario_event_spike_mean_total_episode_return": -9814.410960483054, "scenario_event_spike_mean_total_incoming_vehicles": 13075.666341145834, "scenario_event_spike_mean_total_waiting_vehicles": 13063.400390625, "scenario_morning_rush_num_episodes": 3.0, "scenario_morning_rush_mean_average_travel_time": 1936.5922978284925, "scenario_morning_rush_mean_decision_steps": 720.0, "scenario_morning_rush_mean_episode_return": -0.10708962933340616, "scenario_morning_rush_mean_mean_incoming_vehicles": 74.61074320475261, "scenario_morning_rush_mean_mean_incoming_vehicles_commercial": 55.51025644938151, "scenario_morning_rush_mean_mean_incoming_vehicles_industrial": 40.59558868408203, "scenario_morning_rush_mean_mean_incoming_vehicles_mixed": 59.87671915690104, "scenario_morning_rush_mean_mean_incoming_vehicles_residential": 87.9905293782552, "scenario_morning_rush_mean_mean_reward": -0.133999931315581, "scenario_morning_rush_mean_mean_reward_commercial": -0.10033458222945531, "scenario_morning_rush_mean_mean_reward_industrial": -0.08416341990232468, "scenario_morning_rush_mean_mean_reward_mixed": -0.10421889275312424, "scenario_morning_rush_mean_mean_reward_residential": -0.15734600027402243, "scenario_morning_rush_mean_mean_step_intersection_reward": -0.10708962933340616, "scenario_morning_rush_mean_mean_waiting_vehicles": 74.57434844970703, "scenario_morning_rush_mean_mean_waiting_vehicles_commercial": 55.436256408691406, "scenario_morning_rush_mean_mean_waiting_vehicles_industrial": 40.52499961853027, "scenario_morning_rush_mean_mean_waiting_vehicles_mixed": 59.85820007324219, "scenario_morning_rush_mean_mean_waiting_vehicles_residential": 87.97000122070312, "scenario_morning_rush_mean_num_commercial_intersections": 25.0, "scenario_morning_rush_mean_num_controlled_intersections": 143.66666666666666, "scenario_morning_rush_mean_num_industrial_intersections": 21.0, "scenario_morning_rush_mean_num_mixed_intersections": 18.333333333333332, "scenario_morning_rush_mean_num_residential_intersections": 86.33333333333333, "scenario_morning_rush_mean_reward_component_mean_imbalance_term": -0.005449405028831341, "scenario_morning_rush_mean_reward_component_mean_queue_level_term": -0.032297381070178814, "scenario_morning_rush_mean_reward_component_mean_queue_term": -0.0023439763828315627, "scenario_morning_rush_mean_reward_component_mean_throughput_term": 0.00035928134784626306, "scenario_morning_rush_mean_reward_component_mean_wait_level_term": -0.0626729876756738, "scenario_morning_rush_mean_reward_component_mean_wait_term": -0.004685159468403868, "scenario_morning_rush_mean_reward_component_step_imbalance_term": -0.007145765703171492, "scenario_morning_rush_mean_reward_component_step_queue_level_term": -0.042191573729117714, "scenario_morning_rush_mean_reward_component_step_queue_term": -0.00013554633612026615, "scenario_morning_rush_mean_reward_component_step_throughput_term": 1.0683762714810049e-05, "scenario_morning_rush_mean_reward_component_step_wait_level_term": -0.08433849612871806, "scenario_morning_rush_mean_reward_component_step_wait_term": -0.0001992371010904511, "scenario_morning_rush_mean_running_vehicles": 10819.0, "scenario_morning_rush_mean_throughput": 7449.333333333333, "scenario_morning_rush_mean_total_episode_return": -10973.810554889342, "scenario_morning_rush_mean_total_incoming_vehicles": 10671.133138020834, "scenario_morning_rush_mean_total_waiting_vehicles": 10665.6669921875, "scenario_normal_num_episodes": 3.0, "scenario_normal_mean_average_travel_time": 994.9635758293795, "scenario_normal_mean_decision_steps": 720.0, "scenario_normal_mean_episode_return": -0.05035059287815574, "scenario_normal_mean_mean_incoming_vehicles": 55.243385314941406, "scenario_normal_mean_mean_incoming_vehicles_commercial": 50.84821573893229, "scenario_normal_mean_mean_incoming_vehicles_industrial": 44.05661582946777, "scenario_normal_mean_mean_incoming_vehicles_mixed": 67.43492253621419, "scenario_normal_mean_mean_incoming_vehicles_residential": 55.653130849202476, "scenario_normal_mean_mean_reward": -0.10349780072768529, "scenario_normal_mean_mean_reward_commercial": -0.09856811662515004, "scenario_normal_mean_mean_reward_industrial": -0.1059267669916153, "scenario_normal_mean_mean_reward_mixed": -0.12077426662047704, "scenario_normal_mean_mean_reward_residential": -0.10205420603354771, "scenario_normal_mean_mean_step_intersection_reward": -0.05035059287815574, "scenario_normal_mean_mean_waiting_vehicles": 54.95635477701823, "scenario_normal_mean_mean_waiting_vehicles_commercial": 50.58484013875326, "scenario_normal_mean_mean_waiting_vehicles_industrial": 43.58970642089844, "scenario_normal_mean_mean_waiting_vehicles_mixed": 67.19206110636394, "scenario_normal_mean_mean_waiting_vehicles_residential": 55.35915883382162, "scenario_normal_mean_num_commercial_intersections": 25.0, "scenario_normal_mean_num_controlled_intersections": 143.66666666666666, "scenario_normal_mean_num_industrial_intersections": 21.0, "scenario_normal_mean_num_mixed_intersections": 18.333333333333332, "scenario_normal_mean_num_residential_intersections": 86.33333333333333, "scenario_normal_mean_reward_component_mean_imbalance_term": -0.003025566950653216, "scenario_normal_mean_reward_component_mean_queue_level_term": -0.014634433261168547, "scenario_normal_mean_reward_component_mean_queue_term": -0.0017333149190245985, "scenario_normal_mean_reward_component_mean_throughput_term": 0.0002865474925884983, "scenario_normal_mean_reward_component_mean_wait_level_term": -0.02779575498924192, "scenario_normal_mean_reward_component_mean_wait_term": -0.003448070537263835, "scenario_normal_mean_reward_component_step_imbalance_term": -0.005835302174091339, "scenario_normal_mean_reward_component_step_queue_level_term": -0.03119966636101405, "scenario_normal_mean_reward_component_step_queue_term": -0.0011430880016026397, "scenario_normal_mean_reward_component_step_throughput_term": 4.846154115512036e-05, "scenario_normal_mean_reward_component_step_wait_level_term": -0.06206526731451353, "scenario_normal_mean_reward_component_step_wait_term": -0.003302937373518944, "scenario_normal_mean_running_vehicles": 8012.333333333333, "scenario_normal_mean_throughput": 5872.333333333333, "scenario_normal_mean_total_episode_return": -5199.065684910242, "scenario_normal_mean_total_incoming_vehicles": 7917.932942708333, "scenario_normal_mean_total_waiting_vehicles": 7875.86669921875, "random_num_episodes": 21.0, "random_mean_average_travel_time": 1150.490886825089, "random_mean_decision_steps": 720.0, "random_mean_episode_return": -0.06990540427320903, "random_mean_mean_incoming_vehicles": 69.09179215204148, "random_mean_mean_incoming_vehicles_commercial": 69.69936116536458, "random_mean_mean_incoming_vehicles_industrial": 54.167437246867586, "random_mean_mean_incoming_vehicles_mixed": 64.11694612957183, "random_mean_mean_incoming_vehicles_residential": 72.85166081928071, "random_mean_mean_reward": -0.12400015700785887, "random_mean_mean_reward_commercial": -0.12445728862214656, "random_mean_mean_reward_industrial": -0.11350162490271032, "random_mean_mean_reward_mixed": -0.11247687130456879, "random_mean_mean_reward_residential": -0.12984067316920983, "random_mean_mean_step_intersection_reward": -0.06990540427320903, "random_mean_mean_waiting_vehicles": 68.76035340627034, "random_mean_mean_waiting_vehicles_commercial": 69.30996792657035, "random_mean_mean_waiting_vehicles_industrial": 53.88970620291574, "random_mean_mean_waiting_vehicles_mixed": 63.8006804784139, "random_mean_mean_waiting_vehicles_residential": 72.5347569329398, "random_mean_num_commercial_intersections": 25.0, "random_mean_num_controlled_intersections": 143.66666666666666, "random_mean_num_industrial_intersections": 21.0, "random_mean_num_mixed_intersections": 18.333333333333332, "random_mean_num_residential_intersections": 86.33333333333333, "random_mean_reward_component_mean_imbalance_term": -0.0035169177249284793, "random_mean_reward_component_mean_queue_level_term": -0.020883214150611333, "random_mean_reward_component_mean_queue_term": -0.0021505768439987584, "random_mean_reward_component_mean_throughput_term": 0.00042290938528687414, "random_mean_reward_component_mean_wait_level_term": -0.03949674352678153, "random_mean_reward_component_mean_wait_term": -0.004280861136431931, "random_mean_reward_component_step_imbalance_term": -0.006498712852286796, "random_mean_reward_component_step_queue_level_term": -0.038710383454426414, "random_mean_reward_component_step_queue_term": -0.0005683491076308114, "random_mean_reward_component_step_throughput_term": 6.40415185314071e-05, "random_mean_reward_component_step_wait_level_term": -0.07703489584050008, "random_mean_reward_component_step_wait_term": -0.0012518596860380577, "random_mean_running_vehicles": 10092.333333333334, "random_mean_throughput": 8747.666666666666, "random_mean_total_episode_return": -7200.1159364810055, "random_mean_total_incoming_vehicles": 9939.742803664434, "random_mean_total_waiting_vehicles": 9891.790521530878, "fixed_num_episodes": 21.0, "fixed_mean_average_travel_time": 1124.0568712437182, "fixed_mean_decision_steps": 720.0, "fixed_mean_episode_return": -0.0686861406711341, "fixed_mean_mean_incoming_vehicles": 67.68201482863654, "fixed_mean_mean_incoming_vehicles_commercial": 66.97131806328183, "fixed_mean_mean_incoming_vehicles_industrial": 51.990231377737864, "fixed_mean_mean_incoming_vehicles_mixed": 63.079319545200896, "fixed_mean_mean_incoming_vehicles_residential": 71.61492279597691, "fixed_mean_mean_reward": -0.12380785920790263, "fixed_mean_mean_reward_commercial": -0.1204067144897722, "fixed_mean_mean_reward_industrial": -0.11324393004179001, "fixed_mean_mean_reward_mixed": -0.11251166910820064, "fixed_mean_mean_reward_residential": -0.1302961799360457, "fixed_mean_mean_step_intersection_reward": -0.0686861406711341, "fixed_mean_mean_waiting_vehicles": 67.34817786443801, "fixed_mean_mean_waiting_vehicles_commercial": 66.6082061585926, "fixed_mean_mean_waiting_vehicles_industrial": 51.550524847848074, "fixed_mean_mean_waiting_vehicles_mixed": 62.698986870901926, "fixed_mean_mean_waiting_vehicles_residential": 71.31377015795026, "fixed_mean_num_commercial_intersections": 25.0, "fixed_mean_num_controlled_intersections": 143.66666666666666, "fixed_mean_num_industrial_intersections": 21.0, "fixed_mean_num_mixed_intersections": 18.333333333333332, "fixed_mean_num_residential_intersections": 86.33333333333333, "fixed_mean_reward_component_mean_imbalance_term": -0.0034660549592796983, "fixed_mean_reward_component_mean_queue_level_term": -0.0205750415868521, "fixed_mean_reward_component_mean_queue_term": -0.0021086093155188923, "fixed_mean_reward_component_mean_throughput_term": 0.00045078397826088165, "fixed_mean_reward_component_mean_wait_level_term": -0.038789133458898686, "fixed_mean_reward_component_mean_wait_term": -0.004198085088907214, "fixed_mean_reward_component_step_imbalance_term": -0.006364841884489925, "fixed_mean_reward_component_step_queue_level_term": -0.03795496879943779, "fixed_mean_reward_component_step_queue_term": -0.0003611404653860345, "fixed_mean_reward_component_step_throughput_term": 7.484737112203479e-05, "fixed_mean_reward_component_step_wait_level_term": -0.07553448993712664, "fixed_mean_reward_component_step_wait_term": -0.0036672655107741732, "fixed_mean_running_vehicles": 9872.0, "fixed_mean_throughput": 9343.190476190477, "fixed_mean_total_episode_return": -7067.373823361915, "fixed_mean_total_incoming_vehicles": 9722.552490234375, "fixed_mean_total_waiting_vehicles": 9673.361897786459, "learner_minus_fixed_return": -0.01618220194007622, "learner_minus_random_return": -0.014962938338001289, "update": 20, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "rolling_mean_episode_return": -0.08486834261121032, "rolling_mean_total_episode_return": -8766.06676128968, "rolling_mean_mean_waiting_vehicles": 80.8872553507487, "rolling_mean_throughput": 6031.428571428572} +{"num_episodes": 21.0, "mean_average_travel_time": 1268.2132916592611, "mean_decision_steps": 720.0, "mean_episode_return": -0.08065056819540908, "mean_mean_incoming_vehicles": 78.11120714460101, "mean_mean_incoming_vehicles_commercial": 77.98252296447754, "mean_mean_incoming_vehicles_industrial": 61.233507701328826, "mean_mean_incoming_vehicles_mixed": 75.1530618213472, "mean_mean_incoming_vehicles_residential": 81.80628549484979, "mean_mean_reward": -0.14137286160673415, "mean_mean_reward_commercial": -0.14057240173930213, "mean_mean_reward_industrial": -0.12999094437275613, "mean_mean_reward_mixed": -0.1345921325541678, "mean_mean_reward_residential": -0.14665615824716433, "mean_mean_step_intersection_reward": -0.08065056819540908, "mean_mean_waiting_vehicles": 77.98757498604911, "mean_mean_waiting_vehicles_commercial": 77.85951169331868, "mean_mean_waiting_vehicles_industrial": 61.058612551007954, "mean_mean_waiting_vehicles_mixed": 75.03800419398716, "mean_mean_waiting_vehicles_residential": 81.68517230805897, "mean_num_commercial_intersections": 25.0, "mean_num_controlled_intersections": 143.66666666666666, "mean_num_industrial_intersections": 21.0, "mean_num_mixed_intersections": 18.333333333333332, "mean_num_residential_intersections": 86.33333333333333, "mean_reward_component_mean_imbalance_term": -0.004065092784540517, "mean_reward_component_mean_queue_level_term": -0.023812128864152432, "mean_reward_component_mean_queue_term": -0.0024568224534365093, "mean_reward_component_mean_throughput_term": 0.00032531726546107233, "mean_reward_component_mean_wait_level_term": -0.04573495212162131, "mean_reward_component_mean_wait_term": -0.004906888693554769, "mean_reward_component_step_imbalance_term": -0.007213768615786519, "mean_reward_component_step_queue_level_term": -0.04422280298812049, "mean_reward_component_step_queue_term": -0.0005689788006185111, "mean_reward_component_step_throughput_term": 1.8046400024710845e-05, "mean_reward_component_step_wait_level_term": -0.0883003059952032, "mean_reward_component_step_wait_term": -0.0010850461812445982, "mean_running_vehicles": 11412.047619047618, "mean_throughput": 6718.0952380952385, "mean_total_episode_return": -8322.496321796662, "mean_total_incoming_vehicles": 11247.580961681548, "mean_total_waiting_vehicles": 11229.447474888393, "scenario_accident_num_episodes": 3.0, "scenario_accident_mean_average_travel_time": 1411.759888888889, "scenario_accident_mean_decision_steps": 720.0, "scenario_accident_mean_episode_return": -0.0904396665156328, "scenario_accident_mean_mean_incoming_vehicles": 82.66299184163411, "scenario_accident_mean_mean_incoming_vehicles_commercial": 79.41503397623698, "scenario_accident_mean_mean_incoming_vehicles_industrial": 74.30147171020508, "scenario_accident_mean_mean_incoming_vehicles_mixed": 76.31058247884114, "scenario_accident_mean_mean_incoming_vehicles_residential": 86.23528289794922, "scenario_accident_mean_mean_reward": -0.14962485432624817, "scenario_accident_mean_mean_reward_commercial": -0.1416445126136144, "scenario_accident_mean_mean_reward_industrial": -0.1553802490234375, "scenario_accident_mean_mean_reward_mixed": -0.1386956349015236, "scenario_accident_mean_mean_reward_residential": -0.15439224243164062, "scenario_accident_mean_mean_step_intersection_reward": -0.0904396665156328, "scenario_accident_mean_mean_waiting_vehicles": 82.62549336751302, "scenario_accident_mean_mean_waiting_vehicles_commercial": 79.38665771484375, "scenario_accident_mean_mean_waiting_vehicles_industrial": 74.25147247314453, "scenario_accident_mean_mean_waiting_vehicles_mixed": 76.2753423055013, "scenario_accident_mean_mean_waiting_vehicles_residential": 86.1992899576823, "scenario_accident_mean_num_commercial_intersections": 25.0, "scenario_accident_mean_num_controlled_intersections": 143.66666666666666, "scenario_accident_mean_num_industrial_intersections": 21.0, "scenario_accident_mean_num_mixed_intersections": 18.333333333333332, "scenario_accident_mean_num_residential_intersections": 86.33333333333333, "scenario_accident_mean_reward_component_mean_imbalance_term": -0.004421344317873035, "scenario_accident_mean_reward_component_mean_queue_level_term": -0.02691410790453456, "scenario_accident_mean_reward_component_mean_queue_term": -0.0026103037602155416, "scenario_accident_mean_reward_component_mean_throughput_term": 0.0003602595076009257, "scenario_accident_mean_reward_component_mean_wait_level_term": -0.05163612750054749, "scenario_accident_mean_reward_component_mean_wait_term": -0.00521804408241677, "scenario_accident_mean_reward_component_step_imbalance_term": -0.00753371665875117, "scenario_accident_mean_reward_component_step_queue_level_term": -0.046985467274983726, "scenario_accident_mean_reward_component_step_queue_term": -0.000387709840045621, "scenario_accident_mean_reward_component_step_throughput_term": 1.1111112447300306e-05, "scenario_accident_mean_reward_component_step_wait_level_term": -0.09392478813727696, "scenario_accident_mean_reward_component_step_wait_term": -0.0008042699579770366, "scenario_accident_mean_running_vehicles": 12111.666666666666, "scenario_accident_mean_throughput": 7359.666666666667, "scenario_accident_mean_total_episode_return": -9357.794001990309, "scenario_accident_mean_total_incoming_vehicles": 11921.2001953125, "scenario_accident_mean_total_waiting_vehicles": 11915.599609375, "scenario_construction_num_episodes": 3.0, "scenario_construction_mean_average_travel_time": 1363.9211220220077, "scenario_construction_mean_decision_steps": 720.0, "scenario_construction_mean_episode_return": -0.0891482598902557, "scenario_construction_mean_mean_incoming_vehicles": 80.75005594889323, "scenario_construction_mean_mean_incoming_vehicles_commercial": 78.53020095825195, "scenario_construction_mean_mean_incoming_vehicles_industrial": 55.59191131591797, "scenario_construction_mean_mean_incoming_vehicles_mixed": 74.87301635742188, "scenario_construction_mean_mean_incoming_vehicles_residential": 85.36388142903645, "scenario_construction_mean_mean_reward": -0.14593016107877096, "scenario_construction_mean_mean_reward_commercial": -0.14102379232645035, "scenario_construction_mean_mean_reward_industrial": -0.11277418211102486, "scenario_construction_mean_mean_reward_mixed": -0.13519569983084997, "scenario_construction_mean_mean_reward_residential": -0.15341929097970328, "scenario_construction_mean_mean_step_intersection_reward": -0.0891482598902557, "scenario_construction_mean_mean_waiting_vehicles": 80.67174275716145, "scenario_construction_mean_mean_waiting_vehicles_commercial": 78.42397562662761, "scenario_construction_mean_mean_waiting_vehicles_industrial": 55.44705581665039, "scenario_construction_mean_mean_waiting_vehicles_mixed": 74.75661214192708, "scenario_construction_mean_mean_waiting_vehicles_residential": 85.30693817138672, "scenario_construction_mean_num_commercial_intersections": 25.0, "scenario_construction_mean_num_controlled_intersections": 143.66666666666666, "scenario_construction_mean_num_industrial_intersections": 21.0, "scenario_construction_mean_num_mixed_intersections": 18.333333333333332, "scenario_construction_mean_num_residential_intersections": 86.33333333333333, "scenario_construction_mean_reward_component_mean_imbalance_term": -0.004507689155716918, "scenario_construction_mean_reward_component_mean_queue_level_term": -0.02652356870781929, "scenario_construction_mean_reward_component_mean_queue_term": -0.0025335650880750505, "scenario_construction_mean_reward_component_mean_throughput_term": 0.00037105414114227674, "scenario_construction_mean_reward_component_mean_wait_level_term": -0.050891825682122804, "scenario_construction_mean_reward_component_mean_wait_term": -0.005062663975033085, "scenario_construction_mean_reward_component_step_imbalance_term": -0.007488459348678589, "scenario_construction_mean_reward_component_step_queue_level_term": -0.04560417061050733, "scenario_construction_mean_reward_component_step_queue_term": -0.0004426234566684191, "scenario_construction_mean_reward_component_step_throughput_term": 2.401709571131505e-05, "scenario_construction_mean_reward_component_step_wait_level_term": -0.09111538777748744, "scenario_construction_mean_reward_component_step_wait_term": -0.0013035361383420725, "scenario_construction_mean_running_vehicles": 11828.0, "scenario_construction_mean_throughput": 7776.0, "scenario_construction_mean_total_episode_return": -9218.928452347094, "scenario_construction_mean_total_incoming_vehicles": 11668.93359375, "scenario_construction_mean_total_waiting_vehicles": 11657.399739583334, "scenario_district_overload_num_episodes": 3.0, "scenario_district_overload_mean_average_travel_time": 1295.1715158730158, "scenario_district_overload_mean_decision_steps": 720.0, "scenario_district_overload_mean_episode_return": -0.0881956789920278, "scenario_district_overload_mean_mean_incoming_vehicles": 86.67661794026692, "scenario_district_overload_mean_mean_incoming_vehicles_commercial": 95.01079559326172, "scenario_district_overload_mean_mean_incoming_vehicles_industrial": 67.78749656677246, "scenario_district_overload_mean_mean_incoming_vehicles_mixed": 86.99999745686848, "scenario_district_overload_mean_mean_incoming_vehicles_residential": 88.7105941772461, "scenario_district_overload_mean_mean_reward": -0.15666582683722177, "scenario_district_overload_mean_mean_reward_commercial": -0.1721796989440918, "scenario_district_overload_mean_mean_reward_industrial": -0.14541197195649147, "scenario_district_overload_mean_mean_reward_mixed": -0.15454320112864176, "scenario_district_overload_mean_mean_reward_residential": -0.1584897538026174, "scenario_district_overload_mean_mean_step_intersection_reward": -0.0881956789920278, "scenario_district_overload_mean_mean_waiting_vehicles": 86.60477956136067, "scenario_district_overload_mean_mean_waiting_vehicles_commercial": 94.93174235026042, "scenario_district_overload_mean_mean_waiting_vehicles_industrial": 67.6595573425293, "scenario_district_overload_mean_mean_waiting_vehicles_mixed": 86.92772165934245, "scenario_district_overload_mean_mean_waiting_vehicles_residential": 88.64160664876302, "scenario_district_overload_mean_num_commercial_intersections": 25.0, "scenario_district_overload_mean_num_controlled_intersections": 143.66666666666666, "scenario_district_overload_mean_num_industrial_intersections": 21.0, "scenario_district_overload_mean_num_mixed_intersections": 18.333333333333332, "scenario_district_overload_mean_num_residential_intersections": 86.33333333333333, "scenario_district_overload_mean_reward_component_mean_imbalance_term": -0.004273536046542411, "scenario_district_overload_mean_reward_component_mean_queue_level_term": -0.026002598700083746, "scenario_district_overload_mean_reward_component_mean_queue_term": -0.002730338745060977, "scenario_district_overload_mean_reward_component_mean_throughput_term": 0.0003166555174579521, "scenario_district_overload_mean_reward_component_mean_wait_level_term": -0.05004762406295001, "scenario_district_overload_mean_reward_component_mean_wait_term": -0.005458235277005959, "scenario_district_overload_mean_reward_component_step_imbalance_term": -0.00771539518609643, "scenario_district_overload_mean_reward_component_step_queue_level_term": -0.04914609342813492, "scenario_district_overload_mean_reward_component_step_queue_term": -0.0003390222166975339, "scenario_district_overload_mean_reward_component_step_throughput_term": 2.1367525429620098e-05, "scenario_district_overload_mean_reward_component_step_wait_level_term": -0.09820649524529775, "scenario_district_overload_mean_reward_component_step_wait_term": -0.0012801769577587645, "scenario_district_overload_mean_running_vehicles": 12672.333333333334, "scenario_district_overload_mean_throughput": 6602.666666666667, "scenario_district_overload_mean_total_episode_return": -9088.324234420434, "scenario_district_overload_mean_total_incoming_vehicles": 12468.466471354166, "scenario_district_overload_mean_total_waiting_vehicles": 12457.733072916666, "scenario_evening_rush_num_episodes": 3.0, "scenario_evening_rush_mean_average_travel_time": 864.0714926759046, "scenario_evening_rush_mean_decision_steps": 720.0, "scenario_evening_rush_mean_episode_return": -0.06342388809543271, "scenario_evening_rush_mean_mean_incoming_vehicles": 90.66544850667317, "scenario_evening_rush_mean_mean_incoming_vehicles_commercial": 108.17559305826823, "scenario_evening_rush_mean_mean_incoming_vehicles_industrial": 92.7191162109375, "scenario_evening_rush_mean_mean_incoming_vehicles_mixed": 84.21693166097005, "scenario_evening_rush_mean_mean_incoming_vehicles_residential": 87.71800740559895, "scenario_evening_rush_mean_mean_reward": -0.16457567115624747, "scenario_evening_rush_mean_mean_reward_commercial": -0.19561443229516348, "scenario_evening_rush_mean_mean_reward_industrial": -0.19271807372570038, "scenario_evening_rush_mean_mean_reward_mixed": -0.1515280157327652, "scenario_evening_rush_mean_mean_reward_residential": -0.1579381227493286, "scenario_evening_rush_mean_mean_step_intersection_reward": -0.06342388809543271, "scenario_evening_rush_mean_mean_waiting_vehicles": 90.54784647623698, "scenario_evening_rush_mean_mean_waiting_vehicles_commercial": 108.12950897216797, "scenario_evening_rush_mean_mean_waiting_vehicles_industrial": 92.625, "scenario_evening_rush_mean_mean_waiting_vehicles_mixed": 83.95714569091797, "scenario_evening_rush_mean_mean_waiting_vehicles_residential": 87.5840581258138, "scenario_evening_rush_mean_num_commercial_intersections": 25.0, "scenario_evening_rush_mean_num_controlled_intersections": 143.66666666666666, "scenario_evening_rush_mean_num_industrial_intersections": 21.0, "scenario_evening_rush_mean_num_mixed_intersections": 18.333333333333332, "scenario_evening_rush_mean_num_residential_intersections": 86.33333333333333, "scenario_evening_rush_mean_reward_component_mean_imbalance_term": -0.0031023501918561965, "scenario_evening_rush_mean_reward_component_mean_queue_level_term": -0.01764473241525374, "scenario_evening_rush_mean_reward_component_mean_queue_term": -0.0028624893978671496, "scenario_evening_rush_mean_reward_component_mean_throughput_term": 0.00012469456733520525, "scenario_evening_rush_mean_reward_component_mean_wait_level_term": -0.03421923155784936, "scenario_evening_rush_mean_reward_component_mean_wait_term": -0.005719779381957079, "scenario_evening_rush_mean_reward_component_step_imbalance_term": -0.007895362408210834, "scenario_evening_rush_mean_reward_component_step_queue_level_term": -0.051524811734755836, "scenario_evening_rush_mean_reward_component_step_queue_term": -0.0009908682356278102, "scenario_evening_rush_mean_reward_component_step_throughput_term": 0.0, "scenario_evening_rush_mean_reward_component_step_wait_level_term": -0.10290626684824626, "scenario_evening_rush_mean_reward_component_step_wait_term": -0.0012583534698933363, "scenario_evening_rush_mean_running_vehicles": 13253.333333333334, "scenario_evening_rush_mean_throughput": 2568.0, "scenario_evening_rush_mean_total_episode_return": -6549.855107534056, "scenario_evening_rush_mean_total_incoming_vehicles": 13072.800130208334, "scenario_evening_rush_mean_total_waiting_vehicles": 13055.466145833334, "scenario_event_spike_num_episodes": 3.0, "scenario_event_spike_mean_average_travel_time": 1281.954880952381, "scenario_event_spike_mean_decision_steps": 720.0, "scenario_event_spike_mean_episode_return": -0.09072049533666075, "scenario_event_spike_mean_mean_incoming_vehicles": 88.48151143391927, "scenario_event_spike_mean_mean_incoming_vehicles_commercial": 90.20530954996745, "scenario_event_spike_mean_mean_incoming_vehicles_industrial": 70.84191131591797, "scenario_event_spike_mean_mean_incoming_vehicles_mixed": 91.60211944580078, "scenario_event_spike_mean_mean_incoming_vehicles_residential": 91.54457600911458, "scenario_event_spike_mean_mean_reward": -0.15982097387313843, "scenario_event_spike_mean_mean_reward_commercial": -0.16011461118857065, "scenario_event_spike_mean_mean_reward_industrial": -0.15067455172538757, "scenario_event_spike_mean_mean_reward_mixed": -0.16401011248429617, "scenario_event_spike_mean_mean_reward_residential": -0.16392644246419272, "scenario_event_spike_mean_mean_step_intersection_reward": -0.09072049533666075, "scenario_event_spike_mean_mean_waiting_vehicles": 88.3971430460612, "scenario_event_spike_mean_mean_waiting_vehicles_commercial": 90.06856536865234, "scenario_event_spike_mean_mean_waiting_vehicles_industrial": 70.70882034301758, "scenario_event_spike_mean_mean_waiting_vehicles_mixed": 91.5724868774414, "scenario_event_spike_mean_mean_waiting_vehicles_residential": 91.48065694173177, "scenario_event_spike_mean_num_commercial_intersections": 25.0, "scenario_event_spike_mean_num_controlled_intersections": 143.66666666666666, "scenario_event_spike_mean_num_industrial_intersections": 21.0, "scenario_event_spike_mean_num_mixed_intersections": 18.333333333333332, "scenario_event_spike_mean_num_residential_intersections": 86.33333333333333, "scenario_event_spike_mean_reward_component_mean_imbalance_term": -0.004434348057323023, "scenario_event_spike_mean_reward_component_mean_queue_level_term": -0.02674678366379508, "scenario_event_spike_mean_reward_component_mean_queue_term": -0.002780964880255626, "scenario_event_spike_mean_reward_component_mean_throughput_term": 0.0003304387561018774, "scenario_event_spike_mean_reward_component_mean_wait_level_term": -0.05152829566314549, "scenario_event_spike_mean_reward_component_mean_wait_term": -0.005560540943224019, "scenario_event_spike_mean_reward_component_step_imbalance_term": -0.007938962119321028, "scenario_event_spike_mean_reward_component_step_queue_level_term": -0.05005736400683721, "scenario_event_spike_mean_reward_component_step_queue_term": -0.0005765459112202128, "scenario_event_spike_mean_reward_component_step_throughput_term": 1.0683762714810049e-05, "scenario_event_spike_mean_reward_component_step_wait_level_term": -0.10001830508311589, "scenario_event_spike_mean_reward_component_step_wait_term": -0.0012404831601694848, "scenario_event_spike_mean_running_vehicles": 12922.333333333334, "scenario_event_spike_mean_throughput": 6792.0, "scenario_event_spike_mean_total_episode_return": -9364.969048111388, "scenario_event_spike_mean_total_incoming_vehicles": 12743.199869791666, "scenario_event_spike_mean_total_waiting_vehicles": 12730.8671875, "scenario_morning_rush_num_episodes": 3.0, "scenario_morning_rush_mean_average_travel_time": 1860.1581678399245, "scenario_morning_rush_mean_decision_steps": 720.0, "scenario_morning_rush_mean_episode_return": -0.1019544142957232, "scenario_morning_rush_mean_mean_incoming_vehicles": 70.80067443847656, "scenario_morning_rush_mean_mean_incoming_vehicles_commercial": 51.71791203816732, "scenario_morning_rush_mean_mean_incoming_vehicles_industrial": 35.16691207885742, "scenario_morning_rush_mean_mean_incoming_vehicles_mixed": 57.13492202758789, "scenario_morning_rush_mean_mean_incoming_vehicles_residential": 83.92116800944011, "scenario_morning_rush_mean_mean_reward": -0.12779288987318674, "scenario_morning_rush_mean_mean_reward_commercial": -0.09445428848266602, "scenario_morning_rush_mean_mean_reward_industrial": -0.07477342523634434, "scenario_morning_rush_mean_mean_reward_mixed": -0.09980962425470352, "scenario_morning_rush_mean_mean_reward_residential": -0.15060105423132578, "scenario_morning_rush_mean_mean_step_intersection_reward": -0.1019544142957232, "scenario_morning_rush_mean_mean_waiting_vehicles": 70.74861526489258, "scenario_morning_rush_mean_mean_waiting_vehicles_commercial": 51.61019388834635, "scenario_morning_rush_mean_mean_waiting_vehicles_industrial": 35.09044075012207, "scenario_morning_rush_mean_mean_waiting_vehicles_mixed": 57.079366048177086, "scenario_morning_rush_mean_mean_waiting_vehicles_residential": 83.89161427815755, "scenario_morning_rush_mean_num_commercial_intersections": 25.0, "scenario_morning_rush_mean_num_controlled_intersections": 143.66666666666666, "scenario_morning_rush_mean_num_industrial_intersections": 21.0, "scenario_morning_rush_mean_num_mixed_intersections": 18.333333333333332, "scenario_morning_rush_mean_num_residential_intersections": 86.33333333333333, "scenario_morning_rush_mean_reward_component_mean_imbalance_term": -0.005236291521022004, "scenario_morning_rush_mean_reward_component_mean_queue_level_term": -0.030872170135393794, "scenario_morning_rush_mean_reward_component_mean_queue_term": -0.0022308993274696583, "scenario_morning_rush_mean_reward_component_mean_throughput_term": 0.00041275701186081016, "scenario_morning_rush_mean_reward_component_mean_wait_level_term": -0.05957005604103958, "scenario_morning_rush_mean_reward_component_mean_wait_term": -0.004457752335986778, "scenario_morning_rush_mean_reward_component_step_imbalance_term": -0.0069248005747795105, "scenario_morning_rush_mean_reward_component_step_queue_level_term": -0.040156188110510506, "scenario_morning_rush_mean_reward_component_step_queue_term": -3.51969186643449e-05, "scenario_morning_rush_mean_reward_component_step_throughput_term": 1.1111112447300306e-05, "scenario_morning_rush_mean_reward_component_step_wait_level_term": -0.08025238662958145, "scenario_morning_rush_mean_reward_component_step_wait_term": -0.0004354232660261914, "scenario_morning_rush_mean_running_vehicles": 10263.0, "scenario_morning_rush_mean_throughput": 8582.0, "scenario_morning_rush_mean_total_episode_return": -10440.20379966187, "scenario_morning_rush_mean_total_incoming_vehicles": 10109.999674479166, "scenario_morning_rush_mean_total_waiting_vehicles": 10102.199869791666, "scenario_normal_num_episodes": 3.0, "scenario_normal_mean_average_travel_time": 800.4559733627038, "scenario_normal_mean_decision_steps": 720.0, "scenario_normal_mean_episode_return": -0.04067157424213073, "scenario_normal_mean_mean_incoming_vehicles": 46.74114990234375, "scenario_normal_mean_mean_incoming_vehicles_commercial": 42.822815577189125, "scenario_normal_mean_mean_incoming_vehicles_industrial": 32.22573471069336, "scenario_normal_mean_mean_incoming_vehicles_mixed": 54.9338633219401, "scenario_normal_mean_mean_incoming_vehicles_residential": 49.15048853556315, "scenario_normal_mean_mean_reward": -0.08519965410232544, "scenario_normal_mean_mean_reward_commercial": -0.07897547632455826, "scenario_normal_mean_mean_reward_industrial": -0.07820415683090687, "scenario_normal_mean_mean_reward_mixed": -0.09836263954639435, "scenario_normal_mean_mean_reward_residential": -0.08782620107134183, "scenario_normal_mean_mean_step_intersection_reward": -0.04067157424213073, "scenario_normal_mean_mean_waiting_vehicles": 46.317404429117836, "scenario_normal_mean_mean_waiting_vehicles_commercial": 42.46593793233236, "scenario_normal_mean_mean_waiting_vehicles_industrial": 31.627941131591797, "scenario_normal_mean_mean_waiting_vehicles_mixed": 54.69735463460287, "scenario_normal_mean_mean_waiting_vehicles_residential": 48.6920420328776, "scenario_normal_mean_num_commercial_intersections": 25.0, "scenario_normal_mean_num_controlled_intersections": 143.66666666666666, "scenario_normal_mean_num_industrial_intersections": 21.0, "scenario_normal_mean_num_mixed_intersections": 18.333333333333332, "scenario_normal_mean_num_residential_intersections": 86.33333333333333, "scenario_normal_mean_reward_component_mean_imbalance_term": -0.0024800902014500328, "scenario_normal_mean_reward_component_mean_queue_level_term": -0.01198094052218679, "scenario_normal_mean_reward_component_mean_queue_term": -0.0014491959751115632, "scenario_normal_mean_reward_component_mean_throughput_term": 0.00036136135672845915, "scenario_normal_mean_reward_component_mean_wait_level_term": -0.022251504343694464, "scenario_normal_mean_reward_component_mean_wait_term": -0.0028712048592596934, "scenario_normal_mean_reward_component_step_imbalance_term": -0.004999684014668067, "scenario_normal_mean_reward_component_step_queue_level_term": -0.02608552575111389, "scenario_normal_mean_reward_component_step_queue_term": -0.0012108850254056354, "scenario_normal_mean_reward_component_step_throughput_term": 4.80341914226301e-05, "scenario_normal_mean_reward_component_step_wait_level_term": -0.05167851224541664, "scenario_normal_mean_reward_component_step_wait_term": -0.0012730803185453017, "scenario_normal_mean_running_vehicles": 6833.666666666667, "scenario_normal_mean_throughput": 7346.333333333333, "scenario_normal_mean_total_episode_return": -4237.399608511478, "scenario_normal_mean_total_incoming_vehicles": 6748.466796875, "scenario_normal_mean_total_waiting_vehicles": 6686.86669921875, "random_num_episodes": 21.0, "random_mean_average_travel_time": 1150.302746962976, "random_mean_decision_steps": 720.0, "random_mean_episode_return": -0.06989609777453276, "random_mean_mean_incoming_vehicles": 69.05404917399089, "random_mean_mean_incoming_vehicles_commercial": 69.6673644837879, "random_mean_mean_incoming_vehicles_industrial": 54.190021344593596, "random_mean_mean_incoming_vehicles_mixed": 64.0808919724964, "random_mean_mean_incoming_vehicles_residential": 72.8023042678833, "random_mean_mean_reward": -0.12376718586754232, "random_mean_mean_reward_commercial": -0.12452246452726069, "random_mean_mean_reward_industrial": -0.11355452149707292, "random_mean_mean_reward_mixed": -0.11245997622609138, "random_mean_mean_reward_residential": -0.12944108132450355, "random_mean_mean_step_intersection_reward": -0.06989609777453276, "random_mean_mean_waiting_vehicles": 68.7351276306879, "random_mean_mean_waiting_vehicles_commercial": 69.30939971833001, "random_mean_mean_waiting_vehicles_industrial": 53.90336172921317, "random_mean_mean_waiting_vehicles_mixed": 63.79428595588321, "random_mean_mean_waiting_vehicles_residential": 72.48578248705182, "random_mean_num_commercial_intersections": 25.0, "random_mean_num_controlled_intersections": 143.66666666666666, "random_mean_num_industrial_intersections": 21.0, "random_mean_num_mixed_intersections": 18.333333333333332, "random_mean_num_residential_intersections": 86.33333333333333, "random_mean_reward_component_mean_imbalance_term": -0.003517522223656009, "random_mean_reward_component_mean_queue_level_term": -0.020881174921989903, "random_mean_reward_component_mean_queue_term": -0.0021495158596324493, "random_mean_reward_component_mean_throughput_term": 0.00042326186465254945, "random_mean_reward_component_mean_wait_level_term": -0.03949177015865855, "random_mean_reward_component_mean_wait_term": -0.004279376170980416, "random_mean_reward_component_step_imbalance_term": -0.00649853384987052, "random_mean_reward_component_step_queue_level_term": -0.03869128570936266, "random_mean_reward_component_step_queue_term": -0.0005433857939005108, "random_mean_reward_component_step_throughput_term": 7.67399272133064e-05, "random_mean_reward_component_step_wait_level_term": -0.07700800474378325, "random_mean_reward_component_step_wait_term": -0.0011027172087259324, "random_mean_running_vehicles": 10086.190476190477, "random_mean_throughput": 8755.333333333334, "random_mean_total_episode_return": -7199.098972474014, "random_mean_total_incoming_vehicles": 9934.066603887648, "random_mean_total_waiting_vehicles": 9887.990542457217, "fixed_num_episodes": 21.0, "fixed_mean_average_travel_time": 1124.0393160395279, "fixed_mean_decision_steps": 720.0, "fixed_mean_episode_return": -0.06868349122924423, "fixed_mean_mean_incoming_vehicles": 67.67675236293248, "fixed_mean_mean_incoming_vehicles_commercial": 66.97883664994012, "fixed_mean_mean_incoming_vehicles_industrial": 51.98602976117815, "fixed_mean_mean_incoming_vehicles_mixed": 62.89088439941406, "fixed_mean_mean_incoming_vehicles_residential": 71.62062159038726, "fixed_mean_mean_reward": -0.12380343498218627, "fixed_mean_mean_reward_commercial": -0.12041924281844071, "fixed_mean_mean_reward_industrial": -0.11323692968913487, "fixed_mean_mean_reward_mixed": -0.11227689563695874, "fixed_mean_mean_reward_residential": -0.13030628647123063, "fixed_mean_mean_step_intersection_reward": -0.06868349122924423, "fixed_mean_mean_waiting_vehicles": 67.34291539873395, "fixed_mean_mean_waiting_vehicles_commercial": 66.61572510855538, "fixed_mean_mean_waiting_vehicles_industrial": 51.54632323128836, "fixed_mean_mean_waiting_vehicles_mixed": 62.51055136181059, "fixed_mean_mean_waiting_vehicles_residential": 71.3194685890561, "fixed_mean_num_commercial_intersections": 25.0, "fixed_mean_num_controlled_intersections": 143.66666666666666, "fixed_mean_num_industrial_intersections": 21.0, "fixed_mean_num_mixed_intersections": 18.333333333333332, "fixed_mean_num_residential_intersections": 86.33333333333333, "fixed_mean_reward_component_mean_imbalance_term": -0.0034660061540808793, "fixed_mean_reward_component_mean_queue_level_term": -0.020574340580966147, "fixed_mean_reward_component_mean_queue_term": -0.0021085269799920527, "fixed_mean_reward_component_mean_throughput_term": 0.0004508224737641305, "fixed_mean_reward_component_mean_wait_level_term": -0.03878751932997183, "fixed_mean_reward_component_mean_wait_term": -0.004197920421993977, "fixed_mean_reward_component_step_imbalance_term": -0.006364864014488246, "fixed_mean_reward_component_step_queue_level_term": -0.037953486488688556, "fixed_mean_reward_component_step_queue_term": -0.0003611405845731497, "fixed_mean_reward_component_step_throughput_term": 7.484737112203479e-05, "fixed_mean_reward_component_step_wait_level_term": -0.07553152602520727, "fixed_mean_reward_component_step_wait_term": -0.0036672654553383055, "fixed_mean_running_vehicles": 9871.142857142857, "fixed_mean_throughput": 9344.047619047618, "fixed_mean_total_episode_return": -7067.08566613726, "fixed_mean_total_incoming_vehicles": 9721.742966424852, "fixed_mean_total_waiting_vehicles": 9672.552373976934, "learner_minus_fixed_return": -0.01196707696616485, "learner_minus_random_return": -0.010754470420876322, "update": 40, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "rolling_mean_episode_return": -0.0827594554033097, "rolling_mean_total_episode_return": -8544.28154154317, "rolling_mean_mean_waiting_vehicles": 79.4374151683989, "rolling_mean_throughput": 6374.761904761905} +{"num_episodes": 21.0, "mean_average_travel_time": 1122.3218525638604, "mean_decision_steps": 720.0, "mean_episode_return": -0.0683177196118934, "mean_mean_incoming_vehicles": 68.08623436519078, "mean_mean_incoming_vehicles_commercial": 68.5632487251645, "mean_mean_incoming_vehicles_industrial": 52.74086116041456, "mean_mean_incoming_vehicles_mixed": 63.1581707454863, "mean_mean_incoming_vehicles_residential": 71.83403909774054, "mean_mean_reward": -0.12220520357645694, "mean_mean_reward_commercial": -0.12270791872981049, "mean_mean_reward_industrial": -0.11189213042546596, "mean_mean_reward_mixed": -0.110024058925254, "mean_mean_reward_residential": -0.1282878817014751, "mean_mean_step_intersection_reward": -0.0683177196118934, "mean_mean_waiting_vehicles": 67.70827225276402, "mean_mean_waiting_vehicles_commercial": 68.05483752205258, "mean_mean_waiting_vehicles_industrial": 52.43371825878109, "mean_mean_waiting_vehicles_mixed": 62.737400236583895, "mean_mean_waiting_vehicles_residential": 71.50073074159168, "mean_num_commercial_intersections": 25.0, "mean_num_controlled_intersections": 143.66666666666666, "mean_num_industrial_intersections": 21.0, "mean_num_mixed_intersections": 18.333333333333332, "mean_num_residential_intersections": 86.33333333333333, "mean_reward_component_mean_imbalance_term": -0.003448042777897588, "mean_reward_component_mean_queue_level_term": -0.020447445722048763, "mean_reward_component_mean_queue_term": -0.0021181737344488187, "mean_reward_component_mean_throughput_term": 0.00044679895293354223, "mean_reward_component_mean_wait_level_term": -0.03853884005737269, "mean_reward_component_mean_wait_term": -0.004212016871614351, "mean_reward_component_step_imbalance_term": -0.006419099118959691, "mean_reward_component_step_queue_level_term": -0.03812712823439922, "mean_reward_component_step_queue_term": -0.0005105127863879759, "mean_reward_component_step_throughput_term": 9.072039617984999e-05, "mean_reward_component_step_wait_level_term": -0.07581841564249425, "mean_reward_component_step_wait_term": -0.0014207698778981076, "mean_running_vehicles": 9943.619047619048, "mean_throughput": 9242.190476190477, "mean_total_episode_return": -7035.014056306238, "mean_total_incoming_vehicles": 9792.057152157739, "mean_total_waiting_vehicles": 9737.257178896949, "scenario_accident_num_episodes": 3.0, "scenario_accident_mean_average_travel_time": 1366.1934523809523, "scenario_accident_mean_decision_steps": 720.0, "scenario_accident_mean_episode_return": -0.08449254766958036, "scenario_accident_mean_mean_incoming_vehicles": 79.14771016438802, "scenario_accident_mean_mean_incoming_vehicles_commercial": 77.76483408610027, "scenario_accident_mean_mean_incoming_vehicles_industrial": 70.39338302612305, "scenario_accident_mean_mean_incoming_vehicles_mixed": 75.02857208251953, "scenario_accident_mean_mean_incoming_vehicles_residential": 82.20623779296875, "scenario_accident_mean_mean_reward": -0.142288476228714, "scenario_accident_mean_mean_reward_commercial": -0.13737556089957556, "scenario_accident_mean_mean_reward_industrial": -0.14783791825175285, "scenario_accident_mean_mean_reward_mixed": -0.1354211370150248, "scenario_accident_mean_mean_reward_residential": -0.14597415924072266, "scenario_accident_mean_mean_step_intersection_reward": -0.08449254766958036, "scenario_accident_mean_mean_waiting_vehicles": 79.10306803385417, "scenario_accident_mean_mean_waiting_vehicles_commercial": 77.71961466471355, "scenario_accident_mean_mean_waiting_vehicles_industrial": 70.36103057861328, "scenario_accident_mean_mean_waiting_vehicles_mixed": 75.0012690226237, "scenario_accident_mean_mean_waiting_vehicles_residential": 82.16083272298177, "scenario_accident_mean_num_commercial_intersections": 25.0, "scenario_accident_mean_num_controlled_intersections": 143.66666666666666, "scenario_accident_mean_num_industrial_intersections": 21.0, "scenario_accident_mean_num_mixed_intersections": 18.333333333333332, "scenario_accident_mean_num_residential_intersections": 86.33333333333333, "scenario_accident_mean_reward_component_mean_imbalance_term": -0.0041432209597282105, "scenario_accident_mean_reward_component_mean_queue_level_term": -0.025213563481764612, "scenario_accident_mean_reward_component_mean_queue_term": -0.0024820554128084787, "scenario_accident_mean_reward_component_mean_throughput_term": 0.0004002509601007289, "scenario_accident_mean_reward_component_mean_wait_level_term": -0.04809306953616636, "scenario_accident_mean_reward_component_mean_wait_term": -0.004960891459415225, "scenario_accident_mean_reward_component_step_imbalance_term": -0.007319922869404157, "scenario_accident_mean_reward_component_step_queue_level_term": -0.04467699800928434, "scenario_accident_mean_reward_component_step_queue_term": -0.00027829819979767006, "scenario_accident_mean_reward_component_step_throughput_term": 1.1111112447300306e-05, "scenario_accident_mean_reward_component_step_wait_level_term": -0.08929809431234996, "scenario_accident_mean_reward_component_step_wait_term": -0.0007262775810280194, "scenario_accident_mean_running_vehicles": 11589.666666666666, "scenario_accident_mean_throughput": 8208.333333333334, "scenario_accident_mean_total_episode_return": -8724.985888849944, "scenario_accident_mean_total_incoming_vehicles": 11403.2001953125, "scenario_accident_mean_total_waiting_vehicles": 11396.600260416666, "scenario_construction_num_episodes": 3.0, "scenario_construction_mean_average_travel_time": 1249.819576111596, "scenario_construction_mean_decision_steps": 720.0, "scenario_construction_mean_episode_return": -0.07947400913796504, "scenario_construction_mean_mean_incoming_vehicles": 75.49731953938802, "scenario_construction_mean_mean_incoming_vehicles_commercial": 67.98890558878581, "scenario_construction_mean_mean_incoming_vehicles_industrial": 50.86985397338867, "scenario_construction_mean_mean_incoming_vehicles_mixed": 71.2629623413086, "scenario_construction_mean_mean_incoming_vehicles_residential": 81.50076548258464, "scenario_construction_mean_mean_reward": -0.13515756030877432, "scenario_construction_mean_mean_reward_commercial": -0.11916507532199223, "scenario_construction_mean_mean_reward_industrial": -0.10577524825930595, "scenario_construction_mean_mean_reward_mixed": -0.1250311310092608, "scenario_construction_mean_mean_reward_residential": -0.14556086560090384, "scenario_construction_mean_mean_step_intersection_reward": -0.07947400913796504, "scenario_construction_mean_mean_waiting_vehicles": 75.39998881022136, "scenario_construction_mean_mean_waiting_vehicles_commercial": 67.80161158243816, "scenario_construction_mean_mean_waiting_vehicles_industrial": 50.724998474121094, "scenario_construction_mean_mean_waiting_vehicles_mixed": 71.14497248331706, "scenario_construction_mean_mean_waiting_vehicles_residential": 81.43831125895183, "scenario_construction_mean_num_commercial_intersections": 25.0, "scenario_construction_mean_num_controlled_intersections": 143.66666666666666, "scenario_construction_mean_num_industrial_intersections": 21.0, "scenario_construction_mean_num_mixed_intersections": 18.333333333333332, "scenario_construction_mean_num_residential_intersections": 86.33333333333333, "scenario_construction_mean_reward_component_mean_imbalance_term": -0.004030537088868369, "scenario_construction_mean_reward_component_mean_queue_level_term": -0.02382215270056433, "scenario_construction_mean_reward_component_mean_queue_term": -0.0023440316438027623, "scenario_construction_mean_reward_component_mean_throughput_term": 0.000468583107901092, "scenario_construction_mean_reward_component_mean_wait_level_term": -0.04506468393412825, "scenario_construction_mean_reward_component_mean_wait_term": -0.0046811876012679094, "scenario_construction_mean_reward_component_step_imbalance_term": -0.0071069841894010706, "scenario_construction_mean_reward_component_step_queue_level_term": -0.042192570865154266, "scenario_construction_mean_reward_component_step_queue_term": -0.00037213067601745326, "scenario_construction_mean_reward_component_step_throughput_term": 4.58119708734254e-05, "scenario_construction_mean_reward_component_step_wait_level_term": -0.08426228413979213, "scenario_construction_mean_reward_component_step_wait_term": -0.001269409976278742, "scenario_construction_mean_running_vehicles": 11053.0, "scenario_construction_mean_throughput": 9736.0, "scenario_construction_mean_total_episode_return": -8220.085763727626, "scenario_construction_mean_total_incoming_vehicles": 10900.666666666666, "scenario_construction_mean_total_waiting_vehicles": 10886.6669921875, "scenario_district_overload_num_episodes": 3.0, "scenario_district_overload_mean_average_travel_time": 1198.600841269841, "scenario_district_overload_mean_decision_steps": 720.0, "scenario_district_overload_mean_episode_return": -0.07718827695061875, "scenario_district_overload_mean_mean_incoming_vehicles": 79.60941060384114, "scenario_district_overload_mean_mean_incoming_vehicles_commercial": 90.2357177734375, "scenario_district_overload_mean_mean_incoming_vehicles_industrial": 55.34852981567383, "scenario_district_overload_mean_mean_incoming_vehicles_mixed": 78.30211639404297, "scenario_district_overload_mean_mean_incoming_vehicles_residential": 82.41145833333333, "scenario_district_overload_mean_mean_reward": -0.14329529305299124, "scenario_district_overload_mean_mean_reward_commercial": -0.16334139804045358, "scenario_district_overload_mean_mean_reward_industrial": -0.116667740046978, "scenario_district_overload_mean_mean_reward_mixed": -0.13635293145974478, "scenario_district_overload_mean_mean_reward_residential": -0.14717863500118256, "scenario_district_overload_mean_mean_step_intersection_reward": -0.07718827695061875, "scenario_district_overload_mean_mean_waiting_vehicles": 79.51246388753255, "scenario_district_overload_mean_mean_waiting_vehicles_commercial": 90.13975016276042, "scenario_district_overload_mean_mean_waiting_vehicles_industrial": 55.124263763427734, "scenario_district_overload_mean_mean_waiting_vehicles_mixed": 78.1850814819336, "scenario_district_overload_mean_mean_waiting_vehicles_residential": 82.31850687662761, "scenario_district_overload_mean_num_commercial_intersections": 25.0, "scenario_district_overload_mean_num_controlled_intersections": 143.66666666666666, "scenario_district_overload_mean_num_industrial_intersections": 21.0, "scenario_district_overload_mean_num_mixed_intersections": 18.333333333333332, "scenario_district_overload_mean_num_residential_intersections": 86.33333333333333, "scenario_district_overload_mean_reward_component_mean_imbalance_term": -0.003792690938595989, "scenario_district_overload_mean_reward_component_mean_queue_level_term": -0.02289317587844245, "scenario_district_overload_mean_reward_component_mean_queue_term": -0.0024838263326067834, "scenario_district_overload_mean_reward_component_mean_throughput_term": 0.00041370157830526835, "scenario_district_overload_mean_reward_component_mean_wait_level_term": -0.04347149815317161, "scenario_district_overload_mean_reward_component_mean_wait_term": -0.004960787272526195, "scenario_district_overload_mean_reward_component_step_imbalance_term": -0.0073379892855882645, "scenario_district_overload_mean_reward_component_step_queue_level_term": -0.04470887531836828, "scenario_district_overload_mean_reward_component_step_queue_term": -0.00043141483183717355, "scenario_district_overload_mean_reward_component_step_throughput_term": 2.4444445443805307e-05, "scenario_district_overload_mean_reward_component_step_wait_level_term": -0.08929417033990224, "scenario_district_overload_mean_reward_component_step_wait_term": -0.0015472829206070553, "scenario_district_overload_mean_running_vehicles": 11598.666666666666, "scenario_district_overload_mean_throughput": 8623.666666666666, "scenario_district_overload_mean_total_episode_return": -7937.398448233803, "scenario_district_overload_mean_total_incoming_vehicles": 11433.866861979166, "scenario_district_overload_mean_total_waiting_vehicles": 11419.666666666666, "scenario_evening_rush_num_episodes": 3.0, "scenario_evening_rush_mean_average_travel_time": 662.6805877007786, "scenario_evening_rush_mean_decision_steps": 720.0, "scenario_evening_rush_mean_episode_return": -0.04457968758629005, "scenario_evening_rush_mean_mean_incoming_vehicles": 76.58429718017578, "scenario_evening_rush_mean_mean_incoming_vehicles_commercial": 96.1661376953125, "scenario_evening_rush_mean_mean_incoming_vehicles_industrial": 90.50808715820312, "scenario_evening_rush_mean_mean_incoming_vehicles_mixed": 70.18455123901367, "scenario_evening_rush_mean_mean_incoming_vehicles_residential": 71.70657730102539, "scenario_evening_rush_mean_mean_reward": -0.13884113232294717, "scenario_evening_rush_mean_mean_reward_commercial": -0.17570553719997406, "scenario_evening_rush_mean_mean_reward_industrial": -0.18634846061468124, "scenario_evening_rush_mean_mean_reward_mixed": -0.12491846581300099, "scenario_evening_rush_mean_mean_reward_residential": -0.12866770724455515, "scenario_evening_rush_mean_mean_step_intersection_reward": -0.04457968758629005, "scenario_evening_rush_mean_mean_waiting_vehicles": 76.3606783548991, "scenario_evening_rush_mean_mean_waiting_vehicles_commercial": 96.01304372151692, "scenario_evening_rush_mean_mean_waiting_vehicles_industrial": 90.37279510498047, "scenario_evening_rush_mean_mean_waiting_vehicles_mixed": 69.8724873860677, "scenario_evening_rush_mean_mean_waiting_vehicles_residential": 71.46152242024739, "scenario_evening_rush_mean_num_commercial_intersections": 25.0, "scenario_evening_rush_mean_num_controlled_intersections": 143.66666666666666, "scenario_evening_rush_mean_num_industrial_intersections": 21.0, "scenario_evening_rush_mean_num_mixed_intersections": 18.333333333333332, "scenario_evening_rush_mean_num_residential_intersections": 86.33333333333333, "scenario_evening_rush_mean_reward_component_mean_imbalance_term": -0.0021280142984499693, "scenario_evening_rush_mean_reward_component_mean_queue_level_term": -0.012558625681333103, "scenario_evening_rush_mean_reward_component_mean_queue_term": -0.0023788415155152755, "scenario_evening_rush_mean_reward_component_mean_throughput_term": 0.000350380111550058, "scenario_evening_rush_mean_reward_component_mean_wait_level_term": -0.023122770515484958, "scenario_evening_rush_mean_reward_component_mean_wait_term": -0.00474181558717385, "scenario_evening_rush_mean_reward_component_step_imbalance_term": -0.007118546403944492, "scenario_evening_rush_mean_reward_component_step_queue_level_term": -0.04281914855043093, "scenario_evening_rush_mean_reward_component_step_queue_term": -0.0012759323387096326, "scenario_evening_rush_mean_reward_component_step_throughput_term": 3.24786378769204e-05, "scenario_evening_rush_mean_reward_component_step_wait_level_term": -0.08536934355894725, "scenario_evening_rush_mean_reward_component_step_wait_term": -0.002290644139672319, "scenario_evening_rush_mean_running_vehicles": 11226.333333333334, "scenario_evening_rush_mean_throughput": 7256.333333333333, "scenario_evening_rush_mean_total_episode_return": -4601.1022762873135, "scenario_evening_rush_mean_total_incoming_vehicles": 11035.599934895834, "scenario_evening_rush_mean_total_waiting_vehicles": 11002.866536458334, "scenario_event_spike_num_episodes": 3.0, "scenario_event_spike_mean_average_travel_time": 1211.066111111111, "scenario_event_spike_mean_decision_steps": 720.0, "scenario_event_spike_mean_episode_return": -0.08117229543328462, "scenario_event_spike_mean_mean_incoming_vehicles": 82.65923817952473, "scenario_event_spike_mean_mean_incoming_vehicles_commercial": 83.12132517496745, "scenario_event_spike_mean_mean_incoming_vehicles_industrial": 66.04338073730469, "scenario_event_spike_mean_mean_incoming_vehicles_mixed": 81.13333129882812, "scenario_event_spike_mean_mean_incoming_vehicles_residential": 86.84091695149739, "scenario_event_spike_mean_mean_reward": -0.1490651617447535, "scenario_event_spike_mean_mean_reward_commercial": -0.14903774857521057, "scenario_event_spike_mean_mean_reward_industrial": -0.1390467993915081, "scenario_event_spike_mean_mean_reward_mixed": -0.1415928155183792, "scenario_event_spike_mean_mean_reward_residential": -0.15564128259817758, "scenario_event_spike_mean_mean_step_intersection_reward": -0.08117229543328462, "scenario_event_spike_mean_mean_waiting_vehicles": 82.54344685872395, "scenario_event_spike_mean_mean_waiting_vehicles_commercial": 82.92100779215495, "scenario_event_spike_mean_mean_waiting_vehicles_industrial": 65.9095573425293, "scenario_event_spike_mean_mean_waiting_vehicles_mixed": 81.09481557210286, "scenario_event_spike_mean_mean_waiting_vehicles_residential": 86.73979949951172, "scenario_event_spike_mean_num_commercial_intersections": 25.0, "scenario_event_spike_mean_num_controlled_intersections": 143.66666666666666, "scenario_event_spike_mean_num_industrial_intersections": 21.0, "scenario_event_spike_mean_num_mixed_intersections": 18.333333333333332, "scenario_event_spike_mean_num_residential_intersections": 86.33333333333333, "scenario_event_spike_mean_reward_component_mean_imbalance_term": -0.00401722513024241, "scenario_event_spike_mean_reward_component_mean_queue_level_term": -0.02399794606865355, "scenario_event_spike_mean_reward_component_mean_queue_term": -0.0025816352335331877, "scenario_event_spike_mean_reward_component_mean_throughput_term": 0.0003960574654347174, "scenario_event_spike_mean_reward_component_mean_wait_level_term": -0.04581479612448249, "scenario_event_spike_mean_reward_component_mean_wait_term": -0.00515675141801437, "scenario_event_spike_mean_reward_component_step_imbalance_term": -0.007653515165050824, "scenario_event_spike_mean_reward_component_step_queue_level_term": -0.046469436337550483, "scenario_event_spike_mean_reward_component_step_queue_term": -0.000770126236602664, "scenario_event_spike_mean_reward_component_step_throughput_term": 5.38461633065405e-05, "scenario_event_spike_mean_reward_component_step_wait_level_term": -0.09280650566021602, "scenario_event_spike_mean_reward_component_step_wait_term": -0.0014194278434539835, "scenario_event_spike_mean_running_vehicles": 12059.0, "scenario_event_spike_mean_throughput": 8171.666666666667, "scenario_event_spike_mean_total_episode_return": -8363.663918346167, "scenario_event_spike_mean_total_incoming_vehicles": 11890.133138020834, "scenario_event_spike_mean_total_waiting_vehicles": 11873.199869791666, "scenario_morning_rush_num_episodes": 3.0, "scenario_morning_rush_mean_average_travel_time": 1831.777291128153, "scenario_morning_rush_mean_decision_steps": 720.0, "scenario_morning_rush_mean_episode_return": -0.09846934434304362, "scenario_morning_rush_mean_mean_incoming_vehicles": 68.64203389485677, "scenario_morning_rush_mean_mean_incoming_vehicles_commercial": 50.73058954874674, "scenario_morning_rush_mean_mean_incoming_vehicles_industrial": 32.28823471069336, "scenario_morning_rush_mean_mean_incoming_vehicles_mixed": 51.105292002360024, "scenario_morning_rush_mean_mean_incoming_vehicles_residential": 82.31179300944011, "scenario_morning_rush_mean_mean_reward": -0.12313080082337062, "scenario_morning_rush_mean_mean_reward_commercial": -0.09031663835048676, "scenario_morning_rush_mean_mean_reward_industrial": -0.06790079176425934, "scenario_morning_rush_mean_mean_reward_mixed": -0.09126316135128339, "scenario_morning_rush_mean_mean_reward_residential": -0.14760380486647287, "scenario_morning_rush_mean_mean_step_intersection_reward": -0.09846934434304362, "scenario_morning_rush_mean_mean_waiting_vehicles": 68.58196640014648, "scenario_morning_rush_mean_mean_waiting_vehicles_commercial": 50.61898295084635, "scenario_morning_rush_mean_mean_waiting_vehicles_industrial": 32.17941188812256, "scenario_morning_rush_mean_mean_waiting_vehicles_mixed": 50.96349334716797, "scenario_morning_rush_mean_mean_waiting_vehicles_residential": 82.28609720865886, "scenario_morning_rush_mean_num_commercial_intersections": 25.0, "scenario_morning_rush_mean_num_controlled_intersections": 143.66666666666666, "scenario_morning_rush_mean_num_industrial_intersections": 21.0, "scenario_morning_rush_mean_num_mixed_intersections": 18.333333333333332, "scenario_morning_rush_mean_num_residential_intersections": 86.33333333333333, "scenario_morning_rush_mean_reward_component_mean_imbalance_term": -0.005051728113552774, "scenario_morning_rush_mean_reward_component_mean_queue_level_term": -0.029880973275575578, "scenario_morning_rush_mean_reward_component_mean_queue_term": -0.002151567029501858, "scenario_morning_rush_mean_reward_component_mean_throughput_term": 0.00042879001542941195, "scenario_morning_rush_mean_reward_component_mean_wait_level_term": -0.057515492226098176, "scenario_morning_rush_mean_reward_component_mean_wait_term": -0.0042983739080233755, "scenario_morning_rush_mean_reward_component_step_imbalance_term": -0.0066934314866860705, "scenario_morning_rush_mean_reward_component_step_queue_level_term": -0.03872820672889551, "scenario_morning_rush_mean_reward_component_step_queue_term": -9.312204201705754e-05, "scenario_morning_rush_mean_reward_component_step_throughput_term": 1.0683762714810049e-05, "scenario_morning_rush_mean_reward_component_step_wait_level_term": -0.07738702744245529, "scenario_morning_rush_mean_reward_component_step_wait_term": -0.00023969665441351631, "scenario_morning_rush_mean_running_vehicles": 9944.0, "scenario_morning_rush_mean_throughput": 8928.666666666666, "scenario_morning_rush_mean_total_episode_return": -10058.092643098285, "scenario_morning_rush_mean_total_incoming_vehicles": 9779.933268229166, "scenario_morning_rush_mean_total_waiting_vehicles": 9770.933268229166, "scenario_normal_num_episodes": 3.0, "scenario_normal_mean_average_travel_time": 336.1151082445898, "scenario_normal_mean_decision_steps": 720.0, "scenario_normal_mean_episode_return": -0.012847876162471314, "scenario_normal_mean_mean_incoming_vehicles": 14.46363099416097, "scenario_normal_mean_mean_incoming_vehicles_commercial": 13.93523120880127, "scenario_normal_mean_mean_incoming_vehicles_industrial": 3.7345587015151978, "scenario_normal_mean_mean_incoming_vehicles_mixed": 15.090369860331217, "scenario_normal_mean_mean_incoming_vehicles_residential": 15.860524813334147, "scenario_normal_mean_mean_reward": -0.023658000553647678, "scenario_normal_mean_mean_reward_commercial": -0.024013472720980644, "scenario_normal_mean_mean_reward_industrial": -0.01966795464977622, "scenario_normal_mean_mean_reward_mixed": -0.015588770310084024, "scenario_normal_mean_mean_reward_residential": -0.027388717358311016, "scenario_normal_mean_mean_step_intersection_reward": -0.012847876162471314, "scenario_normal_mean_mean_waiting_vehicles": 12.456293423970541, "scenario_normal_mean_mean_waiting_vehicles_commercial": 11.169851779937744, "scenario_normal_mean_mean_waiting_vehicles_industrial": 2.363970659673214, "scenario_normal_mean_mean_waiting_vehicles_mixed": 12.89968236287435, "scenario_normal_mean_mean_waiting_vehicles_residential": 14.100045204162598, "scenario_normal_mean_num_commercial_intersections": 25.0, "scenario_normal_mean_num_controlled_intersections": 143.66666666666666, "scenario_normal_mean_num_industrial_intersections": 21.0, "scenario_normal_mean_num_mixed_intersections": 18.333333333333332, "scenario_normal_mean_num_residential_intersections": 86.33333333333333, "scenario_normal_mean_reward_component_mean_imbalance_term": -0.0009728829158453953, "scenario_normal_mean_reward_component_mean_queue_level_term": -0.004765682968007712, "scenario_normal_mean_reward_component_mean_queue_term": -0.0004052589733733898, "scenario_normal_mean_reward_component_mean_throughput_term": 0.0006698294318135191, "scenario_normal_mean_reward_component_mean_wait_level_term": -0.006689569912076945, "scenario_normal_mean_reward_component_mean_wait_term": -0.0006843108548795235, "scenario_normal_mean_reward_component_step_imbalance_term": -0.0017033044326429565, "scenario_normal_mean_reward_component_step_queue_level_term": -0.007294661831110716, "scenario_normal_mean_reward_component_step_queue_term": -0.0003525651797341804, "scenario_normal_mean_reward_component_step_throughput_term": 0.00045666668059614796, "scenario_normal_mean_reward_component_step_wait_level_term": -0.012311484043796858, "scenario_normal_mean_reward_component_step_wait_term": -0.002452650029833118, "scenario_normal_mean_running_vehicles": 2134.6666666666665, "scenario_normal_mean_throughput": 13770.666666666666, "scenario_normal_mean_total_episode_return": -1339.76945560053, "scenario_normal_mean_total_incoming_vehicles": 2101.0, "scenario_normal_mean_total_waiting_vehicles": 1810.8666585286458, "random_num_episodes": 21.0, "random_mean_average_travel_time": 1150.3536064579794, "random_mean_decision_steps": 720.0, "random_mean_episode_return": -0.06989081866386257, "random_mean_mean_incoming_vehicles": 69.05115509033203, "random_mean_mean_incoming_vehicles_commercial": 69.66505096072243, "random_mean_mean_incoming_vehicles_industrial": 54.158508675439016, "random_mean_mean_incoming_vehicles_mixed": 64.09260763440814, "random_mean_mean_incoming_vehicles_residential": 72.80309409186954, "random_mean_mean_reward": -0.123759539088323, "random_mean_mean_reward_commercial": -0.12451856609966074, "random_mean_mean_reward_industrial": -0.11351271203186895, "random_mean_mean_reward_mixed": -0.11230511484401566, "random_mean_mean_reward_residential": -0.12944320083728858, "random_mean_mean_step_intersection_reward": -0.06989081866386257, "random_mean_mean_waiting_vehicles": 68.73270675114223, "random_mean_mean_waiting_vehicles_commercial": 69.30708619526455, "random_mean_mean_waiting_vehicles_industrial": 53.871849060058594, "random_mean_mean_waiting_vehicles_mixed": 63.80872276851109, "random_mean_mean_waiting_vehicles_residential": 72.48712417057583, "random_mean_num_commercial_intersections": 25.0, "random_mean_num_controlled_intersections": 143.66666666666666, "random_mean_num_industrial_intersections": 21.0, "random_mean_num_mixed_intersections": 18.333333333333332, "random_mean_num_residential_intersections": 86.33333333333333, "random_mean_reward_component_mean_imbalance_term": -0.003516694080508539, "random_mean_reward_component_mean_queue_level_term": -0.020879733409313577, "random_mean_reward_component_mean_queue_term": -0.0021494168217794547, "random_mean_reward_component_mean_throughput_term": 0.0004232014420825869, "random_mean_reward_component_mean_wait_level_term": -0.03948905701401195, "random_mean_reward_component_mean_wait_term": -0.004279118526439577, "random_mean_reward_component_step_imbalance_term": -0.006497394598443948, "random_mean_reward_component_step_queue_level_term": -0.038689502891862675, "random_mean_reward_component_step_queue_term": -0.000544403414183069, "random_mean_reward_component_step_throughput_term": 7.67399272133064e-05, "random_mean_reward_component_step_wait_level_term": -0.0770050436701803, "random_mean_reward_component_step_wait_term": -0.0010999331286820095, "random_mean_running_vehicles": 10085.952380952382, "random_mean_throughput": 8753.952380952382, "random_mean_total_episode_return": -7198.670266592798, "random_mean_total_incoming_vehicles": 9933.733270554316, "random_mean_total_waiting_vehicles": 9887.723847888765, "fixed_num_episodes": 21.0, "fixed_mean_average_travel_time": 1124.0490376640669, "fixed_mean_decision_steps": 720.0, "fixed_mean_episode_return": -0.06868161920563891, "fixed_mean_mean_incoming_vehicles": 67.67859576997303, "fixed_mean_mean_incoming_vehicles_commercial": 66.97633057548886, "fixed_mean_mean_incoming_vehicles_industrial": 51.98813056945801, "fixed_mean_mean_incoming_vehicles_mixed": 63.074557713099885, "fixed_mean_mean_incoming_vehicles_residential": 71.61028921036493, "fixed_mean_mean_reward": -0.12379270472696849, "fixed_mean_mean_reward_commercial": -0.12034201719576404, "fixed_mean_mean_reward_industrial": -0.11323985617075648, "fixed_mean_mean_reward_mixed": -0.11250583707754101, "fixed_mean_mean_reward_residential": -0.1302868759348279, "fixed_mean_mean_step_intersection_reward": -0.06868161920563891, "fixed_mean_mean_waiting_vehicles": 67.34482056753976, "fixed_mean_mean_waiting_vehicles_commercial": 66.61372003101167, "fixed_mean_mean_waiting_vehicles_industrial": 51.54842403956822, "fixed_mean_mean_waiting_vehicles_mixed": 62.69422503880092, "fixed_mean_mean_waiting_vehicles_residential": 71.30913693564278, "fixed_mean_num_commercial_intersections": 25.0, "fixed_mean_num_controlled_intersections": 143.66666666666666, "fixed_mean_num_industrial_intersections": 21.0, "fixed_mean_num_mixed_intersections": 18.333333333333332, "fixed_mean_num_residential_intersections": 86.33333333333333, "fixed_mean_reward_component_mean_imbalance_term": -0.0034659005348326596, "fixed_mean_reward_component_mean_queue_level_term": -0.020573705617553856, "fixed_mean_reward_component_mean_queue_term": -0.002108503579172313, "fixed_mean_reward_component_mean_throughput_term": 0.00045079279663344784, "fixed_mean_reward_component_mean_wait_level_term": -0.038786424615721245, "fixed_mean_reward_component_mean_wait_term": -0.004197877383997545, "fixed_mean_reward_component_step_imbalance_term": -0.006364824898940112, "fixed_mean_reward_component_step_queue_level_term": -0.03795306535349006, "fixed_mean_reward_component_step_queue_term": -0.00036114034897071265, "fixed_mean_reward_component_step_throughput_term": 7.484737112203479e-05, "fixed_mean_reward_component_step_wait_level_term": -0.07553075116482519, "fixed_mean_reward_component_step_wait_term": -0.003657768958614075, "fixed_mean_running_vehicles": 9871.42857142857, "fixed_mean_throughput": 9343.380952380952, "fixed_mean_total_episode_return": -7066.875179004279, "fixed_mean_total_incoming_vehicles": 9722.028680710566, "fixed_mean_total_waiting_vehicles": 9672.847574869791, "learner_minus_fixed_return": 0.00036389959374551195, "learner_minus_random_return": 0.0015730990519691734, "update": 60, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "rolling_mean_episode_return": -0.0779455434728376, "rolling_mean_total_episode_return": -8041.192379797526, "rolling_mean_mean_waiting_vehicles": 75.52770086318726, "rolling_mean_throughput": 7330.571428571428} +{"num_episodes": 21.0, "mean_average_travel_time": 1113.450075654063, "mean_decision_steps": 720.0, "mean_episode_return": -0.06784738515670057, "mean_mean_incoming_vehicles": 67.41284602028983, "mean_mean_incoming_vehicles_commercial": 67.21778690247308, "mean_mean_incoming_vehicles_industrial": 52.38235368047442, "mean_mean_incoming_vehicles_mixed": 62.73079358963739, "mean_mean_incoming_vehicles_residential": 71.10173184531075, "mean_mean_reward": -0.12027806318586781, "mean_mean_reward_commercial": -0.12069382458659154, "mean_mean_reward_industrial": -0.11017092144382852, "mean_mean_reward_mixed": -0.10803568891493515, "mean_mean_reward_residential": -0.12579486935976006, "mean_mean_step_intersection_reward": -0.06784738515670057, "mean_mean_waiting_vehicles": 66.95252032507034, "mean_mean_waiting_vehicles_commercial": 66.76162994475592, "mean_mean_waiting_vehicles_industrial": 51.9047266968659, "mean_mean_waiting_vehicles_mixed": 62.3097505569458, "mean_mean_waiting_vehicles_residential": 70.64998740241641, "mean_num_commercial_intersections": 25.0, "mean_num_controlled_intersections": 143.66666666666666, "mean_num_industrial_intersections": 21.0, "mean_num_mixed_intersections": 18.333333333333332, "mean_num_residential_intersections": 86.33333333333333, "mean_reward_component_mean_imbalance_term": -0.003420168644998623, "mean_reward_component_mean_queue_level_term": -0.02034208786362712, "mean_reward_component_mean_queue_term": -0.0020979717934131665, "mean_reward_component_mean_throughput_term": 0.00045784638655999195, "mean_reward_component_mean_wait_level_term": -0.03827613184065409, "mean_reward_component_mean_wait_term": -0.004168871452443388, "mean_reward_component_step_imbalance_term": -0.006346983979234383, "mean_reward_component_step_queue_level_term": -0.037763492714258884, "mean_reward_component_step_queue_term": -0.0004233084736846476, "mean_reward_component_step_throughput_term": 9.985348186178488e-05, "mean_reward_component_step_wait_level_term": -0.07500784489370528, "mean_reward_component_step_wait_term": -0.0008362895113393842, "mean_running_vehicles": 9834.42857142857, "mean_throughput": 9483.904761904761, "mean_total_episode_return": -6981.945983669388, "mean_total_incoming_vehicles": 9685.628673735118, "mean_total_waiting_vehicles": 9618.11434500558, "scenario_accident_num_episodes": 3.0, "scenario_accident_mean_average_travel_time": 1356.9842063492063, "scenario_accident_mean_decision_steps": 720.0, "scenario_accident_mean_episode_return": -0.0842677046150989, "scenario_accident_mean_mean_incoming_vehicles": 79.37842814127605, "scenario_accident_mean_mean_incoming_vehicles_commercial": 78.03775278727214, "scenario_accident_mean_mean_incoming_vehicles_industrial": 70.35294151306152, "scenario_accident_mean_mean_incoming_vehicles_mixed": 75.35978698730469, "scenario_accident_mean_mean_incoming_vehicles_residential": 82.36623636881511, "scenario_accident_mean_mean_reward": -0.14290638267993927, "scenario_accident_mean_mean_reward_commercial": -0.13783695052067438, "scenario_accident_mean_mean_reward_industrial": -0.1470283679664135, "scenario_accident_mean_mean_reward_mixed": -0.13598121205965677, "scenario_accident_mean_mean_reward_residential": -0.1467810869216919, "scenario_accident_mean_mean_step_intersection_reward": -0.0842677046150989, "scenario_accident_mean_mean_waiting_vehicles": 79.33832295735677, "scenario_accident_mean_mean_waiting_vehicles_commercial": 77.98902384440105, "scenario_accident_mean_mean_waiting_vehicles_industrial": 70.31470489501953, "scenario_accident_mean_mean_waiting_vehicles_mixed": 75.33470916748047, "scenario_accident_mean_mean_waiting_vehicles_residential": 82.33066813151042, "scenario_accident_mean_num_commercial_intersections": 25.0, "scenario_accident_mean_num_controlled_intersections": 143.66666666666666, "scenario_accident_mean_num_industrial_intersections": 21.0, "scenario_accident_mean_num_mixed_intersections": 18.333333333333332, "scenario_accident_mean_num_residential_intersections": 86.33333333333333, "scenario_accident_mean_reward_component_mean_imbalance_term": -0.004105735185126307, "scenario_accident_mean_reward_component_mean_queue_level_term": -0.02516457435767565, "scenario_accident_mean_reward_component_mean_queue_term": -0.0024862068991413685, "scenario_accident_mean_reward_component_mean_throughput_term": 0.00040695419156859487, "scenario_accident_mean_reward_component_mean_wait_level_term": -0.04794886928827353, "scenario_accident_mean_reward_component_mean_wait_term": -0.004969274149354314, "scenario_accident_mean_reward_component_step_imbalance_term": -0.007296414735416572, "scenario_accident_mean_reward_component_step_queue_level_term": -0.044751724849144615, "scenario_accident_mean_reward_component_step_queue_term": -0.0003007795069909965, "scenario_accident_mean_reward_component_step_throughput_term": 1.3333332996505002e-05, "scenario_accident_mean_reward_component_step_wait_level_term": -0.0894512136777242, "scenario_accident_mean_reward_component_step_wait_term": -0.0011195909755770117, "scenario_accident_mean_running_vehicles": 11619.333333333334, "scenario_accident_mean_throughput": 8352.0, "scenario_accident_mean_total_episode_return": -8697.894233871562, "scenario_accident_mean_total_incoming_vehicles": 11430.800130208334, "scenario_accident_mean_total_waiting_vehicles": 11424.866536458334, "scenario_construction_num_episodes": 3.0, "scenario_construction_mean_average_travel_time": 1238.8159342253878, "scenario_construction_mean_decision_steps": 720.0, "scenario_construction_mean_episode_return": -0.0788646945904967, "scenario_construction_mean_mean_incoming_vehicles": 75.0662612915039, "scenario_construction_mean_mean_incoming_vehicles_commercial": 67.73399098714192, "scenario_construction_mean_mean_incoming_vehicles_industrial": 50.79044151306152, "scenario_construction_mean_mean_incoming_vehicles_mixed": 71.67883682250977, "scenario_construction_mean_mean_incoming_vehicles_residential": 80.71022288004558, "scenario_construction_mean_mean_reward": -0.13388587534427643, "scenario_construction_mean_mean_reward_commercial": -0.11839799334605534, "scenario_construction_mean_mean_reward_industrial": -0.10101516172289848, "scenario_construction_mean_mean_reward_mixed": -0.12553810576597849, "scenario_construction_mean_mean_reward_residential": -0.14420858025550842, "scenario_construction_mean_mean_step_intersection_reward": -0.0788646945904967, "scenario_construction_mean_mean_waiting_vehicles": 74.95114390055339, "scenario_construction_mean_mean_waiting_vehicles_commercial": 67.5420773824056, "scenario_construction_mean_mean_waiting_vehicles_industrial": 50.59558868408203, "scenario_construction_mean_mean_waiting_vehicles_mixed": 71.58306884765625, "scenario_construction_mean_mean_waiting_vehicles_residential": 80.62640889485677, "scenario_construction_mean_num_commercial_intersections": 25.0, "scenario_construction_mean_num_controlled_intersections": 143.66666666666666, "scenario_construction_mean_num_industrial_intersections": 21.0, "scenario_construction_mean_num_mixed_intersections": 18.333333333333332, "scenario_construction_mean_num_residential_intersections": 86.33333333333333, "scenario_construction_mean_reward_component_mean_imbalance_term": -0.004006355484402938, "scenario_construction_mean_reward_component_mean_queue_level_term": -0.023655532121409594, "scenario_construction_mean_reward_component_mean_queue_term": -0.0023313379668511987, "scenario_construction_mean_reward_component_mean_throughput_term": 0.0004785036934966532, "scenario_construction_mean_reward_component_mean_wait_level_term": -0.04469507955342561, "scenario_construction_mean_reward_component_mean_wait_term": -0.004654892855599416, "scenario_construction_mean_reward_component_step_imbalance_term": -0.0070923805857698126, "scenario_construction_mean_reward_component_step_queue_level_term": -0.04196408515175184, "scenario_construction_mean_reward_component_step_queue_term": -0.0005274733897143354, "scenario_construction_mean_reward_component_step_throughput_term": 0.0, "scenario_construction_mean_reward_component_step_wait_level_term": -0.0837902973095576, "scenario_construction_mean_reward_component_step_wait_term": -0.0005116460573238631, "scenario_construction_mean_running_vehicles": 10984.333333333334, "scenario_construction_mean_throughput": 9942.333333333334, "scenario_construction_mean_total_episode_return": -8154.410629073158, "scenario_construction_mean_total_incoming_vehicles": 10832.800455729166, "scenario_construction_mean_total_waiting_vehicles": 10815.933919270834, "scenario_district_overload_num_episodes": 3.0, "scenario_district_overload_mean_average_travel_time": 1195.322119047619, "scenario_district_overload_mean_decision_steps": 720.0, "scenario_district_overload_mean_episode_return": -0.07704715363552843, "scenario_district_overload_mean_mean_incoming_vehicles": 79.52678680419922, "scenario_district_overload_mean_mean_incoming_vehicles_commercial": 88.96267445882161, "scenario_district_overload_mean_mean_incoming_vehicles_industrial": 53.708824157714844, "scenario_district_overload_mean_mean_incoming_vehicles_mixed": 77.57301330566406, "scenario_district_overload_mean_mean_incoming_vehicles_residential": 82.95050048828125, "scenario_district_overload_mean_mean_reward": -0.14318007230758667, "scenario_district_overload_mean_mean_reward_commercial": -0.1615289251009623, "scenario_district_overload_mean_mean_reward_industrial": -0.11472812294960022, "scenario_district_overload_mean_mean_reward_mixed": -0.13287750879923502, "scenario_district_overload_mean_mean_reward_residential": -0.1484353393316269, "scenario_district_overload_mean_mean_step_intersection_reward": -0.07704715363552843, "scenario_district_overload_mean_mean_waiting_vehicles": 79.4207534790039, "scenario_district_overload_mean_mean_waiting_vehicles_commercial": 88.8725077311198, "scenario_district_overload_mean_mean_waiting_vehicles_industrial": 53.441911697387695, "scenario_district_overload_mean_mean_waiting_vehicles_mixed": 77.4367192586263, "scenario_district_overload_mean_mean_waiting_vehicles_residential": 82.85978190104167, "scenario_district_overload_mean_num_commercial_intersections": 25.0, "scenario_district_overload_mean_num_controlled_intersections": 143.66666666666666, "scenario_district_overload_mean_num_industrial_intersections": 21.0, "scenario_district_overload_mean_num_mixed_intersections": 18.333333333333332, "scenario_district_overload_mean_num_residential_intersections": 86.33333333333333, "scenario_district_overload_mean_reward_component_mean_imbalance_term": -0.0037736904710529433, "scenario_district_overload_mean_reward_component_mean_queue_level_term": -0.02285890012094569, "scenario_district_overload_mean_reward_component_mean_queue_term": -0.002483083630987108, "scenario_district_overload_mean_reward_component_mean_throughput_term": 0.0004181063758871325, "scenario_district_overload_mean_reward_component_mean_wait_level_term": -0.04339032608421323, "scenario_district_overload_mean_reward_component_mean_wait_term": -0.004959260496528057, "scenario_district_overload_mean_reward_component_step_imbalance_term": -0.0073141853014628095, "scenario_district_overload_mean_reward_component_step_queue_level_term": -0.04469550649325053, "scenario_district_overload_mean_reward_component_step_queue_term": -0.0003631128541504343, "scenario_district_overload_mean_reward_component_step_throughput_term": 3.47008584261251e-05, "scenario_district_overload_mean_reward_component_step_wait_level_term": -0.0892631287376086, "scenario_district_overload_mean_reward_component_step_wait_term": -0.0015788508656745155, "scenario_district_overload_mean_running_vehicles": 11578.333333333334, "scenario_district_overload_mean_throughput": 8720.0, "scenario_district_overload_mean_total_episode_return": -7920.439513783902, "scenario_district_overload_mean_total_incoming_vehicles": 11418.2001953125, "scenario_district_overload_mean_total_waiting_vehicles": 11402.533203125, "scenario_evening_rush_num_episodes": 3.0, "scenario_evening_rush_mean_average_travel_time": 660.4524094134522, "scenario_evening_rush_mean_decision_steps": 720.0, "scenario_evening_rush_mean_episode_return": -0.04457209495347355, "scenario_evening_rush_mean_mean_incoming_vehicles": 76.65056228637695, "scenario_evening_rush_mean_mean_incoming_vehicles_commercial": 95.35669199625652, "scenario_evening_rush_mean_mean_incoming_vehicles_industrial": 90.39044189453125, "scenario_evening_rush_mean_mean_incoming_vehicles_mixed": 69.93777974446614, "scenario_evening_rush_mean_mean_incoming_vehicles_residential": 71.98044713338216, "scenario_evening_rush_mean_mean_reward": -0.1385439708828926, "scenario_evening_rush_mean_mean_reward_commercial": -0.17414634923140207, "scenario_evening_rush_mean_mean_reward_industrial": -0.18424042314291, "scenario_evening_rush_mean_mean_reward_mixed": -0.12508899718523026, "scenario_evening_rush_mean_mean_reward_residential": -0.1282640720407168, "scenario_evening_rush_mean_mean_step_intersection_reward": -0.04457209495347355, "scenario_evening_rush_mean_mean_waiting_vehicles": 76.41112899780273, "scenario_evening_rush_mean_mean_waiting_vehicles_commercial": 95.16231282552083, "scenario_evening_rush_mean_mean_waiting_vehicles_industrial": 90.23749923706055, "scenario_evening_rush_mean_mean_waiting_vehicles_mixed": 69.61174647013347, "scenario_evening_rush_mean_mean_waiting_vehicles_residential": 71.7259152730306, "scenario_evening_rush_mean_num_commercial_intersections": 25.0, "scenario_evening_rush_mean_num_controlled_intersections": 143.66666666666666, "scenario_evening_rush_mean_num_industrial_intersections": 21.0, "scenario_evening_rush_mean_num_mixed_intersections": 18.333333333333332, "scenario_evening_rush_mean_num_residential_intersections": 86.33333333333333, "scenario_evening_rush_mean_reward_component_mean_imbalance_term": -0.002133049215939269, "scenario_evening_rush_mean_reward_component_mean_queue_level_term": -0.01255612862614136, "scenario_evening_rush_mean_reward_component_mean_queue_term": -0.0023793901366290352, "scenario_evening_rush_mean_reward_component_mean_throughput_term": 0.0003537796854002577, "scenario_evening_rush_mean_reward_component_mean_wait_level_term": -0.023112009718347006, "scenario_evening_rush_mean_reward_component_mean_wait_term": -0.004745296994345637, "scenario_evening_rush_mean_reward_component_step_imbalance_term": -0.007105864739666383, "scenario_evening_rush_mean_reward_component_step_queue_level_term": -0.042829024295012154, "scenario_evening_rush_mean_reward_component_step_queue_term": -0.0014268975937739015, "scenario_evening_rush_mean_reward_component_step_throughput_term": 1.0683762714810049e-05, "scenario_evening_rush_mean_reward_component_step_wait_level_term": -0.08536915977795918, "scenario_evening_rush_mean_reward_component_step_wait_term": -0.00182371501189967, "scenario_evening_rush_mean_running_vehicles": 11232.666666666666, "scenario_evening_rush_mean_throughput": 7317.333333333333, "scenario_evening_rush_mean_total_episode_return": -4600.199328966439, "scenario_evening_rush_mean_total_incoming_vehicles": 11043.533528645834, "scenario_evening_rush_mean_total_waiting_vehicles": 11008.533203125, "scenario_event_spike_num_episodes": 3.0, "scenario_event_spike_mean_average_travel_time": 1208.472896825397, "scenario_event_spike_mean_decision_steps": 720.0, "scenario_event_spike_mean_episode_return": -0.08119336456882184, "scenario_event_spike_mean_mean_incoming_vehicles": 82.9580307006836, "scenario_event_spike_mean_mean_incoming_vehicles_commercial": 83.54111735026042, "scenario_event_spike_mean_mean_incoming_vehicles_industrial": 66.97573852539062, "scenario_event_spike_mean_mean_incoming_vehicles_mixed": 81.62380981445312, "scenario_event_spike_mean_mean_incoming_vehicles_residential": 86.97780863444011, "scenario_event_spike_mean_mean_reward": -0.1493850996096929, "scenario_event_spike_mean_mean_reward_commercial": -0.14835137128829956, "scenario_event_spike_mean_mean_reward_industrial": -0.14332343265414238, "scenario_event_spike_mean_mean_reward_mixed": -0.1416124701499939, "scenario_event_spike_mean_mean_reward_residential": -0.15567681193351746, "scenario_event_spike_mean_mean_step_intersection_reward": -0.08119336456882184, "scenario_event_spike_mean_mean_waiting_vehicles": 82.84591166178386, "scenario_event_spike_mean_mean_waiting_vehicles_commercial": 83.3379643758138, "scenario_event_spike_mean_mean_waiting_vehicles_industrial": 66.875, "scenario_event_spike_mean_mean_waiting_vehicles_mixed": 81.58306884765625, "scenario_event_spike_mean_mean_waiting_vehicles_residential": 86.8769048055013, "scenario_event_spike_mean_num_commercial_intersections": 25.0, "scenario_event_spike_mean_num_controlled_intersections": 143.66666666666666, "scenario_event_spike_mean_num_industrial_intersections": 21.0, "scenario_event_spike_mean_num_mixed_intersections": 18.333333333333332, "scenario_event_spike_mean_num_residential_intersections": 86.33333333333333, "scenario_event_spike_mean_reward_component_mean_imbalance_term": -0.0039921077359601305, "scenario_event_spike_mean_reward_component_mean_queue_level_term": -0.024016949785123465, "scenario_event_spike_mean_reward_component_mean_queue_term": -0.002585857834915536, "scenario_event_spike_mean_reward_component_mean_throughput_term": 0.0003975352663474041, "scenario_event_spike_mean_reward_component_mean_wait_level_term": -0.04582935523439996, "scenario_event_spike_mean_reward_component_mean_wait_term": -0.0051666291805856045, "scenario_event_spike_mean_reward_component_step_imbalance_term": -0.007636613678187132, "scenario_event_spike_mean_reward_component_step_queue_level_term": -0.0465454397102197, "scenario_event_spike_mean_reward_component_step_queue_term": -0.0007804334648729613, "scenario_event_spike_mean_reward_component_step_throughput_term": 2.401709571131505e-05, "scenario_event_spike_mean_reward_component_step_wait_level_term": -0.09295988579591115, "scenario_event_spike_mean_reward_component_step_wait_term": -0.0014867326244711876, "scenario_event_spike_mean_running_vehicles": 12100.0, "scenario_event_spike_mean_throughput": 8194.666666666666, "scenario_event_spike_mean_total_episode_return": -8365.053400541967, "scenario_event_spike_mean_total_incoming_vehicles": 11934.666666666666, "scenario_event_spike_mean_total_waiting_vehicles": 11918.266927083334, "scenario_morning_rush_num_episodes": 3.0, "scenario_morning_rush_mean_average_travel_time": 1811.952595570632, "scenario_morning_rush_mean_decision_steps": 720.0, "scenario_morning_rush_mean_episode_return": -0.09729997475048163, "scenario_morning_rush_mean_mean_incoming_vehicles": 65.98576100667317, "scenario_morning_rush_mean_mean_incoming_vehicles_commercial": 46.47777811686198, "scenario_morning_rush_mean_mean_incoming_vehicles_industrial": 30.824999809265137, "scenario_morning_rush_mean_mean_incoming_vehicles_mixed": 48.718518575032554, "scenario_morning_rush_mean_mean_incoming_vehicles_residential": 79.2193120320638, "scenario_morning_rush_mean_mean_reward": -0.11870058874289195, "scenario_morning_rush_mean_mean_reward_commercial": -0.08712878078222275, "scenario_morning_rush_mean_mean_reward_industrial": -0.062119029462337494, "scenario_morning_rush_mean_mean_reward_mixed": -0.08129808306694031, "scenario_morning_rush_mean_mean_reward_residential": -0.14277466386556625, "scenario_morning_rush_mean_mean_step_intersection_reward": -0.09729997475048163, "scenario_morning_rush_mean_mean_waiting_vehicles": 65.43304443359375, "scenario_morning_rush_mean_mean_waiting_vehicles_commercial": 46.016465504964195, "scenario_morning_rush_mean_mean_waiting_vehicles_industrial": 29.62426471710205, "scenario_morning_rush_mean_mean_waiting_vehicles_mixed": 48.529099782307945, "scenario_morning_rush_mean_mean_waiting_vehicles_residential": 78.70959091186523, "scenario_morning_rush_mean_num_commercial_intersections": 25.0, "scenario_morning_rush_mean_num_controlled_intersections": 143.66666666666666, "scenario_morning_rush_mean_num_industrial_intersections": 21.0, "scenario_morning_rush_mean_num_mixed_intersections": 18.333333333333332, "scenario_morning_rush_mean_num_residential_intersections": 86.33333333333333, "scenario_morning_rush_mean_reward_component_mean_imbalance_term": -0.0050065515168622055, "scenario_morning_rush_mean_reward_component_mean_queue_level_term": -0.029667490588417427, "scenario_morning_rush_mean_reward_component_mean_queue_term": -0.0020817301939887504, "scenario_morning_rush_mean_reward_component_mean_throughput_term": 0.0004631613343934549, "scenario_morning_rush_mean_reward_component_mean_wait_level_term": -0.05687377775736561, "scenario_morning_rush_mean_reward_component_mean_wait_term": -0.004133584840558952, "scenario_morning_rush_mean_reward_component_step_imbalance_term": -0.00652750488370657, "scenario_morning_rush_mean_reward_component_step_queue_level_term": -0.03747114290793737, "scenario_morning_rush_mean_reward_component_step_queue_term": 0.00010746932336284469, "scenario_morning_rush_mean_reward_component_step_throughput_term": 0.00011752135469578207, "scenario_morning_rush_mean_reward_component_step_wait_level_term": -0.07439005995790164, "scenario_morning_rush_mean_reward_component_step_wait_term": -0.0005368716471518079, "scenario_morning_rush_mean_running_vehicles": 9516.333333333334, "scenario_morning_rush_mean_throughput": 9721.333333333334, "scenario_morning_rush_mean_total_episode_return": -9921.271500100693, "scenario_morning_rush_mean_total_incoming_vehicles": 9360.466471354166, "scenario_morning_rush_mean_total_waiting_vehicles": 9274.599934895834, "scenario_normal_num_episodes": 3.0, "scenario_normal_mean_average_travel_time": 322.15036814674727, "scenario_normal_mean_decision_steps": 720.0, "scenario_normal_mean_episode_return": -0.011686708983003072, "scenario_normal_mean_mean_incoming_vehicles": 12.324091911315918, "scenario_normal_mean_mean_incoming_vehicles_commercial": 10.414502620697021, "scenario_normal_mean_mean_incoming_vehicles_industrial": 3.6330883502960205, "scenario_normal_mean_mean_incoming_vehicles_mixed": 14.223809878031412, "scenario_normal_mean_mean_incoming_vehicles_residential": 13.507595380147299, "scenario_normal_mean_mean_reward": -0.015344452733794848, "scenario_normal_mean_mean_reward_commercial": -0.017466401836524408, "scenario_normal_mean_mean_reward_industrial": -0.018741912208497524, "scenario_normal_mean_mean_reward_mixed": -0.013853445377511283, "scenario_normal_mean_mean_reward_residential": -0.014423531169692675, "scenario_normal_mean_mean_step_intersection_reward": -0.011686708983003072, "scenario_normal_mean_mean_waiting_vehicles": 10.26733684539795, "scenario_normal_mean_mean_waiting_vehicles_commercial": 8.411057949066162, "scenario_normal_mean_mean_waiting_vehicles_industrial": 2.244117647409439, "scenario_normal_mean_mean_waiting_vehicles_mixed": 12.089841524759928, "scenario_normal_mean_mean_waiting_vehicles_residential": 11.420641899108887, "scenario_normal_mean_num_commercial_intersections": 25.0, "scenario_normal_mean_num_controlled_intersections": 143.66666666666666, "scenario_normal_mean_num_industrial_intersections": 21.0, "scenario_normal_mean_num_mixed_intersections": 18.333333333333332, "scenario_normal_mean_num_residential_intersections": 86.33333333333333, "scenario_normal_mean_reward_component_mean_imbalance_term": -0.0009236909056465631, "scenario_normal_mean_reward_component_mean_queue_level_term": -0.004475039445676682, "scenario_normal_mean_reward_component_mean_queue_term": -0.00033819589137917, "scenario_normal_mean_reward_component_mean_throughput_term": 0.0006868841588264465, "scenario_normal_mean_reward_component_mean_wait_level_term": -0.006083505248553652, "scenario_normal_mean_reward_component_mean_wait_term": -0.000553161650131739, "scenario_normal_mean_reward_component_step_imbalance_term": -0.0014559239304314058, "scenario_normal_mean_reward_component_step_queue_level_term": -0.0060875255924959975, "scenario_normal_mean_reward_component_step_queue_term": 0.000328068170347251, "scenario_normal_mean_reward_component_step_throughput_term": 0.0004987179684879569, "scenario_normal_mean_reward_component_step_wait_level_term": -0.009831168999274572, "scenario_normal_mean_reward_component_step_wait_term": 0.0012033806027223666, "scenario_normal_mean_running_vehicles": 1810.0, "scenario_normal_mean_throughput": 14139.666666666666, "scenario_normal_mean_total_episode_return": -1214.3532793479972, "scenario_normal_mean_total_incoming_vehicles": 1778.9332682291667, "scenario_normal_mean_total_waiting_vehicles": 1482.0666910807292, "random_num_episodes": 21.0, "random_mean_average_travel_time": 1149.735511120171, "random_mean_decision_steps": 720.0, "random_mean_episode_return": -0.06986708645135926, "random_mean_mean_incoming_vehicles": 69.00572704133533, "random_mean_mean_incoming_vehicles_commercial": 69.49742081051781, "random_mean_mean_incoming_vehicles_industrial": 54.13539964812143, "random_mean_mean_incoming_vehicles_mixed": 64.00039295923142, "random_mean_mean_incoming_vehicles_residential": 72.77403754279727, "random_mean_mean_reward": -0.12369194103493578, "random_mean_mean_reward_commercial": -0.12429957969912461, "random_mean_mean_reward_industrial": -0.11348718235136143, "random_mean_mean_reward_mixed": -0.11239427842554592, "random_mean_mean_reward_residential": -0.12937946449078264, "random_mean_mean_step_intersection_reward": -0.06986708645135926, "random_mean_mean_waiting_vehicles": 68.6866828827631, "random_mean_mean_waiting_vehicles_commercial": 69.13945550010318, "random_mean_mean_waiting_vehicles_industrial": 53.848739760262625, "random_mean_mean_waiting_vehicles_mixed": 63.70834482283819, "random_mean_mean_waiting_vehicles_residential": 72.45771448952812, "random_mean_num_commercial_intersections": 25.0, "random_mean_num_controlled_intersections": 143.66666666666666, "random_mean_num_industrial_intersections": 21.0, "random_mean_num_mixed_intersections": 18.333333333333332, "random_mean_num_residential_intersections": 86.33333333333333, "random_mean_reward_component_mean_imbalance_term": -0.0035170371034860624, "random_mean_reward_component_mean_queue_level_term": -0.020873759790043262, "random_mean_reward_component_mean_queue_term": -0.0021483343322610702, "random_mean_reward_component_mean_throughput_term": 0.00042374731430812513, "random_mean_reward_component_mean_wait_level_term": -0.03947469252266268, "random_mean_reward_component_mean_wait_term": -0.004277009669906202, "random_mean_reward_component_step_imbalance_term": -0.0064979581816476725, "random_mean_reward_component_step_queue_level_term": -0.03867001771660788, "random_mean_reward_component_step_queue_term": -0.0005433858593841294, "random_mean_reward_component_step_throughput_term": 7.67399272133064e-05, "random_mean_reward_component_step_wait_level_term": -0.07696532001275391, "random_mean_reward_component_step_wait_term": -0.001091999217307949, "random_mean_running_vehicles": 10078.57142857143, "random_mean_throughput": 8766.285714285714, "random_mean_total_episode_return": -7195.776583427663, "random_mean_total_incoming_vehicles": 9926.447556268602, "random_mean_total_waiting_vehicles": 9880.352475120908, "fixed_num_episodes": 21.0, "fixed_mean_average_travel_time": 1124.0565598037003, "fixed_mean_decision_steps": 720.0, "fixed_mean_episode_return": -0.06868379996774615, "fixed_mean_mean_incoming_vehicles": 67.68019539969308, "fixed_mean_mean_incoming_vehicles_commercial": 66.97633057548886, "fixed_mean_mean_incoming_vehicles_industrial": 51.98813056945801, "fixed_mean_mean_incoming_vehicles_mixed": 63.079319545200896, "fixed_mean_mean_incoming_vehicles_residential": 71.61153534480503, "fixed_mean_mean_reward": -0.12379579494396846, "fixed_mean_mean_reward_commercial": -0.12034201719576404, "fixed_mean_mean_reward_industrial": -0.11323985617075648, "fixed_mean_mean_reward_mixed": -0.11251166910820064, "fixed_mean_mean_reward_residential": -0.13029047137215025, "fixed_mean_mean_step_intersection_reward": -0.06868379996774615, "fixed_mean_mean_waiting_vehicles": 67.34642019725982, "fixed_mean_mean_waiting_vehicles_commercial": 66.61372003101167, "fixed_mean_mean_waiting_vehicles_industrial": 51.54842403956822, "fixed_mean_mean_waiting_vehicles_mixed": 62.698986870901926, "fixed_mean_mean_waiting_vehicles_residential": 71.31038307008289, "fixed_mean_num_commercial_intersections": 25.0, "fixed_mean_num_controlled_intersections": 143.66666666666666, "fixed_mean_num_industrial_intersections": 21.0, "fixed_mean_num_mixed_intersections": 18.333333333333332, "fixed_mean_num_residential_intersections": 86.33333333333333, "fixed_mean_reward_component_mean_imbalance_term": -0.003465978212682819, "fixed_mean_reward_component_mean_queue_level_term": -0.020574338963747902, "fixed_mean_reward_component_mean_queue_term": -0.0021085567718838313, "fixed_mean_reward_component_mean_throughput_term": 0.00045078821786658424, "fixed_mean_reward_component_mean_wait_level_term": -0.038787730208751085, "fixed_mean_reward_component_mean_wait_term": -0.004197983770099666, "fixed_mean_reward_component_step_imbalance_term": -0.006365043981488617, "fixed_mean_reward_component_step_queue_level_term": -0.03795402275309676, "fixed_mean_reward_component_step_queue_term": -0.00036114034897071265, "fixed_mean_reward_component_step_throughput_term": 7.484737112203479e-05, "fixed_mean_reward_component_step_wait_level_term": -0.0755326659640386, "fixed_mean_reward_component_step_wait_term": -0.003657768958614075, "fixed_mean_running_vehicles": 9871.714285714286, "fixed_mean_throughput": 9343.285714285714, "fixed_mean_total_episode_return": -7067.1107983789625, "fixed_mean_total_incoming_vehicles": 9722.266775948661, "fixed_mean_total_waiting_vehicles": 9673.085670107886, "learner_minus_fixed_return": 0.0008364148110455855, "learner_minus_random_return": 0.002019701294658699, "update": 80, "algorithm": "ps_d3qn", "policy_arch": "single_head", "reward_variant": "wait_queue_throughput", "rolling_mean_episode_return": -0.07542100389380334, "rolling_mean_total_episode_return": -7776.380780765492, "rolling_mean_mean_waiting_vehicles": 73.38390572865804, "rolling_mean_throughput": 7868.9047619047615} diff --git a/client.py b/client.py new file mode 100644 index 0000000000000000000000000000000000000000..4adbbe0c83064e38b5467be1bdbc15d802a5837a --- /dev/null +++ b/client.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +from typing import Any + +import requests + +from models import ( + AgenticTrafficAction, + AgenticTrafficObservation, + AgenticTrafficState, +) + + +class AgenticTrafficClient: + """Thin HTTP client for the DistrictFlow OpenEnv server.""" + + def __init__(self, base_url: str): + self.base_url = base_url.rstrip("/") + + def reset(self, seed: int | None = None) -> AgenticTrafficObservation: + response = requests.post( + f"{self.base_url}/reset", + json={"seed": seed}, + timeout=60, + ) + response.raise_for_status() + payload = response.json() + return AgenticTrafficObservation.model_validate(payload["observation"]) + + def step(self, action: AgenticTrafficAction) -> AgenticTrafficObservation: + response = requests.post( + f"{self.base_url}/step", + json={"action": action.model_dump()}, + timeout=60, + ) + response.raise_for_status() + payload = response.json() + observation = AgenticTrafficObservation.model_validate(payload["observation"]) + observation.done = bool(payload.get("done", False)) + observation.reward = float(payload.get("reward", 0.0)) + return observation + + def state(self) -> AgenticTrafficState: + response = requests.get(f"{self.base_url}/state", timeout=60) + response.raise_for_status() + payload = response.json() + return AgenticTrafficState.model_validate(payload["state"]) + + def health(self) -> dict[str, Any]: + response = requests.get(f"{self.base_url}/health", timeout=30) + response.raise_for_status() + return response.json() diff --git a/configs/README.md b/configs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5a88dd0b2dfe46a41102aa3adab8ee90de8bffec --- /dev/null +++ b/configs/README.md @@ -0,0 +1,13 @@ +# configs + +Static configuration files from earlier iterations of the project. + +## Contents + +- [districts.yaml](/Users/aditya/Developer/traffic-llm/configs/districts.yaml) +- [experiment.yaml](/Users/aditya/Developer/traffic-llm/configs/experiment.yaml) +- [training.yaml](/Users/aditya/Developer/traffic-llm/configs/training.yaml) + +## Status + +These files are not the primary control surface for the current DQN pipeline. The active training path is CLI-driven via [training/train_local_policy.py](/Users/aditya/Developer/traffic-llm/training/train_local_policy.py). diff --git a/configs/districts.yaml b/configs/districts.yaml new file mode 100644 index 0000000000000000000000000000000000000000..56cd7987301b393a0790b1f5288b1609511bdd68 --- /dev/null +++ b/configs/districts.yaml @@ -0,0 +1,37 @@ +districts: + D0: + intersection_ids: ["I1", "I2"] + neighbor_districts: ["D1"] + + D1: + intersection_ids: ["I3", "I4"] + neighbor_districts: ["D0"] + +intersections: + I1: + district_id: "D0" + incoming_lanes: ["I1_N", "I1_S", "I1_E", "I1_W"] + outgoing_lanes: [] + neighbors: ["I2"] + is_border: false + + I2: + district_id: "D0" + incoming_lanes: ["I2_N", "I2_S", "I2_E", "I2_W"] + outgoing_lanes: [] + neighbors: ["I1", "I3"] + is_border: true + + I3: + district_id: "D1" + incoming_lanes: ["I3_N", "I3_S", "I3_E", "I3_W"] + outgoing_lanes: [] + neighbors: ["I2", "I4"] + is_border: true + + I4: + district_id: "D1" + incoming_lanes: ["I4_N", "I4_S", "I4_E", "I4_W"] + outgoing_lanes: [] + neighbors: ["I3"] + is_border: false \ No newline at end of file diff --git a/configs/experiment.yaml b/configs/experiment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b5a9824866f3664384334a9da5d1a53f640fac3f --- /dev/null +++ b/configs/experiment.yaml @@ -0,0 +1,23 @@ +name: "districtflow_baseline" + +scenario: + base_seed: 0 + num_eval_seeds: 5 + emergency_probability: 0.2 + traffic_bias_options: ["balanced", "ns", "ew"] + +compare: + fixed_time: true + local_only: true + local_plus_district: true + +district_coordination: + enabled: true + mode: "rule_based" + +metrics: + - avg_wait + - avg_queue + - mean_reward + - emergency_travel_time + - throughput \ No newline at end of file diff --git a/configs/training.yaml b/configs/training.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bbad2b9fb9414d3579889e4d189c065b16b87317 --- /dev/null +++ b/configs/training.yaml @@ -0,0 +1,31 @@ +seed: 0 + +environment: + config_path: "data/cityflow/config.json" + coordination_interval: 20 + max_steps: 300 + +training: + train_seeds: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + eval_seeds: [100, 101, 102] + num_epochs: 5 + max_steps_per_episode: 300 + +local_policy: + type: "heuristic" + min_green_steps: 5 + switch_margin: 1.0 + district_bonus_scale: 3.0 + neighbor_pressure_scale: 0.25 + +reward: + queue_weight: 0.5 + waiting_weight: 1.0 + switch_penalty: 0.1 + throughput_bonus: 0.0 + district_alignment_bonus: 0.75 + targeted_bonus_multiplier: 1.25 + emergency_bonus: 2.0 + +output: + save_dir: "outputs/local_training" \ No newline at end of file diff --git a/dashboard/README.md b/dashboard/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b9cda8cc13d2949d7f8a0a829ec8e9ffd8280ada --- /dev/null +++ b/dashboard/README.md @@ -0,0 +1,11 @@ +# dashboard + +Experimental dashboard code for inspecting runs and metrics. + +## Main file + +- [streamlit_app.py](/Users/aditya/Developer/traffic-llm/dashboard/streamlit_app.py) + +## Status + +This folder is not part of the core v1 DQN training loop. Expect some code here to reflect earlier prototype assumptions around district coordination. diff --git a/dashboard/__init__.py b/dashboard/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/dashboard/metrics.py b/dashboard/metrics.py new file mode 100644 index 0000000000000000000000000000000000000000..3521ee1e2426ed454b5f42b300034db37f8dd847 --- /dev/null +++ b/dashboard/metrics.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from typing import Any + + +def extract_step_metrics(info: dict[str, Any]) -> dict[str, float]: + metrics = info.get("metrics", {}) + return { + "total_waiting": float(metrics.get("total_waiting", 0.0)), + "total_queue": float(metrics.get("total_queue", 0.0)), + "mean_reward": float(metrics.get("mean_reward", 0.0)), + "num_intersections": float(metrics.get("num_intersections", 0.0)), + } + + +def summarize_history(history: list[dict[str, Any]]) -> dict[str, float]: + if not history: + return { + "avg_total_waiting": 0.0, + "avg_total_queue": 0.0, + "avg_mean_reward": 0.0, + "num_steps": 0.0, + } + + total_waiting = 0.0 + total_queue = 0.0 + mean_reward = 0.0 + + for row in history: + metrics = row.get("metrics", {}) + total_waiting += float(metrics.get("total_waiting", 0.0)) + total_queue += float(metrics.get("total_queue", 0.0)) + mean_reward += float(metrics.get("mean_reward", 0.0)) + + n = len(history) + return { + "avg_total_waiting": total_waiting / n, + "avg_total_queue": total_queue / n, + "avg_mean_reward": mean_reward / n, + "num_steps": float(n), + } + + +def flatten_directives(history: list[dict[str, Any]]) -> list[dict[str, Any]]: + rows: list[dict[str, Any]] = [] + + for row in history: + step = row.get("step", 0) + directives = row.get("district_directives", {}) + for district_id, directive in directives.items(): + rows.append( + { + "step": step, + "district_id": district_id, + "mode": directive.get("mode", "none"), + "duration": directive.get("duration", 1), + "district_weight": directive.get("district_weight", 0.5), + "corridor": directive.get("corridor"), + "rationale": directive.get("rationale", ""), + } + ) + + return rows diff --git a/dashboard/streamlit_app.py b/dashboard/streamlit_app.py new file mode 100644 index 0000000000000000000000000000000000000000..e6ce691580db552f4b5d87ecc5de99962da68c02 --- /dev/null +++ b/dashboard/streamlit_app.py @@ -0,0 +1,308 @@ +from __future__ import annotations + +import json +from pathlib import Path + +import pandas as pd +import streamlit as st +import matplotlib.pyplot as plt + +from agents.district_coordinator import RuleBasedDistrictCoordinator +from agents.local_policy import SharedHeuristicLocalPolicy +from dashboard.metrics import flatten_directives, summarize_history +from training.rollout import run_episode + + +def make_env(): + from env.traffic_env import TrafficEnv + from env.intersection_config import IntersectionConfig, DistrictConfig + + intersections = { + "I1": IntersectionConfig( + intersection_id="I1", + district_id="D0", + incoming_lanes=["I1_N", "I1_S", "I1_E", "I1_W"], + outgoing_lanes=[], + neighbors=["I2"], + is_border=False, + ), + "I2": IntersectionConfig( + intersection_id="I2", + district_id="D0", + incoming_lanes=["I2_N", "I2_S", "I2_E", "I2_W"], + outgoing_lanes=[], + neighbors=["I1", "I3"], + is_border=True, + ), + "I3": IntersectionConfig( + intersection_id="I3", + district_id="D1", + incoming_lanes=["I3_N", "I3_S", "I3_E", "I3_W"], + outgoing_lanes=[], + neighbors=["I2", "I4"], + is_border=True, + ), + "I4": IntersectionConfig( + intersection_id="I4", + district_id="D1", + incoming_lanes=["I4_N", "I4_S", "I4_E", "I4_W"], + outgoing_lanes=[], + neighbors=["I3"], + is_border=False, + ), + } + + districts = { + "D0": DistrictConfig( + district_id="D0", + intersection_ids=["I1", "I2"], + neighbor_districts=["D1"], + ), + "D1": DistrictConfig( + district_id="D1", + intersection_ids=["I3", "I4"], + neighbor_districts=["D0"], + ), + } + + return TrafficEnv( + config_path="data/cityflow/config.json", + intersections=intersections, + districts=districts, + coordination_interval=20, + max_steps=200, + ) + + +def build_history_frames(history: list[dict]): + metric_rows = [] + for row in history: + metrics = row.get("metrics", {}) + metric_rows.append( + { + "step": row.get("step", 0), + "total_waiting": float(metrics.get("total_waiting", 0.0)), + "total_queue": float(metrics.get("total_queue", 0.0)), + "mean_reward": float(metrics.get("mean_reward", 0.0)), + } + ) + + metrics_df = pd.DataFrame(metric_rows) + directives_df = pd.DataFrame(flatten_directives(history)) + return metrics_df, directives_df + + +def _load_json(path: Path) -> dict: + return json.loads(path.read_text(encoding="utf-8")) + + +def _list_generated_cities(root: Path) -> list[str]: + if not root.exists(): + return [] + return sorted( + p.name for p in root.iterdir() if p.is_dir() and p.name.startswith("city_") + ) + + +def _district_color_map(district_ids: list[str]) -> dict[str, tuple[float, float, float, float]]: + cmap = plt.cm.get_cmap("tab20", max(1, len(district_ids))) + return {did: cmap(idx) for idx, did in enumerate(district_ids)} + + +def _plot_city_geometry( + roadnet: dict, + district_map: dict | None, + show_gateways: bool, + show_districts: bool, + show_labels: bool, +): + fig, ax = plt.subplots(figsize=(10, 10)) + intersections = { + node["id"]: (float(node["point"]["x"]), float(node["point"]["y"])) + for node in roadnet.get("intersections", []) + } + roads = roadnet.get("roads", []) + intersection_to_district = ( + district_map.get("intersection_to_district", {}) if district_map else {} + ) + district_ids = sorted(set(intersection_to_district.values())) + district_colors = _district_color_map(district_ids) if district_ids else {} + gateway_nodes = set(district_map.get("gateway_intersections", [])) if district_map else set() + gateway_roads = set(district_map.get("gateway_roads", [])) if district_map else set() + + for road in roads: + points = road.get("points", []) + if len(points) < 2: + continue + x = [points[0]["x"], points[-1]["x"]] + y = [points[0]["y"], points[-1]["y"]] + color = "#7f8c8d" + width = 0.8 + alpha = 0.45 + if show_gateways and road["id"] in gateway_roads: + color = "#f39c12" + width = 1.8 + alpha = 0.95 + elif show_districts: + start = road.get("startIntersection") + end = road.get("endIntersection") + ds = intersection_to_district.get(start) + de = intersection_to_district.get(end) + if ds and ds == de: + color = district_colors.get(ds, color) + width = 1.0 + alpha = 0.7 + elif ds and de and ds != de: + color = "#2c3e50" + width = 1.25 + alpha = 0.9 + ax.plot(x, y, color=color, linewidth=width, alpha=alpha, solid_capstyle="round") + + if show_districts and district_colors: + for district_id in district_ids: + nodes = [ + nid for nid, did in intersection_to_district.items() if did == district_id and nid in intersections + ] + if not nodes: + continue + xs = [intersections[n][0] for n in nodes] + ys = [intersections[n][1] for n in nodes] + ax.scatter(xs, ys, s=14, color=district_colors[district_id], alpha=0.8, label=district_id) + else: + xs = [p[0] for p in intersections.values()] + ys = [p[1] for p in intersections.values()] + ax.scatter(xs, ys, s=8, color="#34495e", alpha=0.65) + + if show_gateways and gateway_nodes: + gxs = [intersections[n][0] for n in sorted(gateway_nodes) if n in intersections] + gys = [intersections[n][1] for n in sorted(gateway_nodes) if n in intersections] + ax.scatter(gxs, gys, s=44, color="#d35400", edgecolors="#1c2833", linewidths=0.6, zorder=10, label="gateway") + + if show_labels: + for nid, (x, y) in intersections.items(): + if nid in gateway_nodes: + ax.text(x, y, nid, fontsize=6, color="#922b21") + + ax.set_aspect("equal") + ax.set_xlabel("X") + ax.set_ylabel("Y") + ax.set_title("Roadnet Viewer") + ax.grid(True, alpha=0.15) + if show_districts or show_gateways: + ax.legend(loc="upper right", fontsize=7, frameon=True) + return fig + + +def main(): + st.set_page_config(page_title="DistrictFlow Dashboard", layout="wide") + st.title("DistrictFlow Dashboard") + st.caption("Multi-agent traffic control with district-level coordination") + + col1, col2, col3 = st.columns(3) + seed = col1.number_input("Seed", min_value=0, max_value=100000, value=0, step=1) + max_steps = col2.slider( + "Max steps", min_value=50, max_value=500, value=200, step=10 + ) + use_district_coordination = col3.checkbox( + "Enable district coordination", value=True + ) + + st.subheader("Generated City Viewer") + root_dir = Path( + st.text_input("Generated dataset dir", value="data/generated") + ) + cities = _list_generated_cities(root_dir) + if not cities: + st.info("No generated cities found in the selected directory.") + else: + selected_city = st.selectbox("City", options=cities, index=0) + show_districts = st.checkbox("Show district overlay", value=True) + show_gateways = st.checkbox("Show perimeter gateways", value=True) + show_gateway_labels = st.checkbox("Label gateways", value=False) + city_dir = root_dir / selected_city + roadnet_path = city_dir / "roadnet.json" + district_map_path = city_dir / "district_map.json" + + if roadnet_path.exists(): + roadnet = _load_json(roadnet_path) + district_map = _load_json(district_map_path) if district_map_path.exists() else None + fig = _plot_city_geometry( + roadnet=roadnet, + district_map=district_map, + show_gateways=show_gateways, + show_districts=show_districts, + show_labels=show_gateway_labels, + ) + st.pyplot(fig, use_container_width=True) + else: + st.warning(f"Missing roadnet file: {roadnet_path}") + + if st.button("Run Simulation", use_container_width=True): + env = make_env() + env.max_steps = max_steps + + local_policy = SharedHeuristicLocalPolicy() + + district_coordinators = {} + if use_district_coordination: + district_coordinators = { + "D0": RuleBasedDistrictCoordinator(), + "D1": RuleBasedDistrictCoordinator(), + } + + result = run_episode( + env=env, + local_policy=local_policy, + district_coordinators=district_coordinators, + seed=int(seed), + max_steps=max_steps, + record_history=True, + policy_update=False, + ) + + summary = summarize_history(result.history) + metrics_df, directives_df = build_history_frames(result.history) + + s1, s2, s3, s4 = st.columns(4) + s1.metric("Avg Waiting", f"{summary['avg_total_waiting']:.2f}") + s2.metric("Avg Queue", f"{summary['avg_total_queue']:.2f}") + s3.metric("Avg Reward", f"{summary['avg_mean_reward']:.2f}") + s4.metric("Steps", int(summary["num_steps"])) + + if not metrics_df.empty: + st.subheader("Simulation Metrics") + + fig1 = plt.figure() + plt.plot(metrics_df["step"], metrics_df["total_waiting"]) + plt.xlabel("Step") + plt.ylabel("Total Waiting") + plt.title("Total Waiting Over Time") + st.pyplot(fig1) + + fig2 = plt.figure() + plt.plot(metrics_df["step"], metrics_df["total_queue"]) + plt.xlabel("Step") + plt.ylabel("Total Queue") + plt.title("Total Queue Over Time") + st.pyplot(fig2) + + fig3 = plt.figure() + plt.plot(metrics_df["step"], metrics_df["mean_reward"]) + plt.xlabel("Step") + plt.ylabel("Mean Reward") + plt.title("Mean Reward Over Time") + st.pyplot(fig3) + + st.subheader("Raw Metrics") + st.dataframe(metrics_df, use_container_width=True) + + if not directives_df.empty: + st.subheader("District Directives") + st.dataframe(directives_df, use_container_width=True) + + st.subheader("Final Info") + st.json(result.final_info) + + +if __name__ == "__main__": + main() diff --git a/district_llm/FINAL_ABLATION_RUNBOOK.md b/district_llm/FINAL_ABLATION_RUNBOOK.md new file mode 100644 index 0000000000000000000000000000000000000000..1d6840d9b59899f53179e6f5c1749f4c51c01298 --- /dev/null +++ b/district_llm/FINAL_ABLATION_RUNBOOK.md @@ -0,0 +1,79 @@ +# Final Ablation Runbook + +## Dataset + +Generate the constrained v3 dataset: + +```bash +python scripts/generate_large_district_dataset.py \ + --num-train 10000 \ + --num-val 2500 \ + --output-dir data/district_llm_dataset_v3 \ + --checkpoint artifacts/dqn_shared/best_validation.pt \ + --max-candidate-intersections 6 \ + --max-target-intersections 3 +``` + +Defaults: + +- candidate pool is visible in the prompt via `candidate_intersections` +- labels are constrained to visible candidates +- DQN teacher sources are preferred by default + +## Notebook + +Use [notebooks/llama_finetune.ipynb](/root/aditya/agentic-traffic/notebooks/llama_finetune.ipynb). + +Recommended defaults for the A100 main run: + +- `RUN_MODE = "main_run"` +- `num_train_epochs = 2` +- `per_device_train_batch_size = 8` +- `gradient_accumulation_steps = 4` +- effective batch size = 32 +- `learning_rate = 1e-4` +- `warmup_ratio = 0.05` +- `eval_steps = 100` +- `save_steps = 100` + +Smoke test mode: + +- `RUN_MODE = "smoke_test"` +- short `max_steps` +- verifies formatting, checkpointing, and eval wiring + +Optional max-step override: + +- set `MAX_STEPS_OVERRIDE = 5000` only for explicit experimentation +- do not use it as the default main run + +Artifacts: + +- checkpoints: `artifacts/district_llm_adapter_v3//checkpoints` +- saved adapter: `artifacts/district_llm_adapter_v3//adapter` + +## Evaluation + +Run offline eval with repair enabled: + +```bash +python -m district_llm.eval \ + --model-path artifacts/district_llm_adapter_v3/main_run/adapter \ + --val-jsonl data/district_llm_dataset_v3/val.jsonl \ + --generated-root data/generated \ + --max-examples 250 \ + --debug-examples 10 \ + --allow-only-visible-candidates \ + --max-target-intersections 3 \ + --fallback-on-empty-targets \ + --fallback-mode heuristic \ + --restrict-targets-to-visible-summary \ + --report-before-after-repair +``` + +Key outputs: + +- raw vs repaired target metrics +- invalid target-id rate before and after repair +- visible-candidate-restricted metrics +- target failure buckets and debug examples diff --git a/district_llm/RL_GUIDANCE_EVAL_RUNBOOK.md b/district_llm/RL_GUIDANCE_EVAL_RUNBOOK.md new file mode 100644 index 0000000000000000000000000000000000000000..636d30bf69558f164ceacfb3017595471fc51a53 --- /dev/null +++ b/district_llm/RL_GUIDANCE_EVAL_RUNBOOK.md @@ -0,0 +1,126 @@ +# RL Guidance Eval Runbook + +This ablation keeps the RL checkpoint fixed. + +District guidance is only used at inference time through the wrapper in +`district_llm/rl_guidance_wrapper.py`. The safest default is +`target_only_soft`, which applies a small local Q-value bias only at +`target_intersections`. + +## Wrapper Modes + +- `no_op`: guidance is computed and logged, but RL actions are unchanged. +- `target_only_soft`: weak local prior on target intersections. Default debug mode. +- `target_only_medium`: same scope, slightly stronger. +- `corridor_soft`: small corridor prior on targets plus a few aligned boundary intersections. +- `global_soft`: weak district-wide prior. Use only as an ablation. +- `current_legacy`: reference mode approximating the old strong/global wrapper. + +## Fast Debug Matrix + +Use a short horizon first so the wrapper can be debugged quickly: + +```bash +python scripts/eval_rl_guidance_ablation.py \ + --rl-checkpoint artifacts/dqn_shared/best_validation.pt \ + --llm-model-path artifacts/district_llm_adapter_v3/main_run/adapter \ + --modes rl_only rl_heuristic rl_llm \ + --wrapper-modes no_op target_only_soft current_legacy \ + --split val \ + --cities city_0001 \ + --scenarios normal \ + --seeds 7 11 13 \ + --num-episodes 1 \ + --max-episode-seconds 300 \ + --guidance-refresh-steps 10 \ + --guidance-persistence-steps 3 \ + --bias-strength 0.12 \ + --target-only-bias-strength 0.18 \ + --corridor-bias-strength 0.05 \ + --max-intersections-affected 3 \ + --fallback-policy hold_previous \ + --save-guidance-traces \ + --output-dir artifacts/rl_guidance_eval/debug_matrix_300s +``` + +This expands into the paired comparison: + +- `rl_only` +- `rl_heuristic+no_op` +- `rl_heuristic+target_only_soft` +- `rl_heuristic+current_legacy` +- `rl_llm+no_op` +- `rl_llm+target_only_soft` +- `rl_llm+current_legacy` + +That command runs a superset of the exact smaller matrix from the wrapper audit prompt. Focus analysis on: + +- `rl_only` +- `rl_heuristic+no_op` +- `rl_heuristic+target_only_soft` +- `rl_llm+no_op` +- `rl_llm+target_only_soft` +- `rl_llm+current_legacy` + +## What To Look At + +Primary files: + +- `summary.json` +- `episode_metrics.csv` +- `guidance_traces.jsonl` +- `config.json` + +Key wrapper metrics in `episode_metrics.csv`: + +- `wrapper_mode` +- `mean_bias_magnitude` +- `max_bias_magnitude` +- `avg_num_targeted_intersections` +- `avg_num_affected_intersections` +- `percent_steps_with_active_guidance` +- `num_guidance_refreshes` +- `num_noop_guidance_events` +- `fallback_policy_used_count` + +Interpretation: + +- If `rl_heuristic+no_op` and `rl_llm+no_op` match `rl_only`, the harness itself is fine. +- If `current_legacy` collapses while `target_only_soft` stays near `rl_only`, the wrapper was too strong/global. +- If `rl_llm+target_only_soft` diverges from `rl_heuristic+target_only_soft`, the LLM is adding signal under safe integration. +- If `avg_num_affected_intersections` is large or `percent_steps_with_active_guidance` is near `1.0`, the wrapper is still too persistent or too broad. +- If `fallback_policy_used_count` stays high in `rl_llm`, inspect `guidance_traces.jsonl` before trusting traffic metrics. + +## Cheap Follow-Up Ablations + +Softer local prior: + +```bash +--wrapper-modes no_op target_only_soft target_only_medium +``` + +Scope ablation: + +```bash +--wrapper-modes target_only_soft corridor_soft global_soft current_legacy +``` + +More conservative persistence: + +```bash +--guidance-refresh-steps 8 --guidance-persistence-steps 2 +``` + +## Output Layout + +Outputs are saved under the requested directory, for example: + +```text +artifacts/rl_guidance_eval/debug_matrix_300s/ + config.json + summary.json + episode_metrics.csv + episode_metrics.jsonl + guidance_traces.jsonl + seeded_configs/ +``` diff --git a/district_llm/RL_LLM_WRAPPER_SWEEP_RUNBOOK.md b/district_llm/RL_LLM_WRAPPER_SWEEP_RUNBOOK.md new file mode 100644 index 0000000000000000000000000000000000000000..db3f4780fc768c5cd1b8a5e1b305921adffa2f7b --- /dev/null +++ b/district_llm/RL_LLM_WRAPPER_SWEEP_RUNBOOK.md @@ -0,0 +1,121 @@ +# RL+LLM Wrapper Sweep + +This sweep keeps both checkpoints fixed: + +- RL weights stay fixed. +- LLM weights stay fixed. +- Only the inference-time `target_only_soft` wrapper settings change. + +## Recommended First Sweep + +Run the default cheap preset on one city, one scenario, and three seeds: + +```bash +python scripts/sweep_rl_llm_wrapper.py \ + --rl-checkpoint artifacts/dqn_shared/best_validation.pt \ + --llm-model-path artifacts/district_llm_adapter_v3/main_run/adapter \ + --preset strength_targets_gating \ + --split val \ + --cities city_0001 \ + --scenarios normal \ + --seeds 7 11 13 \ + --episodes-per-seed 1 \ + --max-episode-seconds 300 \ + --guidance-refresh-steps 10 \ + --queue-threshold 150 \ + --imbalance-threshold 20 \ + --fallback-policy no_op \ + --output-dir artifacts/rl_llm_wrapper_sweep/first_pass +``` + +This preset sweeps a small curated grid over: + +- `bias_strength` in `{0.025, 0.05, 0.075}` +- `max_intersections_affected` in `{1, 2}` +- `gating_mode` in `{always_on, incident_or_spillback, queue_or_imbalance}` +- `guidance_persistence_steps = 5` +- `enable_bias_decay = false` + +It also includes `baseline_current_soft` as a reference row. + +## Cheaper Probe + +If you only want the fastest possible read on strength sensitivity: + +```bash +python scripts/sweep_rl_llm_wrapper.py \ + --rl-checkpoint artifacts/dqn_shared/best_validation.pt \ + --llm-model-path artifacts/district_llm_adapter_v3/main_run/adapter \ + --preset strength_only \ + --cities city_0001 \ + --scenarios normal \ + --seeds 7 11 13 \ + --episodes-per-seed 1 \ + --max-episode-seconds 300 \ + --output-dir artifacts/rl_llm_wrapper_sweep/strength_only +``` + +## Broader Conservative Follow-Up + +After the first pass identifies a promising strength/gating region: + +```bash +python scripts/sweep_rl_llm_wrapper.py \ + --rl-checkpoint artifacts/dqn_shared/best_validation.pt \ + --llm-model-path artifacts/district_llm_adapter_v3/main_run/adapter \ + --preset full_conservative \ + --cities city_0001 \ + --scenarios normal \ + --seeds 7 11 13 \ + --episodes-per-seed 1 \ + --max-episode-seconds 300 \ + --output-dir artifacts/rl_llm_wrapper_sweep/full_conservative +``` + +## Outputs + +Each sweep writes: + +- `config.json` +- `sweep_results.csv` +- `sweep_results.parquet` when parquet support is available +- `paired_episode_metrics.csv` +- `ranking.json` +- `summary_report.json` +- optional `step_metrics.*` +- optional `guidance_traces.jsonl` + +## What To Inspect + +Start with: + +- `summary_report.json` +- `ranking.json` +- `paired_episode_metrics.csv` + +Key fields: + +- `mean_return_delta_vs_rl_only` +- `mean_throughput_delta_vs_rl_only` +- `mean_avg_queue_delta_vs_rl_only` +- `mean_avg_wait_delta_vs_rl_only` +- `mean_percent_steps_with_active_guidance` +- `mean_avg_num_affected_intersections` +- `mean_num_steps_guidance_blocked_by_gate` + +## Interpretation + +The most promising configs should usually look like: + +- small negative or positive `mean_return_delta_vs_rl_only` +- low `mean_avg_num_affected_intersections` +- moderate or low `mean_percent_steps_with_active_guidance` +- low fallback / invalid guidance counts + +If the best configs cluster around: + +- lower `bias_strength` +- `max_intersections_affected = 1` +- gated modes like `incident_or_spillback` or `queue_or_imbalance` + +then the wrapper was still too active and guidance needs to remain a rare local prior. diff --git a/district_llm/__init__.py b/district_llm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f228ce88b3ef09deea8f1394cde4823c7765a48b --- /dev/null +++ b/district_llm/__init__.py @@ -0,0 +1,18 @@ +from district_llm.derivation import DistrictWindowData, LocalIntersectionAction, derive_district_action +from district_llm.prompting import build_system_prompt, format_district_prompt, format_sft_text +from district_llm.schema import CandidateIntersection, CongestedIntersection, DistrictAction, DistrictStateSummary +from district_llm.summary_builder import DistrictStateSummaryBuilder + +__all__ = [ + "CandidateIntersection", + "CongestedIntersection", + "DistrictAction", + "DistrictStateSummary", + "DistrictStateSummaryBuilder", + "DistrictWindowData", + "LocalIntersectionAction", + "derive_district_action", + "build_system_prompt", + "format_district_prompt", + "format_sft_text", +] diff --git a/district_llm/data.py b/district_llm/data.py new file mode 100644 index 0000000000000000000000000000000000000000..33300cf78605d4620dd4f935a961938be1d1e15b --- /dev/null +++ b/district_llm/data.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from pathlib import Path + +def load_jsonl_text_dataset( + path: str | Path, + controller_families: list[str] | None = None, + controller_types: list[str] | None = None, +): + from datasets import load_dataset + + dataset = load_dataset("json", data_files=str(Path(path)), split="train") + if "text" not in dataset.column_names: + raise ValueError("Expected a JSONL dataset with a 'text' field.") + if controller_families: + allowed_families = set(controller_families) + dataset = dataset.filter( + lambda row: row.get("controller_family") in allowed_families + ) + if controller_types: + allowed_types = set(controller_types) + dataset = dataset.filter( + lambda row: row.get("controller_type") in allowed_types + ) + if len(dataset) == 0: + raise ValueError("No dataset rows remain after applying the requested filters.") + return dataset diff --git a/district_llm/derivation.py b/district_llm/derivation.py new file mode 100644 index 0000000000000000000000000000000000000000..6b43247152386a4e86789a8b1aedd4b80aea82bc --- /dev/null +++ b/district_llm/derivation.py @@ -0,0 +1,228 @@ +from __future__ import annotations + +from dataclasses import dataclass, field +from typing import Any + +from district_llm.repair import fallback_target_intersections +from district_llm.schema import DistrictAction, DistrictStateSummary + + +@dataclass +class LocalIntersectionAction: + intersection_id: str + district_id: str + action: int + current_phase: int + next_phase: int + queue_total: float + wait_total: float + outgoing_load: float + is_boundary: bool + + @property + def switched(self) -> bool: + return int(self.action) == 1 and self.next_phase != self.current_phase + + +@dataclass +class DistrictWindowData: + district_id: str + start_summary: DistrictStateSummary + end_summary: DistrictStateSummary + controller_actions: list[LocalIntersectionAction] = field(default_factory=list) + step_count: int = 0 + + def to_dict(self) -> dict[str, Any]: + return { + "district_id": self.district_id, + "step_count": int(self.step_count), + "queue_delta": round(self.end_summary.total_queue - self.start_summary.total_queue, 3), + "wait_delta": round(self.end_summary.total_wait - self.start_summary.total_wait, 3), + "throughput_delta": round( + self.end_summary.recent_throughput - self.start_summary.recent_throughput, + 3, + ), + } + + +def derive_district_action( + window_data: DistrictWindowData, + controller_actions: list[LocalIntersectionAction] | None = None, + district_state: DistrictStateSummary | None = None, + max_target_intersections: int = 3, +) -> DistrictAction: + """ + Deterministic first-pass label extraction from local-controller behavior. + + Heuristic order: + 1. Incident-heavy windows map to `incident_response`. + 2. Strong spillback / boundary pressure maps to `clear_spillback`. + 3. Rising boundary demand maps to `drain_inbound`. + 4. Persistently high outgoing pressure maps to `drain_outbound`. + 5. Boundary-heavy rush windows map to `arterial_priority`. + 6. Clear NS/EW directional dominance maps to `favor_NS` / `favor_EW`. + 7. Otherwise emit `hold`. + """ + actions = controller_actions if controller_actions is not None else window_data.controller_actions + state = district_state if district_state is not None else window_data.start_summary + end_state = window_data.end_summary + + duration_steps = max(1, min(int(window_data.step_count or 1), 20)) + phase_counts = {"NS": 0, "EW": 0} + focus_scores: dict[str, float] = {} + boundary_focus = 0 + switch_count = 0 + + for item in actions: + phase_key = "NS" if int(item.next_phase) == 0 else "EW" + phase_counts[phase_key] += 1 + switch_count += int(item.switched) + if item.is_boundary: + boundary_focus += 1 + focus_scores[item.intersection_id] = focus_scores.get(item.intersection_id, 0.0) + ( + item.queue_total + 1.5 * item.wait_total + 2.0 * float(item.switched) + ) + + total_action_records = max(1, len(actions)) + ns_phase_ratio = phase_counts["NS"] / float(total_action_records) + ew_phase_ratio = phase_counts["EW"] / float(total_action_records) + boundary_focus_ratio = boundary_focus / float(total_action_records) + queue_delta = end_state.total_queue - state.total_queue + wait_delta = end_state.total_wait - state.total_wait + boundary_share = state.boundary_queue_total / max(1.0, state.total_queue) + outgoing_pressure = end_state.total_outgoing_load / max(1.0, end_state.total_queue) + + if ns_phase_ratio > ew_phase_ratio + 0.1: + phase_bias = "NS" + elif ew_phase_ratio > ns_phase_ratio + 0.1: + phase_bias = "EW" + else: + phase_bias = "NONE" + + if phase_bias == "NONE" and state.dominant_flow in {"NS", "EW"}: + phase_bias = state.dominant_flow + + def select_targets( + strategy: str, + priority_corridor: str | None, + selected_phase_bias: str, + ) -> list[str]: + return fallback_target_intersections( + summary=state, + max_target_intersections=max_target_intersections, + strategy=strategy, + priority_corridor=priority_corridor, + phase_bias=selected_phase_bias, + focus_scores=focus_scores, + ) + + if state.incident_flag or end_state.incident_flag: + target_intersections = select_targets( + strategy="incident_response", + priority_corridor=phase_bias if phase_bias in {"NS", "EW"} else "arterial", + selected_phase_bias=phase_bias, + ) + return DistrictAction( + strategy="incident_response", + priority_corridor=phase_bias if phase_bias in {"NS", "EW"} else "arterial", + target_intersections=target_intersections, + phase_bias=phase_bias, + duration_steps=duration_steps, + ).validate() + + if state.spillback_risk or end_state.spillback_risk or (boundary_share >= 0.55 and outgoing_pressure >= 0.45): + priority_corridor = "inbound" if boundary_share >= 0.55 else phase_bias if phase_bias in {"NS", "EW"} else None + target_intersections = select_targets( + strategy="clear_spillback", + priority_corridor=priority_corridor, + selected_phase_bias=phase_bias, + ) + return DistrictAction( + strategy="clear_spillback", + priority_corridor=priority_corridor, + target_intersections=target_intersections, + phase_bias=phase_bias, + duration_steps=duration_steps, + ).validate() + + if boundary_share >= 0.55 and (queue_delta >= 0.0 or wait_delta >= 0.0): + target_intersections = select_targets( + strategy="drain_inbound", + priority_corridor="inbound", + selected_phase_bias=phase_bias, + ) + return DistrictAction( + strategy="drain_inbound", + priority_corridor="inbound", + target_intersections=target_intersections, + phase_bias=phase_bias, + duration_steps=duration_steps, + ).validate() + + if outgoing_pressure >= 0.65 and end_state.total_queue >= state.total_queue * 0.9: + target_intersections = select_targets( + strategy="drain_outbound", + priority_corridor="outbound", + selected_phase_bias=phase_bias, + ) + return DistrictAction( + strategy="drain_outbound", + priority_corridor="outbound", + target_intersections=target_intersections, + phase_bias=phase_bias, + duration_steps=duration_steps, + ).validate() + + if ( + state.event_flag + or state.overload_flag + or end_state.overload_flag + or (boundary_focus_ratio >= 0.6 and switch_count >= max(2, duration_steps)) + ): + priority_corridor = phase_bias if phase_bias in {"NS", "EW"} else "arterial" + target_intersections = select_targets( + strategy="arterial_priority", + priority_corridor=priority_corridor, + selected_phase_bias=phase_bias, + ) + return DistrictAction( + strategy="arterial_priority", + priority_corridor=priority_corridor, + target_intersections=target_intersections, + phase_bias=phase_bias, + duration_steps=duration_steps, + ).validate() + + ns_pressure = state.ns_queue + 1.5 * state.ns_wait + ew_pressure = state.ew_queue + 1.5 * state.ew_wait + imbalance_threshold = max(5.0, 0.15 * max(1.0, ns_pressure + ew_pressure)) + + if ns_pressure - ew_pressure >= imbalance_threshold: + target_intersections = select_targets( + strategy="favor_NS", + priority_corridor="NS", + selected_phase_bias="NS", + ) + return DistrictAction( + strategy="favor_NS", + priority_corridor="NS", + target_intersections=target_intersections, + phase_bias="NS", + duration_steps=duration_steps, + ).validate() + + if ew_pressure - ns_pressure >= imbalance_threshold: + target_intersections = select_targets( + strategy="favor_EW", + priority_corridor="EW", + selected_phase_bias="EW", + ) + return DistrictAction( + strategy="favor_EW", + priority_corridor="EW", + target_intersections=target_intersections, + phase_bias="EW", + duration_steps=duration_steps, + ).validate() + + return DistrictAction.default_hold(duration_steps=duration_steps) diff --git a/district_llm/eval.py b/district_llm/eval.py new file mode 100644 index 0000000000000000000000000000000000000000..c66d2737be2267b8cabf3d5e2f54185290223bd8 --- /dev/null +++ b/district_llm/eval.py @@ -0,0 +1,436 @@ +from __future__ import annotations + +import argparse +import json +from collections import Counter +from pathlib import Path +from typing import Any + +from district_llm.metrics import aggregate_target_metrics, compute_target_metrics, safe_ratio, target_failure_buckets +from district_llm.repair import RepairConfig, extract_visible_candidate_ids, sanitize_action_payload +from district_llm.schema import DistrictAction +from env.utils import build_topology + +try: + from tqdm.auto import tqdm +except ImportError: # pragma: no cover + tqdm = None + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description="Offline evaluation for district-LLM outputs." + ) + parser.add_argument("--model-path", required=True) + parser.add_argument("--val-jsonl", required=True) + parser.add_argument("--max-examples", type=int, default=200) + parser.add_argument("--debug-examples", type=int, default=10) + parser.add_argument("--max-new-tokens", type=int, default=128) + parser.add_argument("--device", default=None) + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--restrict-targets-to-visible-summary", action="store_true") + parser.add_argument( + "--allow-only-visible-candidates", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument("--max-target-intersections", type=int, default=3) + parser.add_argument( + "--fallback-on-empty-targets", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument( + "--fallback-mode", + choices=("heuristic", "hold", "none"), + default="heuristic", + ) + parser.add_argument( + "--report-before-after-repair", + action=argparse.BooleanOptionalAction, + default=True, + ) + return parser.parse_args() + + +def load_rows(path: str | Path, max_examples: int | None = None) -> list[dict[str, Any]]: + rows = [] + with Path(path).open("r", encoding="utf-8") as handle: + for line in handle: + if not line.strip(): + continue + rows.append(json.loads(line)) + if max_examples is not None and len(rows) >= max_examples: + break + return rows + + +def extract_json_object(payload: str) -> str: + start = payload.find("{") + end = payload.rfind("}") + if start == -1 or end == -1 or end <= start: + raise ValueError("No JSON object found.") + return payload[start : end + 1] + + +def load_model_and_tokenizer(model_path: str, device: str | None = None): + import torch + from transformers import AutoModelForCausalLM, AutoTokenizer + + model_dir = Path(model_path) + tokenizer = AutoTokenizer.from_pretrained(model_path) + if tokenizer.pad_token_id is None and tokenizer.eos_token_id is not None: + tokenizer.pad_token = tokenizer.eos_token + + if (model_dir / "adapter_config.json").exists(): + try: + from peft import AutoPeftModelForCausalLM + except ImportError as exc: + raise ImportError( + "Evaluating a LoRA adapter requires the 'peft' package." + ) from exc + model = AutoPeftModelForCausalLM.from_pretrained(model_path) + else: + target_device = device or ("cuda" if torch.cuda.is_available() else "cpu") + model = AutoModelForCausalLM.from_pretrained(model_path).to(target_device) + model.eval() + return model, tokenizer + + +def build_generation_prompt(tokenizer, messages: list[dict[str, str]]) -> str: + if getattr(tokenizer, "chat_template", None): + return tokenizer.apply_chat_template( + messages, + tokenize=False, + add_generation_prompt=True, + ) + return "\n".join(f"{message['role']}: {message['content']}" for message in messages) + "\nassistant:" + + +def generate_response(model, tokenizer, messages: list[dict[str, str]], max_new_tokens: int) -> str: + import torch + + prompt = build_generation_prompt(tokenizer, messages) + device = getattr(model, "device", None) + inputs = tokenizer(prompt, return_tensors="pt") + if device is not None: + inputs = {key: value.to(device) for key, value in inputs.items()} + with torch.no_grad(): + outputs = model.generate( + **inputs, + max_new_tokens=max_new_tokens, + do_sample=False, + pad_token_id=tokenizer.pad_token_id or tokenizer.eos_token_id, + ) + generated = outputs[0][inputs["input_ids"].shape[1] :] + return tokenizer.decode(generated, skip_special_tokens=True) + + +def parse_prediction(payload: str) -> tuple[bool, bool, dict[str, Any] | None]: + try: + json_payload = json.loads(extract_json_object(payload)) + except Exception: + return False, False, None + try: + action = DistrictAction.from_dict(json_payload) + except Exception: + return True, False, json_payload + return True, True, action.to_dict() + + +class DistrictTopologyIndex: + def __init__(self, generated_root: str | Path): + self.generated_root = Path(generated_root) + self._cache: dict[str, dict[str, set[str]]] = {} + + def district_intersections(self, city_id: str, district_id: str) -> set[str]: + if city_id not in self._cache: + roadnet_path = self.generated_root / city_id / "roadnet.json" + district_map_path = self.generated_root / city_id / "district_map.json" + metadata_path = self.generated_root / city_id / "metadata.json" + _, districts = build_topology( + roadnet_path=roadnet_path, + district_map_path=district_map_path, + metadata_path=metadata_path, + ) + self._cache[city_id] = { + key: set(value.intersection_ids) + for key, value in districts.items() + } + return self._cache[city_id].get(district_id, set()) + + +def field_accuracy(pred: dict[str, Any] | None, gt: dict[str, Any], field: str) -> float: + if pred is None: + return 0.0 + return float(pred.get(field) == gt.get(field)) + + +def invalid_target_fraction(pred_targets: list[str], district_candidates: set[str]) -> float: + if not pred_targets: + return 0.0 + invalid_count = sum(1 for item in pred_targets if item not in district_candidates) + return safe_ratio(invalid_count, len(pred_targets)) + + +def evaluate_rows( + rows: list[dict[str, Any]], + model, + tokenizer, + max_new_tokens: int, + topology_index: DistrictTopologyIndex, + restrict_targets_to_visible_summary: bool, + debug_examples: int, + repair_config: RepairConfig, + report_before_after_repair: bool, +) -> dict[str, Any]: + json_valid_count = 0 + schema_valid_count = 0 + field_totals_before = Counter() + field_totals_after = Counter() + full_object_correct_before = 0 + full_object_correct_after = 0 + target_rows_before: list[dict[str, float]] = [] + target_rows_after: list[dict[str, float]] = [] + restricted_target_rows_before: list[dict[str, float]] = [] + restricted_target_rows_after: list[dict[str, float]] = [] + invalid_rates_before: list[float] = [] + invalid_rates_after: list[float] = [] + fallback_used_count = 0 + failure_buckets = Counter() + debug_rows = [] + + progress = ( + tqdm(total=len(rows), desc="eval", dynamic_ncols=True) + if tqdm is not None + else None + ) + + try: + for row in rows: + messages = row["messages"] + ground_truth = json.loads(messages[2]["content"]) + raw_prediction = generate_response( + model=model, + tokenizer=tokenizer, + messages=messages[:2], + max_new_tokens=max_new_tokens, + ) + json_valid, schema_valid, prediction_before = parse_prediction(raw_prediction) + repaired_action, repair_report = sanitize_action_payload( + payload=prediction_before if json_valid else None, + summary=row, + prompt_text=messages[1]["content"], + config=repair_config, + ) + prediction_after = repaired_action.to_dict() + json_valid_count += int(json_valid) + schema_valid_count += int(schema_valid) + fallback_used_count += int(repair_report.fallback_used) + + field_totals_before["strategy"] += field_accuracy(prediction_before, ground_truth, "strategy") + field_totals_before["priority_corridor"] += field_accuracy(prediction_before, ground_truth, "priority_corridor") + field_totals_before["phase_bias"] += field_accuracy(prediction_before, ground_truth, "phase_bias") + field_totals_before["duration_steps"] += field_accuracy(prediction_before, ground_truth, "duration_steps") + + field_totals_after["strategy"] += field_accuracy(prediction_after, ground_truth, "strategy") + field_totals_after["priority_corridor"] += field_accuracy(prediction_after, ground_truth, "priority_corridor") + field_totals_after["phase_bias"] += field_accuracy(prediction_after, ground_truth, "phase_bias") + field_totals_after["duration_steps"] += field_accuracy(prediction_after, ground_truth, "duration_steps") + + if prediction_before == ground_truth: + full_object_correct_before += 1 + if prediction_after == ground_truth: + full_object_correct_after += 1 + + pred_targets_before = [] if prediction_before is None else list(prediction_before.get("target_intersections", [])) + pred_targets_after = list(prediction_after.get("target_intersections", [])) + gt_targets = list(ground_truth.get("target_intersections", [])) + visible_candidates = set( + extract_visible_candidate_ids(summary=row, prompt_text=messages[1]["content"]) + ) + district_candidates = topology_index.district_intersections( + city_id=row["city_id"], + district_id=row["district_id"], + ) + invalid_before = [item for item in pred_targets_before if item not in district_candidates] + invalid_after = [item for item in pred_targets_after if item not in district_candidates] + non_visible_before = [ + item for item in pred_targets_before + if visible_candidates and item not in visible_candidates + ] + + metrics_before = compute_target_metrics(pred_targets_before, gt_targets) + metrics_after = compute_target_metrics(pred_targets_after, gt_targets) + target_rows_before.append(metrics_before) + target_rows_after.append(metrics_after) + invalid_rates_before.append(invalid_target_fraction(pred_targets_before, district_candidates)) + invalid_rates_after.append(invalid_target_fraction(pred_targets_after, district_candidates)) + + if restrict_targets_to_visible_summary: + filtered_pred_before = [item for item in pred_targets_before if item in visible_candidates] + filtered_pred_after = [item for item in pred_targets_after if item in visible_candidates] + filtered_gt = [item for item in gt_targets if item in visible_candidates] + restricted_target_rows_before.append( + compute_target_metrics(filtered_pred_before, filtered_gt) + ) + restricted_target_rows_after.append( + compute_target_metrics(filtered_pred_after, filtered_gt) + ) + + for failure_bucket in set( + target_failure_buckets( + pred_list=pred_targets_before, + gt_list=gt_targets, + visible_candidates=visible_candidates, + invalid_ids=invalid_before, + non_visible_ids=non_visible_before, + repaired_targets=pred_targets_after, + fallback_used=repair_report.fallback_used, + ) + ): + failure_buckets[failure_bucket] += 1 + + if len(debug_rows) < debug_examples: + debug_rows.append( + { + "district_summary": messages[1]["content"], + "predicted_json_raw": raw_prediction, + "predicted_json_parsed_before_repair": prediction_before, + "predicted_json_parsed_after_repair": prediction_after, + "ground_truth_json": ground_truth, + "target_intersections_metrics_before_repair": metrics_before, + "target_intersections_metrics_after_repair": metrics_after, + "repair_report": repair_report.to_dict(), + "visible_candidate_ids": sorted(visible_candidates), + "failure_buckets": sorted( + set( + target_failure_buckets( + pred_list=pred_targets_before, + gt_list=gt_targets, + visible_candidates=visible_candidates, + invalid_ids=invalid_before, + non_visible_ids=non_visible_before, + repaired_targets=pred_targets_after, + fallback_used=repair_report.fallback_used, + ) + ) + ), + } + ) + if progress is not None: + progress.update(1) + finally: + if progress is not None: + progress.close() + + total_rows = max(1, len(rows)) + results = { + "num_examples": len(rows), + "json_validity_rate": float(json_valid_count) / total_rows, + "schema_validity_rate": float(schema_valid_count) / total_rows, + "field_accuracy": { + "strategy": float(field_totals_before["strategy"]) / total_rows, + "priority_corridor": float(field_totals_before["priority_corridor"]) / total_rows, + "phase_bias": float(field_totals_before["phase_bias"]) / total_rows, + "duration_steps": float(field_totals_before["duration_steps"]) / total_rows, + }, + "field_accuracy_after_repair": { + "strategy": float(field_totals_after["strategy"]) / total_rows, + "priority_corridor": float(field_totals_after["priority_corridor"]) / total_rows, + "phase_bias": float(field_totals_after["phase_bias"]) / total_rows, + "duration_steps": float(field_totals_after["duration_steps"]) / total_rows, + }, + "target_intersections_before_repair": aggregate_target_metrics(target_rows_before), + "target_intersections_after_repair": aggregate_target_metrics(target_rows_after), + "target_intersections": aggregate_target_metrics(target_rows_after), + "target_intersections_failure_buckets": dict(sorted(failure_buckets.items())), + "exact_full_object_accuracy": float(full_object_correct_before) / total_rows, + "exact_full_object_accuracy_after_repair": float(full_object_correct_after) / total_rows, + "debug_examples": debug_rows, + } + if restrict_targets_to_visible_summary: + results["target_intersections_restricted_to_visible_summary_before_repair"] = aggregate_target_metrics( + restricted_target_rows_before + ) + results["target_intersections_restricted_to_visible_summary_after_repair"] = aggregate_target_metrics( + restricted_target_rows_after + ) + results["target_intersections_restricted_to_visible_summary"] = aggregate_target_metrics( + restricted_target_rows_after + ) + if report_before_after_repair: + results["target_intersections_before_after_repair"] = { + "invalid_id_rate_before_repair": float(sum(invalid_rates_before) / total_rows), + "invalid_id_rate_after_repair": float(sum(invalid_rates_after) / total_rows), + "exact_set_match_before_repair": aggregate_target_metrics(target_rows_before).get("exact_set_match", 0.0), + "exact_set_match_after_repair": aggregate_target_metrics(target_rows_after).get("exact_set_match", 0.0), + "jaccard_before_repair": aggregate_target_metrics(target_rows_before).get("jaccard", 0.0), + "jaccard_after_repair": aggregate_target_metrics(target_rows_after).get("jaccard", 0.0), + "fallback_used_rate": float(fallback_used_count) / total_rows, + } + return results + + +def print_debug_examples(debug_rows: list[dict[str, Any]]) -> None: + for index, item in enumerate(debug_rows, start=1): + print(f"[debug {index}] district_summary:") + print(item["district_summary"]) + print(f"[debug {index}] predicted_json_raw={item['predicted_json_raw']}") + print( + f"[debug {index}] predicted_json_parsed_before_repair=" + f"{json.dumps(item['predicted_json_parsed_before_repair'], sort_keys=True)}" + ) + print( + f"[debug {index}] predicted_json_parsed_after_repair=" + f"{json.dumps(item['predicted_json_parsed_after_repair'], sort_keys=True)}" + ) + print( + f"[debug {index}] ground_truth_json=" + f"{json.dumps(item['ground_truth_json'], sort_keys=True)}" + ) + print( + f"[debug {index}] target_intersections_metrics_before_repair=" + f"{json.dumps(item['target_intersections_metrics_before_repair'], sort_keys=True)}" + ) + print( + f"[debug {index}] target_intersections_metrics_after_repair=" + f"{json.dumps(item['target_intersections_metrics_after_repair'], sort_keys=True)}" + ) + print( + f"[debug {index}] repair_report=" + f"{json.dumps(item['repair_report'], sort_keys=True)}" + ) + print( + f"[debug {index}] visible_candidate_ids=" + f"{json.dumps(item['visible_candidate_ids'], sort_keys=True)}" + ) + print(f"[debug {index}] failure_buckets={json.dumps(item['failure_buckets'])}") + + +def main() -> None: + args = parse_args() + rows = load_rows(args.val_jsonl, max_examples=args.max_examples) + model, tokenizer = load_model_and_tokenizer(args.model_path, device=args.device) + topology_index = DistrictTopologyIndex(args.generated_root) + results = evaluate_rows( + rows=rows, + model=model, + tokenizer=tokenizer, + max_new_tokens=args.max_new_tokens, + topology_index=topology_index, + restrict_targets_to_visible_summary=args.restrict_targets_to_visible_summary, + debug_examples=args.debug_examples, + repair_config=RepairConfig( + allow_only_visible_candidates=args.allow_only_visible_candidates, + max_target_intersections=args.max_target_intersections, + fallback_on_empty_targets=args.fallback_on_empty_targets, + fallback_mode=args.fallback_mode, + ), + report_before_after_repair=args.report_before_after_repair, + ) + print(json.dumps({k: v for k, v in results.items() if k != "debug_examples"}, indent=2, sort_keys=True)) + print_debug_examples(results["debug_examples"]) + + +if __name__ == "__main__": + main() diff --git a/district_llm/generate_dataset.py b/district_llm/generate_dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..1722a1c6752d64d2e11aee5fe17969bffe9f9269 --- /dev/null +++ b/district_llm/generate_dataset.py @@ -0,0 +1,390 @@ +from __future__ import annotations + +import argparse +import json +import random +from dataclasses import dataclass, field +from pathlib import Path +from typing import Any + +import numpy as np + +from district_llm.derivation import DistrictWindowData, LocalIntersectionAction, derive_district_action +from district_llm.prompting import format_district_prompt, format_sft_text +from district_llm.summary_builder import DistrictStateSummaryBuilder +from district_llm.teachers import BaseTeacher, build_teacher, parse_teacher_spec +from env.observation_builder import ObservationConfig +from env.reward import RewardConfig +from env.traffic_env import EnvConfig, TrafficEnv +from training.cityflow_dataset import CityFlowDataset, ScenarioSpec + + +@dataclass +class _WindowBuffer: + start_summary: Any + controller_actions: list[LocalIntersectionAction] = field(default_factory=list) + step_count: int = 0 + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description="Generate district-LLM SFT data from CityFlow rollouts." + ) + parser.add_argument( + "--controller", + default="queue_greedy", + choices=("rl_checkpoint", "hold", "fixed", "random", "queue_greedy"), + help="Single controller source used when --teacher-spec is not provided.", + ) + parser.add_argument("--checkpoint", default=None) + parser.add_argument( + "--teacher-spec", + action="append", + default=[], + help="Repeatable source spec, e.g. rl_checkpoint=artifacts/dqn_shared/best_validation.pt or fixed.", + ) + parser.add_argument("--episodes", type=int, default=10) + parser.add_argument( + "--decision-interval", + "--district-decision-interval", + dest="district_decision_interval", + type=int, + default=10, + help="District-LLM decision interval in local-controller decision steps.", + ) + parser.add_argument("--output", required=True) + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument("--split", default="train", choices=("train", "val", "test")) + parser.add_argument("--city-id", default=None) + parser.add_argument("--scenario-name", default=None) + parser.add_argument("--seed", type=int, default=7) + parser.add_argument("--fixed-green-time", type=int, default=20) + parser.add_argument("--device", default=None) + parser.add_argument("--append", action="store_true") + parser.add_argument("--top-k-congested", type=int, default=3) + parser.add_argument("--max-candidate-intersections", type=int, default=6) + parser.add_argument("--max-target-intersections", type=int, default=3) + parser.add_argument("--use-checkpoint-env-config", action="store_true") + + parser.add_argument("--env-decision-interval", type=int, default=5) + parser.add_argument("--simulator-interval", type=int, default=1) + parser.add_argument("--min-green-time", type=int, default=10) + parser.add_argument("--thread-num", type=int, default=1) + parser.add_argument("--max-episode-seconds", type=int, default=None) + parser.add_argument("--max-incoming-lanes", type=int, default=16) + parser.add_argument("--count-scale", type=float, default=20.0) + parser.add_argument("--elapsed-time-scale", type=float, default=60.0) + parser.add_argument("--disable-district-context", action="store_true") + parser.add_argument("--disable-outgoing-congestion", action="store_true") + parser.add_argument("--reward-variant", default="wait_queue_throughput") + parser.add_argument("--waiting-weight", type=float, default=1.0) + parser.add_argument("--vehicle-weight", type=float, default=0.1) + parser.add_argument("--pressure-weight", type=float, default=0.0) + parser.add_argument("--reward-scale", type=float, default=0.1) + parser.add_argument("--disable-lane-reward-normalization", action="store_true") + parser.add_argument("--reward-clip", type=float, default=5.0) + parser.add_argument("--queue-delta-weight", type=float, default=2.0) + parser.add_argument("--wait-delta-weight", type=float, default=4.0) + parser.add_argument("--queue-level-weight", type=float, default=0.5) + parser.add_argument("--wait-level-weight", type=float, default=1.0) + parser.add_argument("--throughput-weight", type=float, default=0.1) + parser.add_argument("--imbalance-weight", type=float, default=0.1) + parser.add_argument("--reward-delta-clip", type=float, default=2.0) + parser.add_argument("--reward-level-normalizer", type=float, default=10.0) + parser.add_argument("--throughput-normalizer", type=float, default=2.0) + return parser.parse_args() + + +def build_env_config(args: argparse.Namespace) -> EnvConfig: + return EnvConfig( + simulator_interval=args.simulator_interval, + decision_interval=args.env_decision_interval, + min_green_time=args.min_green_time, + thread_num=args.thread_num, + max_episode_seconds=args.max_episode_seconds, + observation=ObservationConfig( + max_incoming_lanes=args.max_incoming_lanes, + count_scale=args.count_scale, + elapsed_time_scale=args.elapsed_time_scale, + include_outgoing_congestion=not args.disable_outgoing_congestion, + include_district_context=not args.disable_district_context, + include_district_type_feature=True, + ), + reward=RewardConfig( + variant=args.reward_variant, + waiting_weight=args.waiting_weight, + vehicle_weight=args.vehicle_weight, + pressure_weight=args.pressure_weight, + reward_scale=args.reward_scale, + normalize_by_lane_count=not args.disable_lane_reward_normalization, + clip_reward=args.reward_clip, + queue_delta_weight=args.queue_delta_weight, + wait_delta_weight=args.wait_delta_weight, + queue_level_weight=args.queue_level_weight, + wait_level_weight=args.wait_level_weight, + throughput_weight=args.throughput_weight, + imbalance_weight=args.imbalance_weight, + delta_clip=args.reward_delta_clip, + level_normalizer=args.reward_level_normalizer, + throughput_normalizer=args.throughput_normalizer, + ), + ) + + +def build_env(env_config: EnvConfig, scenario_spec: ScenarioSpec) -> TrafficEnv: + return TrafficEnv( + city_id=scenario_spec.city_id, + scenario_name=scenario_spec.scenario_name, + city_dir=scenario_spec.city_dir, + scenario_dir=scenario_spec.scenario_dir, + config_path=scenario_spec.config_path, + roadnet_path=scenario_spec.roadnet_path, + district_map_path=scenario_spec.district_map_path, + metadata_path=scenario_spec.metadata_path, + env_config=env_config, + ) + + +def resolve_teachers(args: argparse.Namespace) -> list[BaseTeacher]: + teacher_specs = list(args.teacher_spec) + if not teacher_specs: + teacher_specs = [args.controller if args.controller != "rl_checkpoint" else f"rl_checkpoint={args.checkpoint}"] + + teachers = [] + for spec in teacher_specs: + controller_type, checkpoint = parse_teacher_spec(spec) + if controller_type == "rl_checkpoint": + checkpoint = checkpoint or args.checkpoint + teachers.append( + build_teacher( + controller_type=controller_type, + checkpoint=checkpoint, + fixed_green_time=args.fixed_green_time, + seed=args.seed, + device=args.device, + ) + ) + return teachers + + +def resolve_env_config(args: argparse.Namespace, teachers: list[BaseTeacher]) -> EnvConfig: + env_config = build_env_config(args) + if not args.use_checkpoint_env_config: + return env_config + + checkpoint_env_configs = [ + teacher.env_config for teacher in teachers if teacher.env_config is not None + ] + if not checkpoint_env_configs: + return env_config + + first_payload = checkpoint_env_configs[0] + assert first_payload is not None + for item in checkpoint_env_configs[1:]: + if item != first_payload: + raise ValueError("Checkpoint teachers use different env configs. Generate separate datasets.") + return first_payload + + +def sample_scenario( + dataset: CityFlowDataset, + rng: random.Random, + split: str, + city_id: str | None, + scenario_name: str | None, +) -> ScenarioSpec: + if city_id and scenario_name: + return dataset.build_scenario_spec(city_id, scenario_name) + return dataset.sample_scenario( + split_name=split, + rng=rng, + city_id=city_id, + scenario_name=scenario_name, + ) + + +def extract_step_actions( + env: TrafficEnv, + observation_batch: dict[str, Any], + next_observation_batch: dict[str, Any], + actions: np.ndarray, +) -> dict[str, list[LocalIntersectionAction]]: + grouped: dict[str, list[LocalIntersectionAction]] = {district_id: [] for district_id in env.districts} + lane_vehicle_count = env.adapter.get_lane_vehicle_count() + + for index, intersection_id in enumerate(observation_batch["intersection_ids"]): + district_id = observation_batch["district_ids"][index] + grouped[district_id].append( + LocalIntersectionAction( + intersection_id=intersection_id, + district_id=district_id, + action=int(actions[index]), + current_phase=int(observation_batch["current_phase"][index]), + next_phase=int(next_observation_batch["current_phase"][index]), + queue_total=float(np.asarray(observation_batch["incoming_counts"][index], dtype=np.float32).sum()), + wait_total=float(np.asarray(observation_batch["incoming_waiting"][index], dtype=np.float32).sum()), + outgoing_load=float( + sum( + float(lane_vehicle_count.get(lane_id, 0)) + for lane_id in env.intersections[intersection_id].outgoing_lanes + ) + ), + is_boundary=bool(env.intersections[intersection_id].is_boundary), + ) + ) + return grouped + + +def generate_examples_for_episode( + env: TrafficEnv, + teacher: BaseTeacher, + district_interval: int, + top_k_congested: int, + max_candidate_intersections: int, + max_target_intersections: int, + episode_index: int, +) -> list[dict[str, Any]]: + summary_builder = DistrictStateSummaryBuilder( + top_k=top_k_congested, + candidate_limit=max_candidate_intersections, + ) + observation_batch = env.reset() + summary_builder.reset() + current_summaries = summary_builder.build_all(env, observation_batch) + windows = { + district_id: _WindowBuffer(start_summary=summary) + for district_id, summary in current_summaries.items() + } + samples: list[dict[str, Any]] = [] + done = False + window_index = 0 + + while not done: + actions = teacher.act(observation_batch) + next_observation_batch, rewards, done, info = env.step(actions) + del rewards, info + step_actions = extract_step_actions(env, observation_batch, next_observation_batch, actions) + next_summaries = summary_builder.build_all(env, next_observation_batch) + + for district_id, buffer in windows.items(): + buffer.controller_actions.extend(step_actions[district_id]) + buffer.step_count += 1 + should_emit = buffer.step_count >= district_interval or done + if not should_emit: + continue + + end_summary = next_summaries[district_id] + window_data = DistrictWindowData( + district_id=district_id, + start_summary=buffer.start_summary, + end_summary=end_summary, + controller_actions=list(buffer.controller_actions), + step_count=buffer.step_count, + ) + action = derive_district_action( + window_data=window_data, + max_target_intersections=max_target_intersections, + ) + prompt = format_district_prompt( + buffer.start_summary, + max_target_intersections=max_target_intersections, + allow_only_visible_candidates=True, + ) + samples.append( + { + "text": format_sft_text( + buffer.start_summary, + action, + max_target_intersections=max_target_intersections, + allow_only_visible_candidates=True, + ), + "prompt": prompt, + "response_json": action.to_dict(), + "state": buffer.start_summary.to_dict(), + "candidate_intersections": buffer.start_summary.to_dict().get("candidate_intersections", []), + "window_summary": window_data.to_dict(), + "city_id": env.city_id, + "district_id": district_id, + "district_type": env.districts[district_id].district_type, + "scenario": env.scenario_name, + "controller_type": teacher.metadata.controller_type, + "controller_id": teacher.metadata.controller_id, + "controller_family": teacher.metadata.controller_family, + "teacher_algorithm": teacher.metadata.teacher_algorithm, + "checkpoint_path": teacher.metadata.checkpoint_path, + "episode_index": int(episode_index), + "window_index": int(window_index), + "decision_interval": int(district_interval), + "sim_time": int(buffer.start_summary.sim_time), + } + ) + windows[district_id] = _WindowBuffer(start_summary=end_summary) + window_index += 1 + + observation_batch = next_observation_batch + + return samples + + +def append_jsonl(path: Path, records: list[dict[str, Any]], append: bool) -> None: + mode = "a" if append else "w" + path.parent.mkdir(parents=True, exist_ok=True) + with path.open(mode, encoding="utf-8") as handle: + for record in records: + handle.write(json.dumps(record, sort_keys=True)) + handle.write("\n") + + +def main() -> None: + args = parse_args() + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + dataset.generate_default_splits() + rng = random.Random(args.seed) + teachers = resolve_teachers(args) + env_config = resolve_env_config(args, teachers) + + output_path = Path(args.output) + write_mode_append = bool(args.append) + + for episode_index in range(args.episodes): + scenario_spec = sample_scenario( + dataset=dataset, + rng=rng, + split=args.split, + city_id=args.city_id, + scenario_name=args.scenario_name, + ) + episode_records: list[dict[str, Any]] = [] + for teacher in teachers: + env = build_env(env_config=env_config, scenario_spec=scenario_spec) + episode_records.extend( + generate_examples_for_episode( + env=env, + teacher=teacher, + district_interval=args.district_decision_interval, + top_k_congested=args.top_k_congested, + max_candidate_intersections=args.max_candidate_intersections, + max_target_intersections=args.max_target_intersections, + episode_index=episode_index, + ) + ) + append_jsonl(output_path, episode_records, append=write_mode_append) + write_mode_append = True + print( + json.dumps( + { + "episode_index": episode_index, + "city_id": scenario_spec.city_id, + "scenario_name": scenario_spec.scenario_name, + "records_written": len(episode_records), + } + ) + ) + + +if __name__ == "__main__": + main() diff --git a/district_llm/guided_control.py b/district_llm/guided_control.py new file mode 100644 index 0000000000000000000000000000000000000000..9e623c8417dc9437a687c09851efd18e88ff2554 --- /dev/null +++ b/district_llm/guided_control.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from typing import Any + +import numpy as np + +from district_llm.schema import DistrictAction + + +class DistrictGuidedLocalController: + """ + Wrap a low-level controller and bias its actions with district directives. + + The shared DQN still produces the base per-intersection action, and the + district plan only nudges hold/switch decisions toward the requested phase. + """ + + def __init__(self, base_teacher): + self.base_teacher = base_teacher + + def act( + self, + observation_batch: dict[str, Any], + district_actions: dict[str, DistrictAction] | None = None, + ) -> np.ndarray: + base_actions = np.asarray(self.base_teacher.act(observation_batch), dtype=np.int64) + if not district_actions: + return base_actions + + guided_actions = base_actions.copy() + for index, district_id in enumerate(observation_batch["district_ids"]): + directive = district_actions.get(district_id) + if directive is None: + continue + guided_actions[index] = self._apply_directive( + observation_batch=observation_batch, + index=index, + base_action=int(base_actions[index]), + directive=directive, + ) + return guided_actions + + @staticmethod + def _apply_directive( + observation_batch: dict[str, Any], + index: int, + base_action: int, + directive: DistrictAction, + ) -> int: + action_mask = observation_batch["action_mask"][index] + current_phase = int(observation_batch["current_phase"][index]) + can_switch = bool(action_mask[1] > 0.0) + + if directive.strategy == "hold" or directive.phase_bias == "NONE": + return int(base_action) + + if directive.phase_bias == "NS": + if current_phase == 0: + return 0 + return 1 if can_switch else 0 + + if directive.phase_bias == "EW": + if current_phase != 0: + return 0 + return 1 if can_switch else 0 + + return int(base_action) diff --git a/district_llm/heuristic_guidance.py b/district_llm/heuristic_guidance.py new file mode 100644 index 0000000000000000000000000000000000000000..fbaebf51879ff420dfba319ecc490992636265fd --- /dev/null +++ b/district_llm/heuristic_guidance.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from dataclasses import dataclass + +from district_llm.repair import fallback_target_intersections +from district_llm.schema import DistrictAction, DistrictStateSummary + + +@dataclass(frozen=True) +class HeuristicGuidanceConfig: + max_target_intersections: int = 3 + incident_duration_steps: int = 12 + spillback_duration_steps: int = 10 + default_duration_steps: int = 8 + + +def generate_heuristic_guidance( + summary: DistrictStateSummary, + config: HeuristicGuidanceConfig | None = None, +) -> DistrictAction: + config = config or HeuristicGuidanceConfig() + + if summary.incident_flag or summary.construction_flag: + strategy = "incident_response" + priority_corridor = summary.dominant_flow if summary.dominant_flow in {"NS", "EW"} else "arterial" + phase_bias = summary.dominant_flow if summary.dominant_flow in {"NS", "EW"} else "NONE" + duration_steps = config.incident_duration_steps + elif summary.spillback_risk: + strategy = "clear_spillback" + boundary_share = summary.boundary_queue_total / max(1.0, summary.total_queue) + if boundary_share >= 0.45: + priority_corridor = "inbound" + elif summary.dominant_flow in {"NS", "EW"}: + priority_corridor = summary.dominant_flow + else: + priority_corridor = None + phase_bias = summary.dominant_flow if summary.dominant_flow in {"NS", "EW"} else "NONE" + duration_steps = config.spillback_duration_steps + elif summary.event_flag or summary.overload_flag: + strategy = "arterial_priority" + priority_corridor = summary.dominant_flow if summary.dominant_flow in {"NS", "EW"} else "arterial" + phase_bias = summary.dominant_flow if summary.dominant_flow in {"NS", "EW"} else "NONE" + duration_steps = config.spillback_duration_steps + elif summary.dominant_flow == "NS": + strategy = "favor_NS" + priority_corridor = "NS" + phase_bias = "NS" + duration_steps = config.default_duration_steps + elif summary.dominant_flow == "EW": + strategy = "favor_EW" + priority_corridor = "EW" + phase_bias = "EW" + duration_steps = config.default_duration_steps + else: + strategy = "hold" + priority_corridor = None + phase_bias = "NONE" + duration_steps = config.default_duration_steps + + targets = fallback_target_intersections( + summary=summary, + max_target_intersections=config.max_target_intersections, + strategy=strategy, + priority_corridor=priority_corridor, + phase_bias=phase_bias, + ) + return DistrictAction( + strategy=strategy, + priority_corridor=priority_corridor, + target_intersections=targets, + phase_bias=phase_bias, + duration_steps=duration_steps, + ).validate() diff --git a/district_llm/inference.py b/district_llm/inference.py new file mode 100644 index 0000000000000000000000000000000000000000..b9c519c2d26028fab748c56ffe6b3960f1d48c14 --- /dev/null +++ b/district_llm/inference.py @@ -0,0 +1,223 @@ +from __future__ import annotations + +import argparse +import json +from dataclasses import dataclass +from pathlib import Path +from typing import Any, Callable + +from district_llm.prompting import format_district_prompt +from district_llm.repair import RepairConfig, RepairReport, sanitize_action_payload +from district_llm.schema import DistrictAction, DistrictStateSummary +from district_llm.summary_builder import DistrictStateSummaryBuilder +from env.observation_builder import ObservationConfig +from env.reward import RewardConfig +from env.traffic_env import EnvConfig, TrafficEnv +from training.cityflow_dataset import CityFlowDataset + + +def _extract_json_object(payload: str) -> str: + start = payload.find("{") + end = payload.rfind("}") + if start == -1 or end == -1 or end <= start: + raise ValueError("No JSON object found in model output.") + return payload[start : end + 1] + + +@dataclass(frozen=True) +class DistrictLLMInferenceResult: + action: DistrictAction + raw_text: str + parsed_payload_before_repair: dict[str, Any] + repair_report: RepairReport + json_valid: bool + schema_valid_before_repair: bool + + +class DistrictLLMInference: + def __init__( + self, + generator_fn: Callable[[str], str] | None = None, + model_name_or_path: str | None = None, + device: str | None = None, + fallback_action: DistrictAction | None = None, + repair_config: RepairConfig | None = None, + ): + self.fallback_action = fallback_action or DistrictAction.default_hold() + self.generator_fn = generator_fn + self.repair_config = repair_config or RepairConfig() + self.tokenizer = None + self.model = None + self.device = device or "cpu" + + if self.generator_fn is None: + if not model_name_or_path: + raise ValueError("Provide either generator_fn or model_name_or_path.") + import torch + from transformers import AutoModelForCausalLM, AutoTokenizer + + self.device = device or ("cuda" if torch.cuda.is_available() else "cpu") + model_dir = Path(model_name_or_path) + self.tokenizer = AutoTokenizer.from_pretrained(model_name_or_path) + if self.tokenizer.pad_token_id is None and self.tokenizer.eos_token_id is not None: + self.tokenizer.pad_token = self.tokenizer.eos_token + + if (model_dir / "adapter_config.json").exists(): + try: + from peft import AutoPeftModelForCausalLM + except ImportError as exc: + raise ImportError("Loading a LoRA adapter requires the 'peft' package.") from exc + self.model = AutoPeftModelForCausalLM.from_pretrained(model_name_or_path).to(self.device) + else: + self.model = AutoModelForCausalLM.from_pretrained(model_name_or_path).to(self.device) + self.model.eval() + + def generate_raw(self, prompt: str, max_new_tokens: int = 128) -> str: + if self.generator_fn is not None: + return self.generator_fn(prompt) + import torch + + assert self.model is not None and self.tokenizer is not None + inputs = self.tokenizer(prompt, return_tensors="pt").to(self.device) + with torch.no_grad(): + outputs = self.model.generate( + **inputs, + max_new_tokens=max_new_tokens, + do_sample=False, + pad_token_id=self.tokenizer.eos_token_id, + ) + generated = outputs[0][inputs["input_ids"].shape[1] :] + return self.tokenizer.decode(generated, skip_special_tokens=True) + + def parse_action( + self, + payload: str, + summary: DistrictStateSummary | None = None, + ) -> tuple[DistrictAction, RepairReport, dict[str, Any], bool, bool]: + json_valid = True + schema_valid_before_repair = True + try: + parsed_payload = json.loads(_extract_json_object(payload)) + except Exception: + json_valid = False + schema_valid_before_repair = False + parsed_payload = self.fallback_action.to_dict() + action, repair_report = sanitize_action_payload( + payload=parsed_payload, + summary=summary, + config=self.repair_config, + ) + return action, repair_report, parsed_payload, json_valid, schema_valid_before_repair + + def predict_with_result( + self, + summary: DistrictStateSummary, + max_new_tokens: int = 128, + ) -> DistrictLLMInferenceResult: + prompt = format_district_prompt( + summary, + max_target_intersections=self.repair_config.max_target_intersections, + allow_only_visible_candidates=self.repair_config.allow_only_visible_candidates, + ) + raw = self.generate_raw(prompt=prompt, max_new_tokens=max_new_tokens) + action, repair_report, parsed_payload, json_valid, schema_valid_before_repair = self.parse_action( + raw, + summary=summary, + ) + return DistrictLLMInferenceResult( + action=action, + raw_text=raw, + parsed_payload_before_repair=parsed_payload, + repair_report=repair_report, + json_valid=json_valid, + schema_valid_before_repair=schema_valid_before_repair, + ) + + def predict(self, summary: DistrictStateSummary, max_new_tokens: int = 128) -> DistrictAction: + return self.predict_with_result(summary=summary, max_new_tokens=max_new_tokens).action + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser(description="Run single-sample district LLM inference.") + parser.add_argument("--model", required=True, help="Model name, local path, or LoRA adapter path.") + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument("--city-id", required=True) + parser.add_argument("--scenario-name", required=True) + parser.add_argument("--district-id", required=True) + parser.add_argument("--device", default=None) + parser.add_argument("--max-new-tokens", type=int, default=128) + parser.add_argument( + "--allow-only-visible-candidates", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument("--max-target-intersections", type=int, default=3) + parser.add_argument( + "--fallback-on-empty-targets", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument( + "--fallback-mode", + choices=("heuristic", "hold", "none"), + default="heuristic", + ) + return parser.parse_args() + + +def build_env(scenario_spec) -> TrafficEnv: + env_config = EnvConfig( + simulator_interval=1, + decision_interval=5, + min_green_time=10, + thread_num=1, + observation=ObservationConfig(), + reward=RewardConfig(variant="wait_queue_throughput"), + ) + return TrafficEnv( + city_id=scenario_spec.city_id, + scenario_name=scenario_spec.scenario_name, + city_dir=scenario_spec.city_dir, + scenario_dir=scenario_spec.scenario_dir, + config_path=scenario_spec.config_path, + roadnet_path=scenario_spec.roadnet_path, + district_map_path=scenario_spec.district_map_path, + metadata_path=scenario_spec.metadata_path, + env_config=env_config, + ) + + +def main() -> None: + args = parse_args() + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + scenario_spec = dataset.build_scenario_spec(args.city_id, args.scenario_name) + env = build_env(scenario_spec) + summary_builder = DistrictStateSummaryBuilder(candidate_limit=max(6, args.max_target_intersections)) + observation_batch = env.reset() + summaries = summary_builder.build_all(env, observation_batch) + if args.district_id not in summaries: + raise ValueError(f"Unknown district_id '{args.district_id}' for {args.city_id}/{args.scenario_name}.") + inference = DistrictLLMInference( + model_name_or_path=args.model, + device=args.device, + fallback_action=DistrictAction.default_hold(), + repair_config=RepairConfig( + allow_only_visible_candidates=args.allow_only_visible_candidates, + max_target_intersections=args.max_target_intersections, + fallback_on_empty_targets=args.fallback_on_empty_targets, + fallback_mode=args.fallback_mode, + ), + ) + action = inference.predict( + summary=summaries[args.district_id], + max_new_tokens=args.max_new_tokens, + ) + print(action.to_pretty_json()) + + +if __name__ == "__main__": + main() diff --git a/district_llm/metrics.py b/district_llm/metrics.py new file mode 100644 index 0000000000000000000000000000000000000000..e0b1f1ac259852f08fa73918f52be9e9bed0f243 --- /dev/null +++ b/district_llm/metrics.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from typing import Any + + +def safe_ratio(numerator: int | float, denominator: int | float, default_if_empty: float = 0.0) -> float: + if denominator <= 0: + return default_if_empty + return float(numerator) / float(denominator) + + +def compute_target_metrics(pred_list: list[str], gt_list: list[str]) -> dict[str, float]: + pred = list(pred_list) + gt = list(gt_list) + pred_set = set(pred) + gt_set = set(gt) + overlap = pred_set & gt_set + union = pred_set | gt_set + + both_empty = not pred_set and not gt_set + precision_default = 1.0 if both_empty else 0.0 + recall_default = 1.0 if both_empty else 0.0 + jaccard_default = 1.0 if both_empty else 0.0 + overlap_rate_default = 1.0 if both_empty else 0.0 + + overlap_count = len(overlap) + return { + "exact_list_match": float(pred == gt), + "exact_set_match": float(pred_set == gt_set), + "overlap_count": float(overlap_count), + "overlap_rate": safe_ratio(overlap_count, len(gt_set), overlap_rate_default), + "precision": safe_ratio(overlap_count, len(pred_set), precision_default), + "recall": safe_ratio(overlap_count, len(gt_set), recall_default), + "jaccard": safe_ratio(overlap_count, len(union), jaccard_default), + "hit_at_1": float(overlap_count >= 1), + "hit_at_2": float(overlap_count >= 2), + "hit_at_3": float(overlap_count >= 3), + } + + +def aggregate_target_metrics(metric_rows: list[dict[str, float]]) -> dict[str, float]: + if not metric_rows: + return {} + keys = metric_rows[0].keys() + return { + key: float(sum(row[key] for row in metric_rows) / len(metric_rows)) + for key in keys + } + + +def target_failure_buckets( + pred_list: list[str], + gt_list: list[str], + visible_candidates: set[str], + invalid_ids: list[str] | None = None, + non_visible_ids: list[str] | None = None, + repaired_targets: list[str] | None = None, + fallback_used: bool = False, +) -> list[str]: + buckets: list[str] = [] + pred_set = set(pred_list) + gt_set = set(gt_list) + + if not pred_list: + buckets.append("prediction_empty") + if not gt_list: + buckets.append("ground_truth_empty") + if pred_list and gt_list and pred_set == gt_set and pred_list != gt_list: + buckets.append("same_set_different_order") + elif pred_set & gt_set: + buckets.append("partial_overlap") + elif pred_list and gt_list: + buckets.append("no_overlap") + + if invalid_ids: + buckets.append("prediction_contains_invalid_ids") + if non_visible_ids: + buckets.append("prediction_contains_ids_not_visible_in_summary") + if pred_list and visible_candidates and any(item not in visible_candidates for item in pred_list): + buckets.append("prediction_contains_ids_not_visible_in_summary") + if fallback_used: + buckets.append("fallback_used") + + if repaired_targets is not None: + repaired_set = set(repaired_targets) + if repaired_set == gt_set and pred_set != gt_set: + buckets.append("repaired_successfully") + elif (invalid_ids or non_visible_ids or fallback_used) and repaired_set != gt_set: + buckets.append("repair_failed") + + return buckets + + +def average_item_rate(values: list[list[Any]]) -> float: + numerators = sum(len(item) for item in values) + denominators = sum(max(len(item), 1) for item in values) + return safe_ratio(numerators, denominators) diff --git a/district_llm/prompting.py b/district_llm/prompting.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e4348a1de8c55d5728aa824b2008d87217e728 --- /dev/null +++ b/district_llm/prompting.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from district_llm.schema import DISTRICT_STRATEGIES, PHASE_BIASES, PRIORITY_CORRIDORS, DistrictAction, DistrictStateSummary + + +DEFAULT_MAX_TARGET_INTERSECTIONS = 3 + + +def build_system_prompt( + max_target_intersections: int = DEFAULT_MAX_TARGET_INTERSECTIONS, + allow_only_visible_candidates: bool = True, +) -> str: + candidate_rule = ( + " If candidate_intersections is present, target_intersections must use only ids from that list." + if allow_only_visible_candidates + else "" + ) + return ( + "You are a district traffic coordinator for RL traffic lights. " + "Return only valid JSON with exactly these keys: " + "strategy, priority_corridor, target_intersections, phase_bias, duration_steps. " + f"target_intersections must be a JSON array with at most {int(max_target_intersections)} unique ids." + f"{candidate_rule} " + "Do not invent intersection ids. Deduplicate ids. If uncertain, prefer the most congested valid candidates." + ) + + +def format_district_prompt( + summary: DistrictStateSummary, + max_target_intersections: int = DEFAULT_MAX_TARGET_INTERSECTIONS, + allow_only_visible_candidates: bool = True, +) -> str: + target_rule = ( + f"target_intersections: up to {int(max_target_intersections)} ids from candidate_intersections only" + if allow_only_visible_candidates + else f"target_intersections: up to {int(max_target_intersections)} valid ids" + ) + return "\n".join( + [ + "### DISTRICT ACTION SCHEMA", + f"strategy: {'|'.join(DISTRICT_STRATEGIES)}", + f"phase_bias: {'|'.join(PHASE_BIASES)}", + f"priority_corridor: {'|'.join(PRIORITY_CORRIDORS)}|none", + "duration_steps: integer 1..20", + target_rule, + "rules: return only valid JSON; do not invent ids; deduplicate target_intersections", + "fallback: if uncertain, prefer the most congested visible candidates", + "", + "### DISTRICT STATE", + summary.to_prompt_text(), + "", + "### DECISION", + ] + ) + + +def format_sft_text( + summary: DistrictStateSummary, + action: DistrictAction, + max_target_intersections: int = DEFAULT_MAX_TARGET_INTERSECTIONS, + allow_only_visible_candidates: bool = True, +) -> str: + return ( + f"{format_district_prompt(summary, max_target_intersections=max_target_intersections, allow_only_visible_candidates=allow_only_visible_candidates)}\n" + f"{action.to_pretty_json()}" + ) diff --git a/district_llm/repair.py b/district_llm/repair.py new file mode 100644 index 0000000000000000000000000000000000000000..f3a09a8c11f4d0f3725feb0370d57f94a8c7862e --- /dev/null +++ b/district_llm/repair.py @@ -0,0 +1,392 @@ +from __future__ import annotations + +import re +from dataclasses import dataclass, field +from typing import Any + +from district_llm.schema import ( + DISTRICT_STRATEGIES, + PHASE_BIASES, + PRIORITY_CORRIDORS, + CandidateIntersection, + DistrictAction, + DistrictStateSummary, + candidate_priority_score, + canonicalize_target_intersections, +) + + +INTERSECTION_ID_PATTERN = re.compile(r"\bi_\d+\b") + + +@dataclass(frozen=True) +class RepairConfig: + allow_only_visible_candidates: bool = True + max_target_intersections: int = 3 + fallback_on_empty_targets: bool = True + fallback_mode: str = "heuristic" + + +@dataclass +class RepairReport: + raw_targets: list[str] = field(default_factory=list) + repaired_targets: list[str] = field(default_factory=list) + invalid_ids_removed: list[str] = field(default_factory=list) + non_visible_ids_removed: list[str] = field(default_factory=list) + deduplicated: bool = False + truncated: bool = False + fallback_used: bool = False + fallback_mode: str | None = None + empty_after_filtering: bool = False + + def to_dict(self) -> dict[str, Any]: + return { + "raw_targets": list(self.raw_targets), + "repaired_targets": list(self.repaired_targets), + "invalid_ids_removed": list(self.invalid_ids_removed), + "non_visible_ids_removed": list(self.non_visible_ids_removed), + "deduplicated": bool(self.deduplicated), + "truncated": bool(self.truncated), + "fallback_used": bool(self.fallback_used), + "fallback_mode": self.fallback_mode, + "empty_after_filtering": bool(self.empty_after_filtering), + } + + +def normalize_candidate_intersections( + payload: list[CandidateIntersection | dict[str, Any]] | None, +) -> list[dict[str, Any]]: + normalized: list[dict[str, Any]] = [] + for item in payload or []: + if isinstance(item, CandidateIntersection): + normalized.append(item.to_dict()) + elif isinstance(item, dict): + normalized.append(dict(item)) + return normalized + + +def parse_candidate_intersections_from_text(text: str) -> list[dict[str, Any]]: + if "candidate_intersections:" not in text: + return [] + + candidates: list[dict[str, Any]] = [] + capture = False + for line in text.splitlines(): + stripped = line.strip() + if stripped == "candidate_intersections:": + capture = True + continue + if not capture: + continue + if stripped == "- none": + continue + if not stripped.startswith("- "): + if stripped.endswith(":"): + break + continue + fields = stripped[2:].split() + if not fields: + continue + candidate: dict[str, Any] = { + "intersection_id": fields[0], + "queue_total": 0.0, + "wait_total": 0.0, + "outgoing_load": 0.0, + "current_phase": 0, + "is_boundary": False, + "spillback_risk": False, + "incident_proximity": False, + "overload_marker": False, + "event_proximity": False, + "corridor_alignment": "BALANCED", + "selection_reasons": [], + } + for token in fields[1:]: + if "=" not in token: + continue + key, value = token.split("=", 1) + if key == "q": + candidate["queue_total"] = float(value) + elif key == "w": + candidate["wait_total"] = float(value) + elif key == "out": + candidate["outgoing_load"] = float(value) + elif key == "phase": + candidate["current_phase"] = int(value) + elif key == "boundary": + candidate["is_boundary"] = value == "1" + elif key == "spillback": + candidate["spillback_risk"] = value == "1" + elif key == "incident": + candidate["incident_proximity"] = value == "1" + elif key == "overload": + candidate["overload_marker"] = value == "1" + elif key == "event": + candidate["event_proximity"] = value == "1" + elif key == "align": + candidate["corridor_alignment"] = value + elif key == "reasons": + candidate["selection_reasons"] = [] if value == "none" else value.split("|") + candidates.append(candidate) + return normalized_candidate_intersections_from_dicts(candidates) + + +def normalized_candidate_intersections_from_dicts( + payload: list[dict[str, Any]], +) -> list[dict[str, Any]]: + normalized: list[dict[str, Any]] = [] + for item in payload: + try: + normalized.append( + CandidateIntersection( + intersection_id=str(item.get("intersection_id", "")).strip(), + queue_total=float(item.get("queue_total", 0.0)), + wait_total=float(item.get("wait_total", 0.0)), + outgoing_load=float(item.get("outgoing_load", 0.0)), + current_phase=int(item.get("current_phase", 0)), + is_boundary=bool(item.get("is_boundary", False)), + spillback_risk=bool(item.get("spillback_risk", False)), + incident_proximity=bool(item.get("incident_proximity", False)), + overload_marker=bool(item.get("overload_marker", False)), + event_proximity=bool(item.get("event_proximity", False)), + corridor_alignment=str(item.get("corridor_alignment", "BALANCED")), + selection_reasons=list(item.get("selection_reasons", [])), + ).to_dict() + ) + except Exception: + continue + return normalized + + +def candidate_intersections_from_context( + summary: DistrictStateSummary | dict[str, Any] | None = None, + prompt_text: str | None = None, +) -> list[dict[str, Any]]: + if isinstance(summary, DistrictStateSummary): + return normalize_candidate_intersections(summary.candidate_intersections) + if isinstance(summary, dict): + if "candidate_intersections" in summary: + return normalize_candidate_intersections(summary.get("candidate_intersections")) + state_payload = summary.get("state") + if isinstance(state_payload, dict) and "candidate_intersections" in state_payload: + return normalize_candidate_intersections(state_payload.get("candidate_intersections")) + if prompt_text: + return parse_candidate_intersections_from_text(prompt_text) + return [] + + +def fallback_target_intersections( + summary: DistrictStateSummary | dict[str, Any] | None = None, + prompt_text: str | None = None, + max_target_intersections: int = 3, + strategy: str | None = None, + priority_corridor: str | None = None, + phase_bias: str | None = None, + focus_scores: dict[str, float] | None = None, +) -> list[str]: + candidate_intersections = candidate_intersections_from_context(summary=summary, prompt_text=prompt_text) + if candidate_intersections: + ordered_candidates = sorted( + candidate_intersections, + key=lambda item: ( + -( + candidate_priority_score(item) + + _focus_score_bonus(item, focus_scores) + + _strategy_target_bonus( + candidate=item, + strategy=strategy, + priority_corridor=priority_corridor, + phase_bias=phase_bias, + ) + ), + -float(item.get("queue_total", 0.0)), + -float(item.get("wait_total", 0.0)), + -float(item.get("outgoing_load", 0.0)), + str(item.get("intersection_id", "")), + ), + ) + ordered_ids = canonicalize_target_intersections( + [item["intersection_id"] for item in ordered_candidates], + ordered_candidates, + limit=max_target_intersections, + ) + return ordered_ids[:max_target_intersections] + + if isinstance(summary, DistrictStateSummary): + return [item.intersection_id for item in summary.top_congested_intersections[:max_target_intersections]] + if isinstance(summary, dict): + top_congested = summary.get("top_congested_intersections") or summary.get("state", {}).get("top_congested_intersections", []) + return [ + str(item.get("intersection_id")) + for item in top_congested[:max_target_intersections] + if str(item.get("intersection_id", "")).strip() + ] + if prompt_text: + return list(dict.fromkeys(INTERSECTION_ID_PATTERN.findall(prompt_text)))[:max_target_intersections] + return [] + + +def _focus_score_bonus(candidate: dict[str, Any], focus_scores: dict[str, float] | None) -> float: + if not focus_scores: + return 0.0 + max_focus = max(max(focus_scores.values()), 1.0) + return 4.0 * float(focus_scores.get(str(candidate.get("intersection_id", "")), 0.0)) / max_focus + + +def _strategy_target_bonus( + candidate: dict[str, Any], + strategy: str | None, + priority_corridor: str | None, + phase_bias: str | None, +) -> float: + reasons = set(candidate.get("selection_reasons", [])) + corridor_alignment = str(candidate.get("corridor_alignment", "BALANCED")) + bonus = 0.0 + + if strategy == "incident_response": + bonus += 4.0 * float(bool(candidate.get("incident_proximity", False))) + elif strategy == "clear_spillback": + bonus += 4.0 * float(bool(candidate.get("spillback_risk", False))) + bonus += 1.0 * float(bool(candidate.get("is_boundary", False))) + elif strategy == "drain_inbound": + bonus += 4.0 * float(bool(candidate.get("is_boundary", False))) + bonus += 1.0 * float(bool(candidate.get("spillback_risk", False))) + elif strategy == "drain_outbound": + bonus += 4.0 * float("outgoing" in reasons) + bonus += 1.0 * float(bool(candidate.get("spillback_risk", False))) + elif strategy == "arterial_priority": + bonus += 2.0 * float(bool(candidate.get("is_boundary", False))) + bonus += 1.5 * float(bool(candidate.get("overload_marker", False))) + bonus += 1.5 * float(bool(candidate.get("event_proximity", False))) + elif strategy == "favor_NS": + bonus += 4.0 * float(corridor_alignment == "NS") + elif strategy == "favor_EW": + bonus += 4.0 * float(corridor_alignment == "EW") + + if priority_corridor in {"NS", "EW"}: + bonus += 1.5 * float(corridor_alignment == priority_corridor) + elif priority_corridor == "inbound": + bonus += 1.5 * float(bool(candidate.get("is_boundary", False))) + elif priority_corridor == "outbound": + bonus += 1.5 * float("outgoing" in reasons) + elif priority_corridor == "arterial": + bonus += 0.75 * float(bool(candidate.get("is_boundary", False))) + + if phase_bias in {"NS", "EW"}: + bonus += 0.5 * float(corridor_alignment == phase_bias) + + return bonus + + +def extract_visible_candidate_ids( + summary: DistrictStateSummary | dict[str, Any] | None = None, + prompt_text: str | None = None, +) -> list[str]: + candidate_intersections = candidate_intersections_from_context(summary=summary, prompt_text=prompt_text) + if candidate_intersections: + return [item["intersection_id"] for item in candidate_intersections] + if prompt_text: + return list(dict.fromkeys(INTERSECTION_ID_PATTERN.findall(prompt_text))) + return [] + + +def sanitize_action_payload( + payload: dict[str, Any] | None, + summary: DistrictStateSummary | dict[str, Any] | None = None, + prompt_text: str | None = None, + config: RepairConfig | None = None, +) -> tuple[DistrictAction, RepairReport]: + config = config or RepairConfig() + payload = dict(payload or {}) + candidate_intersections = candidate_intersections_from_context(summary=summary, prompt_text=prompt_text) + visible_candidate_ids = [item["intersection_id"] for item in candidate_intersections] + visible_candidate_set = set(visible_candidate_ids) + + raw_target_payload = payload.get("target_intersections", []) + if isinstance(raw_target_payload, str): + raw_targets = INTERSECTION_ID_PATTERN.findall(raw_target_payload) + elif isinstance(raw_target_payload, (list, tuple)): + raw_targets = [str(item).strip() for item in raw_target_payload if str(item).strip()] + else: + raw_targets = [] + + report = RepairReport(raw_targets=list(raw_targets)) + deduped_targets: list[str] = [] + seen: set[str] = set() + for item in raw_targets: + if item in seen: + report.deduplicated = True + continue + seen.add(item) + deduped_targets.append(item) + + filtered_targets: list[str] = [] + for item in deduped_targets: + if not INTERSECTION_ID_PATTERN.fullmatch(item): + report.invalid_ids_removed.append(item) + continue + if config.allow_only_visible_candidates and visible_candidate_set and item not in visible_candidate_set: + report.non_visible_ids_removed.append(item) + continue + filtered_targets.append(item) + + if len(filtered_targets) > int(config.max_target_intersections): + report.truncated = True + filtered_targets = canonicalize_target_intersections( + filtered_targets, + candidate_intersections, + limit=int(config.max_target_intersections), + ) + + if not filtered_targets: + report.empty_after_filtering = bool(raw_targets) + if config.fallback_on_empty_targets: + report.fallback_used = True + report.fallback_mode = config.fallback_mode + if config.fallback_mode == "heuristic": + filtered_targets = fallback_target_intersections( + summary=summary, + prompt_text=prompt_text, + max_target_intersections=int(config.max_target_intersections), + ) + elif config.fallback_mode == "hold": + filtered_targets = [] + elif config.fallback_mode == "none": + filtered_targets = [] + else: + raise ValueError(f"Unsupported fallback_mode '{config.fallback_mode}'.") + + strategy = str(payload.get("strategy", "hold")) + if strategy not in DISTRICT_STRATEGIES: + strategy = "hold" + + priority_corridor = payload.get("priority_corridor") + if priority_corridor is not None: + priority_corridor = str(priority_corridor) + if priority_corridor not in PRIORITY_CORRIDORS: + priority_corridor = None + + phase_bias = str(payload.get("phase_bias", "NONE")) + if phase_bias not in PHASE_BIASES: + phase_bias = "NONE" + + duration_steps_raw = payload.get("duration_steps", 1) + try: + duration_steps = int(duration_steps_raw) + except (TypeError, ValueError): + duration_steps = 1 + duration_steps = max(1, min(duration_steps, 20)) + + if config.fallback_mode == "hold" and report.fallback_used and not filtered_targets: + action = DistrictAction.default_hold(duration_steps=duration_steps) + else: + action = DistrictAction( + strategy=strategy, + priority_corridor=priority_corridor, + target_intersections=filtered_targets, + phase_bias=phase_bias, + duration_steps=duration_steps, + ).validate() + + report.repaired_targets = list(action.target_intersections) + return action, report diff --git a/district_llm/rl_guidance_wrapper.py b/district_llm/rl_guidance_wrapper.py new file mode 100644 index 0000000000000000000000000000000000000000..b5cf23518c75027f442d16289744d44359caee64 --- /dev/null +++ b/district_llm/rl_guidance_wrapper.py @@ -0,0 +1,1004 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod +from dataclasses import asdict, dataclass, field, replace +import hashlib +from time import perf_counter +from typing import Any + +import numpy as np +import torch + +from district_llm.heuristic_guidance import ( + HeuristicGuidanceConfig, + generate_heuristic_guidance, +) +from district_llm.inference import DistrictLLMInference, DistrictLLMInferenceResult +from district_llm.repair import RepairReport +from district_llm.schema import CandidateIntersection, DistrictAction, DistrictStateSummary +from district_llm.summary_builder import DistrictStateSummaryBuilder +from district_llm.teachers import RLCheckpointTeacher + + +WRAPPER_MODES: tuple[str, ...] = ( + "no_op", + "target_only_soft", + "target_only_medium", + "corridor_soft", + "global_soft", + "current_legacy", +) +FALLBACK_POLICIES: tuple[str, ...] = ( + "no_op", + "hold_previous", + "heuristic_weak", +) +GATING_MODES: tuple[str, ...] = ( + "always_on", + "incident_or_spillback", + "queue_threshold", + "imbalance_threshold", + "queue_or_imbalance", + "combined", +) +BIAS_DECAY_SCHEDULES: tuple[str, ...] = ( + "linear", +) +STRATEGY_BIAS_MULTIPLIERS: dict[str, float] = { + "hold": 0.0, + "favor_NS": 1.0, + "favor_EW": 1.0, + "drain_inbound": 1.05, + "drain_outbound": 1.05, + "clear_spillback": 1.1, + "incident_response": 1.15, + "arterial_priority": 1.05, +} + + +@dataclass(frozen=True) +class GuidanceInfluenceConfig: + """ + Conservative inference-time wrapper around the fixed DQN policy. + + The DQN checkpoint remains unchanged. Guidance is treated as a weak prior + and only biases Q-values slightly before greedy action selection. + """ + + wrapper_mode: str = "target_only_soft" + bias_strength: float = 0.12 + target_only_bias_strength: float = 0.18 + corridor_bias_strength: float = 0.05 + max_intersections_affected: int = 3 + guidance_refresh_steps: int = 5 + guidance_persistence_steps: int = 3 + max_guidance_duration: int = 6 + apply_global_bias: bool = False + apply_target_only: bool = True + gating_mode: str = "always_on" + min_avg_queue_for_guidance: float = 150.0 + min_queue_imbalance_for_guidance: float = 20.0 + require_incident_or_spillback: bool = False + allow_guidance_in_normal_conditions: bool = True + enable_bias_decay: bool = True + bias_decay_schedule: str = "linear" + fallback_policy: str = "hold_previous" + log_guidance_debug: bool = False + max_debug_chars: int = 240 + + def validate(self) -> "GuidanceInfluenceConfig": + if self.wrapper_mode not in WRAPPER_MODES: + raise ValueError( + f"Unsupported wrapper_mode '{self.wrapper_mode}'. Expected one of {WRAPPER_MODES}." + ) + if self.fallback_policy not in FALLBACK_POLICIES: + raise ValueError( + f"Unsupported fallback_policy '{self.fallback_policy}'. Expected one of {FALLBACK_POLICIES}." + ) + if self.gating_mode not in GATING_MODES: + raise ValueError( + f"Unsupported gating_mode '{self.gating_mode}'. Expected one of {GATING_MODES}." + ) + if self.bias_decay_schedule not in BIAS_DECAY_SCHEDULES: + raise ValueError( + f"Unsupported bias_decay_schedule '{self.bias_decay_schedule}'. " + f"Expected one of {BIAS_DECAY_SCHEDULES}." + ) + if self.guidance_refresh_steps < 1: + raise ValueError("guidance_refresh_steps must be at least 1.") + if self.guidance_persistence_steps < 1: + raise ValueError("guidance_persistence_steps must be at least 1.") + if self.max_guidance_duration < 1: + raise ValueError("max_guidance_duration must be at least 1.") + if self.max_intersections_affected < 1: + raise ValueError("max_intersections_affected must be at least 1.") + return self + + +@dataclass(frozen=True) +class RLPolicyDecision: + q_values: np.ndarray + actions: np.ndarray + + +@dataclass +class GuidanceDecision: + source: str + action: DistrictAction + runtime_seconds: float + raw_text: str | None = None + parsed_payload_before_repair: dict[str, Any] | None = None + repair_report: RepairReport | None = None + json_valid: bool = True + schema_valid_before_repair: bool = True + provider_error: str | None = None + fallback_policy_applied: str | None = None + + @property + def repair_applied(self) -> bool: + report = self.repair_report + if report is None: + return False + return any( + ( + report.invalid_ids_removed, + report.non_visible_ids_removed, + report.deduplicated, + report.truncated, + report.fallback_used, + report.empty_after_filtering, + ) + ) + + @property + def invalid_before_repair(self) -> bool: + report = self.repair_report + if self.provider_error: + return True + if not self.json_valid or not self.schema_valid_before_repair: + return True + if report is None: + return False + return bool( + report.invalid_ids_removed + or report.non_visible_ids_removed + or report.empty_after_filtering + ) + + def to_trace_payload(self) -> dict[str, Any]: + return { + "source": self.source, + "runtime_seconds": float(self.runtime_seconds), + "action": self.action.to_dict(), + "raw_text": self.raw_text, + "parsed_payload_before_repair": self.parsed_payload_before_repair, + "repair_report": None if self.repair_report is None else self.repair_report.to_dict(), + "json_valid": bool(self.json_valid), + "schema_valid_before_repair": bool(self.schema_valid_before_repair), + "repair_applied": bool(self.repair_applied), + "invalid_before_repair": bool(self.invalid_before_repair), + "provider_error": self.provider_error, + "fallback_policy_applied": self.fallback_policy_applied, + } + + +@dataclass(frozen=True) +class GuidanceApplicationPlan: + wrapper_mode: str + scope: str + affected_intersections: tuple[str, ...] + targeted_intersections: tuple[str, ...] + target_candidate_ids: tuple[str, ...] + priority_direction: str | None + strength_scale: float + base_bias_strength: float + target_bias_strength: float + corridor_bias_strength: float + apply_global_bias: bool + apply_target_only: bool + max_intersections_affected: int + + def to_dict(self) -> dict[str, Any]: + return { + "wrapper_mode": self.wrapper_mode, + "scope": self.scope, + "affected_intersections": list(self.affected_intersections), + "targeted_intersections": list(self.targeted_intersections), + "target_candidate_ids": list(self.target_candidate_ids), + "priority_direction": self.priority_direction, + "strength_scale": float(self.strength_scale), + "base_bias_strength": float(self.base_bias_strength), + "target_bias_strength": float(self.target_bias_strength), + "corridor_bias_strength": float(self.corridor_bias_strength), + "apply_global_bias": bool(self.apply_global_bias), + "apply_target_only": bool(self.apply_target_only), + "max_intersections_affected": int(self.max_intersections_affected), + } + + +@dataclass +class ActiveDistrictGuidance: + district_id: str + summary: DistrictStateSummary + decision: GuidanceDecision + application_plan: GuidanceApplicationPlan + generated_step: int + expires_step: int + fallback_used: bool = False + + +@dataclass(frozen=True) +class GuidanceGateDecision: + allowed: bool + gating_mode: str + triggered_conditions: tuple[str, ...] + blocked_reasons: tuple[str, ...] + avg_queue: float + queue_imbalance: float + incident_flag: bool + spillback_risk: bool + overload_flag: bool + + def to_dict(self) -> dict[str, Any]: + return { + "allowed": bool(self.allowed), + "gating_mode": self.gating_mode, + "triggered_conditions": list(self.triggered_conditions), + "blocked_reasons": list(self.blocked_reasons), + "avg_queue": float(self.avg_queue), + "queue_imbalance": float(self.queue_imbalance), + "incident_flag": bool(self.incident_flag), + "spillback_risk": bool(self.spillback_risk), + "overload_flag": bool(self.overload_flag), + } + + +@dataclass +class GuidanceRefreshTrace: + mode_source: str + district_id: str + decision_step: int + summary_hash: str + summary_excerpt: str + summary_payload: dict[str, Any] + guidance: dict[str, Any] + repaired_guidance: dict[str, Any] + fallback_used: bool + fallback_policy: str + application_plan: dict[str, Any] + applied_biases: dict[str, float] + gate_decision: dict[str, Any] | None = None + + def to_dict(self) -> dict[str, Any]: + return { + "mode_source": self.mode_source, + "district_id": self.district_id, + "decision_step": int(self.decision_step), + "summary_hash": self.summary_hash, + "summary_excerpt": self.summary_excerpt, + "summary": self.summary_payload, + "raw_guidance": self.guidance, + "repaired_guidance": self.repaired_guidance, + "fallback_used": bool(self.fallback_used), + "fallback_policy": self.fallback_policy, + "application_plan": self.application_plan, + "applied_biases": self.applied_biases, + "gate_decision": self.gate_decision, + } + + +@dataclass +class WrapperEpisodeStats: + step_count: int = 0 + steps_with_active_guidance: int = 0 + guidance_refresh_count: int = 0 + guidance_blocked_step_count: int = 0 + guidance_blocked_refresh_count: int = 0 + bias_application_count: int = 0 + noop_guidance_events: int = 0 + fallback_event_count: int = 0 + total_affected_intersections: int = 0 + total_targeted_intersections: int = 0 + total_bias_magnitude: float = 0.0 + max_bias_magnitude: float = 0.0 + + def to_dict(self) -> dict[str, float]: + refresh_count = max(1, self.guidance_refresh_count) + return { + "num_guidance_refreshes": float(self.guidance_refresh_count), + "num_steps_guidance_blocked_by_gate": float(self.guidance_blocked_step_count), + "num_guidance_refreshes_blocked_by_gate": float(self.guidance_blocked_refresh_count), + "num_bias_applications": float(self.bias_application_count), + "num_noop_guidance_events": float(self.noop_guidance_events), + "fallback_policy_used_count": float(self.fallback_event_count), + "avg_num_affected_intersections": float(self.total_affected_intersections) / float(refresh_count), + "avg_num_targeted_intersections": float(self.total_targeted_intersections) / float(refresh_count), + "mean_bias_magnitude": float(self.total_bias_magnitude) / float(max(1, self.bias_application_count)), + "max_bias_magnitude": float(self.max_bias_magnitude), + "percent_steps_with_active_guidance": float(self.steps_with_active_guidance) + / float(max(1, self.step_count)), + } + + +@dataclass +class GuidedActionBatch: + actions: np.ndarray + base_actions: np.ndarray + base_q_values: np.ndarray + guided_q_values: np.ndarray + q_bias: np.ndarray + refresh_traces: list[GuidanceRefreshTrace] = field(default_factory=list) + runtime_seconds: float = 0.0 + + +class BaseGuidanceProvider(ABC): + source_name: str + + @abstractmethod + def generate(self, summary: DistrictStateSummary) -> GuidanceDecision: + raise NotImplementedError + + +class HeuristicGuidanceProvider(BaseGuidanceProvider): + source_name = "heuristic" + + def __init__(self, config: HeuristicGuidanceConfig | None = None): + self.config = config or HeuristicGuidanceConfig() + + def generate(self, summary: DistrictStateSummary) -> GuidanceDecision: + started = perf_counter() + action = generate_heuristic_guidance(summary=summary, config=self.config) + return GuidanceDecision( + source=self.source_name, + action=action, + runtime_seconds=perf_counter() - started, + parsed_payload_before_repair=action.to_dict(), + ) + + +class LLMGuidanceProvider(BaseGuidanceProvider): + source_name = "llm" + + def __init__(self, inference: DistrictLLMInference, max_new_tokens: int = 128): + self.inference = inference + self.max_new_tokens = int(max_new_tokens) + + def generate(self, summary: DistrictStateSummary) -> GuidanceDecision: + started = perf_counter() + result: DistrictLLMInferenceResult = self.inference.predict_with_result( + summary=summary, + max_new_tokens=self.max_new_tokens, + ) + return GuidanceDecision( + source=self.source_name, + action=result.action, + runtime_seconds=perf_counter() - started, + raw_text=result.raw_text, + parsed_payload_before_repair=result.parsed_payload_before_repair, + repair_report=result.repair_report, + json_valid=result.json_valid, + schema_valid_before_repair=result.schema_valid_before_repair, + ) + + +class FixedRLPolicyAdapter: + def __init__(self, checkpoint_path: str, device: str | None = None): + self.teacher = RLCheckpointTeacher(checkpoint_path=checkpoint_path, device=device) + self.device = self.teacher.device + + @property + def env_config(self) -> Any | None: + return self.teacher.env_config + + def decide(self, observation_batch: dict[str, Any]) -> RLPolicyDecision: + raw_obs = observation_batch["observations"].astype(np.float32) + normalized_obs = ( + self.teacher.obs_normalizer.normalize(raw_obs) + if self.teacher.obs_normalizer is not None + else raw_obs + ) + obs_tensor = torch.as_tensor(normalized_obs, dtype=torch.float32, device=self.device) + district_type_tensor = torch.as_tensor( + observation_batch["district_type_indices"], + dtype=torch.int64, + device=self.device, + ) + action_mask_tensor = torch.as_tensor( + observation_batch["action_mask"], + dtype=torch.float32, + device=self.device, + ) + with torch.no_grad(): + q_values = self.teacher.model.forward( + observations=obs_tensor, + district_type_indices=district_type_tensor, + action_mask=action_mask_tensor, + ) + q_values_np = q_values.detach().cpu().numpy().astype(np.float32) + return RLPolicyDecision(q_values=q_values_np, actions=q_values_np.argmax(axis=1).astype(np.int64)) + + +class DistrictGuidedRLController: + def __init__( + self, + policy: FixedRLPolicyAdapter, + mode_source: str, + summary_builder: DistrictStateSummaryBuilder | None = None, + guidance_provider: BaseGuidanceProvider | None = None, + influence_config: GuidanceInfluenceConfig | None = None, + heuristic_provider: BaseGuidanceProvider | None = None, + ): + self.policy = policy + self.mode_source = mode_source + self.summary_builder = summary_builder + self.guidance_provider = guidance_provider + self.influence_config = (influence_config or GuidanceInfluenceConfig()).validate() + self.heuristic_provider = heuristic_provider + self._active_guidance: dict[str, ActiveDistrictGuidance] = {} + self._next_refresh_step_by_district: dict[str, int] = {} + self._episode_stats = WrapperEpisodeStats() + + def reset(self) -> None: + self._active_guidance = {} + self._next_refresh_step_by_district = {} + self._episode_stats = WrapperEpisodeStats() + if self.summary_builder is not None: + self.summary_builder.reset() + + def active_guidance_snapshot(self) -> dict[str, dict[str, Any]]: + return { + district_id: active.decision.action.to_dict() + for district_id, active in sorted(self._active_guidance.items()) + } + + def episode_debug_summary(self) -> dict[str, Any]: + payload = self._episode_stats.to_dict() + payload.update( + { + "wrapper_mode": self.influence_config.wrapper_mode, + "fallback_policy": self.influence_config.fallback_policy, + } + ) + return payload + + def act(self, env, observation_batch: dict[str, Any]) -> GuidedActionBatch: + started = perf_counter() + base_decision = self.policy.decide(observation_batch) + base_q_values = base_decision.q_values + guided_q_values = base_q_values.copy() + q_bias = np.zeros_like(guided_q_values, dtype=np.float32) + + refresh_traces = self._refresh_guidance_if_needed(env=env, observation_batch=observation_batch) + if self.guidance_provider is None: + self._episode_stats.step_count += 1 + return GuidedActionBatch( + actions=base_decision.actions.copy(), + base_actions=base_decision.actions, + base_q_values=base_q_values, + guided_q_values=guided_q_values, + q_bias=q_bias, + refresh_traces=refresh_traces, + runtime_seconds=perf_counter() - started, + ) + + active_any = False + decision_step = int(observation_batch.get("decision_step", 0)) + candidate_lookup_by_district = { + district_id: { + item.intersection_id: item + for item in active.summary.candidate_intersections + } + for district_id, active in self._active_guidance.items() + } + for row_index, intersection_id in enumerate(observation_batch["intersection_ids"]): + district_id = str(observation_batch["district_ids"][row_index]) + active = self._active_guidance.get(district_id) + if active is None: + continue + active_any = True + candidate = candidate_lookup_by_district[district_id].get(str(intersection_id)) + row_bias = self._row_action_bias( + active=active, + candidate=candidate, + intersection_id=str(intersection_id), + current_phase=int(observation_batch["current_phase"][row_index]), + decision_step=decision_step, + ) + if row_bias is None: + continue + q_bias[row_index] = row_bias + guided_q_values[row_index] = guided_q_values[row_index] + row_bias + magnitude = float(np.abs(row_bias).max()) + self._episode_stats.bias_application_count += 1 + self._episode_stats.total_bias_magnitude += magnitude + self._episode_stats.max_bias_magnitude = max(self._episode_stats.max_bias_magnitude, magnitude) + + self._episode_stats.step_count += 1 + if active_any: + self._episode_stats.steps_with_active_guidance += 1 + actions = guided_q_values.argmax(axis=1).astype(np.int64) + return GuidedActionBatch( + actions=actions, + base_actions=base_decision.actions, + base_q_values=base_q_values, + guided_q_values=guided_q_values, + q_bias=q_bias, + refresh_traces=refresh_traces, + runtime_seconds=perf_counter() - started, + ) + + def _refresh_guidance_if_needed( + self, + env, + observation_batch: dict[str, Any], + ) -> list[GuidanceRefreshTrace]: + if self.guidance_provider is None or self.summary_builder is None: + return [] + + decision_step = int(observation_batch.get("decision_step", 0)) + due_districts = [ + district_id + for district_id in tuple(sorted(env.districts)) + if self._district_requires_refresh(district_id=district_id, decision_step=decision_step) + ] + if not due_districts: + return [] + + summaries = self.summary_builder.build_all(env, observation_batch) + refresh_traces: list[GuidanceRefreshTrace] = [] + gate_blocked_this_step = False + for district_id in due_districts: + summary = summaries[district_id] + previous_active = self._active_guidance.get(district_id) + gate_decision = _evaluate_guidance_gate(summary=summary, config=self.influence_config) + if not gate_decision.allowed: + gate_blocked_this_step = True + self._active_guidance.pop(district_id, None) + self._next_refresh_step_by_district[district_id] = ( + decision_step + self._resolve_blocked_refresh_horizon() + ) + self._episode_stats.guidance_refresh_count += 1 + self._episode_stats.guidance_blocked_refresh_count += 1 + self._episode_stats.noop_guidance_events += 1 + decision = GuidanceDecision( + source=f"{self.mode_source}_gate_blocked", + action=DistrictAction.default_hold(), + runtime_seconds=0.0, + fallback_policy_applied="gate_blocked", + ) + application_plan = _build_application_plan( + summary=summary, + action=decision.action, + config=replace(self.influence_config, wrapper_mode="no_op"), + district_intersection_ids=tuple(env.districts[district_id].intersection_ids), + ) + trace = GuidanceRefreshTrace( + mode_source=self.mode_source, + district_id=district_id, + decision_step=decision_step, + summary_hash=_summary_hash(summary), + summary_excerpt=summary.to_prompt_text()[:240], + summary_payload=summary.to_dict(), + guidance=decision.to_trace_payload(), + repaired_guidance=decision.action.to_dict(), + fallback_used=False, + fallback_policy="gate_blocked", + application_plan=application_plan.to_dict(), + applied_biases={ + "base": 0.0, + "target": 0.0, + "corridor": 0.0, + "strength_scale": 0.0, + }, + gate_decision=gate_decision.to_dict(), + ) + refresh_traces.append(trace) + if self.influence_config.log_guidance_debug: + _log_guidance_debug(trace) + continue + + decision, fallback_used = self._generate_guidance( + district_id=district_id, + summary=summary, + previous_active=previous_active, + ) + application_plan = _build_application_plan( + summary=summary, + action=decision.action, + config=self.influence_config, + district_intersection_ids=tuple(env.districts[district_id].intersection_ids), + ) + expires_step = decision_step + self._resolve_refresh_horizon(decision.action) + active = ActiveDistrictGuidance( + district_id=district_id, + summary=summary, + decision=decision, + application_plan=application_plan, + generated_step=decision_step, + expires_step=expires_step, + fallback_used=fallback_used, + ) + self._active_guidance[district_id] = active + self._next_refresh_step_by_district[district_id] = int(expires_step) + + self._episode_stats.guidance_refresh_count += 1 + self._episode_stats.total_affected_intersections += len(application_plan.affected_intersections) + self._episode_stats.total_targeted_intersections += len(application_plan.targeted_intersections) + if application_plan.wrapper_mode == "no_op" or not application_plan.affected_intersections: + self._episode_stats.noop_guidance_events += 1 + if fallback_used: + self._episode_stats.fallback_event_count += 1 + + trace = GuidanceRefreshTrace( + mode_source=self.mode_source, + district_id=district_id, + decision_step=decision_step, + summary_hash=_summary_hash(summary), + summary_excerpt=summary.to_prompt_text()[:240], + summary_payload=summary.to_dict(), + guidance=decision.to_trace_payload(), + repaired_guidance=decision.action.to_dict(), + fallback_used=fallback_used, + fallback_policy=self.influence_config.fallback_policy if fallback_used else "none", + application_plan=application_plan.to_dict(), + applied_biases={ + "base": float(application_plan.base_bias_strength), + "target": float(application_plan.target_bias_strength), + "corridor": float(application_plan.corridor_bias_strength), + "strength_scale": float(application_plan.strength_scale), + }, + gate_decision=gate_decision.to_dict(), + ) + refresh_traces.append(trace) + if self.influence_config.log_guidance_debug: + _log_guidance_debug(trace) + if gate_blocked_this_step: + self._episode_stats.guidance_blocked_step_count += 1 + return refresh_traces + + def _generate_guidance( + self, + district_id: str, + summary: DistrictStateSummary, + previous_active: ActiveDistrictGuidance | None, + ) -> tuple[GuidanceDecision, bool]: + fallback_used = False + try: + decision = self.guidance_provider.generate(summary) + except Exception as exc: + decision = GuidanceDecision( + source=self.guidance_provider.source_name, + action=DistrictAction.default_hold(), + runtime_seconds=0.0, + provider_error=str(exc), + json_valid=False, + schema_valid_before_repair=False, + ) + if not _should_fallback(decision): + return decision, fallback_used + + fallback_used = True + fallback_policy = self.influence_config.fallback_policy + if fallback_policy == "hold_previous" and previous_active is not None: + fallback_decision = GuidanceDecision( + source=f"{decision.source}_fallback_hold_previous", + action=previous_active.decision.action, + runtime_seconds=decision.runtime_seconds, + raw_text=decision.raw_text, + parsed_payload_before_repair=decision.parsed_payload_before_repair, + repair_report=decision.repair_report, + json_valid=decision.json_valid, + schema_valid_before_repair=decision.schema_valid_before_repair, + provider_error=decision.provider_error, + fallback_policy_applied=fallback_policy, + ) + return fallback_decision, fallback_used + + if fallback_policy == "heuristic_weak" and self.heuristic_provider is not None: + fallback_decision = self.heuristic_provider.generate(summary) + fallback_decision.fallback_policy_applied = fallback_policy + return fallback_decision, fallback_used + + fallback_decision = GuidanceDecision( + source=f"{decision.source}_fallback_no_op", + action=DistrictAction.default_hold(), + runtime_seconds=decision.runtime_seconds, + raw_text=decision.raw_text, + parsed_payload_before_repair=decision.parsed_payload_before_repair, + repair_report=decision.repair_report, + json_valid=decision.json_valid, + schema_valid_before_repair=decision.schema_valid_before_repair, + provider_error=decision.provider_error, + fallback_policy_applied=fallback_policy, + ) + return fallback_decision, fallback_used + + def _district_requires_refresh(self, district_id: str, decision_step: int) -> bool: + next_refresh_step = self._next_refresh_step_by_district.get(district_id) + if next_refresh_step is None: + return True + return decision_step >= int(next_refresh_step) + + def _resolve_refresh_horizon(self, action: DistrictAction) -> int: + requested = max(1, min(int(action.duration_steps), self.influence_config.max_guidance_duration)) + return min( + requested, + int(self.influence_config.guidance_refresh_steps), + int(self.influence_config.guidance_persistence_steps), + ) + + def _resolve_blocked_refresh_horizon(self) -> int: + return max( + 1, + min( + int(self.influence_config.guidance_refresh_steps), + int(self.influence_config.guidance_persistence_steps), + ), + ) + + def _row_action_bias( + self, + active: ActiveDistrictGuidance, + candidate: CandidateIntersection | None, + intersection_id: str, + current_phase: int, + decision_step: int, + ) -> np.ndarray | None: + plan = active.application_plan + if plan.wrapper_mode == "no_op": + return None + if intersection_id not in set(plan.affected_intersections): + return None + + preferred_action = _preferred_action_for_direction( + direction=plan.priority_direction, + current_phase=current_phase, + ) + if preferred_action is None: + return None + + decay = 1.0 + if self.influence_config.enable_bias_decay: + horizon = max(1, active.expires_step - active.generated_step) + age = max(0, decision_step - active.generated_step) + if self.influence_config.bias_decay_schedule == "linear": + decay = max(0.25, 1.0 - (float(age) / float(horizon))) + + magnitude = plan.base_bias_strength * plan.strength_scale * decay + if intersection_id in set(plan.targeted_intersections): + magnitude += plan.target_bias_strength * plan.strength_scale * decay + if candidate is not None and plan.priority_direction in {"NS", "EW"}: + if candidate.corridor_alignment == plan.priority_direction: + magnitude += plan.corridor_bias_strength * plan.strength_scale * decay + if candidate.is_boundary and plan.scope in {"corridor_local", "global"}: + magnitude += 0.5 * plan.corridor_bias_strength * plan.strength_scale * decay + + strategy_multiplier = STRATEGY_BIAS_MULTIPLIERS.get(active.decision.action.strategy, 1.0) + magnitude *= strategy_multiplier + if magnitude <= 0.0: + return None + + bias = np.zeros(2, dtype=np.float32) + bias[preferred_action] += float(magnitude) + return bias + + +def _build_application_plan( + summary: DistrictStateSummary, + action: DistrictAction, + config: GuidanceInfluenceConfig, + district_intersection_ids: tuple[str, ...], +) -> GuidanceApplicationPlan: + wrapper_mode = config.wrapper_mode + target_ids = tuple( + intersection_id + for intersection_id in action.target_intersections + if intersection_id in {item.intersection_id for item in summary.candidate_intersections} + ) + candidate_lookup = { + item.intersection_id: item + for item in summary.candidate_intersections + } + priority_direction = _resolve_guidance_direction(action=action, summary=summary) + if wrapper_mode == "no_op": + return GuidanceApplicationPlan( + wrapper_mode=wrapper_mode, + scope="none", + affected_intersections=(), + targeted_intersections=target_ids, + target_candidate_ids=tuple(candidate_lookup), + priority_direction=priority_direction, + strength_scale=0.0, + base_bias_strength=0.0, + target_bias_strength=0.0, + corridor_bias_strength=0.0, + apply_global_bias=False, + apply_target_only=True, + max_intersections_affected=0, + ) + + if wrapper_mode == "current_legacy": + affected = tuple(district_intersection_ids) + return GuidanceApplicationPlan( + wrapper_mode=wrapper_mode, + scope="global", + affected_intersections=affected, + targeted_intersections=target_ids, + target_candidate_ids=tuple(candidate_lookup), + priority_direction=priority_direction, + strength_scale=1.0, + base_bias_strength=float(max(config.bias_strength, 0.75)), + target_bias_strength=float(max(config.target_only_bias_strength, 1.25)), + corridor_bias_strength=float(max(config.corridor_bias_strength, 0.5)), + apply_global_bias=True, + apply_target_only=False, + max_intersections_affected=max(len(affected), config.max_intersections_affected), + ) + + if wrapper_mode in {"target_only_soft", "target_only_medium"}: + strength_scale = 0.5 if wrapper_mode == "target_only_soft" else 1.0 + affected = target_ids[: config.max_intersections_affected] + return GuidanceApplicationPlan( + wrapper_mode=wrapper_mode, + scope="targeted", + affected_intersections=affected, + targeted_intersections=target_ids, + target_candidate_ids=tuple(candidate_lookup), + priority_direction=priority_direction, + strength_scale=strength_scale, + base_bias_strength=float(config.bias_strength), + target_bias_strength=float(config.target_only_bias_strength), + corridor_bias_strength=float(config.corridor_bias_strength), + apply_global_bias=False, + apply_target_only=True, + max_intersections_affected=config.max_intersections_affected, + ) + + if wrapper_mode == "corridor_soft": + ranked = list(target_ids) + extras = [ + item.intersection_id + for item in summary.candidate_intersections + if item.intersection_id not in ranked + and item.is_boundary + and (priority_direction is None or item.corridor_alignment == priority_direction) + ] + affected = tuple((ranked + extras)[: config.max_intersections_affected]) + return GuidanceApplicationPlan( + wrapper_mode=wrapper_mode, + scope="corridor_local", + affected_intersections=affected, + targeted_intersections=target_ids, + target_candidate_ids=tuple(candidate_lookup), + priority_direction=priority_direction, + strength_scale=0.6, + base_bias_strength=float(config.bias_strength), + target_bias_strength=float(config.target_only_bias_strength), + corridor_bias_strength=float(config.corridor_bias_strength), + apply_global_bias=False, + apply_target_only=False, + max_intersections_affected=config.max_intersections_affected, + ) + + affected_global = tuple(district_intersection_ids) + return GuidanceApplicationPlan( + wrapper_mode="global_soft", + scope="global", + affected_intersections=affected_global, + targeted_intersections=target_ids, + target_candidate_ids=tuple(candidate_lookup), + priority_direction=priority_direction, + strength_scale=0.35, + base_bias_strength=float(config.bias_strength), + target_bias_strength=float(config.target_only_bias_strength), + corridor_bias_strength=float(config.corridor_bias_strength), + apply_global_bias=True, + apply_target_only=False, + max_intersections_affected=config.max_intersections_affected, + ) + + +def _should_fallback(decision: GuidanceDecision) -> bool: + if decision.provider_error is not None: + return True + if not decision.json_valid or not decision.schema_valid_before_repair: + return True + report = decision.repair_report + if report is None: + return False + return bool( + report.fallback_used + or report.empty_after_filtering + ) + + +def _evaluate_guidance_gate( + summary: DistrictStateSummary, + config: GuidanceInfluenceConfig, +) -> GuidanceGateDecision: + queue_imbalance = abs(float(summary.ns_queue) - float(summary.ew_queue)) + queue_trigger = float(summary.avg_queue) >= float(config.min_avg_queue_for_guidance) + imbalance_trigger = queue_imbalance >= float(config.min_queue_imbalance_for_guidance) + incident_or_spillback = bool(summary.incident_flag or summary.spillback_risk or summary.overload_flag) + triggers = { + "incident_or_spillback": incident_or_spillback, + "queue_threshold": queue_trigger, + "imbalance_threshold": imbalance_trigger, + } + triggered_conditions = tuple(name for name, active in triggers.items() if active) + + if config.gating_mode == "always_on": + allowed = True + elif config.gating_mode == "incident_or_spillback": + allowed = incident_or_spillback + elif config.gating_mode == "queue_threshold": + allowed = queue_trigger + elif config.gating_mode == "imbalance_threshold": + allowed = imbalance_trigger + elif config.gating_mode == "queue_or_imbalance": + allowed = queue_trigger or imbalance_trigger + else: + allowed = incident_or_spillback or queue_trigger or imbalance_trigger + + blocked_reasons: list[str] = [] + if config.require_incident_or_spillback and not incident_or_spillback: + allowed = False + blocked_reasons.append("requires_incident_or_spillback") + if not config.allow_guidance_in_normal_conditions and not triggered_conditions: + allowed = False + blocked_reasons.append("normal_conditions_blocked") + if not allowed and not blocked_reasons: + blocked_reasons.append(f"gating_mode:{config.gating_mode}") + + return GuidanceGateDecision( + allowed=allowed, + gating_mode=config.gating_mode, + triggered_conditions=triggered_conditions, + blocked_reasons=tuple(blocked_reasons), + avg_queue=float(summary.avg_queue), + queue_imbalance=float(queue_imbalance), + incident_flag=bool(summary.incident_flag), + spillback_risk=bool(summary.spillback_risk), + overload_flag=bool(summary.overload_flag), + ) + + +def _resolve_guidance_direction(action: DistrictAction, summary: DistrictStateSummary) -> str | None: + if action.phase_bias in {"NS", "EW"}: + return action.phase_bias + if action.priority_corridor in {"NS", "EW"}: + return action.priority_corridor + if summary.dominant_flow in {"NS", "EW"}: + return summary.dominant_flow + return None + + +def _preferred_action_for_direction(direction: str | None, current_phase: int) -> int | None: + if direction == "NS": + return 0 if current_phase == 0 else 1 + if direction == "EW": + return 0 if current_phase != 0 else 1 + return None + + +def _summary_hash(summary: DistrictStateSummary) -> str: + return hashlib.sha1(summary.to_json().encode("utf-8")).hexdigest()[:16] + + +def guidance_config_payload(config: GuidanceInfluenceConfig) -> dict[str, Any]: + return asdict(config.validate()) + + +def _log_guidance_debug(trace: GuidanceRefreshTrace) -> None: + print( + "[guidance-debug] " + f"mode={trace.mode_source} " + f"district={trace.district_id} " + f"wrapper_mode={trace.application_plan['wrapper_mode']} " + f"gate_allowed={trace.gate_decision.get('allowed') if trace.gate_decision else True} " + f"scope={trace.application_plan['scope']} " + f"targets={trace.repaired_guidance.get('target_intersections', [])} " + f"affected={trace.application_plan['affected_intersections']} " + f"fallback_used={trace.fallback_used} " + f"fallback_policy={trace.fallback_policy}" + ) diff --git a/district_llm/schema.py b/district_llm/schema.py new file mode 100644 index 0000000000000000000000000000000000000000..c866ff2971c9f929db3cb2f8efb99157ff310da6 --- /dev/null +++ b/district_llm/schema.py @@ -0,0 +1,429 @@ +from __future__ import annotations + +import json +from dataclasses import dataclass, field +from typing import Any + + +DISTRICT_STRATEGIES: tuple[str, ...] = ( + "hold", + "favor_NS", + "favor_EW", + "drain_inbound", + "drain_outbound", + "clear_spillback", + "incident_response", + "arterial_priority", +) +PHASE_BIASES: tuple[str, ...] = ("NONE", "NS", "EW") +PRIORITY_CORRIDORS: tuple[str, ...] = ( + "NS", + "EW", + "inbound", + "outbound", + "arterial", +) +DOMINANT_FLOWS: tuple[str, ...] = ("NS", "EW", "BALANCED") +CANDIDATE_REASON_TAGS: tuple[str, ...] = ( + "congested", + "boundary", + "spillback", + "incident", + "outgoing", + "overload", + "event", +) + + +def _round_float(value: float, digits: int = 3) -> float: + return round(float(value), digits) + + +def _dedupe_string_list(values: list[str] | tuple[str, ...] | None, limit: int | None = None) -> list[str]: + normalized: list[str] = [] + seen: set[str] = set() + for item in values or []: + value = str(item).strip() + if not value or value in seen: + continue + normalized.append(value) + seen.add(value) + if limit is not None and len(normalized) >= limit: + break + return normalized + + +def _stable_reason_list(values: list[str] | tuple[str, ...] | None) -> list[str]: + present = {str(item).strip() for item in (values or []) if str(item).strip()} + return [item for item in CANDIDATE_REASON_TAGS if item in present] + + +def candidate_priority_score(candidate: "CandidateIntersection | dict[str, Any]") -> float: + item = candidate.to_dict() if hasattr(candidate, "to_dict") else dict(candidate) + queue_total = float(item.get("queue_total", 0.0)) + wait_total = float(item.get("wait_total", 0.0)) + outgoing_load = float(item.get("outgoing_load", 0.0)) + score = queue_total + 1.5 * wait_total + 0.5 * outgoing_load + score += 2.0 * float(bool(item.get("spillback_risk", False))) + score += 1.5 * float(bool(item.get("incident_proximity", False))) + score += 1.0 * float(bool(item.get("is_boundary", False))) + score += 0.75 * float(bool(item.get("event_proximity", False))) + score += 0.75 * float(bool(item.get("overload_marker", False))) + return score + + +def candidate_priority_tuple(candidate: "CandidateIntersection | dict[str, Any]") -> tuple[float, float, float, float, str]: + item = candidate.to_dict() if hasattr(candidate, "to_dict") else dict(candidate) + return ( + candidate_priority_score(item), + float(item.get("queue_total", 0.0)), + float(item.get("wait_total", 0.0)), + float(item.get("outgoing_load", 0.0)), + str(item.get("intersection_id", "")), + ) + + +def canonicalize_target_intersections( + targets: list[str] | tuple[str, ...] | None, + candidates: list["CandidateIntersection | dict[str, Any]"] | None = None, + limit: int | None = None, +) -> list[str]: + normalized = _dedupe_string_list(targets, limit=None) + if not candidates: + return normalized[:limit] if limit is not None else normalized + + candidate_order = { + str(candidate.to_dict()["intersection_id"] if hasattr(candidate, "to_dict") else candidate["intersection_id"]): ( + -candidate_priority_tuple(candidate)[0], + -candidate_priority_tuple(candidate)[1], + -candidate_priority_tuple(candidate)[2], + -candidate_priority_tuple(candidate)[3], + candidate_priority_tuple(candidate)[4], + ) + for candidate in candidates + } + normalized.sort(key=lambda item: candidate_order.get(item, (1.0, 1.0, 1.0, 1.0, item))) + if limit is not None: + normalized = normalized[:limit] + return normalized + + +@dataclass +class CongestedIntersection: + intersection_id: str + queue_total: float + wait_total: float + outgoing_load: float + current_phase: int + is_boundary: bool + + def to_dict(self) -> dict[str, Any]: + return { + "intersection_id": self.intersection_id, + "queue_total": _round_float(self.queue_total), + "wait_total": _round_float(self.wait_total), + "outgoing_load": _round_float(self.outgoing_load), + "current_phase": int(self.current_phase), + "is_boundary": bool(self.is_boundary), + } + + def to_prompt_line(self) -> str: + return ( + f"- {self.intersection_id} " + f"q={self.queue_total:.2f} " + f"w={self.wait_total:.2f} " + f"out={self.outgoing_load:.2f} " + f"phase={self.current_phase} " + f"boundary={int(self.is_boundary)}" + ) + + +@dataclass +class CandidateIntersection: + intersection_id: str + queue_total: float + wait_total: float + outgoing_load: float + current_phase: int + is_boundary: bool + spillback_risk: bool = False + incident_proximity: bool = False + overload_marker: bool = False + event_proximity: bool = False + corridor_alignment: str = "BALANCED" + selection_reasons: list[str] = field(default_factory=list) + + def validate(self) -> "CandidateIntersection": + if self.corridor_alignment not in DOMINANT_FLOWS: + raise ValueError( + f"Invalid corridor_alignment '{self.corridor_alignment}'. Expected one of {DOMINANT_FLOWS}." + ) + self.selection_reasons = _stable_reason_list(self.selection_reasons) + return self + + def to_dict(self) -> dict[str, Any]: + self.validate() + return { + "intersection_id": self.intersection_id, + "queue_total": _round_float(self.queue_total), + "wait_total": _round_float(self.wait_total), + "outgoing_load": _round_float(self.outgoing_load), + "current_phase": int(self.current_phase), + "is_boundary": bool(self.is_boundary), + "spillback_risk": bool(self.spillback_risk), + "incident_proximity": bool(self.incident_proximity), + "overload_marker": bool(self.overload_marker), + "event_proximity": bool(self.event_proximity), + "corridor_alignment": self.corridor_alignment, + "selection_reasons": list(self.selection_reasons), + } + + def to_prompt_line(self) -> str: + self.validate() + reasons = "|".join(self.selection_reasons) if self.selection_reasons else "none" + return ( + f"- {self.intersection_id} " + f"q={self.queue_total:.2f} " + f"w={self.wait_total:.2f} " + f"out={self.outgoing_load:.2f} " + f"phase={self.current_phase} " + f"boundary={int(self.is_boundary)} " + f"spillback={int(self.spillback_risk)} " + f"incident={int(self.incident_proximity)} " + f"overload={int(self.overload_marker)} " + f"event={int(self.event_proximity)} " + f"align={self.corridor_alignment} " + f"reasons={reasons}" + ) + + +@dataclass +class DistrictAction: + strategy: str = "hold" + priority_corridor: str | None = None + target_intersections: list[str] = field(default_factory=list) + phase_bias: str = "NONE" + duration_steps: int = 1 + + def validate(self) -> "DistrictAction": + if self.strategy not in DISTRICT_STRATEGIES: + raise ValueError( + f"Invalid strategy '{self.strategy}'. Expected one of {DISTRICT_STRATEGIES}." + ) + if self.priority_corridor is not None and self.priority_corridor not in PRIORITY_CORRIDORS: + raise ValueError( + f"Invalid priority_corridor '{self.priority_corridor}'. " + f"Expected one of {PRIORITY_CORRIDORS} or None." + ) + if self.phase_bias not in PHASE_BIASES: + raise ValueError( + f"Invalid phase_bias '{self.phase_bias}'. Expected one of {PHASE_BIASES}." + ) + if not isinstance(self.duration_steps, int): + raise ValueError("duration_steps must be an integer.") + if not 1 <= self.duration_steps <= 20: + raise ValueError("duration_steps must be between 1 and 20.") + self.target_intersections = _dedupe_string_list(self.target_intersections, limit=8) + return self + + @classmethod + def default_hold(cls, duration_steps: int = 1) -> "DistrictAction": + return cls( + strategy="hold", + priority_corridor=None, + target_intersections=[], + phase_bias="NONE", + duration_steps=max(1, min(int(duration_steps), 20)), + ) + + @classmethod + def from_dict(cls, payload: dict[str, Any]) -> "DistrictAction": + return cls( + strategy=str(payload.get("strategy", "hold")), + priority_corridor=payload.get("priority_corridor"), + target_intersections=list(payload.get("target_intersections", [])), + phase_bias=str(payload.get("phase_bias", "NONE")), + duration_steps=int(payload.get("duration_steps", 1)), + ).validate() + + @classmethod + def from_json(cls, payload: str) -> "DistrictAction": + return cls.from_dict(json.loads(payload)) + + def to_dict(self) -> dict[str, Any]: + self.validate() + return { + "strategy": self.strategy, + "priority_corridor": self.priority_corridor, + "target_intersections": list(self.target_intersections), + "phase_bias": self.phase_bias, + "duration_steps": int(self.duration_steps), + } + + def to_json(self) -> str: + return json.dumps(self.to_dict(), sort_keys=True, separators=(",", ":")) + + def to_pretty_json(self) -> str: + return json.dumps(self.to_dict(), sort_keys=True, indent=2) + + def to_rl_context(self) -> dict[str, Any]: + payload = self.to_dict() + payload["district_strategy"] = payload.pop("strategy") + payload["district_duration_steps"] = payload.pop("duration_steps") + return payload + + +@dataclass +class DistrictStateSummary: + city_id: str + district_id: str + district_type: str + scenario_name: str + scenario_type: str + decision_step: int + sim_time: int + intersection_count: int + avg_queue: float + max_queue: float + total_queue: float + avg_wait: float + max_wait: float + total_wait: float + avg_outgoing_load: float + max_outgoing_load: float + total_outgoing_load: float + recent_throughput: float + queue_change: float + wait_change: float + throughput_change: float + ns_queue: float + ew_queue: float + ns_wait: float + ew_wait: float + dominant_flow: str + boundary_queue_total: float + boundary_wait_total: float + spillback_risk: bool + incident_flag: bool + construction_flag: bool + overload_flag: bool + event_flag: bool + top_congested_intersections: list[CongestedIntersection] = field(default_factory=list) + candidate_intersections: list[CandidateIntersection] = field(default_factory=list) + + def validate(self) -> "DistrictStateSummary": + if self.dominant_flow not in DOMINANT_FLOWS: + raise ValueError( + f"Invalid dominant_flow '{self.dominant_flow}'. Expected one of {DOMINANT_FLOWS}." + ) + self.top_congested_intersections = list(self.top_congested_intersections[:5]) + self.candidate_intersections = list(self.candidate_intersections[:8]) + return self + + def candidate_ids(self) -> list[str]: + self.validate() + return [item.intersection_id for item in self.candidate_intersections] + + def candidate_lookup(self) -> dict[str, CandidateIntersection]: + self.validate() + return { + item.intersection_id: item + for item in self.candidate_intersections + } + + def to_dict(self) -> dict[str, Any]: + self.validate() + return { + "city_id": self.city_id, + "district_id": self.district_id, + "district_type": self.district_type, + "scenario_name": self.scenario_name, + "scenario_type": self.scenario_type, + "decision_step": int(self.decision_step), + "sim_time": int(self.sim_time), + "intersection_count": int(self.intersection_count), + "avg_queue": _round_float(self.avg_queue), + "max_queue": _round_float(self.max_queue), + "total_queue": _round_float(self.total_queue), + "avg_wait": _round_float(self.avg_wait), + "max_wait": _round_float(self.max_wait), + "total_wait": _round_float(self.total_wait), + "avg_outgoing_load": _round_float(self.avg_outgoing_load), + "max_outgoing_load": _round_float(self.max_outgoing_load), + "total_outgoing_load": _round_float(self.total_outgoing_load), + "recent_throughput": _round_float(self.recent_throughput), + "queue_change": _round_float(self.queue_change), + "wait_change": _round_float(self.wait_change), + "throughput_change": _round_float(self.throughput_change), + "ns_queue": _round_float(self.ns_queue), + "ew_queue": _round_float(self.ew_queue), + "ns_wait": _round_float(self.ns_wait), + "ew_wait": _round_float(self.ew_wait), + "dominant_flow": self.dominant_flow, + "boundary_queue_total": _round_float(self.boundary_queue_total), + "boundary_wait_total": _round_float(self.boundary_wait_total), + "spillback_risk": bool(self.spillback_risk), + "incident_flag": bool(self.incident_flag), + "construction_flag": bool(self.construction_flag), + "overload_flag": bool(self.overload_flag), + "event_flag": bool(self.event_flag), + "top_congested_intersections": [ + item.to_dict() for item in self.top_congested_intersections + ], + "candidate_intersections": [ + item.to_dict() for item in self.candidate_intersections + ], + } + + def to_json(self) -> str: + return json.dumps(self.to_dict(), sort_keys=True, separators=(",", ":")) + + def to_prompt_text(self) -> str: + self.validate() + top_lines = [item.to_prompt_line() for item in self.top_congested_intersections] + candidate_lines = [item.to_prompt_line() for item in self.candidate_intersections] + if not top_lines: + top_lines = ["- none"] + if not candidate_lines: + candidate_lines = ["- none"] + return "\n".join( + [ + f"city_id: {self.city_id}", + f"district_id: {self.district_id}", + f"district_type: {self.district_type}", + f"scenario: {self.scenario_name}", + f"scenario_type: {self.scenario_type}", + f"decision_step: {self.decision_step}", + f"sim_time: {self.sim_time}", + f"intersection_count: {self.intersection_count}", + f"avg_queue: {self.avg_queue:.2f}", + f"max_queue: {self.max_queue:.2f}", + f"total_queue: {self.total_queue:.2f}", + f"avg_wait: {self.avg_wait:.2f}", + f"max_wait: {self.max_wait:.2f}", + f"total_wait: {self.total_wait:.2f}", + f"avg_outgoing_load: {self.avg_outgoing_load:.2f}", + f"max_outgoing_load: {self.max_outgoing_load:.2f}", + f"total_outgoing_load: {self.total_outgoing_load:.2f}", + f"recent_throughput: {self.recent_throughput:.2f}", + f"queue_change: {self.queue_change:.2f}", + f"wait_change: {self.wait_change:.2f}", + f"throughput_change: {self.throughput_change:.2f}", + f"ns_queue: {self.ns_queue:.2f}", + f"ew_queue: {self.ew_queue:.2f}", + f"ns_wait: {self.ns_wait:.2f}", + f"ew_wait: {self.ew_wait:.2f}", + f"dominant_flow: {self.dominant_flow}", + f"boundary_queue_total: {self.boundary_queue_total:.2f}", + f"boundary_wait_total: {self.boundary_wait_total:.2f}", + f"spillback_risk: {int(self.spillback_risk)}", + f"incident_flag: {int(self.incident_flag)}", + f"construction_flag: {int(self.construction_flag)}", + f"overload_flag: {int(self.overload_flag)}", + f"event_flag: {int(self.event_flag)}", + "top_congested_intersections:", + *top_lines, + "candidate_intersections:", + *candidate_lines, + ] + ) diff --git a/district_llm/summary_builder.py b/district_llm/summary_builder.py new file mode 100644 index 0000000000000000000000000000000000000000..f1e08a9b538ba5029cdaca109869aa95e868b483 --- /dev/null +++ b/district_llm/summary_builder.py @@ -0,0 +1,413 @@ +from __future__ import annotations + +from dataclasses import dataclass +from pathlib import Path +from typing import Any + +import numpy as np + +from district_llm.schema import CandidateIntersection, CongestedIntersection, DistrictStateSummary, candidate_priority_score +from env.utils import load_json + + +@dataclass +class _SummaryContext: + previous_summaries: dict[str, DistrictStateSummary] + previous_finished_vehicles: int + + +class DistrictStateSummaryBuilder: + def __init__(self, top_k: int = 3, candidate_limit: int = 6): + self.top_k = int(top_k) + self.candidate_limit = int(candidate_limit) + self._context = _SummaryContext(previous_summaries={}, previous_finished_vehicles=0) + self._scenario_metadata: dict[str, Any] | None = None + self._road_endpoints: dict[str, tuple[str, str]] | None = None + self._incident_intersections: set[str] = set() + + def reset(self) -> None: + self._context = _SummaryContext(previous_summaries={}, previous_finished_vehicles=0) + self._scenario_metadata = None + self._road_endpoints = None + self._incident_intersections = set() + + def build_all(self, env, observation_batch: dict[str, Any]) -> dict[str, DistrictStateSummary]: + if self._scenario_metadata is None: + metadata_path = Path(env.scenario_dir) / "scenario_metadata.json" + self._scenario_metadata = load_json(metadata_path) if metadata_path.exists() else {} + self._road_endpoints = self._load_road_endpoints(Path(env.roadnet_path)) + self._incident_intersections = self._derive_incident_intersections() + + lane_vehicle_count = env.adapter.get_lane_vehicle_count() + finished_vehicles = int(env.adapter.get_finished_vehicle_count()) + district_summaries: dict[str, DistrictStateSummary] = {} + + for district_id in env.districts: + district_summaries[district_id] = self._build_single( + env=env, + observation_batch=observation_batch, + lane_vehicle_count=lane_vehicle_count, + district_id=district_id, + finished_vehicles=finished_vehicles, + ) + + self._context.previous_summaries = district_summaries + self._context.previous_finished_vehicles = finished_vehicles + return district_summaries + + def _build_single( + self, + env, + observation_batch: dict[str, Any], + lane_vehicle_count: dict[str, int], + district_id: str, + finished_vehicles: int, + ) -> DistrictStateSummary: + district = env.districts[district_id] + scenario_metadata = self._scenario_metadata or {} + intersection_ids = observation_batch["intersection_ids"] + district_ids = observation_batch["district_ids"] + incoming_counts = observation_batch["incoming_counts"] + incoming_waiting = observation_batch["incoming_waiting"] + current_phase = observation_batch["current_phase"] + + queue_totals: list[float] = [] + wait_totals: list[float] = [] + outgoing_loads: list[float] = [] + ns_queue = 0.0 + ew_queue = 0.0 + ns_wait = 0.0 + ew_wait = 0.0 + boundary_queue_total = 0.0 + boundary_wait_total = 0.0 + congestion_items: list[CongestedIntersection] = [] + candidate_seed_items: list[dict[str, Any]] = [] + + for index, intersection_id in enumerate(intersection_ids): + if district_ids[index] != district_id: + continue + + queue_total = float(np.asarray(incoming_counts[index], dtype=np.float32).sum()) + wait_total = float(np.asarray(incoming_waiting[index], dtype=np.float32).sum()) + outgoing_load = self._compute_outgoing_load( + env=env, + lane_vehicle_count=lane_vehicle_count, + intersection_id=intersection_id, + ) + queue_totals.append(queue_total) + wait_totals.append(wait_total) + outgoing_loads.append(outgoing_load) + + midpoint = incoming_counts.shape[1] // 2 + ns_queue_local = float(np.asarray(incoming_counts[index][:midpoint], dtype=np.float32).sum()) + ew_queue_local = float(np.asarray(incoming_counts[index][midpoint:], dtype=np.float32).sum()) + ns_wait_local = float(np.asarray(incoming_waiting[index][:midpoint], dtype=np.float32).sum()) + ew_wait_local = float(np.asarray(incoming_waiting[index][midpoint:], dtype=np.float32).sum()) + ns_queue += ns_queue_local + ew_queue += ew_queue_local + ns_wait += ns_wait_local + ew_wait += ew_wait_local + + intersection_config = env.intersections[intersection_id] + if intersection_config.is_boundary: + boundary_queue_total += queue_total + boundary_wait_total += wait_total + + congestion_items.append( + CongestedIntersection( + intersection_id=intersection_id, + queue_total=queue_total, + wait_total=wait_total, + outgoing_load=outgoing_load, + current_phase=int(current_phase[index]), + is_boundary=bool(intersection_config.is_boundary), + ) + ) + candidate_seed_items.append( + { + "intersection_id": intersection_id, + "queue_total": queue_total, + "wait_total": wait_total, + "outgoing_load": outgoing_load, + "current_phase": int(current_phase[index]), + "is_boundary": bool(intersection_config.is_boundary), + "spillback_risk": bool( + outgoing_load >= max(6.0, queue_total * 0.6) + or ( + intersection_config.is_boundary + and outgoing_load >= max(4.0, queue_total * 0.4) + ) + ), + "incident_proximity": intersection_id in self._incident_intersections, + "corridor_alignment": self._compute_corridor_alignment( + ns_queue=ns_queue_local, + ew_queue=ew_queue_local, + ns_wait=ns_wait_local, + ew_wait=ew_wait_local, + ), + } + ) + + queue_array = np.asarray(queue_totals or [0.0], dtype=np.float32) + wait_array = np.asarray(wait_totals or [0.0], dtype=np.float32) + outgoing_array = np.asarray(outgoing_loads or [0.0], dtype=np.float32) + + previous_summary = self._context.previous_summaries.get(district_id) + recent_throughput = float( + finished_vehicles - self._context.previous_finished_vehicles + if self._context.previous_finished_vehicles + else 0.0 + ) + queue_change = 0.0 if previous_summary is None else float(queue_array.sum() - previous_summary.total_queue) + wait_change = 0.0 if previous_summary is None else float(wait_array.sum() - previous_summary.total_wait) + throughput_change = ( + 0.0 + if previous_summary is None + else recent_throughput - previous_summary.recent_throughput + ) + + directional_ns = ns_queue + 1.5 * ns_wait + directional_ew = ew_queue + 1.5 * ew_wait + if directional_ns > directional_ew * 1.1: + dominant_flow = "NS" + elif directional_ew > directional_ns * 1.1: + dominant_flow = "EW" + else: + dominant_flow = "BALANCED" + + boundary_share = boundary_queue_total / max(1.0, float(queue_array.sum())) + spillback_risk = bool( + outgoing_array.max() >= max(8.0, queue_array.max() * 0.5) + or (boundary_share >= 0.6 and queue_change >= 0.0) + ) + + top_intersections = sorted( + congestion_items, + key=lambda item: (item.queue_total + 1.5 * item.wait_total + 0.5 * item.outgoing_load), + reverse=True, + )[: self.top_k] + + overload_flag = bool( + scenario_metadata.get("overload_district") == district_id + or (scenario_metadata.get("name") == "district_overload" and queue_array.sum() >= 25.0) + ) + event_flag = bool(scenario_metadata.get("event_district") == district_id) + incident_flag = bool( + scenario_metadata.get("name") in {"accident", "construction"} + or bool(scenario_metadata.get("blocked_roads")) + ) + construction_flag = bool(scenario_metadata.get("name") == "construction") + candidate_intersections = self._build_candidate_intersections( + candidate_seed_items=candidate_seed_items, + overload_flag=overload_flag, + event_flag=event_flag, + ) + + return DistrictStateSummary( + city_id=env.city_id, + district_id=district_id, + district_type=district.district_type, + scenario_name=env.scenario_name, + scenario_type=str(scenario_metadata.get("intensity", env.scenario_name)), + decision_step=int(observation_batch["decision_step"]), + sim_time=int(observation_batch["sim_time"]), + intersection_count=int(len(district.intersection_ids)), + avg_queue=float(queue_array.mean()), + max_queue=float(queue_array.max()), + total_queue=float(queue_array.sum()), + avg_wait=float(wait_array.mean()), + max_wait=float(wait_array.max()), + total_wait=float(wait_array.sum()), + avg_outgoing_load=float(outgoing_array.mean()), + max_outgoing_load=float(outgoing_array.max()), + total_outgoing_load=float(outgoing_array.sum()), + recent_throughput=recent_throughput, + queue_change=queue_change, + wait_change=wait_change, + throughput_change=throughput_change, + ns_queue=ns_queue, + ew_queue=ew_queue, + ns_wait=ns_wait, + ew_wait=ew_wait, + dominant_flow=dominant_flow, + boundary_queue_total=boundary_queue_total, + boundary_wait_total=boundary_wait_total, + spillback_risk=spillback_risk, + incident_flag=incident_flag, + construction_flag=construction_flag, + overload_flag=overload_flag, + event_flag=event_flag, + top_congested_intersections=top_intersections, + candidate_intersections=candidate_intersections, + ).validate() + + @staticmethod + def _compute_outgoing_load(env, lane_vehicle_count: dict[str, int], intersection_id: str) -> float: + intersection_config = env.intersections[intersection_id] + if not intersection_config.outgoing_lanes: + return 0.0 + return float( + sum(float(lane_vehicle_count.get(lane_id, 0)) for lane_id in intersection_config.outgoing_lanes) + ) + + @staticmethod + def _compute_corridor_alignment( + ns_queue: float, + ew_queue: float, + ns_wait: float, + ew_wait: float, + ) -> str: + ns_pressure = ns_queue + 1.5 * ns_wait + ew_pressure = ew_queue + 1.5 * ew_wait + if ns_pressure > ew_pressure * 1.1: + return "NS" + if ew_pressure > ns_pressure * 1.1: + return "EW" + return "BALANCED" + + @staticmethod + def _load_road_endpoints(roadnet_path: Path) -> dict[str, tuple[str, str]]: + roadnet = load_json(roadnet_path) + return { + str(road["id"]): ( + str(road["startIntersection"]), + str(road["endIntersection"]), + ) + for road in roadnet.get("roads", []) + } + + def _derive_incident_intersections(self) -> set[str]: + if not self._road_endpoints: + return set() + scenario_metadata = self._scenario_metadata or {} + details = scenario_metadata.get("details", {}) + incident_roads = list(scenario_metadata.get("blocked_roads", [])) + incident_roads.extend(details.get("accident_roads", [])) + incident_roads.extend(details.get("construction_roads", [])) + if not incident_roads: + incident_roads.extend(list((scenario_metadata.get("penalized_roads") or {}).keys())) + + intersections: set[str] = set() + for road_id in incident_roads: + endpoints = self._road_endpoints.get(str(road_id)) + if endpoints is None: + continue + intersections.update(endpoints) + return intersections + + def _build_candidate_intersections( + self, + candidate_seed_items: list[dict[str, Any]], + overload_flag: bool, + event_flag: bool, + ) -> list[CandidateIntersection]: + if not candidate_seed_items or self.candidate_limit <= 0: + return [] + + def severity_key(item: dict[str, Any]) -> tuple[float, float, float, float, str]: + candidate = CandidateIntersection( + intersection_id=str(item["intersection_id"]), + queue_total=float(item["queue_total"]), + wait_total=float(item["wait_total"]), + outgoing_load=float(item["outgoing_load"]), + current_phase=int(item["current_phase"]), + is_boundary=bool(item["is_boundary"]), + spillback_risk=bool(item["spillback_risk"]), + incident_proximity=bool(item["incident_proximity"]), + overload_marker=overload_flag, + event_proximity=event_flag, + corridor_alignment=str(item["corridor_alignment"]), + selection_reasons=[], + ) + return ( + candidate_priority_score(candidate), + float(item["queue_total"]), + float(item["wait_total"]), + float(item["outgoing_load"]), + str(item["intersection_id"]), + ) + + overall_sorted = sorted( + candidate_seed_items, + key=lambda item: ( + -severity_key(item)[0], + -severity_key(item)[1], + -severity_key(item)[2], + -severity_key(item)[3], + severity_key(item)[4], + ), + ) + boundary_sorted = [item for item in overall_sorted if item["is_boundary"]] + spillback_sorted = [item for item in overall_sorted if item["spillback_risk"]] + incident_sorted = [item for item in overall_sorted if item["incident_proximity"]] + outgoing_sorted = sorted( + candidate_seed_items, + key=lambda item: ( + -float(item["outgoing_load"]), + -float(item["queue_total"]), + -float(item["wait_total"]), + str(item["intersection_id"]), + ), + ) + + reason_tags: dict[str, set[str]] = {} + selected_ids: list[str] = [] + + def mark(items: list[dict[str, Any]], tag: str, limit: int) -> None: + for item in items[:limit]: + intersection_id = str(item["intersection_id"]) + reason_tags.setdefault(intersection_id, set()).add(tag) + if intersection_id not in selected_ids: + selected_ids.append(intersection_id) + + mark(overall_sorted, "congested", max(1, min(self.top_k, self.candidate_limit))) + mark(boundary_sorted, "boundary", min(2, self.candidate_limit)) + mark(spillback_sorted, "spillback", min(2, self.candidate_limit)) + mark(incident_sorted, "incident", min(2, self.candidate_limit)) + mark(outgoing_sorted, "outgoing", min(2, self.candidate_limit)) + if overload_flag: + mark(overall_sorted, "overload", min(2, self.candidate_limit)) + if event_flag: + event_seed = boundary_sorted if boundary_sorted else outgoing_sorted + mark(event_seed, "event", min(2, self.candidate_limit)) + + for item in overall_sorted: + if len(selected_ids) >= self.candidate_limit: + break + intersection_id = str(item["intersection_id"]) + if intersection_id in selected_ids: + continue + selected_ids.append(intersection_id) + reason_tags.setdefault(intersection_id, {"congested"}) + + seed_lookup = { + str(item["intersection_id"]): item + for item in candidate_seed_items + } + candidates = [ + CandidateIntersection( + intersection_id=intersection_id, + queue_total=float(seed_lookup[intersection_id]["queue_total"]), + wait_total=float(seed_lookup[intersection_id]["wait_total"]), + outgoing_load=float(seed_lookup[intersection_id]["outgoing_load"]), + current_phase=int(seed_lookup[intersection_id]["current_phase"]), + is_boundary=bool(seed_lookup[intersection_id]["is_boundary"]), + spillback_risk=bool(seed_lookup[intersection_id]["spillback_risk"]), + incident_proximity=bool(seed_lookup[intersection_id]["incident_proximity"]), + overload_marker=overload_flag, + event_proximity=event_flag, + corridor_alignment=str(seed_lookup[intersection_id]["corridor_alignment"]), + selection_reasons=sorted(reason_tags.get(intersection_id, {"congested"})), + ).validate() + for intersection_id in selected_ids[: self.candidate_limit] + ] + return sorted( + candidates, + key=lambda item: ( + -candidate_priority_score(item), + -item.queue_total, + -item.wait_total, + -item.outgoing_load, + item.intersection_id, + ), + ) diff --git a/district_llm/teachers.py b/district_llm/teachers.py new file mode 100644 index 0000000000000000000000000000000000000000..84e7a4eb1761090eac01587cdfb38111d8cd1831 --- /dev/null +++ b/district_llm/teachers.py @@ -0,0 +1,227 @@ +from __future__ import annotations + +import json +from abc import ABC, abstractmethod +from dataclasses import dataclass +from pathlib import Path +from typing import Any + +import numpy as np + +from agents.local_policy import ( + BaseLocalPolicy, + FixedCyclePolicy, + HoldPhasePolicy, + QueueGreedyPolicy, + RandomPhasePolicy, +) + + +BASELINE_TYPES: tuple[str, ...] = ("hold", "fixed", "random", "queue_greedy") + + +@dataclass(frozen=True) +class TeacherMetadata: + controller_type: str + controller_id: str + controller_family: str + teacher_algorithm: str + checkpoint_path: str | None = None + + def to_dict(self) -> dict[str, Any]: + return { + "controller_type": self.controller_type, + "controller_id": self.controller_id, + "controller_family": self.controller_family, + "teacher_algorithm": self.teacher_algorithm, + "checkpoint_path": self.checkpoint_path, + } + + +class BaseTeacher(ABC): + def __init__(self, metadata: TeacherMetadata): + self.metadata = metadata + + @property + def env_config(self) -> Any | None: + return None + + @abstractmethod + def act(self, observation_batch: dict[str, Any]) -> np.ndarray: + raise NotImplementedError + + +class BaselineTeacher(BaseTeacher): + def __init__(self, policy: BaseLocalPolicy, metadata: TeacherMetadata): + super().__init__(metadata=metadata) + self.policy = policy + + def act(self, observation_batch: dict[str, Any]) -> np.ndarray: + return np.asarray(self.policy.act(observation_batch), dtype=np.int64) + + +class RLCheckpointTeacher(BaseTeacher): + def __init__( + self, + checkpoint_path: str | Path, + device: str | None = None, + deterministic: bool = True, + ): + try: + import torch + except ImportError as exc: + raise ImportError( + "RL checkpoint teachers require PyTorch to be installed." + ) from exc + + from training.models import RunningNormalizer, TrafficControlQNetwork + from training.train_local_policy import load_env_config + + checkpoint_path = Path(checkpoint_path) + self._torch = torch + self.device = torch.device(device or ("cuda" if torch.cuda.is_available() else "cpu")) + self.checkpoint = torch.load( + checkpoint_path, + map_location=self.device, + weights_only=False, + ) + network_architecture = self.checkpoint.get("network_architecture") or self.checkpoint.get( + "policy_architecture", + {}, + ) + trainer_config = self.checkpoint.get("dqn_config", {}) + policy_arch = network_architecture.get( + "policy_arch", + trainer_config.get("policy_arch", "single_head_with_district_feature"), + ) + self.model = TrafficControlQNetwork( + observation_dim=int(network_architecture["observation_dim"]), + action_dim=int(network_architecture.get("action_dim", 2)), + hidden_dim=int(trainer_config.get("hidden_dim", 256)), + num_layers=int(trainer_config.get("hidden_layers", 2)), + district_types=tuple(network_architecture.get("district_types", ())), + policy_arch=policy_arch, + dueling=bool(network_architecture.get("dueling", True)), + ).to(self.device) + self.model.load_state_dict( + self.checkpoint.get("q_network_state_dict") or self.checkpoint["policy_state_dict"] + ) + self.model.eval() + self.obs_normalizer = None + if self.checkpoint.get("obs_normalizer"): + self.obs_normalizer = RunningNormalizer() + self.obs_normalizer.load_state_dict(self.checkpoint["obs_normalizer"]) + + checkpoint_id = checkpoint_path.stem + super().__init__( + metadata=TeacherMetadata( + controller_type="rl_checkpoint", + controller_id=checkpoint_id, + controller_family="dqn", + teacher_algorithm="dqn", + checkpoint_path=str(checkpoint_path), + ) + ) + self.deterministic = bool(deterministic) + self._env_config = ( + load_env_config(self.checkpoint["env_config"]) + if self.checkpoint.get("env_config") + else None + ) + + @property + def env_config(self) -> Any | None: + return self._env_config + + def act(self, observation_batch: dict[str, Any]) -> np.ndarray: + torch = self._torch + raw_obs = observation_batch["observations"].astype(np.float32) + normalized_obs = self.obs_normalizer.normalize(raw_obs) if self.obs_normalizer else raw_obs + obs_tensor = torch.as_tensor(normalized_obs, dtype=torch.float32, device=self.device) + district_type_tensor = torch.as_tensor( + observation_batch["district_type_indices"], + dtype=torch.int64, + device=self.device, + ) + action_mask_tensor = torch.as_tensor( + observation_batch["action_mask"], + dtype=torch.float32, + device=self.device, + ) + with torch.no_grad(): + actions = self.model.act( + observations=obs_tensor, + district_type_indices=district_type_tensor, + action_mask=action_mask_tensor, + deterministic=self.deterministic, + epsilon=0.0, + ) + return actions.cpu().numpy().astype(np.int64) + + +def build_teacher( + controller_type: str, + checkpoint: str | None = None, + fixed_green_time: int = 20, + seed: int = 7, + device: str | None = None, +) -> BaseTeacher: + if controller_type == "rl_checkpoint": + if not checkpoint: + raise ValueError("controller_type='rl_checkpoint' requires --checkpoint.") + return RLCheckpointTeacher(checkpoint_path=checkpoint, device=device) + if controller_type == "hold": + return BaselineTeacher( + policy=HoldPhasePolicy(), + metadata=TeacherMetadata( + controller_type="hold", + controller_id="hold", + controller_family="baseline", + teacher_algorithm="hold", + ), + ) + if controller_type == "fixed": + return BaselineTeacher( + policy=FixedCyclePolicy(green_time=fixed_green_time), + metadata=TeacherMetadata( + controller_type="fixed", + controller_id=f"fixed_{fixed_green_time}", + controller_family="baseline", + teacher_algorithm="fixed_cycle", + ), + ) + if controller_type == "random": + return BaselineTeacher( + policy=RandomPhasePolicy(seed=seed), + metadata=TeacherMetadata( + controller_type="random", + controller_id=f"random_{seed}", + controller_family="baseline", + teacher_algorithm="random", + ), + ) + if controller_type == "queue_greedy": + return BaselineTeacher( + policy=QueueGreedyPolicy(), + metadata=TeacherMetadata( + controller_type="queue_greedy", + controller_id="queue_greedy", + controller_family="baseline", + teacher_algorithm="queue_greedy", + ), + ) + raise ValueError( + f"Unsupported controller_type '{controller_type}'. " + f"Expected rl_checkpoint or one of {BASELINE_TYPES}." + ) + + +def parse_teacher_spec(spec: str) -> tuple[str, str | None]: + if "=" not in spec: + return spec.strip(), None + controller_type, checkpoint_path = spec.split("=", 1) + return controller_type.strip(), checkpoint_path.strip() or None + + +def teachers_metadata_json(teachers: list[BaseTeacher]) -> str: + return json.dumps([teacher.metadata.to_dict() for teacher in teachers], sort_keys=True) diff --git a/district_llm/train_unsloth.py b/district_llm/train_unsloth.py new file mode 100644 index 0000000000000000000000000000000000000000..af1341935ba253efc5ceababa93b5fade2f18e62 --- /dev/null +++ b/district_llm/train_unsloth.py @@ -0,0 +1,129 @@ +from __future__ import annotations + +import argparse +from pathlib import Path + +from district_llm.data import load_jsonl_text_dataset + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description="Supervised fine-tune a district LLM on DQN-derived district traces with Unsloth/QLoRA." + ) + parser.add_argument("--dataset", required=True, help="JSONL dataset with a 'text' field.") + parser.add_argument("--output-dir", required=True) + parser.add_argument("--model-name", default="Qwen/Qwen2.5-7B-Instruct") + parser.add_argument("--max-seq-length", type=int, default=1024) + parser.add_argument("--load-in-4bit", action="store_true") + parser.add_argument("--lora-rank", type=int, default=16) + parser.add_argument("--lora-alpha", type=int, default=16) + parser.add_argument("--lora-dropout", type=float, default=0.0) + parser.add_argument("--batch-size", type=int, default=2) + parser.add_argument("--gradient-accumulation-steps", type=int, default=8) + parser.add_argument("--learning-rate", type=float, default=2e-4) + parser.add_argument("--warmup-steps", type=int, default=50) + parser.add_argument("--max-steps", type=int, default=500) + parser.add_argument("--logging-steps", type=int, default=10) + parser.add_argument("--save-steps", type=int, default=100) + parser.add_argument("--seed", type=int, default=7) + parser.add_argument("--dataset-num-proc", type=int, default=2) + parser.add_argument("--eval-dataset", default=None) + parser.add_argument("--resume-from-checkpoint", default=None) + parser.add_argument( + "--include-non-dqn-sources", + action="store_true", + help="By default the trainer keeps only DQN-derived rows (controller_family=dqn).", + ) + return parser.parse_args() + + +def main() -> None: + args = parse_args() + + try: + import torch + from trl import SFTTrainer + from transformers import TrainingArguments + from unsloth import FastLanguageModel + except ImportError as exc: + raise ImportError( + "District LLM training requires 'unsloth' and 'trl'. " + "Install them in the active environment before running this entry point." + ) from exc + + controller_families = None if args.include_non_dqn_sources else ["dqn"] + train_dataset = load_jsonl_text_dataset( + args.dataset, + controller_families=controller_families, + ) + eval_dataset = ( + load_jsonl_text_dataset( + args.eval_dataset, + controller_families=controller_families, + ) + if args.eval_dataset + else None + ) + output_dir = Path(args.output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + + model, tokenizer = FastLanguageModel.from_pretrained( + model_name=args.model_name, + max_seq_length=args.max_seq_length, + dtype=None, + load_in_4bit=bool(args.load_in_4bit), + ) + model = FastLanguageModel.get_peft_model( + model, + r=args.lora_rank, + target_modules=[ + "q_proj", + "k_proj", + "v_proj", + "o_proj", + "gate_proj", + "up_proj", + "down_proj", + ], + lora_alpha=args.lora_alpha, + lora_dropout=args.lora_dropout, + bias="none", + use_gradient_checkpointing="unsloth", + random_state=args.seed, + ) + + trainer = SFTTrainer( + model=model, + tokenizer=tokenizer, + train_dataset=train_dataset, + eval_dataset=eval_dataset, + dataset_text_field="text", + max_seq_length=args.max_seq_length, + dataset_num_proc=args.dataset_num_proc, + packing=False, + args=TrainingArguments( + output_dir=str(output_dir), + per_device_train_batch_size=args.batch_size, + gradient_accumulation_steps=args.gradient_accumulation_steps, + warmup_steps=args.warmup_steps, + max_steps=args.max_steps, + learning_rate=args.learning_rate, + logging_steps=args.logging_steps, + save_steps=args.save_steps, + bf16=bool(torch.cuda.is_available() and torch.cuda.is_bf16_supported()), + fp16=bool(torch.cuda.is_available() and not torch.cuda.is_bf16_supported()), + optim="paged_adamw_8bit", + lr_scheduler_type="cosine", + seed=args.seed, + report_to="none", + evaluation_strategy="steps" if eval_dataset is not None else "no", + eval_steps=args.save_steps if eval_dataset is not None else None, + ), + ) + trainer.train(resume_from_checkpoint=args.resume_from_checkpoint) + model.save_pretrained(str(output_dir)) + tokenizer.save_pretrained(str(output_dir)) + + +if __name__ == "__main__": + main() diff --git a/env/README.md b/env/README.md new file mode 100644 index 0000000000000000000000000000000000000000..09570bee6b2c1b3f2174b5aee3548446eb7c6ad4 --- /dev/null +++ b/env/README.md @@ -0,0 +1,43 @@ +# env + +CityFlow environment implementation for intersection-level RL with district-type metadata. + +## Main files + +- [traffic_env.py](/Users/aditya/Developer/traffic-llm/env/traffic_env.py) + Main environment. One episode corresponds to one `(city, scenario)` pair. +- [cityflow_adapter.py](/Users/aditya/Developer/traffic-llm/env/cityflow_adapter.py) + Thin wrapper around the CityFlow Python engine. +- [observation_builder.py](/Users/aditya/Developer/traffic-llm/env/observation_builder.py) + Converts variable city topology into fixed-size per-intersection tensors. +- [reward.py](/Users/aditya/Developer/traffic-llm/env/reward.py) + Configurable local reward calculation. +- [utils.py](/Users/aditya/Developer/traffic-llm/env/utils.py) + Topology parsing and helper functions. +- [intersection_config.py](/Users/aditya/Developer/traffic-llm/env/intersection_config.py) + Internal topology dataclasses. + +## How it works + +- Reads `roadnet.json`, `district_map.json`, and district types from `metadata.json`. +- Identifies non-virtual controllable intersections with at least two green phases. +- Uses one action per controllable intersection. +- Enforces `min_green_time` inside the environment. +- Advances CityFlow for `decision_interval` simulator steps between policy decisions. +- Returns a batched observation for all controlled intersections. + +## Observation model + +Per intersection: + +- padded incoming lane vehicle counts +- padded incoming lane waiting counts +- incoming lane mask +- current green phase index +- elapsed time in current phase +- optional outgoing congestion summary +- district-type one-hot features +- optional small district context +- boundary-intersection indicator + +The observation dimension is exposed as `TrafficEnv.observation_dim`. diff --git a/env/__init__.py b/env/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a5b882a307ab0530659e92cf218dc581ced30824 --- /dev/null +++ b/env/__init__.py @@ -0,0 +1,18 @@ +from env.intersection_config import DistrictConfig, IntersectionConfig, PhaseConfig +from env.observation_builder import ObservationBuilder, ObservationConfig +from env.reward import RewardCalculator, RewardConfig +from env.traffic_env import EnvConfig, TrafficEnv +from env.utils import build_topology + +__all__ = [ + "DistrictConfig", + "EnvConfig", + "IntersectionConfig", + "ObservationBuilder", + "ObservationConfig", + "PhaseConfig", + "RewardCalculator", + "RewardConfig", + "TrafficEnv", + "build_topology", +] diff --git a/env/cityflow_adapter.py b/env/cityflow_adapter.py new file mode 100644 index 0000000000000000000000000000000000000000..c8310770ae29c49539fae0732da0299ac3b0076b --- /dev/null +++ b/env/cityflow_adapter.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from pathlib import Path +from typing import Any + + +class CityFlowAdapter: + def __init__(self, config_path: str | Path, thread_num: int = 1): + self.config_path = str(config_path) + self.thread_num = int(thread_num) + self.engine = None + self._phase_cache: dict[str, int] = {} + self._active_vehicle_ids: set[str] = set() + self._finished_vehicle_ids: set[str] = set() + + def reset(self) -> None: + try: + import cityflow + except ImportError as exc: + raise RuntimeError( + "CityFlow is not installed. Install the CityFlow Python bindings " + "before running smoke tests, training, or evaluation." + ) from exc + + self.engine = cityflow.Engine(self.config_path, thread_num=self.thread_num) + self._phase_cache.clear() + self._active_vehicle_ids = self._fetch_active_vehicle_ids() + self._finished_vehicle_ids.clear() + + def step(self) -> None: + self._require_engine() + self.engine.next_step() + current_vehicle_ids = self._fetch_active_vehicle_ids() + self._finished_vehicle_ids.update(self._active_vehicle_ids - current_vehicle_ids) + self._active_vehicle_ids = current_vehicle_ids + + def set_tl_phase(self, intersection_id: str, phase: int) -> None: + self._require_engine() + self.engine.set_tl_phase(intersection_id, int(phase)) + self._phase_cache[intersection_id] = int(phase) + + def get_tl_phase(self, intersection_id: str) -> int: + self._require_engine() + if hasattr(self.engine, "get_tl_phase"): + phase = int(self.engine.get_tl_phase(intersection_id)) + self._phase_cache[intersection_id] = phase + return phase + return int(self._phase_cache.get(intersection_id, 0)) + + def get_lane_vehicle_count(self) -> dict[str, int]: + self._require_engine() + return { + lane_id: int(count) + for lane_id, count in self.engine.get_lane_vehicle_count().items() + } + + def get_lane_waiting_vehicle_count(self) -> dict[str, int]: + self._require_engine() + return { + lane_id: int(count) + for lane_id, count in self.engine.get_lane_waiting_vehicle_count().items() + } + + def get_current_time(self) -> int: + self._require_engine() + return int(self.engine.get_current_time()) + + def get_vehicle_count(self) -> int: + self._require_engine() + if hasattr(self.engine, "get_vehicle_count"): + return int(self.engine.get_vehicle_count()) + return len(self._active_vehicle_ids) + + def get_average_travel_time(self) -> float | None: + self._require_engine() + if hasattr(self.engine, "get_average_travel_time"): + return float(self.engine.get_average_travel_time()) + return None + + def get_finished_vehicle_count(self) -> int: + self._require_engine() + if hasattr(self.engine, "get_finished_vehicle_count"): + return int(self.engine.get_finished_vehicle_count()) + return len(self._finished_vehicle_ids) + + def get_active_vehicle_ids(self) -> set[str]: + return set(self._active_vehicle_ids) + + def _fetch_active_vehicle_ids(self) -> set[str]: + if self.engine is None or not hasattr(self.engine, "get_vehicles"): + return set() + + vehicles = self.engine.get_vehicles() + if isinstance(vehicles, dict): + return set(vehicles.keys()) + return set(vehicles) + + def _require_engine(self) -> None: + if self.engine is None: + raise RuntimeError( + "CityFlow engine has not been initialized. Call reset() before use." + ) diff --git a/env/district_summary.py b/env/district_summary.py new file mode 100644 index 0000000000000000000000000000000000000000..94956434666216923254c9412bc04ac7b4878819 --- /dev/null +++ b/env/district_summary.py @@ -0,0 +1,9 @@ +class DistrictSummaryBuilder: + def build(self, adapter, district_config): + waiting = adapter.get_lane_waiting_vehicle_count() + + return { + "district_id": district_config.id, + "intersection_ids": district_config.intersection_ids, + "avg_wait": sum(waiting.values()) / len(waiting), + } diff --git a/env/intersection_config.py b/env/intersection_config.py new file mode 100644 index 0000000000000000000000000000000000000000..7d465912adca18557957a2261336bd0ed63fe25b --- /dev/null +++ b/env/intersection_config.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +from dataclasses import dataclass + +DISTRICT_TYPES: tuple[str, ...] = ( + "residential", + "commercial", + "industrial", + "mixed", +) +DISTRICT_TYPE_TO_INDEX: dict[str, int] = { + district_type: index for index, district_type in enumerate(DISTRICT_TYPES) +} +DEFAULT_DISTRICT_TYPE = "mixed" + + +@dataclass(frozen=True) +class PhaseConfig: + engine_phase_index: int + available_road_links: tuple[int, ...] + incoming_lanes_served: tuple[str, ...] + outgoing_lanes_served: tuple[str, ...] + + +@dataclass(frozen=True) +class IntersectionConfig: + intersection_id: str + district_id: str + district_type: str + district_type_index: int + incoming_lanes: tuple[str, ...] + outgoing_lanes: tuple[str, ...] + is_boundary: bool + green_phases: tuple[PhaseConfig, ...] + all_phase_indices: tuple[int, ...] + initial_engine_phase_index: int + + @property + def num_green_phases(self) -> int: + return len(self.green_phases) + + +@dataclass(frozen=True) +class DistrictConfig: + district_id: str + district_type: str + district_type_index: int + intersection_ids: tuple[str, ...] + neighbor_districts: tuple[str, ...] diff --git a/env/observation_builder.py b/env/observation_builder.py new file mode 100644 index 0000000000000000000000000000000000000000..339ac3263c5e801d7b0b5337ddad38b997cec61b --- /dev/null +++ b/env/observation_builder.py @@ -0,0 +1,224 @@ +from __future__ import annotations + +from dataclasses import dataclass + +import numpy as np + +from env.intersection_config import DistrictConfig, IntersectionConfig +from env.utils import normalize_scalar + + +@dataclass(frozen=True) +class ObservationConfig: + max_incoming_lanes: int = 16 + count_scale: float = 20.0 + elapsed_time_scale: float = 60.0 + include_outgoing_congestion: bool = True + include_district_context: bool = True + include_district_type_feature: bool = True + + +class ObservationBuilder: + def __init__( + self, + intersections: dict[str, IntersectionConfig], + districts: dict[str, DistrictConfig], + config: ObservationConfig | None = None, + ): + self.intersections = intersections + self.districts = districts + self.config = config or ObservationConfig() + self.intersection_ids = tuple(sorted(intersections)) + self._district_lookup = { + intersection_id: intersections[intersection_id].district_id + for intersection_id in self.intersection_ids + } + self._district_sizes = { + district_id: max(1, len(district.intersection_ids)) + for district_id, district in districts.items() + } + self.observation_dim = self._compute_observation_dim() + + def build( + self, + lane_vehicle_count: dict[str, int], + lane_waiting_count: dict[str, int], + phase_positions: dict[str, int], + phase_elapsed_times: dict[str, int], + switch_allowed: dict[str, bool], + ) -> dict[str, np.ndarray | tuple[str, ...]]: + district_context = self._compute_district_context( + lane_vehicle_count=lane_vehicle_count, + lane_waiting_count=lane_waiting_count, + ) + + num_intersections = len(self.intersection_ids) + max_lanes = self.config.max_incoming_lanes + + observations = np.zeros( + (num_intersections, self.observation_dim), + dtype=np.float32, + ) + incoming_counts = np.zeros((num_intersections, max_lanes), dtype=np.float32) + incoming_waiting = np.zeros((num_intersections, max_lanes), dtype=np.float32) + lane_mask = np.zeros((num_intersections, max_lanes), dtype=np.float32) + action_mask = np.ones((num_intersections, 2), dtype=np.float32) + current_phase = np.zeros(num_intersections, dtype=np.int64) + phase_elapsed = np.zeros(num_intersections, dtype=np.float32) + outgoing_congestion = np.zeros(num_intersections, dtype=np.float32) + district_type_indices = np.zeros(num_intersections, dtype=np.int64) + boundary_mask = np.zeros(num_intersections, dtype=np.float32) + + for row_index, intersection_id in enumerate(self.intersection_ids): + config = self.intersections[intersection_id] + lane_count_vector, waiting_vector, mask_vector = self._lane_vectors( + config=config, + lane_vehicle_count=lane_vehicle_count, + lane_waiting_count=lane_waiting_count, + ) + incoming_counts[row_index] = lane_count_vector + incoming_waiting[row_index] = waiting_vector + lane_mask[row_index] = mask_vector + + phase_index = int(phase_positions[intersection_id]) + phase_time = float(phase_elapsed_times[intersection_id]) + phase_count = max(1, config.num_green_phases) + current_phase[row_index] = phase_index + phase_elapsed[row_index] = phase_time + district_type_indices[row_index] = config.district_type_index + boundary_mask[row_index] = 1.0 if config.is_boundary else 0.0 + + next_col = 0 + observations[row_index, next_col : next_col + max_lanes] = ( + lane_count_vector / self.config.count_scale + ) + next_col += max_lanes + observations[row_index, next_col : next_col + max_lanes] = ( + waiting_vector / self.config.count_scale + ) + next_col += max_lanes + observations[row_index, next_col : next_col + max_lanes] = mask_vector + next_col += max_lanes + + if self.config.include_outgoing_congestion: + outgoing_congestion[row_index] = self._mean_outgoing_congestion( + config=config, + lane_vehicle_count=lane_vehicle_count, + ) + + meta_features = [ + normalize_scalar(phase_index, max(1, phase_count - 1)) + if phase_count > 1 + else 0.0, + normalize_scalar(phase_time, self.config.elapsed_time_scale), + normalize_scalar(float(outgoing_congestion[row_index]), self.config.count_scale), + normalize_scalar(float(lane_count_vector.sum()), self.config.count_scale), + normalize_scalar(float(phase_count), 4.0), + 1.0 if switch_allowed[intersection_id] else 0.0, + boundary_mask[row_index], + ] + observations[row_index, next_col : next_col + len(meta_features)] = meta_features + next_col += len(meta_features) + + if self.config.include_district_type_feature: + observations[row_index, next_col + config.district_type_index] = 1.0 + next_col += 4 + + if self.config.include_district_context: + district_values = district_context.get( + config.district_id, + (0.0, 0.0), + ) + observations[row_index, next_col : next_col + len(district_values)] = district_values + + if not switch_allowed[intersection_id]: + action_mask[row_index, 1] = 0.0 + + return { + "observations": observations, + "incoming_counts": incoming_counts, + "incoming_waiting": incoming_waiting, + "lane_mask": lane_mask, + "action_mask": action_mask, + "current_phase": current_phase, + "phase_elapsed": phase_elapsed, + "outgoing_congestion": outgoing_congestion, + "boundary_mask": boundary_mask, + "district_type_indices": district_type_indices, + "district_types": tuple( + self.intersections[intersection_id].district_type + for intersection_id in self.intersection_ids + ), + "district_ids": tuple( + self.intersections[intersection_id].district_id + for intersection_id in self.intersection_ids + ), + "intersection_ids": self.intersection_ids, + } + + def _compute_observation_dim(self) -> int: + base_dim = self.config.max_incoming_lanes * 3 + 7 + if self.config.include_district_type_feature: + base_dim += 4 + if self.config.include_district_context: + base_dim += 2 + return base_dim + + def _lane_vectors( + self, + config: IntersectionConfig, + lane_vehicle_count: dict[str, int], + lane_waiting_count: dict[str, int], + ) -> tuple[np.ndarray, np.ndarray, np.ndarray]: + max_lanes = self.config.max_incoming_lanes + count_vector = np.zeros(max_lanes, dtype=np.float32) + waiting_vector = np.zeros(max_lanes, dtype=np.float32) + mask_vector = np.zeros(max_lanes, dtype=np.float32) + + for lane_index, lane_id in enumerate(config.incoming_lanes[:max_lanes]): + count_vector[lane_index] = float(lane_vehicle_count.get(lane_id, 0)) + waiting_vector[lane_index] = float(lane_waiting_count.get(lane_id, 0)) + mask_vector[lane_index] = 1.0 + + return count_vector, waiting_vector, mask_vector + + def _mean_outgoing_congestion( + self, + config: IntersectionConfig, + lane_vehicle_count: dict[str, int], + ) -> float: + if not config.outgoing_lanes: + return 0.0 + total = sum(float(lane_vehicle_count.get(lane_id, 0)) for lane_id in config.outgoing_lanes) + return total / float(len(config.outgoing_lanes)) + + def _compute_district_context( + self, + lane_vehicle_count: dict[str, int], + lane_waiting_count: dict[str, int], + ) -> dict[str, tuple[float, float]]: + context: dict[str, tuple[float, float]] = {} + if not self.config.include_district_context: + return context + + for district_id, district in self.districts.items(): + total_count = 0.0 + total_waiting = 0.0 + for intersection_id in district.intersection_ids: + config = self.intersections[intersection_id] + total_count += sum( + float(lane_vehicle_count.get(lane_id, 0)) + for lane_id in config.incoming_lanes + ) + total_waiting += sum( + float(lane_waiting_count.get(lane_id, 0)) + for lane_id in config.incoming_lanes + ) + + size = float(self._district_sizes[district_id]) + context[district_id] = ( + normalize_scalar(total_count / size, self.config.count_scale), + normalize_scalar(total_waiting / size, self.config.count_scale), + ) + + return context diff --git a/env/reward.py b/env/reward.py new file mode 100644 index 0000000000000000000000000000000000000000..064e2274bc77000ffd541bbb9911f6e0be9ff63e --- /dev/null +++ b/env/reward.py @@ -0,0 +1,244 @@ +from __future__ import annotations + +from dataclasses import dataclass + +import numpy as np + +REWARD_VARIANTS: tuple[str, ...] = ( + "current", + "normalized_wait_queue", + "wait_queue_throughput", +) + + +@dataclass(frozen=True) +class RewardConfig: + variant: str = "current" + waiting_weight: float = 1.0 + vehicle_weight: float = 0.1 + pressure_weight: float = 0.0 + reward_scale: float = 0.1 + normalize_by_lane_count: bool = True + clip_reward: float | None = 5.0 + queue_delta_weight: float = 2.0 + wait_delta_weight: float = 4.0 + queue_level_weight: float = 0.5 + wait_level_weight: float = 1.0 + throughput_weight: float = 0.1 + imbalance_weight: float = 0.1 + delta_clip: float = 2.0 + level_normalizer: float = 10.0 + throughput_normalizer: float = 2.0 + + +@dataclass(frozen=True) +class RewardBreakdown: + reward: np.ndarray + components: dict[str, np.ndarray] + + +class RewardCalculator: + def __init__(self, config: RewardConfig | None = None): + self.config = config or RewardConfig() + if self.config.variant not in REWARD_VARIANTS: + raise ValueError( + f"Unsupported reward variant: {self.config.variant}. " + f"Expected one of {REWARD_VARIANTS}." + ) + self._prev_queue_norm: np.ndarray | None = None + self._prev_wait_norm: np.ndarray | None = None + self._prev_finished_vehicle_count = 0.0 + + def reset( + self, + incoming_waiting: np.ndarray, + incoming_counts: np.ndarray, + incoming_lane_counts: np.ndarray | None = None, + finished_vehicle_count: float = 0.0, + ) -> None: + queue_norm, wait_norm, _ = self._normalized_state( + incoming_waiting=incoming_waiting, + incoming_counts=incoming_counts, + incoming_lane_counts=incoming_lane_counts, + ) + self._prev_queue_norm = queue_norm + self._prev_wait_norm = wait_norm + self._prev_finished_vehicle_count = float(finished_vehicle_count) + + def compute( + self, + incoming_waiting: np.ndarray, + incoming_counts: np.ndarray, + outgoing_counts: np.ndarray | None = None, + incoming_lane_counts: np.ndarray | None = None, + finished_vehicle_count: float = 0.0, + ) -> np.ndarray: + return self.compute_breakdown( + incoming_waiting=incoming_waiting, + incoming_counts=incoming_counts, + outgoing_counts=outgoing_counts, + incoming_lane_counts=incoming_lane_counts, + finished_vehicle_count=finished_vehicle_count, + ).reward + + def compute_breakdown( + self, + incoming_waiting: np.ndarray, + incoming_counts: np.ndarray, + outgoing_counts: np.ndarray | None = None, + incoming_lane_counts: np.ndarray | None = None, + finished_vehicle_count: float = 0.0, + ) -> RewardBreakdown: + if self.config.variant == "current": + return self._compute_current( + incoming_waiting=incoming_waiting, + incoming_counts=incoming_counts, + outgoing_counts=outgoing_counts, + incoming_lane_counts=incoming_lane_counts, + ) + return self._compute_delta_based( + incoming_waiting=incoming_waiting, + incoming_counts=incoming_counts, + incoming_lane_counts=incoming_lane_counts, + finished_vehicle_count=finished_vehicle_count, + include_throughput=self.config.variant == "wait_queue_throughput", + ) + + def _compute_current( + self, + incoming_waiting: np.ndarray, + incoming_counts: np.ndarray, + outgoing_counts: np.ndarray | None = None, + incoming_lane_counts: np.ndarray | None = None, + ) -> RewardBreakdown: + waiting_total = incoming_waiting.sum(axis=1) + vehicle_total = incoming_counts.sum(axis=1) + normalization = self._lane_normalization(waiting_total.shape[0], incoming_lane_counts) + + components = { + "wait_term": (-self.config.waiting_weight * waiting_total / normalization).astype(np.float32), + "queue_term": (-self.config.vehicle_weight * vehicle_total / normalization).astype(np.float32), + } + if outgoing_counts is not None and self.config.pressure_weight != 0.0: + outgoing_total = outgoing_counts.sum(axis=1) + components["pressure_term"] = ( + self.config.pressure_weight * (outgoing_total - vehicle_total) / normalization + ).astype(np.float32) + components = self._scale_components(components) + reward = self._finalize_reward(components) + return RewardBreakdown(reward=reward, components=components) + + def _compute_delta_based( + self, + incoming_waiting: np.ndarray, + incoming_counts: np.ndarray, + incoming_lane_counts: np.ndarray | None, + finished_vehicle_count: float, + include_throughput: bool, + ) -> RewardBreakdown: + queue_norm, wait_norm, lane_norm = self._normalized_state( + incoming_waiting=incoming_waiting, + incoming_counts=incoming_counts, + incoming_lane_counts=incoming_lane_counts, + ) + + if self._prev_queue_norm is None or self._prev_wait_norm is None: + self._prev_queue_norm = queue_norm.copy() + self._prev_wait_norm = wait_norm.copy() + + queue_delta = np.clip( + self._prev_queue_norm - queue_norm, + -self.config.delta_clip, + self.config.delta_clip, + ).astype(np.float32) + wait_delta = np.clip( + self._prev_wait_norm - wait_norm, + -self.config.delta_clip, + self.config.delta_clip, + ).astype(np.float32) + + components: dict[str, np.ndarray] = { + "queue_term": (self.config.queue_delta_weight * queue_delta).astype(np.float32), + "wait_term": (self.config.wait_delta_weight * wait_delta).astype(np.float32), + "queue_level_term": ( + -self.config.queue_level_weight + * np.clip(queue_norm / self.config.level_normalizer, 0.0, self.config.delta_clip) + ).astype(np.float32), + "wait_level_term": ( + -self.config.wait_level_weight + * np.clip(wait_norm / self.config.level_normalizer, 0.0, self.config.delta_clip) + ).astype(np.float32), + } + + if include_throughput: + num_intersections = max(1, queue_norm.shape[0]) + finished_delta = max( + 0.0, + float(finished_vehicle_count) - self._prev_finished_vehicle_count, + ) + throughput_per_intersection = finished_delta / float(num_intersections) + throughput_term = np.full( + queue_norm.shape, + self.config.throughput_weight + * min(1.0, throughput_per_intersection / self.config.throughput_normalizer), + dtype=np.float32, + ) + imbalance = np.std( + incoming_waiting / lane_norm[:, None], + axis=1, + ).astype(np.float32) + components["throughput_term"] = throughput_term + components["imbalance_term"] = (-self.config.imbalance_weight * imbalance).astype( + np.float32 + ) + + components = self._scale_components(components) + reward = self._finalize_reward(components) + self._prev_queue_norm = queue_norm + self._prev_wait_norm = wait_norm + self._prev_finished_vehicle_count = float(finished_vehicle_count) + return RewardBreakdown(reward=reward, components=components) + + def _normalized_state( + self, + incoming_waiting: np.ndarray, + incoming_counts: np.ndarray, + incoming_lane_counts: np.ndarray | None, + ) -> tuple[np.ndarray, np.ndarray, np.ndarray]: + lane_norm = self._lane_normalization(incoming_counts.shape[0], incoming_lane_counts) + queue_norm = (incoming_counts.sum(axis=1) / lane_norm).astype(np.float32) + wait_norm = (incoming_waiting.sum(axis=1) / lane_norm).astype(np.float32) + return queue_norm, wait_norm, lane_norm + + def _lane_normalization( + self, + batch_size: int, + incoming_lane_counts: np.ndarray | None, + ) -> np.ndarray: + normalization = np.ones(batch_size, dtype=np.float32) + if incoming_lane_counts is not None and self.config.normalize_by_lane_count: + normalization = np.maximum(1.0, incoming_lane_counts.astype(np.float32)) + return normalization + + def _finalize_reward(self, components: dict[str, np.ndarray]) -> np.ndarray: + reward = np.zeros_like(next(iter(components.values())), dtype=np.float32) + for term in components.values(): + reward += term.astype(np.float32) + + if self.config.clip_reward is not None: + reward = np.clip( + reward, + -float(self.config.clip_reward), + float(self.config.clip_reward), + ) + return reward.astype(np.float32) + + def _scale_components( + self, + components: dict[str, np.ndarray], + ) -> dict[str, np.ndarray]: + scale = float(self.config.reward_scale) + return { + name: (values.astype(np.float32) * scale).astype(np.float32) + for name, values in components.items() + } diff --git a/env/scenarios.py b/env/scenarios.py new file mode 100644 index 0000000000000000000000000000000000000000..5eb4659a5845ac04259bc022fe17ff67b034abba --- /dev/null +++ b/env/scenarios.py @@ -0,0 +1,10 @@ +class ScenarioGenerator: + def generate(self, seed): + import random + + random.seed(seed) + + return { + "traffic_bias": random.choice(["ns", "ew", "balanced"]), + "emergency_vehicle": random.random() < 0.2, + } diff --git a/env/traffic_env.py b/env/traffic_env.py new file mode 100644 index 0000000000000000000000000000000000000000..788be61067c89aa6468926a2253e836514579cd6 --- /dev/null +++ b/env/traffic_env.py @@ -0,0 +1,356 @@ +from __future__ import annotations +from dataclasses import dataclass +from pathlib import Path +from typing import Any + +import numpy as np + +from env.cityflow_adapter import CityFlowAdapter +from env.intersection_config import DistrictConfig, IntersectionConfig +from env.observation_builder import ObservationBuilder, ObservationConfig +from env.reward import RewardCalculator, RewardConfig +from env.utils import build_topology, load_json + + +@dataclass(frozen=True) +class EnvConfig: + simulator_interval: int = 1 + decision_interval: int = 5 + min_green_time: int = 10 + thread_num: int = 1 + observation: ObservationConfig = ObservationConfig() + reward: RewardConfig = RewardConfig() + max_episode_seconds: int | None = None + + +class TrafficEnv: + def __init__( + self, + city_id: str, + scenario_name: str, + city_dir: str | Path, + scenario_dir: str | Path, + config_path: str | Path, + roadnet_path: str | Path, + district_map_path: str | Path | None = None, + metadata_path: str | Path | None = None, + env_config: EnvConfig | None = None, + ): + self.city_id = city_id + self.scenario_name = scenario_name + self.city_dir = Path(city_dir) + self.scenario_dir = Path(scenario_dir) + self.original_config_path = Path(config_path) + self.roadnet_path = Path(roadnet_path) + self.district_map_path = Path(district_map_path) if district_map_path else None + self.metadata_path = Path(metadata_path) if metadata_path else None + self.env_config = env_config or EnvConfig() + + self.intersections, self.districts = build_topology( + roadnet_path=self.roadnet_path, + district_map_path=self.district_map_path, + metadata_path=self.metadata_path, + ) + if not self.intersections: + raise ValueError( + f"No controllable intersections found for {self.city_id}/{self.scenario_name}." + ) + + self.controlled_intersection_ids = tuple(sorted(self.intersections)) + self.observation_builder = ObservationBuilder( + intersections=self.intersections, + districts=self.districts, + config=self.env_config.observation, + ) + self.reward_calculator = RewardCalculator(self.env_config.reward) + self.adapter = CityFlowAdapter( + config_path=self.original_config_path, + thread_num=self.env_config.thread_num, + ) + + config_payload = load_json(self.original_config_path) + self.max_episode_seconds = int( + self.env_config.max_episode_seconds + or config_payload.get("step", 0) + ) + self.metadata = load_json(self.metadata_path) if self.metadata_path else {} + self._district_type_labels = tuple( + self.intersections[intersection_id].district_type + for intersection_id in self.controlled_intersection_ids + ) + self._incoming_lane_counts = np.asarray( + [ + max(1, len(self.intersections[intersection_id].incoming_lanes)) + for intersection_id in self.controlled_intersection_ids + ], + dtype=np.float32, + ) + + self.current_phase_positions: dict[str, int] = {} + self.phase_elapsed_times: dict[str, int] = {} + self.decision_step_count = 0 + self.episode_return = 0.0 + self.total_episode_return = 0.0 + self.last_info: dict[str, Any] = {} + self.reward_component_sums: dict[str, float] = {} + + @property + def observation_dim(self) -> int: + return self.observation_builder.observation_dim + + def reset(self, seed: int | None = None) -> dict[str, Any]: + del seed + self.adapter.reset() + self.decision_step_count = 0 + self.episode_return = 0.0 + self.total_episode_return = 0.0 + self.reward_component_sums = {} + + self.current_phase_positions = {} + self.phase_elapsed_times = {} + for intersection_id in self.controlled_intersection_ids: + config = self.intersections[intersection_id] + initial_position = 0 + initial_phase = config.green_phases[initial_position].engine_phase_index + self.current_phase_positions[intersection_id] = initial_position + self.phase_elapsed_times[intersection_id] = 0 + self.adapter.set_tl_phase(intersection_id, initial_phase) + + observation = self._build_observation() + self.reward_calculator.reset( + incoming_waiting=observation["incoming_waiting"], + incoming_counts=observation["incoming_counts"], + incoming_lane_counts=self._incoming_lane_counts, + finished_vehicle_count=self.adapter.get_finished_vehicle_count(), + ) + self.last_info = self._build_info( + rewards=np.zeros(len(self.controlled_intersection_ids), dtype=np.float32), + avg_incoming_counts=observation["incoming_counts"], + avg_incoming_waiting=observation["incoming_waiting"], + reward_components={}, + ) + return observation + + def step( + self, + actions: dict[str, int] | list[int] | np.ndarray, + ) -> tuple[dict[str, Any], np.ndarray, bool, dict[str, Any]]: + normalized_actions = self._normalize_actions(actions) + self._apply_actions(normalized_actions) + + avg_incoming_counts, avg_incoming_waiting, avg_outgoing_counts = self._advance_simulator() + reward_breakdown = self.reward_calculator.compute_breakdown( + incoming_waiting=avg_incoming_waiting, + incoming_counts=avg_incoming_counts, + outgoing_counts=avg_outgoing_counts, + incoming_lane_counts=self._incoming_lane_counts, + finished_vehicle_count=self.adapter.get_finished_vehicle_count(), + ) + rewards = reward_breakdown.reward + self.decision_step_count += 1 + self.total_episode_return += float(rewards.sum()) + self.episode_return = self._mean_step_intersection_reward() + self._accumulate_reward_components(reward_breakdown.components) + + observation = self._build_observation() + done = self.adapter.get_current_time() >= self.max_episode_seconds + info = self._build_info( + rewards=rewards, + avg_incoming_counts=avg_incoming_counts, + avg_incoming_waiting=avg_incoming_waiting, + reward_components=reward_breakdown.components, + ) + self.last_info = info + return observation, rewards, done, info + + def _build_observation(self) -> dict[str, Any]: + lane_vehicle_count = self.adapter.get_lane_vehicle_count() + lane_waiting_count = self.adapter.get_lane_waiting_vehicle_count() + switch_allowed = { + intersection_id: ( + self.phase_elapsed_times[intersection_id] >= self.env_config.min_green_time + ) + for intersection_id in self.controlled_intersection_ids + } + + observation = self.observation_builder.build( + lane_vehicle_count=lane_vehicle_count, + lane_waiting_count=lane_waiting_count, + phase_positions=self.current_phase_positions, + phase_elapsed_times=self.phase_elapsed_times, + switch_allowed=switch_allowed, + ) + observation["city_id"] = self.city_id + observation["scenario_name"] = self.scenario_name + observation["decision_step"] = self.decision_step_count + observation["sim_time"] = self.adapter.get_current_time() + return observation + + def _apply_actions(self, actions: np.ndarray) -> None: + for action_index, intersection_id in enumerate(self.controlled_intersection_ids): + config = self.intersections[intersection_id] + current_position = self.current_phase_positions[intersection_id] + can_switch = self.phase_elapsed_times[intersection_id] >= self.env_config.min_green_time + should_switch = int(actions[action_index]) == 1 and can_switch + + if should_switch: + next_position = (current_position + 1) % config.num_green_phases + engine_phase = config.green_phases[next_position].engine_phase_index + self.adapter.set_tl_phase(intersection_id, engine_phase) + self.current_phase_positions[intersection_id] = next_position + self.phase_elapsed_times[intersection_id] = 0 + else: + current_engine_phase = config.green_phases[current_position].engine_phase_index + self.adapter.set_tl_phase(intersection_id, current_engine_phase) + + def _advance_simulator(self) -> tuple[np.ndarray, np.ndarray, np.ndarray]: + num_intersections = len(self.controlled_intersection_ids) + max_lanes = self.env_config.observation.max_incoming_lanes + avg_incoming_counts = np.zeros((num_intersections, max_lanes), dtype=np.float32) + avg_incoming_waiting = np.zeros((num_intersections, max_lanes), dtype=np.float32) + avg_outgoing_counts = np.zeros((num_intersections, max_lanes), dtype=np.float32) + + for _ in range(self.env_config.decision_interval): + self.adapter.step() + lane_vehicle_count = self.adapter.get_lane_vehicle_count() + lane_waiting_count = self.adapter.get_lane_waiting_vehicle_count() + + for row_index, intersection_id in enumerate(self.controlled_intersection_ids): + config = self.intersections[intersection_id] + for lane_index, lane_id in enumerate( + config.incoming_lanes[: self.env_config.observation.max_incoming_lanes] + ): + avg_incoming_counts[row_index, lane_index] += float( + lane_vehicle_count.get(lane_id, 0) + ) + avg_incoming_waiting[row_index, lane_index] += float( + lane_waiting_count.get(lane_id, 0) + ) + for lane_index, lane_id in enumerate( + config.outgoing_lanes[: self.env_config.observation.max_incoming_lanes] + ): + avg_outgoing_counts[row_index, lane_index] += float( + lane_vehicle_count.get(lane_id, 0) + ) + + self.phase_elapsed_times[intersection_id] += self.env_config.simulator_interval + + avg_incoming_counts /= float(self.env_config.decision_interval) + avg_incoming_waiting /= float(self.env_config.decision_interval) + avg_outgoing_counts /= float(self.env_config.decision_interval) + return avg_incoming_counts, avg_incoming_waiting, avg_outgoing_counts + + def _build_info( + self, + rewards: np.ndarray, + avg_incoming_counts: np.ndarray, + avg_incoming_waiting: np.ndarray, + reward_components: dict[str, np.ndarray], + ) -> dict[str, Any]: + mean_reward = float(rewards.mean()) if rewards.size else 0.0 + average_travel_time = self.adapter.get_average_travel_time() + info = { + "city_id": self.city_id, + "scenario_name": self.scenario_name, + "decision_step": self.decision_step_count, + "sim_time": self.adapter.get_current_time(), + "episode_return": float(self.episode_return), + "total_episode_return": float(self.total_episode_return), + "intersection_ids": self.controlled_intersection_ids, + "district_types": self._district_type_labels, + "metrics": { + "num_controlled_intersections": len(self.controlled_intersection_ids), + "mean_reward": mean_reward, + "mean_step_intersection_reward": self._mean_step_intersection_reward(), + "mean_waiting_vehicles": float(avg_incoming_waiting.sum(axis=1).mean()), + "mean_incoming_vehicles": float(avg_incoming_counts.sum(axis=1).mean()), + "total_waiting_vehicles": float(avg_incoming_waiting.sum()), + "total_incoming_vehicles": float(avg_incoming_counts.sum()), + "running_vehicles": self.adapter.get_vehicle_count(), + "throughput": self.adapter.get_finished_vehicle_count(), + "average_travel_time": average_travel_time, + "reward_variant": self.env_config.reward.variant, + }, + } + info["metrics"].update(self._reward_component_metrics(reward_components)) + info["metrics"].update( + per_district_type_metrics( + district_types=self._district_type_labels, + rewards=rewards, + avg_incoming_counts=avg_incoming_counts, + avg_incoming_waiting=avg_incoming_waiting, + ) + ) + return info + + def _normalize_actions( + self, + actions: dict[str, int] | list[int] | np.ndarray, + ) -> np.ndarray: + if isinstance(actions, dict): + return np.asarray( + [int(actions.get(intersection_id, 0)) for intersection_id in self.controlled_intersection_ids], + dtype=np.int64, + ) + array = np.asarray(actions, dtype=np.int64) + if array.shape != (len(self.controlled_intersection_ids),): + raise ValueError( + "Actions must provide exactly one action per controlled intersection." + ) + return array + + def _mean_step_intersection_reward(self) -> float: + denominator = max( + 1, + self.decision_step_count * len(self.controlled_intersection_ids), + ) + return float(self.total_episode_return) / float(denominator) + + def _accumulate_reward_components(self, components: dict[str, np.ndarray]) -> None: + for name, values in components.items(): + self.reward_component_sums[name] = self.reward_component_sums.get(name, 0.0) + float( + np.asarray(values, dtype=np.float32).mean() + ) + + def _reward_component_metrics( + self, + reward_components: dict[str, np.ndarray], + ) -> dict[str, float]: + metrics: dict[str, float] = {} + for name, values in reward_components.items(): + metrics[f"reward_component_step_{name}"] = float( + np.asarray(values, dtype=np.float32).mean() + ) + if self.decision_step_count <= 0: + return metrics + for name, total in self.reward_component_sums.items(): + metrics[f"reward_component_mean_{name}"] = float(total) / float( + self.decision_step_count + ) + return metrics + + +def per_district_type_metrics( + district_types: tuple[str, ...], + rewards: np.ndarray, + avg_incoming_counts: np.ndarray, + avg_incoming_waiting: np.ndarray, +) -> dict[str, float]: + metrics: dict[str, float] = {} + reward_vector = np.asarray(rewards, dtype=np.float32) + incoming_totals = avg_incoming_counts.sum(axis=1) + waiting_totals = avg_incoming_waiting.sum(axis=1) + + for district_type in sorted(set(district_types)): + mask = np.asarray( + [item == district_type for item in district_types], + dtype=bool, + ) + if not mask.any(): + continue + metrics[f"num_{district_type}_intersections"] = float(mask.sum()) + metrics[f"mean_reward_{district_type}"] = float(reward_vector[mask].mean()) + metrics[f"mean_waiting_vehicles_{district_type}"] = float(waiting_totals[mask].mean()) + metrics[f"mean_incoming_vehicles_{district_type}"] = float(incoming_totals[mask].mean()) + + return metrics diff --git a/env/utils.py b/env/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..03150c462b46b65ba358d49f97d531a16d18db53 --- /dev/null +++ b/env/utils.py @@ -0,0 +1,209 @@ +from __future__ import annotations + +import json +import math +from pathlib import Path + +from env.intersection_config import ( + DEFAULT_DISTRICT_TYPE, + DISTRICT_TYPE_TO_INDEX, + DistrictConfig, + IntersectionConfig, + PhaseConfig, +) + + +def load_json(path: str | Path) -> dict: + return json.loads(Path(path).read_text()) + + +def clamp(value: float, min_value: float, max_value: float) -> float: + return max(min_value, min(max_value, value)) + + +def normalize_scalar(value: float, scale: float) -> float: + if scale <= 0: + return float(value) + return float(value) / float(scale) + + +def lane_ids_for_road(road: dict) -> tuple[str, ...]: + return tuple(f"{road['id']}_{lane_index}" for lane_index, _ in enumerate(road["lanes"])) + + +def build_topology( + roadnet_path: str | Path, + district_map_path: str | Path | None = None, + metadata_path: str | Path | None = None, +) -> tuple[dict[str, IntersectionConfig], dict[str, DistrictConfig]]: + roadnet = load_json(roadnet_path) + district_map = load_json(district_map_path) if district_map_path else {} + metadata = load_json(metadata_path) if metadata_path else {} + + intersection_to_district = district_map.get("intersection_to_district", {}) + district_neighbors = district_map.get("district_neighbors", {}) + district_types = metadata.get("district_types", {}) + + roads = {road["id"]: road for road in roadnet["roads"]} + road_lookup_by_end: dict[str, list[dict]] = {} + road_lookup_by_start: dict[str, list[dict]] = {} + for road in roadnet["roads"]: + road_lookup_by_end.setdefault(road["endIntersection"], []).append(road) + road_lookup_by_start.setdefault(road["startIntersection"], []).append(road) + + intersections: dict[str, IntersectionConfig] = {} + district_to_intersections: dict[str, list[str]] = {} + + for intersection in roadnet["intersections"]: + if intersection.get("virtual", False): + continue + + intersection_id = intersection["id"] + district_id = intersection_to_district.get(intersection_id, "unknown") + incoming_roads = _sort_roads_around_intersection( + intersection=intersection, + roads=road_lookup_by_end.get(intersection_id, []), + incoming=True, + ) + outgoing_roads = _sort_roads_around_intersection( + intersection=intersection, + roads=road_lookup_by_start.get(intersection_id, []), + incoming=False, + ) + + incoming_lanes = tuple( + lane_id + for road in incoming_roads + for lane_id in lane_ids_for_road(road) + ) + outgoing_lanes = tuple( + lane_id + for road in outgoing_roads + for lane_id in lane_ids_for_road(road) + ) + + green_phases: list[PhaseConfig] = [] + lightphases = intersection.get("trafficLight", {}).get("lightphases", []) + road_links = intersection.get("roadLinks", []) + for engine_phase_index, phase in enumerate(lightphases): + available_road_links = tuple(phase.get("availableRoadLinks", [])) + if not available_road_links: + continue + + served_incoming: set[str] = set() + served_outgoing: set[str] = set() + for road_link_index in available_road_links: + road_link = road_links[road_link_index] + start_road = road_link["startRoad"] + end_road = road_link["endRoad"] + for lane_link in road_link.get("laneLinks", []): + served_incoming.add( + f"{start_road}_{int(lane_link['startLaneIndex'])}" + ) + served_outgoing.add( + f"{end_road}_{int(lane_link['endLaneIndex'])}" + ) + + green_phases.append( + PhaseConfig( + engine_phase_index=engine_phase_index, + available_road_links=available_road_links, + incoming_lanes_served=tuple(sorted(served_incoming)), + outgoing_lanes_served=tuple(sorted(served_outgoing)), + ) + ) + + if len(green_phases) < 2: + continue + + district_type = _normalize_district_type( + district_types.get(district_id, DEFAULT_DISTRICT_TYPE) + ) + initial_phase_index = ( + green_phases[0].engine_phase_index + if green_phases + else 0 + ) + intersections[intersection_id] = IntersectionConfig( + intersection_id=intersection_id, + district_id=district_id, + district_type=district_type, + district_type_index=DISTRICT_TYPE_TO_INDEX[district_type], + incoming_lanes=incoming_lanes, + outgoing_lanes=outgoing_lanes, + is_boundary=_is_boundary_intersection( + intersection_id=intersection_id, + district_id=district_id, + incoming_roads=incoming_roads, + outgoing_roads=outgoing_roads, + intersection_to_district=intersection_to_district, + ), + green_phases=tuple(green_phases), + all_phase_indices=tuple(range(len(lightphases))), + initial_engine_phase_index=initial_phase_index, + ) + district_to_intersections.setdefault(district_id, []).append(intersection_id) + + districts: dict[str, DistrictConfig] = {} + for district_id, intersection_ids in district_to_intersections.items(): + district_type = _normalize_district_type( + district_types.get(district_id, DEFAULT_DISTRICT_TYPE) + ) + districts[district_id] = DistrictConfig( + district_id=district_id, + district_type=district_type, + district_type_index=DISTRICT_TYPE_TO_INDEX[district_type], + intersection_ids=tuple(sorted(intersection_ids)), + neighbor_districts=tuple(sorted(district_neighbors.get(district_id, []))), + ) + + return intersections, districts + + +def _sort_roads_around_intersection( + intersection: dict, + roads: list[dict], + incoming: bool, +) -> list[dict]: + center_x = float(intersection["point"]["x"]) + center_y = float(intersection["point"]["y"]) + + def angle_for_road(road: dict) -> tuple[float, str]: + points = road.get("points", []) + if not points: + return (0.0, road["id"]) + + reference_point = points[0] if incoming else points[-1] + dx = float(reference_point["x"]) - center_x + dy = float(reference_point["y"]) - center_y + angle = math.atan2(dy, dx) + return (angle, road["id"]) + + return sorted(roads, key=angle_for_road) + + +def _normalize_district_type(value: str) -> str: + normalized = str(value).strip().lower() + if normalized not in DISTRICT_TYPE_TO_INDEX: + return DEFAULT_DISTRICT_TYPE + return normalized + + +def _is_boundary_intersection( + intersection_id: str, + district_id: str, + incoming_roads: list[dict], + outgoing_roads: list[dict], + intersection_to_district: dict[str, str], +) -> bool: + connected_intersections = { + road["startIntersection"] for road in incoming_roads + } | { + road["endIntersection"] for road in outgoing_roads + } + connected_intersections.discard(intersection_id) + for neighbor_intersection_id in connected_intersections: + neighbor_district_id = intersection_to_district.get(neighbor_intersection_id) + if neighbor_district_id is not None and neighbor_district_id != district_id: + return True + return False diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000000000000000000000000000000000000..38b2b87a74e495cedcedacfedccef6d0e5041eaa --- /dev/null +++ b/environment.yml @@ -0,0 +1,107 @@ +name: traffic-llm +channels: + - conda-forge + - defaults +dependencies: + - anyio=4.12.1=pyhcf101f3_0 + - backports=1.0=pyhd8ed1ab_5 + - backports.tarfile=1.2.0=pyhcf101f3_2 + - backports.zstd=1.1.0=py312hb3cf4b8_0 + - brotli-python=1.2.0=py312h5b255a4_0 + - bzip2=1.0.8=h80987f9_6 + - c-ares=1.34.6=hfe05a68_0 + - ca-certificates=2026.2.25=hbd8a1cb_0 + - cachecontrol=0.14.3=pyha770c72_0 + - cachecontrol-with-filecache=0.14.3=pyhd8ed1ab_0 + - certifi=2026.2.25=pyhd8ed1ab_0 + - cffi=2.0.0=py312h73c2a22_1 + - charset-normalizer=3.4.4=pyhd8ed1ab_0 + - cleo=2.1.0=pyhd8ed1ab_1 + - cmake=4.2.3=h7fa4267_0 + - colorama=0.4.6=pyhd8ed1ab_1 + - crashtest=0.4.1=pyhd8ed1ab_1 + - distlib=0.4.0=pyhd8ed1ab_0 + - dulwich=0.25.2=py312h931abed_0 + - exceptiongroup=1.3.1=pyhd8ed1ab_0 + - expat=2.7.4=h50f4ffc_0 + - filelock=3.25.0=pyhd8ed1ab_0 + - findpython=0.7.1=pyh332efcf_0 + - gettext=0.25.1=h50c8ec2_0 + - gettext-tools=0.25.1=h61de102_0 + - h11=0.16.0=pyhcf101f3_1 + - h2=4.3.0=pyhcf101f3_0 + - hpack=4.1.0=pyhd8ed1ab_0 + - httpcore=1.0.9=pyh29332c3_0 + - httpx=0.28.1=pyhd8ed1ab_0 + - hyperframe=6.1.0=pyhd8ed1ab_0 + - icu=73.1=h313beb8_0 + - idna=3.11=pyhd8ed1ab_0 + - importlib_resources=6.5.2=pyhd8ed1ab_0 + - jansson=2.14=h80987f9_1 + - jaraco.context=6.1.0=pyhcf101f3_0 + - jaraco.functools=4.4.0=pyhcf101f3_1 + - keyring=25.7.0=pyh534df25_0 + - libasprintf=0.25.1=h7b764f5_0 + - libasprintf-devel=0.25.1=h7b764f5_0 + - libbrotlicommon=1.2.0=hbd7815e_0 + - libbrotlidec=1.2.0=h1e834b2_0 + - libbrotlienc=1.2.0=h5439a07_0 + - libcurl=8.18.0=hd4c70c6_0 + - libcxx=21.1.8=hb4ce287_0 + - libev=4.33=h1a28f6b_1 + - libexpat=2.7.4=h50f4ffc_0 + - libffi=3.4.4=hca03da5_1 + - libgettextpo=0.25.1=h7b764f5_0 + - libgettextpo-devel=0.25.1=h7b764f5_0 + - libiconv=1.18=h92f5915_0 + - libidn2=2.3.8=h9681e36_0 + - libintl=0.25.1=h7b764f5_0 + - libintl-devel=0.25.1=h7b764f5_0 + - libkrb5=1.22.1=ha46c28b_0 + - libnghttp2=1.67.1=h8189af8_0 + - libssh2=1.11.1=h3e2b118_0 + - libunistring=1.3=h1799b2a_0 + - libuv=1.52.0=h8e34c70_0 + - libxml2=2.13.9=h528a072_0 + - libzlib=1.3.1=h5f15de7_0 + - lmdb=0.9.31=h79febb2_0 + - lz4-c=1.9.4=h313beb8_1 + - more-itertools=10.8.0=pyhcf101f3_1 + - msgpack-python=1.1.1=py312h313beb8_0 + - ncurses=6.5=hee39554_0 + - openssl=3.6.1=hd24854e_1 + - pbs-installer=2026.2.11=pyhd8ed1ab_0 + - pip=26.0.1=pyhc872135_0 + - pkginfo=1.12.1.2=pyhd8ed1ab_0 + - poetry=2.3.1=pyh6a5c839_1 + - poetry-core=2.3.0=pyhcf101f3_1 + - pyproject_hooks=1.2.0=pyhd8ed1ab_1 + - pysocks=1.7.1=pyha55dd90_7 + - python=3.12.12=h2bfc596_1 + - python-build=1.4.0=pyh332efcf_0 + - python-discovery=1.1.0=pyhcf101f3_0 + - python-fastjsonschema=2.21.2=pyhe01879c_0 + - python-installer=0.7.0=pyhff2d567_1 + - rapidfuzz=3.14.1=py312h0962b89_0 + - readline=8.3=h0b18652_0 + - requests=2.32.5=pyhcf101f3_1 + - requests-toolbelt=1.0.0=pyhd8ed1ab_1 + - rhash=1.4.6=hd92ab70_1 + - shellingham=1.5.4=pyhd8ed1ab_2 + - sniffio=1.3.1=pyhd8ed1ab_2 + - sqlite=3.51.1=hab6afd1_0 + - tk=8.6.15=hcd8a7d5_0 + - tomli=2.4.0=pyhcf101f3_0 + - tomlkit=0.14.0=pyha770c72_0 + - trove-classifiers=2026.1.14.14=pyhd8ed1ab_0 + - typing_extensions=4.15.0=pyhcf101f3_0 + - urllib3=2.6.3=pyhd8ed1ab_0 + - virtualenv=21.1.0=pyhcf101f3_0 + - wheel=0.46.3=py312hca03da5_0 + - xattr=1.1.4=py312h80987f9_0 + - xz=5.8.2=h8bbcb1d_0 + - zipp=3.23.0=pyhcf101f3_1 + - zlib=1.3.1=h5f15de7_0 + - zstandard=0.24.0=py312hbc14757_0 + - zstd=1.5.7=h817c040_0 + - pip diff --git a/models.py b/models.py new file mode 100644 index 0000000000000000000000000000000000000000..e5c4c8e845fd34ad69712c65ed16a5511969319d --- /dev/null +++ b/models.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +import json +from typing import Any + +from openenv.core.env_server import Action, Observation, State +from pydantic import ConfigDict, Field, field_validator + + +class AgenticTrafficAction(Action): + model_config = ConfigDict( + extra="forbid", + validate_assignment=True, + arbitrary_types_allowed=True, + validate_default=True, + ) + + use_llm: bool = Field( + default=False, + description=( + "When true, use the bundled district LLM adapter to generate district_actions " + "for districts not explicitly provided." + ), + ) + district_actions: dict[str, Any] = Field( + default="{}", + description=( + "JSON object keyed by district_id. Use {} for a no-op step, or provide " + 'entries like {"d_00":{"strategy":"hold","phase_bias":"NS","duration_steps":10}}.' + ), + json_schema_extra={ + "type": "string", + "maxLength": 4000, + "default": "{}", + }, + ) + llm_max_new_tokens: int = Field( + default=128, + ge=16, + le=512, + description="Maximum new tokens to generate per district when use_llm=true.", + ) + + @field_validator("district_actions", mode="before") + @classmethod + def parse_district_actions(cls, value: Any) -> dict[str, Any]: + if value is None or value == "": + return {} + if isinstance(value, str): + parsed = json.loads(value) + if not isinstance(parsed, dict): + raise ValueError("district_actions must decode to a JSON object.") + return parsed + if isinstance(value, dict): + return value + raise ValueError("district_actions must be a dict or JSON object string.") + + +class AgenticTrafficObservation(Observation): + city_id: str | None = None + scenario_name: str | None = None + decision_step: int = 0 + sim_time: int = 0 + district_summaries: dict[str, Any] = Field(default_factory=dict) + + +class AgenticTrafficState(State): + scenario: dict[str, Any] | None = None + controller: dict[str, Any] = Field(default_factory=dict) + district_decision_interval: int = 0 + district_summaries: dict[str, Any] = Field(default_factory=dict) + llm: dict[str, Any] = Field(default_factory=dict) + last_info: dict[str, Any] = Field(default_factory=dict) diff --git a/notebooks/README.md b/notebooks/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c834ab5eb9aae8a62206202f84f36d672950539e --- /dev/null +++ b/notebooks/README.md @@ -0,0 +1,7 @@ +# notebooks + +Workspace for exploratory notebooks. + +## Status + +This folder is currently empty. Use it for analysis, profiling, or visualization notebooks if needed, but keep production training logic in `training/` and `env/`. diff --git a/notebooks/llama_finetune.ipynb b/notebooks/llama_finetune.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..3b4ecbe57491120c3bd67e793d788aeb9db295d1 --- /dev/null +++ b/notebooks/llama_finetune.ipynb @@ -0,0 +1,2055 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# District LLM Fine-Tuning\n", + "\n", + "This notebook fine-tunes the district coordinator on the larger v3 chat dataset, saves validation checkpoints, reloads the best adapter, and runs offline evaluation with before/after repair metrics.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1. Install dependencies\n", + "\n", + "Run this first in Colab after cloning or uploading the repository.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "6327d12b", + "metadata": {}, + "outputs": [], + "source": [ + "%%capture\n", + "import os\n", + "import re\n", + "import sys\n", + "from pathlib import Path\n", + "import torch\n", + "from datasets import load_dataset\n", + "from transformers import TrainingArguments\n", + "from trl import SFTTrainer\n", + "from peft import LoraConfig\n", + "from unsloth import FastLanguageModel\n", + "\n", + "REPO_ROOT = Path('agentic-traffic')\n", + "if REPO_ROOT.exists() and str(REPO_ROOT) not in sys.path:\n", + " sys.path.insert(0, str(REPO_ROOT))\n" + ] + }, + { + "cell_type": "markdown", + "id": "c4d14c95", + "metadata": {}, + "source": [ + "## 2. Configure Paths And Run Mode\n", + "\n", + "Set the dataset root, run preset, and checkpoint layout here. The notebook supports a short smoke test and a main A100 run.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1e4ffa25", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "REPO_ROOT=/root/aditya/agentic-traffic\n", + "DATASET_ROOT=/root/aditya/agentic-traffic/data/district_llm_dataset_v3\n", + "RUN_MODE=main_run\n", + "{\n", + " \"eval_steps\": 50,\n", + " \"gradient_accumulation_steps\": 4,\n", + " \"learning_rate\": 5e-05,\n", + " \"logging_steps\": 10,\n", + " \"max_steps\": 200,\n", + " \"num_train_epochs\": 2,\n", + " \"per_device_eval_batch_size\": 8,\n", + " \"per_device_train_batch_size\": 8,\n", + " \"save_steps\": 50,\n", + " \"save_total_limit\": 10,\n", + " \"warmup_ratio\": 0.05\n", + "}\n" + ] + } + ], + "source": [ + "from pathlib import Path\n", + "import json\n", + "\n", + "def find_repo_root(start: Path) -> Path:\n", + " for candidate in (start, *start.parents):\n", + " if (candidate / 'data').exists() or (candidate / 'outputs').exists():\n", + " return candidate\n", + " raise FileNotFoundError('Could not locate the repo root from the current working directory.')\n", + "\n", + "\n", + "def resolve_dataset_root(repo_root: Path) -> Path:\n", + " candidates = [\n", + " repo_root / 'data' / 'district_llm_dataset_v3',\n", + " repo_root / 'outputs' / 'district_llm_dataset_v3',\n", + " repo_root / 'data' / 'district_llm_dataset_v2',\n", + " repo_root / 'outputs' / 'district_llm_dataset_v2',\n", + " ]\n", + " for candidate in candidates:\n", + " if candidate.exists():\n", + " return candidate\n", + " return candidates[0]\n", + "\n", + "\n", + "REPO_ROOT = find_repo_root(Path.cwd())\n", + "DATASET_ROOT = resolve_dataset_root(REPO_ROOT)\n", + "TRAIN_JSONL = DATASET_ROOT / 'train.jsonl'\n", + "VAL_JSONL = DATASET_ROOT / 'val.jsonl'\n", + "METADATA_JSON = DATASET_ROOT / 'metadata.json'\n", + "MODEL_NAME = 'unsloth/Llama-3.1-8B'\n", + "MAX_SEQ_LENGTH = 2048\n", + "LOAD_IN_4BIT = True\n", + "SEED = 3407\n", + "DATASET_NUM_PROC = 2\n", + "DEBUG_EXAMPLES = 10\n", + "MAX_EVAL_EXAMPLES = 250\n", + "ALLOW_ONLY_VISIBLE_CANDIDATES = True\n", + "MAX_TARGET_INTERSECTIONS = 3\n", + "FALLBACK_ON_EMPTY_TARGETS = True\n", + "FALLBACK_MODE = 'heuristic'\n", + "RESTRICT_TARGETS_TO_VISIBLE_SUMMARY = True\n", + "RUN_MODE = 'main_run' # 'smoke_test' or 'main_run'\n", + "MAX_STEPS_OVERRIDE = None # e.g. 5000 for experimentation\n", + "RESUME_FROM_CHECKPOINT = None\n", + "\n", + "RUN_PRESETS = {\n", + " 'smoke_test': {\n", + " 'num_train_epochs': 1,\n", + " 'max_steps': 40,\n", + " 'per_device_train_batch_size': 2,\n", + " 'per_device_eval_batch_size': 2,\n", + " 'gradient_accumulation_steps': 4,\n", + " 'warmup_ratio': 0.03,\n", + " 'learning_rate': 2e-4,\n", + " 'logging_steps': 5,\n", + " 'eval_steps': 20,\n", + " 'save_steps': 20,\n", + " 'save_total_limit': 2,\n", + " },\n", + " 'main_run': {\n", + " 'num_train_epochs': 2,\n", + " 'max_steps': 200\n", + " ,\n", + " 'per_device_train_batch_size': 8,\n", + " 'per_device_eval_batch_size': 8,\n", + " 'gradient_accumulation_steps': 4,\n", + " 'warmup_ratio': 0.05,\n", + " 'learning_rate': 5e-5,\n", + " 'logging_steps': 10,\n", + " 'eval_steps': 50,\n", + " 'save_steps': 50,\n", + " 'save_total_limit': 10,\n", + " },\n", + "}\n", + "\n", + "RUN_CONFIG = dict(RUN_PRESETS[RUN_MODE])\n", + "if MAX_STEPS_OVERRIDE is not None:\n", + " RUN_CONFIG['max_steps'] = int(MAX_STEPS_OVERRIDE)\n", + "\n", + "RUN_ARTIFACT_DIR = REPO_ROOT / 'artifacts' / 'district_llm_adapter_v3' / RUN_MODE\n", + "CHECKPOINT_DIR = RUN_ARTIFACT_DIR / 'checkpoints'\n", + "ADAPTER_OUTPUT_DIR = RUN_ARTIFACT_DIR / 'adapter'\n", + "BEST_ADAPTER_DIR = ADAPTER_OUTPUT_DIR\n", + "\n", + "print(f'REPO_ROOT={REPO_ROOT}')\n", + "print(f'DATASET_ROOT={DATASET_ROOT}')\n", + "print(f'RUN_MODE={RUN_MODE}')\n", + "print(json.dumps(RUN_CONFIG, indent=2, sort_keys=True))\n" + ] + }, + { + "cell_type": "markdown", + "id": "0844162f", + "metadata": {}, + "source": [ + "## 3. Inspect Dataset Metadata And Preview Rows\n", + "\n", + "This checks that the larger constrained dataset exists and exposes candidate_intersections before training.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "e901fab5", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\n", + " \"average_candidate_intersections_count\": 5.2272,\n", + " \"average_target_intersections_count\": 2.81336,\n", + " \"controller_family_counts\": {\n", + " \"dqn\": 12500\n", + " },\n", + " \"duplicate_rows_removed\": 0,\n", + " \"generation_timestamp\": \"2026-03-08T02:03:42.664133+00:00\",\n", + " \"num_train_rows\": 10000,\n", + " \"num_val_rows\": 2500,\n", + " \"rows_per_city\": {\n", + " \"city_0001\": 8449,\n", + " \"city_0002\": 1551,\n", + " \"city_0009\": 2500\n", + " },\n", + " \"rows_per_district_type\": {\n", + " \"commercial\": 4484,\n", + " \"industrial\": 2376,\n", + " \"mixed\": 1545,\n", + " \"residential\": 4095\n", + " },\n", + " \"rows_per_scenario\": {\n", + " \"accident\": 1704,\n", + " \"construction\": 1704,\n", + " \"district_overload\": 1222,\n", + " \"evening_rush\": 1704,\n", + " \"event_spike\": 1207,\n", + " \"morning_rush\": 2119,\n", + " \"normal\": 2840\n", + " },\n", + " \"schema_version\": \"district_action_v1_messages_v3_candidates\",\n", + " \"teacher_sources\": [\n", + " {\n", + " \"checkpoint_path\": \"artifacts/dqn_shared/best_validation.pt\",\n", + " \"controller_family\": \"dqn\",\n", + " \"controller_id\": \"best_validation\",\n", + " \"controller_type\": \"rl_checkpoint\",\n", + " \"teacher_algorithm\": \"dqn\"\n", + " }\n", + " ],\n", + " \"train_stats\": {\n", + " \"assistant_json_length\": {\n", + " \"average\": 157.6475,\n", + " \"median\": 161.0\n", + " },\n", + " \"assistant_uniqueness_ratio\": 0.2509,\n", + " \"candidate_pool_size\": {\n", + " \"average\": 5.034,\n", + " \"median\": 6.0\n", + " },\n", + " \"controller_family_counts\": {\n", + " \"dqn\": 10000\n", + " },\n", + " \"duplicate_rows_removed\": 0,\n", + " \"duration_steps_distribution\": {\n", + " \"10\": 10000\n", + " },\n", + " \"low_signal_rows_removed\": 151,\n", + " \"phase_bias_distribution\": {\n", + " \"EW\": 2527,\n", + " \"NONE\": 167,\n", + " \"NS\": 7306\n", + " },\n", + " \"priority_corridor_distribution\": {\n", + " \"EW\": 449,\n", + " \"NS\": 2465,\n", + " \"None\": 54,\n", + " \"arterial\": 23,\n", + " \"inbound\": 6936,\n", + " \"outbound\": 73\n", + " },\n", + " \"rows\": 10000,\n", + " \"rows_per_city\": {\n", + " \"city_0001\": 8449,\n", + " \"city_0002\": 1551\n", + " },\n", + " \"rows_per_district_type\": {\n", + " \"commercial\": 3770,\n", + " \"industrial\": 2376,\n", + " \"mixed\": 1188,\n", + " \"residential\": 2666\n", + " },\n", + " \"rows_per_scenario\": {\n", + " \"accident\": 1207,\n", + " \"construction\": 1207,\n", + " \"district_overload\": 1207,\n", + " \"evening_rush\": 1207,\n", + " \"event_spike\": 1207,\n", + " \"morning_rush\": 1622,\n", + " \"normal\": 2343\n", + " },\n", + " \"strategy_distribution\": {\n", + " \"arterial_priority\": 100,\n", + " \"clear_spillback\": 7305,\n", + " \"drain_inbound\": 22,\n", + " \"drain_outbound\": 73,\n", + " \"favor_NS\": 39,\n", + " \"hold\": 47,\n", + " \"incident_response\": 2414\n", + " },\n", + " \"summary_length\": {\n", + " \"average\": 1536.7461,\n", + " \"median\": 1650.0\n", + " },\n", + " \"target_intersections_count\": {\n", + " \"average\": 2.7667,\n", + " \"median\": 3.0\n", + " }\n", + " },\n", + " \"val_stats\": {\n", + " \"assistant_json_length\": {\n", + " \"average\": 159.1296,\n", + " \"median\": 158.0\n", + " },\n", + " \"assistant_uniqueness_ratio\": 0.2416,\n", + " \"candidate_pool_size\": {\n", + " \"average\": 6.0,\n", + " \"median\": 6.0\n", + " },\n", + " \"controller_family_counts\": {\n", + " \"dqn\": 2500\n", + " },\n", + " \"duplicate_rows_removed\": 0,\n", + " \"duration_steps_distribution\": {\n", + " \"10\": 2500\n", + " },\n", + " \"low_signal_rows_removed\": 42,\n", + " \"phase_bias_distribution\": {\n", + " \"EW\": 208,\n", + " \"NONE\": 9,\n", + " \"NS\": 2283\n", + " },\n", + " \"priority_corridor_distribution\": {\n", + " \"EW\": 99,\n", + " \"NS\": 1216,\n", + " \"arterial\": 5,\n", + " \"inbound\": 1153,\n", + " \"outbound\": 27\n", + " },\n", + " \"rows\": 2500,\n", + " \"rows_per_city\": {\n", + " \"city_0009\": 2500\n", + " },\n", + " \"rows_per_district_type\": {\n", + " \"commercial\": 714,\n", + " \"mixed\": 357,\n", + " \"residential\": 1429\n", + " },\n", + " \"rows_per_scenario\": {\n", + " \"accident\": 497,\n", + " \"construction\": 497,\n", + " \"district_overload\": 15,\n", + " \"evening_rush\": 497,\n", + " \"morning_rush\": 497,\n", + " \"normal\": 497\n", + " },\n", + " \"strategy_distribution\": {\n", + " \"clear_spillback\": 1463,\n", + " \"drain_outbound\": 27,\n", + " \"favor_NS\": 16,\n", + " \"incident_response\": 994\n", + " },\n", + " \"summary_length\": {\n", + " \"average\": 1680.2236,\n", + " \"median\": 1680.0\n", + " },\n", + " \"target_intersections_count\": {\n", + " \"average\": 3.0,\n", + " \"median\": 3.0\n", + " }\n", + " }\n", + "}\n", + "DatasetDict({\n", + " train: Dataset({\n", + " features: ['candidate_intersections', 'checkpoint_path', 'city_id', 'controller_family', 'controller_id', 'controller_type', 'district_id', 'district_type', 'messages', 'scenario', 'teacher_algorithm'],\n", + " num_rows: 10000\n", + " })\n", + " val: Dataset({\n", + " features: ['candidate_intersections', 'checkpoint_path', 'city_id', 'controller_family', 'controller_id', 'controller_type', 'district_id', 'district_type', 'messages', 'scenario', 'teacher_algorithm'],\n", + " num_rows: 2500\n", + " })\n", + "})\n", + "{\n", + " \"candidate_intersections\": [\n", + " {\n", + " \"corridor_alignment\": \"NS\",\n", + " \"current_phase\": 1,\n", + " \"event_proximity\": false,\n", + " \"incident_proximity\": false,\n", + " \"intersection_id\": \"i_0003\",\n", + " \"is_boundary\": true,\n", + " \"outgoing_load\": 1.0,\n", + " \"overload_marker\": false,\n", + " \"queue_total\": 1.0,\n", + " \"selection_reasons\": [\n", + " \"congested\",\n", + " \"boundary\"\n", + " ],\n", + " \"spillback_risk\": false,\n", + " \"wait_total\": 0.0\n", + " },\n", + " {\n", + " \"corridor_alignment\": \"BALANCED\",\n", + " \"current_phase\": 1,\n", + " \"event_proximity\": false,\n", + " \"incident_proximity\": false,\n", + " \"intersection_id\": \"i_0013\",\n", + " \"is_boundary\": true,\n", + " \"outgoing_load\": 3.0,\n", + " \"overload_marker\": false,\n", + " \"queue_total\": 0.0,\n", + " \"selection_reasons\": [\n", + " \"congested\",\n", + " \"boundary\",\n", + " \"outgoing\"\n", + " ],\n", + " \"spillback_risk\": false,\n", + " \"wait_total\": 0.0\n", + " },\n", + " {\n", + " \"corridor_alignment\": \"NS\",\n", + " \"current_phase\": 1,\n", + " \"event_proximity\": false,\n", + " \"incident_proximity\": false,\n", + " \"intersection_id\": \"i_0001\",\n", + " \"is_boundary\": false,\n", + " \"outgoing_load\": 1.0,\n", + " \"overload_marker\": false,\n", + " \"queue_total\": 1.0,\n", + " \"selection_reasons\": [\n", + " \"congested\",\n", + " \"outgoing\"\n", + " ],\n", + " \"spillback_risk\": false,\n", + " \"wait_total\": 0.0\n", + " },\n", + " {\n", + " \"corridor_alignment\": \"BALANCED\",\n", + " \"current_phase\": 1,\n", + " \"event_proximity\": false,\n", + " \"incident_proximity\": false,\n", + " \"intersection_id\": \"i_0015\",\n", + " \"is_boundary\": true,\n", + " \"outgoing_load\": 1.0,\n", + " \"overload_marker\": false,\n", + " \"queue_total\": 0.0,\n", + " \"selection_reasons\": [\n", + " \"congested\"\n", + " ],\n", + " \"spillback_risk\": false,\n", + " \"wait_total\": 0.0\n", + " },\n", + " {\n", + " \"corridor_alignment\": \"NS\",\n", + " \"current_phase\": 1,\n", + " \"event_proximity\": false,\n", + " \"incident_proximity\": false,\n", + " \"intersection_id\": \"i_0002\",\n", + " \"is_boundary\": false,\n", + " \"outgoing_load\": 0.0,\n", + " \"overload_marker\": false,\n", + " \"queue_total\": 1.0,\n", + " \"selection_reasons\": [\n", + " \"congested\"\n", + " ],\n", + " \"spillback_risk\": false,\n", + " \"wait_total\": 0.0\n", + " },\n", + " {\n", + " \"corridor_alignment\": \"BALANCED\",\n", + " \"current_phase\": 0,\n", + " \"event_proximity\": false,\n", + " \"incident_proximity\": false,\n", + " \"intersection_id\": \"i_0012\",\n", + " \"is_boundary\": true,\n", + " \"outgoing_load\": 0.0,\n", + " \"overload_marker\": false,\n", + " \"queue_total\": 0.0,\n", + " \"selection_reasons\": [\n", + " \"congested\"\n", + " ],\n", + " \"spillback_risk\":\n", + "train candidate_intersections: 6\n" + ] + } + ], + "source": [ + "import json\n", + "from datasets import load_dataset\n", + "\n", + "metadata = json.loads(METADATA_JSON.read_text())\n", + "print(json.dumps(metadata, indent=2)[:5000])\n", + "\n", + "dataset = load_dataset(\n", + " 'json',\n", + " data_files={'train': str(TRAIN_JSONL), 'val': str(VAL_JSONL)},\n", + ")\n", + "print(dataset)\n", + "print(json.dumps(dataset['train'][0], indent=2)[:2500])\n", + "print('train candidate_intersections:', len(dataset['train'][0].get('candidate_intersections', [])))\n" + ] + }, + { + "cell_type": "markdown", + "id": "31dcd337", + "metadata": {}, + "source": [ + "## 4. Load The Base Model With Unsloth\n", + "\n", + "This loads the base model and attaches the LoRA adapter for SFT.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "666a05a0", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "==((====))== Unsloth 2026.3.3: Fast Llama patching. Transformers: 5.2.0.\n", + " \\\\ /| NVIDIA H100 80GB HBM3. Num GPUs = 1. Max memory: 79.179 GB. Platform: Linux.\n", + "O^O/ \\_/ \\ Torch: 2.10.0+cu128. CUDA: 9.0. CUDA Toolkit: 12.8. Triton: 3.6.0\n", + "\\ / Bfloat16 = TRUE. FA [Xformers = 0.0.35. FA2 = False]\n", + " \"-____-\" Free license: http://github.com/unslothai/unsloth\n", + "Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/root/conda_envs/traffic-llm/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=23524) is multi-threaded, use of fork() may lead to deadlocks in the child.\n", + " self.pid = os.fork()\n", + "Loading weights: 100%|██████████| 291/291 [00:00<00:00, 307.67it/s, Materializing param=model.norm.weight] \n" + ] + } + ], + "source": [ + "from unsloth import FastLanguageModel\n", + "import torch\n", + "\n", + "model, tokenizer = FastLanguageModel.from_pretrained(\n", + " model_name=MODEL_NAME,\n", + " max_seq_length=MAX_SEQ_LENGTH,\n", + " dtype=None,\n", + " load_in_4bit=LOAD_IN_4BIT,\n", + ")\n", + "\n", + "model = FastLanguageModel.get_peft_model(\n", + " model,\n", + " r=16,\n", + " target_modules=['q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj'],\n", + " lora_alpha=16,\n", + " lora_dropout=0.05,\n", + " bias='none',\n", + " use_gradient_checkpointing='unsloth',\n", + " random_state=SEED,\n", + " use_rslora=False,\n", + " loftq_config=None,\n", + ")\n" + ] + }, + { + "cell_type": "markdown", + "id": "1d3ca6a3", + "metadata": {}, + "source": [ + "## 5. Convert Chat Rows Into Training Text\n", + "\n", + "This keeps the custom message formatting flow while handling tokenizers that do not ship with a chat template.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "5d040955", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "DatasetDict({\n", + " train: Dataset({\n", + " features: ['text'],\n", + " num_rows: 10000\n", + " })\n", + " val: Dataset({\n", + " features: ['text'],\n", + " num_rows: 2500\n", + " })\n", + "})" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "EOS_TOKEN = tokenizer.eos_token or ''\n", + "\n", + "\n", + "def render_messages(messages, add_generation_prompt=False):\n", + " if getattr(tokenizer, 'chat_template', None):\n", + " return tokenizer.apply_chat_template(\n", + " messages,\n", + " tokenize=False,\n", + " add_generation_prompt=add_generation_prompt,\n", + " )\n", + "\n", + " rendered_messages = [f\"{msg['role']}: {msg['content']}\" for msg in messages]\n", + " if add_generation_prompt:\n", + " rendered_messages.append('assistant:')\n", + " return '\\n'.join(rendered_messages)\n", + "\n", + "\n", + "def format_chat_examples(batch):\n", + " texts = []\n", + " for messages in batch['messages']:\n", + " rendered = render_messages(messages, add_generation_prompt=False)\n", + " texts.append(rendered + EOS_TOKEN)\n", + " return {'text': texts}\n", + "\n", + "\n", + "map_kwargs = {\n", + " 'function': format_chat_examples,\n", + " 'batched': True,\n", + " 'remove_columns': dataset['train'].column_names,\n", + "}\n", + "if DATASET_NUM_PROC:\n", + " map_kwargs['num_proc'] = DATASET_NUM_PROC\n", + "\n", + "formatted_dataset = dataset.map(**map_kwargs)\n", + "formatted_dataset\n" + ] + }, + { + "cell_type": "markdown", + "id": "16015d1c", + "metadata": {}, + "source": [ + "## 6. Train With Unsloth SFT\n", + "\n", + "`smoke_test` is for wiring checks. `main_run` is the default A100 configuration: moderate effective batch size, 2 epochs by default, periodic validation, and checkpoint selection by `eval_loss`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "98f1eaea", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "🦥 Unsloth: Padding-free auto-enabled, enabling faster training.\n", + "{\n", + " \"bf16\": true,\n", + " \"eval_steps\": 50,\n", + " \"eval_strategy\": \"steps\",\n", + " \"fp16\": false,\n", + " \"gradient_accumulation_steps\": 4,\n", + " \"greater_is_better\": false,\n", + " \"learning_rate\": 5e-05,\n", + " \"load_best_model_at_end\": true,\n", + " \"logging_steps\": 10,\n", + " \"logging_strategy\": \"steps\",\n", + " \"lr_scheduler_type\": \"cosine\",\n", + " \"max_seq_length\": 2048,\n", + " \"max_steps\": 200,\n", + " \"metric_for_best_model\": \"eval_loss\",\n", + " \"optim\": \"adamw_8bit\",\n", + " \"output_dir\": \"/root/aditya/agentic-traffic/artifacts/district_llm_adapter_v3/main_run/checkpoints\",\n", + " \"packing\": false,\n", + " \"per_device_eval_batch_size\": 8,\n", + " \"per_device_train_batch_size\": 8,\n", + " \"report_to\": \"none\",\n", + " \"save_steps\": 50,\n", + " \"save_strategy\": \"steps\",\n", + " \"save_total_limit\": 10,\n", + " \"seed\": 3407,\n", + " \"warmup_ratio\": 0.05,\n", + " \"weight_decay\": 0.01\n", + "}\n" + ] + } + ], + "source": [ + "import inspect\n", + "from trl import SFTConfig, SFTTrainer\n", + "\n", + "CHECKPOINT_DIR.mkdir(parents=True, exist_ok=True)\n", + "ADAPTER_OUTPUT_DIR.mkdir(parents=True, exist_ok=True)\n", + "\n", + "bf16_supported = torch.cuda.is_available() and torch.cuda.get_device_capability(0)[0] >= 8\n", + "sft_signature = inspect.signature(SFTConfig.__init__).parameters\n", + "\n", + "\n", + "def set_if_supported(kwargs, key, value, alt_key=None):\n", + " if key in sft_signature:\n", + " kwargs[key] = value\n", + " elif alt_key and alt_key in sft_signature:\n", + " kwargs[alt_key] = value\n", + "\n", + "\n", + "trainer_kwargs = {\n", + " 'max_seq_length': MAX_SEQ_LENGTH,\n", + " 'packing': False,\n", + " 'per_device_train_batch_size': RUN_CONFIG['per_device_train_batch_size'],\n", + " 'per_device_eval_batch_size': RUN_CONFIG['per_device_eval_batch_size'],\n", + " 'gradient_accumulation_steps': RUN_CONFIG['gradient_accumulation_steps'],\n", + " 'learning_rate': RUN_CONFIG['learning_rate'],\n", + " 'warmup_ratio': RUN_CONFIG['warmup_ratio'],\n", + " 'logging_steps': RUN_CONFIG['logging_steps'],\n", + " 'eval_steps': RUN_CONFIG['eval_steps'],\n", + " 'save_steps': RUN_CONFIG['save_steps'],\n", + " 'optim': 'adamw_8bit',\n", + " 'weight_decay': 0.01,\n", + " 'lr_scheduler_type': 'cosine',\n", + " 'seed': SEED,\n", + " 'output_dir': str(CHECKPOINT_DIR),\n", + " 'report_to': 'none',\n", + " 'save_total_limit': RUN_CONFIG['save_total_limit'],\n", + " 'load_best_model_at_end': True,\n", + " 'metric_for_best_model': 'eval_loss',\n", + " 'greater_is_better': False,\n", + "}\n", + "\n", + "if RUN_CONFIG['max_steps'] is None:\n", + " trainer_kwargs['num_train_epochs'] = RUN_CONFIG['num_train_epochs']\n", + "else:\n", + " trainer_kwargs['max_steps'] = RUN_CONFIG['max_steps']\n", + "\n", + "set_if_supported(trainer_kwargs, 'eval_strategy', 'steps', alt_key='evaluation_strategy')\n", + "set_if_supported(trainer_kwargs, 'save_strategy', 'steps')\n", + "set_if_supported(trainer_kwargs, 'logging_strategy', 'steps')\n", + "set_if_supported(trainer_kwargs, 'bf16', bf16_supported)\n", + "set_if_supported(trainer_kwargs, 'fp16', torch.cuda.is_available() and not bf16_supported)\n", + "\n", + "trainer = SFTTrainer(\n", + " model=model,\n", + " tokenizer=tokenizer,\n", + " train_dataset=formatted_dataset['train'],\n", + " eval_dataset=formatted_dataset['val'],\n", + " dataset_text_field='text',\n", + " args=SFTConfig(**trainer_kwargs),\n", + ")\n", + "\n", + "print(json.dumps(trainer_kwargs, indent=2, sort_keys=True, default=str))\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "10c2ecf2", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/data/_utils/pin_memory.py:57: DeprecationWarning: The argument 'device' of Tensor.pin_memory() is deprecated. Please do not pass this argument. (Triggered internally at /pytorch/aten/src/ATen/native/Memory.cpp:46.)\n", + " return data.pin_memory(device)\n", + "/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/data/_utils/pin_memory.py:57: DeprecationWarning: The argument 'device' of Tensor.is_pinned() is deprecated. Please do not pass this argument. (Triggered internally at /pytorch/aten/src/ATen/native/Memory.cpp:31.)\n", + " return data.pin_memory(device)\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " \n", + " [200/200 15:31, Epoch 0/1]\n", + "
\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
StepTraining LossValidation Loss
500.2013710.244767
1000.1696310.229486
1500.1545360.224721
2000.1545210.226754

" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/data/_utils/pin_memory.py:57: DeprecationWarning: The argument 'device' of Tensor.pin_memory() is deprecated. Please do not pass this argument. (Triggered internally at /pytorch/aten/src/ATen/native/Memory.cpp:46.)\n", + " return data.pin_memory(device)\n", + "/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/data/_utils/pin_memory.py:57: DeprecationWarning: The argument 'device' of Tensor.is_pinned() is deprecated. Please do not pass this argument. (Triggered internally at /pytorch/aten/src/ATen/native/Memory.cpp:31.)\n", + " return data.pin_memory(device)\n", + "/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/data/_utils/pin_memory.py:57: DeprecationWarning: The argument 'device' of Tensor.pin_memory() is deprecated. Please do not pass this argument. (Triggered internally at /pytorch/aten/src/ATen/native/Memory.cpp:46.)\n", + " return data.pin_memory(device)\n", + "/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/data/_utils/pin_memory.py:57: DeprecationWarning: The argument 'device' of Tensor.is_pinned() is deprecated. Please do not pass this argument. (Triggered internally at /pytorch/aten/src/ATen/native/Memory.cpp:31.)\n", + " return data.pin_memory(device)\n", + "/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/data/_utils/pin_memory.py:57: DeprecationWarning: The argument 'device' of Tensor.pin_memory() is deprecated. Please do not pass this argument. (Triggered internally at /pytorch/aten/src/ATen/native/Memory.cpp:46.)\n", + " return data.pin_memory(device)\n", + "/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/data/_utils/pin_memory.py:57: DeprecationWarning: The argument 'device' of Tensor.is_pinned() is deprecated. Please do not pass this argument. (Triggered internally at /pytorch/aten/src/ATen/native/Memory.cpp:31.)\n", + " return data.pin_memory(device)\n", + "/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/data/_utils/pin_memory.py:57: DeprecationWarning: The argument 'device' of Tensor.pin_memory() is deprecated. Please do not pass this argument. (Triggered internally at /pytorch/aten/src/ATen/native/Memory.cpp:46.)\n", + " return data.pin_memory(device)\n", + "/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/data/_utils/pin_memory.py:57: DeprecationWarning: The argument 'device' of Tensor.is_pinned() is deprecated. Please do not pass this argument. (Triggered internally at /pytorch/aten/src/ATen/native/Memory.cpp:31.)\n", + " return data.pin_memory(device)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "TrainOutput(global_step=200, training_loss=0.2981086879968643, metrics={'train_runtime': 936.9228, 'train_samples_per_second': 6.831, 'train_steps_per_second': 0.213, 'total_flos': 2.176929763679355e+17, 'train_loss': 0.2981086879968643, 'epoch': 0.64})\n", + "best_model_checkpoint= /root/aditya/agentic-traffic/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150\n" + ] + } + ], + "source": [ + "trainer_stats = trainer.train(resume_from_checkpoint=RESUME_FROM_CHECKPOINT)\n", + "print(trainer_stats)\n", + "print('best_model_checkpoint=', getattr(trainer.state, 'best_model_checkpoint', None))\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "16436f8d", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABKUAAAGGCAYAAACqvTJ0AAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjgsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvwVt1zgAAAAlwSFlzAAAPYQAAD2EBqD+naQAApmpJREFUeJzs3XdYFFfbBvB7dheWDtKrFTtF7L0bK8aSaOzdGDXRED+jibFFY3zVRGOPRlETo8aoUbEbsXcFsWBFKdKVLnXn+8OwkQCKyDIse/+uiyvZ2ZnZ+1kVDs+eOSOIoiiCiIiIiIiIiIioFMmkDkBERERERERERLqHTSkiIiIiIiIiIip1bEoREREREREREVGpY1OKiIiIiIiIiIhKHZtSRERERERERERU6tiUIiIiIiIiIiKiUsemFBERERERERERlTo2pYiIiIiIiIiIqNSxKUVERERERERERKWOTSkiIiIiIqJSULlyZQwfPlzqGDrl8ePHEAQBixcv1vhr+fr6QhAEPH78+K2P9ff3hyAI8Pf3L/FcRGUZm1JEJInhw4ejcuXKUscodYIgYPbs2VLHICIi0lq5v/hfuXJF6ihaRRCEPF9mZmZo06YN/Pz8in3OrVu3YunSpSUX8hX79u1DmzZtYGtrCyMjI1StWhX9+vXDoUOHNPJ6RCQNNqWIKI//DlgK+yrLn+I0aNAA48ePL/T53MFsYV8XLlwoxbT5leYnekRERFR67t69i3Xr1kn2+p06dcKWLVuwefNmTJ06FQ8ePIC3tzcOHz5crPNpqim1ePFi9OzZE4IgYPr06fjxxx/Rt29f3L9/H9u2bSvx1yMi6SikDkBEZcuWLVvyPN68eTOOHj2ab3vt2rXf6XXWrVsHlUr1TucoSGRkJK5fv465c+e+cd+5c+eiSpUq+ba7urqWeC4iIiIqX7Kzs6FSqaCvr1/kY5RKpQYTvVmNGjUwePBg9eO+ffuiTp06WLZsGTp37ixhsn9lZ2fj22+/RadOnXDkyJF8z8fExEiQiog0hTOliCiPwYMH5/mqUaNGgdvt7OzyHJeWlvZWr6Onp6eRgdnBgwdhYGCA9u3bv3Hfrl275qtr8ODBsLa2LvFcREREVLoiIiIwcuRI2NnZQalUom7dutiwYUOefTIzMzFz5kw0aNAA5ubmMDY2RqtWrXDixIk8+706i3np0qWoVq0alEolbt++jdmzZ0MQBDx48ADDhw+HhYUFzM3NMWLEiHzjo/+uKZU7e/vs2bPw8fGBjY0NjI2N0bt3b8TGxuY5VqVSYfbs2XB0dISRkRHatWuH27dvv9M6VbVr14a1tTUePnyYZ/tff/2F7t27w9HREUqlEtWqVcO3336LnJwc9T5t27aFn58fnjx5op5t/urSDBkZGZg1axZcXV2hVCrh4uKCqVOnIiMj47WZ4uLikJSUhBYtWhT4vK2tbZ7H6enpmD17NmrUqAEDAwM4ODigT58++WoCgJ9//ln9Z9eoUSNcvnw53z7BwcH44IMPYGlpCQMDAzRs2BB79+7Nt9+tW7fQvn17GBoawtnZGfPmzSvwA9fClm4o6p/bxYsX0aVLF5ibm8PIyAht2rTB2bNn33gckbZgU4qI3lrbtm3h5uaGq1evonXr1jAyMsJXX30FoGiDGCD/mlKvDvaKMmAojJ+fH9q1awdDQ8N3qjErKwuWlpYYMWJEvueSkpJgYGCAKVOmACj6gLakxcTEYNSoUbCzs4OBgQE8PT2xadOmfPtt27YNDRo0gKmpKczMzODu7o5ly5apn8/KysKcOXNQvXp1GBgYwMrKCi1btsTRo0c1mp+IiEhToqOj0bRpUxw7dgwTJ07EsmXL4OrqilGjRuW53CwpKQnr169H27ZtsXDhQsyePRuxsbHo3LkzAgIC8p1348aNWL58OcaOHYslS5bA0tJS/Vy/fv2QnJyMBQsWoF+/fvD19cWcOXOKlPfTTz9FYGAgZs2ahU8++QT79u3DxIkT8+wzffp0zJkzBw0bNsSiRYtQvXp1dO7cGampqcV6jwAgMTERz58/R4UKFfJs9/X1hYmJCXx8fLBs2TI0aNAAM2fOxLRp09T7fP3116hXrx6sra2xZcsWbNmyRf3eqlQq9OzZE4sXL4a3tzeWL1+OXr164ccff0T//v1fm8nW1haGhobYt28fnj179tp9c3Jy0KNHD8yZMwcNGjTAkiVLMGnSJCQmJuLmzZt59t26dSsWLVqEjz/+GPPmzcPjx4/Rp08fZGVlqfe5desWmjZtijt37mDatGlYsmQJjI2N0atXL+zevVu9X1RUFNq1a4eAgABMmzYNkydPxubNm/OMr0rC33//jdatWyMpKQmzZs3Cd999h4SEBLRv3x6XLl0q0dcikoxIRPQaEyZMEP/7raJNmzaivb29aGNjI3766afi2rVrxT179oiiKIq9evUS+/XrJy5atEhcvXq1+OGHH4oAxClTpuQ5x7Bhw8RKlSqpH4eEhIgARC8vL9HV1VVcuHCh+L///U+0trYWnZ2dxczMzDdmzczMFM3MzMQVK1a8dr+NGzeKAMRjx46JsbGxeb7i4uLU+40cOVK0sLAQMzIy8hy/adMmEYB4+fJlURRFMTY2VnRwcBB9fHzE1atXi//73//EmjVrinp6euL169fzHAtAnDVr1mvz5b4XixYtKnSftLQ0sXbt2qKenp74+eefiz/99JPYqlUrEYC4dOlS9X5HjhwRAYgdOnQQV65cKa5cuVKcOHGi+OGHH6r3+eqrr0RBEMQxY8aI69atE5csWSIOGDBA/P7771+bk4iISAq5P8dzfw4XZNSoUaKDg0Oen+uiKIofffSRaG5uLqalpYmiKIrZ2dn5fs4/f/5ctLOzE0eOHKnelvuz2czMTIyJicmz/6xZs0QAefYXRVHs3bu3aGVllWdbpUqVxGHDhuWrpWPHjqJKpVJv//zzz0W5XC4mJCSIoiiKUVFRokKhEHv16pXnfLNnzxYB5DlnYQCIo0aNEmNjY8WYmBjxypUrYpcuXQocc+S+P6/6+OOPRSMjIzE9PV29rXv37nnGc7m2bNkiymQy8fTp03m2r1mzRgQgnj179rVZZ86cKQIQjY2Nxa5du4rz588Xr169mm+/DRs2iADEH374Id9zue9n7p+dlZWV+OzZM/Xzf/31lwhA3Ldvn3pbhw4dRHd39zw1qlQqsXnz5mL16tXV2yZPniwCEC9evKjeFhMTI5qbm4sAxJCQEPX2wsZ+//27cOLECRGAeOLECfXrVq9eXezcuXOevxtpaWlilSpVxE6dOhXwzhFpHzaliOi1CmtKARDXrFmTb/+iDmIKa0oVZcBQmOPHj+cbCBQkdwBY0JdSqVTvd/jw4QJfu1u3bmLVqlXVj4s6oBXFkmtKLV26VAQg/vrrr+ptmZmZYrNmzUQTExMxKSlJFEVRnDRpkmhmZiZmZ2cXei5PT0+xe/fur81ERERUVrypKaVSqUQLCwtx7Nix+T58yj32zJkz+Y7LyckR4+PjxdjYWLF79+5ivXr11M/l/mweMWJEvuNym1KXLl3Ks/2HH34QAYiJiYnqbYU1pXbs2JHn2F27dokAxMDAQFEURfG3334TAYhHjhzJs198fPxbNaX++6WnpydOnTpVzMnJKfS4pKQkMTY2Vvz1119FAGJAQID6ucKaUj179hTr1q2b7/2/d++eCECcN2/eG/Nu3bpVbNmypSiTydR5vby8xNu3b+d5fWtrazErK6vQ8+T+2Y0fPz7P9mfPnokAxGXLlomi+PK9FARB/Pbbb/PlnjNnjghADA8PF0VRFGvUqCE2bdo032uNHz++xJpS165dEwGImzZtypdn9OjRolKpfO2fG5G24OV7RFQsSqWywEvbXr1sLjk5GXFxcWjVqhXS0tIQHBz8xvP2798/zxTyVq1aAQAePXr0xmMPHDiAOnXq5Lks8HVWrlyJo0eP5vk6ePCg+vn27dvD2toa27dvV297/vw5jh49mmfquVwuVy9yqlKp8OzZM2RnZ6Nhw4a4du1akbK8rQMHDsDe3h4DBgxQb9PT08Nnn32GlJQUnDx5EgBgYWGB1NTU116KZ2FhgVu3buH+/fsayUpE2unUqVPw9vaGo6MjBEHAnj17NPp6uevyvPpVq1Ytjb4mlU+xsbFISEjAzz//DBsbmzxfuWOXVxfL3rRpEzw8PNSXsNvY2MDPzw+JiYn5zl3QDVJyVaxYMc/j3PHM8+fP35j5Tcc+efIEQP6bsVhaWua79O513n//fRw9ehR+fn7qf3NpaWmQyfL+Wnjr1i307t0b5ubmMDMzg42NjXqB9ILel/+6f/8+bt26le/9z12rtCiLlQ8YMACnT5/G8+fPceTIEQwcOBDXr1+Ht7c30tPTAQAPHz5EzZo1oVC8+f5db3qPHzx4AFEU8c033+TLPWvWrDy5nzx5gurVq+d7jZo1a74xR1HljsuGDRuWL8/69euRkZFRpD8LorKOd98jomJxcnIq8G4zt27dwowZM/D3338jKSkpz3NF+cH5LgM6Pz8/eHt7v3G/XI0bN0bDhg0LfV6hUKBv377YunUrMjIyoFQqsWvXLmRlZeVbD2HTpk1YsmQJgoOD86xN8LrB67vIHQz9dxCZe1fE3MHr+PHjsWPHDnTt2hVOTk5477330K9fP3Tp0kV9zNy5c/H++++jRo0acHNzQ5cuXTBkyBB4eHhoJDsRaYfU1FR4enpi5MiR6NOnT6m8Zt26dXHs2DH146L8okn0X7mLTQ8ePBjDhg0rcJ/cn3G//vorhg8fjl69euH//u//YGtrC7lcjgULFhS4UPbr1qyUy+UFbhdF8Y2Z3+XYt+Hs7IyOHTsCALp16wZra2tMnDgR7dq1U/87T0hIQJs2bWBmZoa5c+eiWrVqMDAwwLVr1/Dll18W6e7JKpUK7u7u+OGHHwp83sXFpciZzczM0KlTJ3Tq1Al6enrYtGkTLl68iDZt2hT5HMCb3+PcuqZMmVLonQhL8g7N/11v9b9y8yxatAj16tUrcB8TE5MSy0MkFf6kJ6JiKWhQVhKDmOIOykJCQhAcHIzVq1cXrYAi+uijj7B27VocPHgQvXr1wo4dO1CrVi14enqq93nbAW1psrW1RUBAAA4fPoyDBw/i4MGD2LhxI4YOHapeFL1169Z4+PAh/vrrLxw5cgTr16/Hjz/+iDVr1mD06NGS5ici6XTt2hVdu3Yt9PmMjAx8/fXX+P3335GQkAA3NzcsXLgQbdu2LfZrKhQK2NvbF/t4IgCwsbGBqakpcnJy1A2YwuzcuRNVq1bFrl27IAiCenvuzJiyolKlSgBezuZ59QOv+Pj4In1wV5iPP/4YP/74I2bMmIHevXtDEAT4+/sjPj4eu3btQuvWrdX7hoSE5Dv+1ffsVdWqVUNgYCA6dOhQ6D7F0bBhQ2zatAmRkZHq17l48SKysrKgp6f3TueuWrUqgJczz9/096ZSpUoFzjC/e/duvm0VKlRAQkJCnm2ZmZnqGgpTrVo1AC+bcm/KQ6TNePkeEZWY3EGMr68vJk2ahB49eqBjx45vNa28uPz8/GBubo6WLVuW6Hlbt24NBwcHbN++HXFxcfj777/zzZJ6dUA7ZMgQdO7cGR07dlRPLdeE3MHQfxt9uZdI5g5eAUBfXx/e3t5YtWoVHj58iI8//hibN2/GgwcP1Pvk3mnw999/R1hYGDw8PAq8fTERUa6JEyfi/Pnz2LZtG27cuIEPP/wQXbp0eadLge/fvw9HR0dUrVoVgwYNQmhoaAkmJl0hl8vRt29f/Pnnn/nuwAa8vLzv1X2BvB9+Xbx4EefPn9d80LfQoUMHKBSKfB++rVix4p3Oq1Ao8MUXX+DOnTv466+/ABT8nmRmZmLVqlX5jjc2Ni5wJny/fv0QERGBdevW5XvuxYsXr71jYFpaWqHvf+4yC7mXyfXt2xdxcXEFvg9vO8vM1tYWbdu2xdq1awtsGL3696Zbt264cOFCnjvgxcbG4rfffst3XLVq1XDq1Kk8237++ec3zpRq0KABqlWrhsWLFyMlJeW1eYi0GWdKEVGJeZtBTEk7cOAA3nvvvRK/1EMmk+GDDz7Ahg0b0LhxY2RnZ+drSr1ad+6ngbkD2v9ejlhSunXrhiNHjmD79u3qdaWys7OxfPlymJiYqKe0x8fHw8rKKk89uZcsZGRkFLiPiYkJXF1dERYWppHsRKT9QkNDsXHjRoSGhsLR0RHAy0teDh06hI0bN+K7775763M2adIEvr6+qFmzJiIjIzFnzhy0atUKN2/ehKmpaUmXQOXAhg0bcOjQoXzbJ02ahO+//x4nTpxAkyZNMGbMGNSpUwfPnj3DtWvXcOzYMTx79gwA0KNHD+zatQu9e/dG9+7dERISgjVr1qBOnToFNgKkYmdnh0mTJmHJkiXo2bMnunTpgsDAQBw8eBDW1tbvNBtp+PDhmDlzJhYuXIhevXqhefPmqFChAoYNG4bPPvsMgiBgy5YtBTZ5GjRogO3bt8PHxweNGjWCiYkJvL29MWTIEOzYsQPjxo3DiRMn0KJFC+Tk5CA4OBg7duzA4cOHC11CIS0tDc2bN0fTpk3RpUsXuLi4ICEhAXv27MHp06fRq1cveHl5AQCGDh2KzZs3w8fHB5cuXUKrVq2QmpqKY8eOYfz48Xj//fff6r1YuXIlWrZsCXd3d4wZMwZVq1ZFdHQ0zp8/j/DwcAQGBgIApk6dii1btqBLly6YNGkSjI2N8fPPP6NSpUq4ceNGnnOOHj0a48aNQ9++fdGpUycEBgbi8OHDsLa2fm0WmUyG9evXo2vXrqhbty5GjBgBJycnRERE4MSJEzAzM8O+ffveqj6isohNKSIqMW8ziClJL168wIkTJ7BmzZq3Ou7gwYMFLr7evHlz9RRu4OXi68uXL8esWbPg7u6uXrcpl6YGtMePHy9wtlWvXr0wduxYrF27FsOHD8fVq1dRuXJl7Ny5E2fPnsXSpUvVv8CNHj0az549Q/v27eHs7IwnT55g+fLlqFevnrqOOnXqoG3btmjQoAEsLS1x5coV7Ny5ExMnTix2diIq34KCgpCTk6NetDhXRkaGuskdHByc7/vlf3355Zf4/vvvASDPpYIeHh5o0qQJKlWqhB07dmDUqFElXAGVB4Vdsj98+HA4Ozvj0qVLmDt3Lnbt2oVVq1bBysoKdevWxcKFC/PsGxUVhbVr1+Lw4cOoU6cOfv31V/zxxx/w9/cvpUqKZuHChTAyMsK6detw7NgxNGvWDEeOHEHLli1hYGBQ7PMaGhpi4sSJmD17Nvz9/dG2bVvs378fX3zxBWbMmIEKFSpg8ODB6NChQ761lsaPH4+AgABs3LgRP/74IypVqgRvb2/IZDLs2bMHP/74IzZv3ozdu3fDyMgIVatWxaRJk/J973iVhYUF1q1bBz8/P2zcuBFRUVGQy+WoWbMmFi1ahM8++0y9r1wux4EDBzB//nxs3boVf/75J6ysrNSNpbdVp04dXLlyBXPmzIGvry/i4+Nha2sLLy8vzJw5U72fg4MDTpw4gU8//RTff/89rKysMG7cODg6Oub7fjVmzBiEhITgl19+waFDh9CqVSscPXoUHTp0eGOetm3b4vz58/j222+xYsUKpKSkwN7eHk2aNMHHH3/81vURlUnS3PSPiLTFhAkTxP9+q2jTpo1Yt27dAvc/e/as2LRpU9HQ0FB0dHQUp06dKh4+fDjPLW5FURSHDRuW5xbCubfrXbRoUb5zopBb6ebav3+/KAiCGB0dXaSacm+/XNjXxo0b8+yvUqlEFxeXQm9hrFKpxO+++06sVKmSqFQqRS8vL3H//v35aixKLaL473tR2NeWLVtEURTF6OhoccSIEaK1tbWor68vuru758u+c+dO8b333hNtbW1FfX19sWLFiuLHH38sRkZGqveZN2+e2LhxY9HCwkI0NDQUa9WqJc6fP1/MzMws0vtJROUfAHH37t3qx9u2bRPlcrkYHBws3r9/P89X7veXjIwM8c6dO6/9iomJee3rNmzYUJw2bZomSyPSas+fPy90fEJEpA0EUdTwFAYiIg0bP348rly5kue6fiIiKjmCIGD37t3o1asXAODevXuoWbMmTp06hVatWmnkNVNSUlCxYkXMnj07z8wIIl314sWLfDeamT17NubMmYMzZ86gRYsWEiUjIio+Xr5HRFqvXr168Pb2ljoGEVG5kpKSkueGCCEhIQgICIClpSVq1KiBQYMGYejQoViyZAm8vLwQGxuL48ePw8PDA927d3/r15syZQq8vb1RqVIlPH36FLNmzYJcLlevm0ek67Zv3w5fX19069YNJiYmOHPmDH7//Xe89957bEgRkdbiTCkiIiIiysff3x/t2rXLt33YsGHw9fVFVlYW5s2bh82bNyMiIgLW1tZo2rQp5syZU6y1XD766COcOnUK8fHxsLGxQcuWLTF//nz1bdGJdN21a9cwdepUBAQEICkpCXZ2dujbty/mzZsHExMTqeMRERULm1JERERERERERFTqZFIHICIiIiIiIiIi3cOmFBERERERERERlTqdW+hcpVLh6dOnMDU1hSAIUschIiIiLSWKIpKTk+Ho6AiZrHx8zsdxEhEREZWEoo6TdK4p9fTpU7i4uEgdg4iIiMqJsLAwODs7Sx2jRHCcRERERCXpTeMknWtKmZqaAnj5xpiZmUmcpnSpVCrExsbCxsam3HyiW1S6XDvA+lm/7tavy7UDrF/T9SclJcHFxUU9tigPOE7SzX8vulw7wPpZv+7Wr8u1A6y/rIyTdK4plTsV3czMTCcHW+np6TAzM9O5f3S6XDvA+lm/7tavy7UDrL+06i9Pl7lxnKSb/150uXaA9bN+3a1fl2sHWH9ZGSfp3jtPRERERERERESSY1OKiIiIiIiIiIhKHZtSRERERERERERU6nRuTSkiIqLSplKpkJmZKcnrZmVlIT09XWfXSniX+vX09CCXyzWQjIiIqOyTavxSWjhOKhvjJDaliIiINCgzMxMhISFQqVSl/tqiKEKlUiE5OblcLcZdVCVRv4WFBezt7XXy/SMiIt0l5filtHCcVDbGSWxKERERaYgoioiMjIRcLoeLi0upfwoniiKys7OhUCh0drBV3PpFUURaWhpiYmIAAA4ODpqIWOJmz56NOXPm5NlWs2ZNBAcHS5SIiIi0jdTjl9LCcVLZGCexKUVERKQh2dnZSEtLg6OjI4yMjEr99TnYerf6DQ0NAQAxMTGwtbXVmkv56tati2PHjqkfKxQc7hERUdFJPX4pLRwnlY1xEkcpREREGpKTkwMA0NfXlzgJFVfuYDwrK0trmlIKhQL29vZSxyAiIi3F8QsVVUmMk8rnPDwiIqIyRBc/fSsvtPHP7v79+3B0dETVqlUxaNAghIaGSh2JiIi0kDb+DKTSVRJ/RzhTSgOyclQQRUBfwZ4fERERlZ4mTZrA19cXNWvWRGRkJObMmYNWrVrh5s2bMDU1zbd/RkYGMjIy1I+TkpIAvLwjT3le3LYgKpVKveirrtHl2gHWz/p1t/7Cas/dnvtVnuXWV97rLMy71p/7d6SgcUNR/02xKVXCVp54gPWnH2FG9zro28BZ6jhERESSq1y5MiZPnozJkydLeg5d0LVrV/X/e3h4oEmTJqhUqRJ27NiBUaNG5dt/wYIF+RZGB4DY2Fikp6drNKumJKZnY/ahECSn56CWnRHq2Bmjtr0RKlUwgOw1n+iqVCokJiZCFMVyu6hvYXS5doD1s37drb+w2rOysqBSqZCdnY3s7GwJE76djh07wtPTE0uWLCnS/qIoqi9VLOlZYXPnzsXevXtx5cqVEj1vSSqJ+rOzs6FSqRAfHw89Pb08zyUnJxfpHGxKlbCsHBWep2Vh/42nbEoREZFWatu2LerVq4elS5eWyPkuX74MY2PjEjkXvR0LCwvUqFEDDx48KPD56dOnw8fHR/04KSkJLi4usLGxgZmZWWnFLDFJ6VkY88dlBEW8nPF1MyoVQCwAwEQph5ujOTyc//1ysjBUD8RVKhUEQYCNjY1O/mKqq7UDrJ/16279hdWenp6O5ORkKBQKrbpZhiAIEAThrTP/t5lSEqZOnYpJkyaV2ffP398f7du3R3R0NGxsbIp9HoVCAZlMBisrKxgYGOR57r+PCz1HsV+dCtTDwxFLj93H6ftxSEjLhIURF4cjIqLyJ/fTtaIMtt5lsEPvJiUlBQ8fPsSQIUMKfF6pVEKpVObbLpPJtO6Xs5SMbIz0vYKgiERYGutjyns18SAmBTfCE3DzaSJSMnJwIeQZLoQ8Ux9jaaz/T4PKAu5OZnBUZsNOC2svCYIgaOWfe0lh/axfV+svqHaZTKZu8GjbulJvk1kURfW+RT0mMzOzSAvAm5qaFnjZvKYVNd9/6y7un3Pu+13Qv5+i/nvSvX91GuZqa4Ja9qbIVok4cita6jhERERvZfjw4Th58iSWLVumHmg8fvwY/v7+EAQBBw8eRIMGDaBUKnHmzBk8fPgQ77//Puzs7GBiYoJGjRrh2LFjec5ZuXLlPLOuBEHA+vXr0bt3bxgZGaF69erYu3fvW+UMDQ3F+++/DxMTE5iZmaFfv36Ijv73525gYCDat28PS0tLmJubo0GDBuop9E+ePIG3tzcqVKgAY2Nj1K1bFwcOHCj+m1aGTJkyBSdPnsTjx49x7tw59O7dG3K5HAMGDJA6mka9yMzBSN/LuBaaAHNDPfw6qgkGNqmImd51sPOT5rg5uzMOTmqFhX3dMbBJRbg5mUEhE/AsNRP+d2Px0/H7GLP5Krqvu4EWC09g3JarWOX/AGcfxCHxRZbU5RERUTFkZGRgypQpcHJygrGxMZo0aQJ/f3/18/Hx8Rg8eDCcnZ1hZGQEd3d3/P7773nO0bZtW0ycOBGTJ0+GtbU1OnfurB4THT9+HA0bNoSRkRGaN2+Ou3fvqo+bPXs26tWrp348fPhw9OrVC4sXL4aDgwOsrKwwYcIEZGX9+zMmMjIS3bt3h6GhIapUqYKtW7fmG0P9V+5558+fD0dHR9SsWRMAsGXLFjRs2BCmpqawt7fHwIEDERMTAwB4/Pgx2rVrBwCwtbWFTCbD8OHDAbycPbdgwQJUqVIFhoaG8PT0xM6dO4vz9hcZZ0ppQA8PBwRHJWPfjafo18hF6jhERFRGiKKIF1k5pfp62dnZUKgAI31FkT4FW7ZsGe7duwc3NzfMnTsXwMuZTo8fPwYATJs2DYsXL0bVqlVRoUIFhIWFoVu3bpg/fz6USiU2b94Mb29v3L17FxUrViz0debMmYP//e9/WLRoEZYvX45BgwbhyZMnsLS0fGNGlUqlbkidPHkS2dnZmDBhAvr3768ebA4aNAheXl746aefoFQqERgYqJ6eP2HCBGRmZuLUqVMwNjbG7du3YWJi8sbX1Qbh4eEYMGAA4uPjYWNjg5YtW+LChQvlerZaelYOxmy+gkshz2CqVGDzyMao45j30kOFXIbaDmao7WCG/o3+Pe5OZBJuhCciMDwBN8IS8DA2FZGJ6YhMjMKhW1Hq46taG8PD2RzuzhbwdDZHXUdzGOoX79bXRETaprTHL68y1JMXexbPxIkTcfv2bWzbtg2Ojo7YvXs3unTpgqCgIFSvXh3p6emoX78+pk2bBnNzc/j5+WHIkCGoVq0aGjdurD7Ppk2b8Mknn+Ds2bMAXjaPAODrr7/GkiVLYGNjg3HjxmHkyJHqfQpy4sQJODg44MSJE3jw4AH69++PevXqYcyYMQCAoUOHIi4uDv7+/tDT04OPj4+6kfQ6x48fh5mZGY4eParelpWVhW+//RY1a9ZETEwMfHx8MHz4cBw4cAAuLi74888/0bdvX9y8eROWlpYwMjIC8HKtyV9//RVr1qxB9erVcerUKQwePBg2NjZo06bN2/8hFAGbUhrQw8MRi4/cw7mH8YhPyYCVSf5p8UREpHteZOWgzszDkrz27bmdYaT/5h/75ubm0NfXh5GREezt7fM9P3fuXHTq1En92NLSEp6enurH3377LXbv3o29e/di4sSJhb7O8OHD1bN3vvvuO/z000+4dOkSunTp8saMx48fR1BQEEJCQuDi8vLDn82bN6Nu3bq4fPkyGjVqhNDQUEyZMgW1atWCQqFAjRo11MeHhoaib9++cHd3BwBUrVr1ja+pLbZt2yZ1hFKVma3CJ79exZkHcTDSl8N3ZCN4ulgU6VgDPTm8KlaAV8UKAF42O0PCIxGdqY+giCTciEjEjfAEhD17gUdxqXgUl4o9AU8BAHKZgOq2JvCqaIH36tqjpas19OS8AIGIyidtGL/8V2hoKDZu3IjQ0FA4OjoCeDmb+NChQ9i4cSO+++47ODk5wcfHBwrFyw/uPv30Uxw+fBg7duzI05SqXr06/ve//6kf5zal5s+fr27UTJs2Dd27d0d6enqhaylVqFABK1asgFwuR61atdC9e3ccP34cY8aMQXBwMI4dO4bLly+jYcOGAID169ejevXqb6zV2NgY69evz3PZ3siRI9X/X7VqVfz0009o1KgRUlJSYGJiov4Q0NbWFtbW1hAEARkZGfjuu+9w7NgxNGvWTH3smTNnsHbt2vLZlDp16hQWLVqEq1evIjIyErt370avXr2KdOzZs2fRpk0buLm5ISAgQKM531Zla2O4OZnhZkQSDt+KxsAmhX9STEREpE1yB0q5UlJSMHv2bPj5+SEyMhLZ2dl48eIFQkNDX3seDw8P9f8bGxvDzMysSJ8GAsCdO3fg4uKibkgBQJ06dWBhYYE7d+6gUaNG8PHxwZgxY7BlyxZ07NgR/fr1Q7Vq1QAAn332GT755BMcOXIEHTt2RN++ffPkIe2QlaPCxK3XcOJuLAz0ZNgwvBEaVHrzTLvXMdaXo6mzFZq7/juz7FlqJm6EJ+BG+MsmVWB4ImKTMxAclYzgqGT8fikMFYz00M3dAT09HdGosiVkMu1ag4WIqLwJCgpCTk5Ong+lgJeX9FlZWQEAcnJyMH/+fPz555+IiIhAZmYmMjIy1LOGcjVo0KDA13h17ODg4AAAiImJKXSmeN26dSGXy/McExQUBAC4e/cuFAoF6tevr37e1dUVFSpUeGOt7u7u+daRunr1KmbPno3AwEA8f/4cKpUKwMtmXZ06dQo8z4MHD5CWlpbnw0fg5TpVXl5eb8xRXJI2pVJTU+Hp6YmRI0eiT58+RT4uISEBQ4cORYcOHfKsH1GWdHd3xM2IJOy/8ZRNKSIiAvByCvrtuZ1L7fXUl+8pFDDUK5lLjf57F70pU6bg6NGjWLx4MVxdXWFoaIgPPvgAmZmZrz3Pf+90IwiCesBUEmbPno0BAwZg3759OHLkCGbPno1t27ahd+/eGD16NDp37gw/Pz8cOXIECxYswJIlS/Dpp5+W2OuTZmXnqDB5ewCO3I6GvkKG9UMboWlVK428lqWxPtrWtEXbmrYAXv67ikpKR2BYIs49jMOBoEjEpWTit4uh+O1iKBzMDdDDwwHv13NCXUczrVskmIjov0p7/PLf1y6OlJQUyOVyXL16NU8jCID6kv1FixZhxYoV+PHHH+Hh4QFjY2NMnjw53ximsDsIvzqWefVOroXR1Njnv/lSU1PRuXNndO7cGb/99htsbGwQGhqKzp07v3Z8lpKSAgDw8/ODk5NTnucKuilKSZG0KdW1a1d07dr1rY8bN24cBg4cCLlcjj179pR8sBLQw8MBCw8F48KjeMQmZ8DGlJfwERHpOkEQijUFvbhEUUS2DOpp6UWlr6+PnJyirR1x9uxZDB8+HL179wbwckCTu/6UptSuXRthYWEICwtTz5a6ffs2EhIS8nz6V6NGDUyaNAlffPEFBg4ciI0bN6pzuri4YNy4cRg3bhymT5+OdevWsSmlJVQqEVN33oDfjUjoyQWsGVwfLatbl9rrC4IAB3NDOJgbooubPWb2qINzD+OxN/ApDt+MQmRiOtadDsG60yGoam0Mb09H9KzniGo25WPdMiLSPaU9fikJXl5eyMnJQUxMDFq1alXgPufOnYO3tzcGDx6sbhDdu3ev0JlEmlSzZk1kZ2fj+vXr6plZDx48wPPnz9/6XMHBwYiPj8f333+vHifl3uwlV+7MqlfHe3Xq1IFSqURoaKjGLtUriNZd/L5x40Y8evQIs2bNkjrKa7lYGsHTxQIqETh0M1LqOEREREVWuXJlXLx4EY8fP0ZcXNxrP8WrXr06du3ahYCAAAQGBmLgwIElOuOpIB07doS7uzsGDRqEa9eu4dKlSxg6dCjatGmDhg0b4sWLF5g4cSL8/f3x5MkTnD17FpcvX0bt2rUBAJMnT8bhw4cREhKCa9eu4cSJE+rnqGxTqUR8tTsIu65HQC4TsHxAfbSvZSdpJoVchtY1bLD4Q09cntERawY3QHd3BygVMjyKS8Wy4/fRYclJ9Fh+Gj+feoinCS8kzUtEpAtq1KiBQYMGYejQodi1axdCQkJw6dIlLFiwAH5+fgBeXh53/PhxnDt3Dnfu3MHHH38s2ZVYtWrVQseOHTF27FhcunQJ169fx9ixY2FoaPjWM24rVqwIfX19LF++HI8ePcLevXvx7bff5tmnUqVKEAQBfn5+iI2NRUpKCkxNTTFlyhR8/vnn2LRpEx4+fIhr165h+fLl2LRpU0mWm4dWtTvv37+PadOm4fTp01AoihY9IyMDGRkZ6sdJSUkAXk6r0/SgububPQLDErAv8CkGlYFL+FQqFURR1HjdZZEu1w6wftavu/VLXXvu6+d+SSH3dd/m9b/44gsMHz4cderUwYsXL/Do0aM853n1XEuWLMGoUaPQvHlzWFtbY+rUqUhKSsq335seF7atsOf37NmDzz77DK1bt4ZMJkOXLl3w008/QRRFyGQyxMfHY9iwYYiOjoa1tTV69+6N2bNnqy9pnDBhAsLDw2FmZoYuXbrghx9+KPC1c1+zoHGDLv6bkpIoipi97xa2XQ6DTACW9q+HLm75F+OXkoGeHF3c7NHFzR4pGdk4cisKewOf4vT9ONyMSMLNiCR8dyAYjStbwrueI7q7O8DSWP/NJyYiore2ceNGzJs3D1988QUiIiJgbW2Npk2bokePHgCAGTNm4OHDh+jSpQuMjIwwduxY9OrVC4mJiZLk3bx5M0aNGoXWrVvD3t4eCxYswK1btwpdOL0wNjY28PX1xVdffYWffvoJ9evXx+LFi9GzZ0/1Pk5OTpg9ezZmzJiBMWPGYOjQofD19cW3334LGxsbLFiwAI8ePYKFhQXq16+Pr776qqTLVRNEqUbJ/yEIwmsXOs/JyUHTpk0xatQojBs3DsDL9SL27Nnz2oXOZ8+ejTlz5uTbfu/ePZiampZE9EJFJ2fi/V+CIADYO9odNibSDjpUKhUSExNhbm4OmUzrJsm9E12uHWD9rF9365e69qysLCQmJqJSpUpvPaAoCaIoIicnB3J58W+nrM1Kov709HQ8efIE5ubm+daCSE5ORo0aNZCYmAgzM7OSiCy5pKQkmJubl7maRFHEfL87WH8mBIIALPnQE33qO5foa6hUKsTExMDW1rbEv188S83EgaBI7A14ikuPn6m3y2UCWlW3Rk9PR7xX1x4mSmk+L9Zk7dqA9bN+Xa2/sNrT09MREhKCKlWqSDJ+KS2vrr1ZFsdJ4eHhcHFxwbFjx9ChQ4cSP39J1P+6vytFHVNozUyp5ORkXLlyBdevX1ffYjr3E2iFQoEjR46gffv2+Y6bPn06fHx81I+TkpLg4uICGxsbjQ+2bG2BBhXDcDU0AZejsjG8eckOnt6WSqWCIAiwsbHRyW+4ulo7wPpZv+7WL3Xt6enpSE5OhkKhKPIMX034bzNF17xL/QqFAjKZDFZWVvkGW+V5oF7WLDlyD+vPhAAAvuvtXuINKU2zNNbH4KaVMLhpJTxNeIH9N55ib+BT3IxIgv/dWPjfjYVSEYQOtW3R09MJbWvawKCEbk5ARETa4e+//0ZKSgrc3d0RGRmJqVOnonLlymjdurXU0TRKa5pSZmZm6tsl5lq1ahX+/vtv7Ny5E1WqVCnwOKVSWeBK8TKZrFR+Qenu4YiroQnwC4rCyJZVNf56byIIQqnVXtbocu0A62f9ulu/lLXLZDIIgqD+Km2iKKpftyx+AqhpJVF/7p9dQX+HdPHfkxSWH7+PFSceAADm9KyLAY2lXxLhXThaGGJs62oY27oaHsamYF/gU+wNeIpHcak4EBSFA0FRMFUq0NnNHj09HdG8mhUUcv5dIyIq77KysvDVV1/h0aNHMDU1RfPmzfHbb7+V+w8XJW1KpaSk4MGDB+rHISEhCAgIgKWlJSpWrIjp06cjIiICmzdvhkwmg5ubW57jbW1tYWBgkG97WdLdwwHf+t3G1SfP8TThBRwtDKWORERERKQV1p58iCVH7wEAvu5WG8OaV5Y2UAmrZmOCyR1rYFKH6rj1NAl7A59iX+BTRCamY+fVcOy8Gg5rE330qe+MUS2rwM6Ms/OIiMqrzp07o3PnzlLHKHWSfuxy5coVeHl5wcvLCwDg4+MDLy8vzJw5EwAQGRmJ0NBQKSO+MzszAzSqbAkAOBDEu/ARERERFcXGsyFYcDAYADDlvRoY01r6GeeaIggC3JzM8VW32jj7ZXtsH9sUg5pURAUjPcSlZOLnU4/QauEJfL07CGHP0qSOS0REVGIkbUq1bds2z12Jcr98fX0BAL6+vvD39y/0+NmzZ792kfOyooeHAwBg3w02pYiIiIje5LeLTzBn320AwGftXTGxfXWJE5UemUxAk6pWmN/bHZe+7oj1QxuiYaUKyMxR4beLoWi72B8+OwLwICZF6qhERETvjBeol4Kubg6QCUBgWAI/3SIiIiJ6jZ1Xw/H17psAgI9bV8XnnWpInEg6enIZOtaxwx/jmmHb2KZoVd0aOSoRu65FoNOPJzH+t6u4GSHNrcuJqPwTRVHqCFTGqVSqdz6H1ix0rs1sTJVoWtUK5x7Gwy8oEuPaVJM6EhEREVGZ81dABKbuDAQADG9eGdO61tLJRfr/SxAENK1qhaZVrRAYloAVJx7g6O1o9cLo7WraYGJ7VzSoZCl1VCIqB/T09CAIAmJjY2FjY1Nuvw+Loojs7GwoFIpyW+PrvEv9oigiMzMTsbGxkMlk0NfXL3YONqVKSXcPB5x7GI/9N56yKUVERET0HweDIuGzIxAqERjQuCJmedfRyV8S3sTTxQLrhjZEcFQSVp14iP03nuLE3VicuBuLplUtMbFddbRwteJ7R0TFJpfL4ezsjPDwcDx+/FjqOBojiiJUKpX6bsm6piTqNzIyQsWKFd/pjsRsSpWSLnXtMfOvW7gZkYTHcamobG0sdSQiIiKiMuHY7Wh8+vt15KhE9K3vjPm93HTyF4S3UcveDD8N8IJPpxpY7f8Qu66H48KjZ7jw6CI8XSwwsZ0rOtSyhUzG95GI3p6JiQmqV6+OrKwsqaNojEqlQnx8PKysrN6pqaKt3rV+uVxeIrPM2JQqJVYmSjSvZoXT9+PgFxSJCe1cpY5EREQkGV9fX0yePBkJCQkFPv/48WNUqVIF169fR7169Uo1G5WuU/diMf63a8hWifD2dMT/PvBgI+UtVLY2xsIPPDCpY3X8fOoRfr8UisCwBIzZfAW17E0xvp0rurs7QM73lIjeklwuh1wulzqGxqhUKujp6cHAwEBnm1JloX7de+clpL4LX+BTiZMQERERSe/8w3iM2XwFmTkqdKlrjx/6ebJ5UkyOFoaY3bMuzk5rj0/aVoOJUoHgqGR89vt1dPzhJHZcDkNm9rsvSEtERFSS2JQqRZ3r2kMhExAclczb+BIREZFOu/L4GUZtuoyMbBXa17LFTwO8oCfn0PRdWZso8WWXWjj7ZXv4dKoBCyM9hMSlYuqfN9B20QlsOvcY6Vk5UsckIiICwKZUqbIw0kfL6tYAAL8bkRKnISIiKphKpcKCBQtQpUoVGBoawtPTEzt37lQ/5+zsjNWrV+c55vr165DJZHjy5AkA4IcffoC7uzuMjY3h4uKC8ePHIyXl3T6QOXnyJBo3bgylUgkHBwdMmzYN2dnZ6ud37twJd3d3GBoawsrKCp06dUJqaioAwN/fH40bN4axsTEsLCzQokULdVYqfQFhCRi+8TLSMnPQqro1Vg2qD30Fh6UlydxID591qI6zX7bH191qw8ZUiaeJ6Zi19xZaLjyBNScfIiUj+80nIiIi0iD+9C9lPTwcAQD7b/ASPiIinSOKQGaqNF+iWOSYCxYswObNm7FmzRrcunULn3/+OQYPHoyTJ09CJpNhwIAB2Lp1a55jfvvtN7Ro0QKVKlUCAMhkMvz000+4desWNm3ahL///htTp04t9lsXERGBbt26oVGjRggMDMTq1avxyy+/YN68eQCAyMhIDBgwACNHjsSdO3fg7++P3r17q2933KtXL7Rp0wY3btzA+fPnMXbsWC6kLZGbEYkY+stFpGRko0kVS/w8pCEM9MrvmiVSM1YqMKZ1VZye2g7f9nKDk4Uh4lIy8P3BYLT4/m/8ePQeEtIypY5JREQ6igudl7JOdeygL5fhfkwK7kUno4adqdSRiIiotGSlAd85ltrLCQD0ch989RTQf/OdXzMyMvDdd9/h2LFjaNasGQCgatWqOHPmDNauXYs2bdpg0KBBWLJkCUJDQ1GxYkWoVCps27YNM2bMUJ9n8uTJ6v+vXLky5s2bh3HjxmHVqlXFqmXVqlVwcXHBihUrIAgCatWqhadPn+LLL7/EzJkzERkZiezsbPTp00fdGHNzc0N2djaSkpKQmJiIHj16oFq1agCA2rVrFysHvZu7UckY8stFJKVno0GlCtgwvBEM9dmQKg0GenIMaVoJHzVywZ7rEVjt/xCP4lKx7Ph9rD/9CL3crfFFVwtYmhhIHZWIiHQIZ0qVMnNDPbSu8fISvv1c8JyIiMqYBw8eIC0tDZ06dYKJiYn6a/PmzXj48CEAoF69eqhdu7Z6ttTJkycRExODDz/8UH2eY8eOoUOHDnBycoKpqSmGDBmC+Ph4pKWlFSvXnTt30KxZszyzm1q0aIGUlBSEh4fD09MTHTp0gLu7Oz788EOsW7cOz58/BwBYWlpi+PDh6Ny5M7y9vbFs2TJERvIy+tImiiKm7gzE87QseDqbY+OIRjBW8vPR0qYnl+HDhi446tMGKwfWR20HM6Rm5uC3q9Ho+MMp7LgcBpWq6DMriYiI3gVHAhLo4eGIY3disP9GJD7vVIOXDxAR6Qo9o5czlkpJ7qVrCoUCgp5RkY7JXffJz88PTk5OeZ5TKpXq/x80aBC2bt2KadOmYevWrejSpQusrKwAAI8fP0aPHj3wySefYP78+bC0tMSZM2cwatQoZGZmwsioaFnehlwux9GjR3Hu3DkcOXIEy5cvx9dff40zZ86gevXq2LhxIz777DMcOnQI27dvx4wZM3D06FE0bdq0xLNQwQRBwIqB9THP7zYW9vWAmYHemw8ijZHLBHT3cEA3d3scvxON7/xu4VF8Oqb+eQNbL4ViXi83uDmZSx2TiIjKOc6UkkDHOnbQV8jwKC4VdyKTpY5DRESlRRBeXkInxVcRPwCpU6cOlEolQkND4erqmufLxcVFvd/AgQNx8+ZNXL16FTt37sSgQYPUz129ehUqlQpLlixB06ZNUaNGDTx9+m7NuNq1a+P8+fMQX1kb6+zZszA1NYWzs/M/b6+AFi1aYM6cObh+/Tr09fXx119/qff38vLC9OnTce7cObi5ueVbF4s0z8XSCGuHNISFkb7UUegfgiCgfS1bbB5YB191qwUTpQIBYQnwXnEGM/YEcb0pIiLSKDalJGCiVKBdTRsAXPCciIjKFlNTU0yZMgWff/45Nm3ahIcPH+LatWtYvnw5Nm3apN6vcuXKaN68OUaNGoWcnBz07NlT/ZyrqyuysrKwfPlyPHr0CFu2bMGaNWveKdf48eMRFhaGTz/9FMHBwfjrr78wa9Ys+Pj4QCaT4eLFi/juu+9w5coVhIaGYteuXYiNjUWtWrUQEhKC6dOn4/z583jy5AmOHDmC+/fvc10polco5AJGt6yC41+0wfv1HCGKwK8XQtF+yUlsvxzKS/qIiEgj2JSSSO5d+PyCIvN86ktERCS1b7/9Ft988w0WLFiA2rVro0uXLvDz80OVKlXy7Ddo0CAEBgaid+/eMDQ0VG/39PTEDz/8gIULF8LNzQ2//fYbFixY8E6ZnJyccODAAVy6dAmenp4YN24cRo0apV5c3czMDKdOnUK3bt1Qo0YNzJgxA4sXL0aXLl1gZGSE4OBg9O3bFzVq1MDYsWMxYcIEfPzxx++Uiag8sjMzwLKPvLBtbFPUsDPBs9RMfPlnEPqsPoeg8ESp4xERUTkjiDrWEUlKSoK5uTkSExNhZmYmWY60zGzU//Yo0rNU2DexJdydNX/NvkqlQkxMDGxtbSGT6VY/UpdrB1g/69fd+qWuPT09HSEhIahSpQoMDEr/jlZ51pTSwfULS6L+1/0ZlpUxRUkqjzUVldTfL6RUWO1ZOSpsOvcYS4/dR0pGNgQBGNi4Iv6vc81ydQmmLv/ZA6xfl+vX5doB1q/p+os6ptC9d76MMNJXoEMtOwC8hI+IiIiIyh49uQyjW1XF31+0Qa9/Lun77WIo2i32x7ZLvKSPiIjeHZtSEurh4QAA2H+Dl/ARERERUdlka2aApf9c0lfTzhTP07IwbVcQeq8+hxvhCVLHIyIiLcamlITa1bKFkb4cEQkvEBCWIHUcIiIiIqJCNa1qhf2ftcQ3PerARKlAYFgC3l95Fl/tDsLzVN6lj4iI3h6bUhIy0JOjY+3cS/giJU5DRERERPR6enIZRrWsgr+/aIPeXk4QRWDrxVC0X+KP33lJHxERvSU2pSSWewnfgaBI/hAnIiIiIq1ga2aAH/vXw/ZXLumbzkv6iIjoLbEpJbHWNWxgqlQgMjEd10KfSx2HiIg0gOsGai+VSiV1BKIyrQkv6SMionegkDqArjPQk6NTHTvsuh6B/Tci0bCypdSRiIiohOjp6UEQBMTGxsLGxgaCIJTq64uiiOzsbCgUilJ/7bLgXeoXRRGZmZmIjY2FTCaDvr6+hlISab/cS/q8PRyw4GAwdl+PwNaLoTgQFIkvu9RC/4YukMl073sQERG9GZtSZUAPTwfsuh6BA0GR+KZHHcj5Q5uIqFyQy+VwdnZGeHg4Hj9+XOqvL4oiVCoVZDKZzjal3rV+IyMjVKxYETIZJ5cTvUnuJX0fNXLBrL23EByVjOm7grDtUijmvu8GTxcLqSMSEVEZw6ZUGdDS1QZmBgrEJGfg8uNnaFrVSupIRERUQkxMTFC9enVkZWWV+murVCrEx8fDyspKJ5sq71q/XC7X2VlmRO+iSVUr7P+0JTaff4Ifj95DYHgieq06i48aVcTUzjVRwZgzD4mI6CU2pcoAfYUMneva44+r4dh/4ymbUkRE5YxcLodcLi/111WpVNDT04OBgYHONqV0uX4iKSnkMoxsWQU9PB3w/YFg7Loegd8vheLo7Sj87wMPtK9lJ3VEIiIqAzhCKyN6eDoCAA7djEJ2DhdVJSIiIiLtZ2tqgB/618OOj5uhhp0J4lIyMdL3Cr7eHYS0zGyp4xERkcTYlCojmlezQgUjPcSlZOJiyDOp4xARERERlZjGVSyxd2JLjG5ZBQDw28VQ9PjpDALDEqQNRkREkmJTqozQk8vQxc0eALD/xlOJ0xARERERlSwDPTlm9KiD30Y3gb2ZAR7FpaLv6nNYfvw+rxQgItJRbEqVIT08/r2EL4s/mImIiIioHGrhao1Dk1uhu4cDslUilhy9h/4/X0BofJrU0YiIqJSxKVWGNKliCStjfTxPy8K5h/FSxyEiIiIi0ggLI32sGOCFH/t7wlSpwNUnz9F12SnsuBIGURSljkdERKWETakyRCGXoav7y0v4/HgJHxERERGVY4IgoLeXMw5MaoXGlS2RmpmDqTtv4JNfr+F5aqbU8YiIqBRI2pQ6deoUvL294ejoCEEQsGfPntfuv2vXLnTq1Ak2NjYwMzNDs2bNcPjw4dIJW0pevYQvM5uX8BERERFR+eZiaYTfxzbF1C41oScXcOhWFDovPYWT92KljkZERBomaVMqNTUVnp6eWLlyZZH2P3XqFDp16oQDBw7g6tWraNeuHby9vXH9+nUNJy09jSpbwsZUiaT0bJx5wB/ERERERFT+yWUCxrd1xe7xLVDNxhgxyRkYtuESZu+9hfSsHKnjERGRhkjalOratSvmzZuH3r17F2n/pUuXYurUqWjUqBGqV6+O7777DtWrV8e+ffs0nLT0yGUCurs7AAD234iUOA0RERFpq++//x6CIGDy5MlSRyEqMjcnc+z/tBWGNasEAPA99xg9lp/BzYhEiZMREZEmaPWaUiqVCsnJybC0tJQ6Sonq4fGyKXX0VjQ/GSIiIqK3dvnyZaxduxYeHh5SRyF6a4b6csx53w2+IxrBxlSJBzEp6L3qLFb7P0SOiougExGVJwqpA7yLxYsXIyUlBf369St0n4yMDGRkZKgfJyUlAXjZ0FKpyuaaTfWczWFvpkRUUgZO3o1Bpzp2JXJelUoFURTLbN2apMu1A6yf9etu/bpcO8D6NV1/WX1fU1JSMGjQIKxbtw7z5s2TOg5RsbWtaYvDk1tj2p83cOR2NBYeCsaJuzH4oZ8nnCsYSR2PiIhKgNY2pbZu3Yo5c+bgr7/+gq2tbaH7LViwAHPmzMm3PTY2Funp6ZqM+E7aVjPHtusx+PPyY3haCyVyTpVKhcTERIiiCJlMqyfJvTVdrh1g/axfd+vX5doB1q/p+pOTk0v8nCVhwoQJ6N69Ozp27PjGppQ2fninKbrcxC3LtVsYKrB6kBf+uBqOb/ffwaWQZ+iy9DTmvl8H73u+vFnSuyrL9ZcG1q+79ety7QDrLysf3mllU2rbtm0YPXo0/vjjD3Ts2PG1+06fPh0+Pj7qx0lJSXBxcVHfwa+s6tdUH9uux+BsSCLMKljBQE/+zudUqVQQBAE2NjY698uJLtcOsH7Wr7v163LtAOvXdP0GBgYlfs53tW3bNly7dg2XL18u0v7a+uGdJuhyE1cbam9bUQnXgbUx53AIgiJT4bPjBg4EhGFq+4owM3i3X2m0oX5NYv26W78u1w6w/rLy4Z3WNaV+//13jBw5Etu2bUP37t3fuL9SqYRSqcy3XSaTlem/eF4VK8DJwhARCS9w8l4cuv6z+Pm7EgShzNeuKbpcO8D6Wb/u1q/LtQOsX5P1l7X3NCwsDJMmTcLRo0eL3DDT1g/vNEGXm7jaUrutLfBnNSesPvkIP/39AMfuPcet6BdY9IEHmlezKvZ5taV+TWH9ulu/LtcOsP6y8uGdpE2plJQUPHjwQP04JCQEAQEBsLS0RMWKFTF9+nRERERg8+bNAF5esjds2DAsW7YMTZo0QVRUFADA0NAQ5ubmktSgKYIgoIeHA9aeeoT9QZEl1pQiIiKi8unq1auIiYlB/fr11dtycnJw6tQprFixAhkZGZDL88681tYP7zRFl5u42lK7vkyGSR1roE1NW3y+PQAhcakY/MsljGlVBVM614RSUbyrC7Slfk1h/bpbvy7XDrD+svDhnaTv/JUrV+Dl5QUvLy8AgI+PD7y8vDBz5kwAQGRkJEJDQ9X7//zzz8jOzsaECRPg4OCg/po0aZIk+TWt+z934fv7TgzSMrMlTkNERERlWYcOHRAUFISAgAD1V8OGDTFo0CAEBATka0gRabN6Lhbw+6wlBjapCABYdzoE7684i+CoJImTERHR25B0plTbtm0hioXf1tXX1zfPY39/f80GKmPcncxR0dIIoc/ScPxODLw9HaWORERERGWUqakp3Nzc8mwzNjaGlZVVvu1E5YGRvgLf9XZH+5q2+PLPGwiOSkbP5WcxtUtNjGxRBTJZydwsiIiINEc356hpidxL+ADA70akxGmIiIiIiMqejnXscGhya7SvZYvMHBXm+d3B2C1XkPgiS+poRET0BmxKlXG5l/CduBuDlAxewkdERERF5+/vj6VLl0odg0jjbEyV+GVYQ8zr5QZ9hQzH7sTg/RVncDeqaHd/IiIiabApVcbVcTBDVWtjZGSrcOx2tNRxiIiIiIjKJEEQMLhpJewc1wxOFoZ4HJ+GXivPYm/gU6mjERFRIdiUKuNevYRvPy/hIyIiIiJ6LQ9nC+z7tCVaulrjRVYOPvv9Oubuu42sHJXU0YiI6D/YlNIC3T1eLnB+6l4sr40nIiIiInoDS2N9bBrZGOPbVgMAbDgbgkHrLyImOV3iZERE9Co2pbRATXtTVLc1QWYOL+EjIiIiIioKuUzA1C61sGZwA5goFbgU8gzey8/g6pPnUkcjIqJ/sCmlJXr8M1tq/w1eE09EREREVFRd3Ozx18QWcLU1QXRSBj76+Ty2nH8MURSljkZEpPPYlNISuXfhO30/DglpmRKnISIiIiLSHtVsTLBnQgt0c7dHVo6Ib/66hS/+CER6Vo7U0YiIdBqbUlrC1dYEtexNka0SceQWL+EjIiIiInobJkoFVg6sj6+61YJMAHZdi0CfVecQ9ixN6mhERDqLTSkt4u358hK+fbyEj4iIiIjorQmCgLGtq+HX0U1gZayP25FJ6LnyHM4/TpQ6GhGRTmJTSot0d395Cd+5h/GIT8mQOA0RERERkXZqXs0a+z5tCU8XCyS+yILPngdY8fcDqFRcZ4qIqDSxKaVFKlsbw83JDDkqEYd5CR8RERERUbE5Whhix8dNMaCxC0QAPxy7j7FbriDxRZbU0YiIdAabUlqGd+EjIiIiIioZSoUc83u5YUanStBXyHDsTgzeX3EGd6OSpY5GRKQT2JTSMrmX8F14FI/YZF7CR0RERET0rnrUtcYfHzeFk4UhHsenodfKs9gbyA+BiYg0jU0pLeNiaQRPFwuoRODQzUip4xARERERlQvuTubY92lLtHS1xousHHz2+3V8u/82snJUUkcjIiq32JTSQt4eL2dL7bvBphQRERERUUmxNNbHppGNMb5tNQDAL2dCMGj9RV6hQESkIWxKaaFu/1zCd/nxMySlcyFGIiIiIqKSIpcJmNqlFtYMbgATpQKXQp6hx/LTuPrkudTRiIjKHTaltJCjhSGcKxhCFIGb4YlSxyEiIiIiKne6uNnjr4ktUN3WBNFJGfjo5/PYcv4xRFGUOhoRUbnBppSW8nA2BwDciGBTioiIiIhIE6rZmGDPhBbo7u6ArBwR3/x1C1/8EYj0rBypoxERlQtsSmkpD2cLAEAQZ0oREREREWmMsVKBFQO98HW32pDLBOy6FoE+q84h7Fma1NGIiLQem1JaysMpd6ZUgrRBiIiIiIjKOUEQMKZ1VWwZ1RhWxvq4HZmEnivO4FLIM6mjERFpNTaltFTdf5pSYc9e4HlqpsRpiIiIiIjKv+bVrLH/s5bwcDbH87QsDFp/AX9eDZc6FhGR1mJTSkuZG+qhirUxACCI60oREREREZUKB3NDbB/bDN3c7ZGVI+KLPwKx+PBdqFRcAJ2I6G2xKaXF3P+ZLcWmFBERERFR6THUl2PFgPqY0K4aAGDFiQf49PfrXACdiOgtsSmlxdR34AtPkDYIEREREZGOkckE/F/nWlj8oSf05AL8giLR/+cLiElOlzoaEZHWYFNKi+XOlLrBO/AREREREUnigwbO+HVUE1gY6SEwLAG9V57DncgkqWMREWkFNqW0WF0ncwgCEJmYzk9kiIiIiIgk0qSqFfaMb4Gq1saISHiBD1afw4ngGKljERGVeWxKaTETpQKuNiYAgJtcV4qIiIiISDKVrY2xe3wLNK9mhdTMHIzadBkbz4ZAFLkAOhFRYdiU0nLuzryEj4iIiIioLDA30sOmkY3xUSMXqERgzr7bmPnXLWTnqKSORkRUJrEppeU8cu/Ax6YUEREREZHk9OQyLOjjjq+61YIgAFsuPMHITVeQlJ4ldTQiojKHTSkt5+5sAQC4EZHIqcFERERERGWAIAgY27oa1gxuAEM9OU7di0XfVecQ9ixN6mhERGUKm1Jaro6DGeQyAbHJGYhOypA6DhERERER/aNzXXv8Ma4Z7MyUuB+Tgl4rz+Lqk+dSxyIiKjMkbUqdOnUK3t7ecHR0hCAI2LNnzxuP8ff3R/369aFUKuHq6gpfX1+N5yzLDPXlqG77crHzG+EJ0oYhIiIiIqI83JzM8deElqjraIb41EwMWHcBfwVESB2LiKhMkLQplZqaCk9PT6xcubJI+4eEhKB79+5o164dAgICMHnyZIwePRqHDx/WcNKyzYOLnRMRERERlVn25gbY8XEzdKpjh8xsFSZtC8DSY/e4/AYR6TyFlC/etWtXdO3atcj7r1mzBlWqVMGSJUsAALVr18aZM2fw448/onPnzpqKWea5O1tgx5Vw3IhgU4qIiIiIqCwyViqwZnADLDwUjJ9PPcLSY/cREpeKhX09YKAnlzoeEZEkJG1Kva3z58+jY8eOebZ17twZkydPLvSYjIwMZGT8u9ZSUlISAEClUkGlKh+3ZnV3NAMABIUnICcnB4IgFLifSqWCKIrlpu63ocu1A6yf9etu/bpcO8D6NV2/rr6vRFR8cpmAr7rVRlVrY8zYcxN/BTxF+PMXWDukAaxNlFLHIyIqdVrVlIqKioKdnV2ebXZ2dkhKSsKLFy9gaGiY75gFCxZgzpw5+bbHxsYiPT1dY1lLk6VMBYVMwPO0LAQ+CIejecE/0FQqFRITX96lTybTrTXudbl2gPWzft2tX5drB1i/putPTk4u8XMSkW74qHFFuFga4ZNfr+Lqk+fotfIsNg5vhOp2plJHIyIqVVrVlCqO6dOnw8fHR/04KSkJLi4usLGxgZmZmYTJSlYtB1PcjEjC03QF6lW3LXAflUoFQRBgY2Ojc7+c6HLtAOtn/bpbvy7XDrB+TddvYGBQ4uckIt3RwtUau8a3wKhNl/EkPg19Vp3DykH10bqGjdTRiIhKjVY1pezt7REdHZ1nW3R0NMzMzAqcJQUASqUSSmX+mUMymaxcDdA9nC1wMyIJN58mo4enU6H7CYJQ7movKl2uHWD9rF9369fl2gHWr8n6dfU9JaKS42prgt3jW2Dclqu49PgZRvhexuyedTGkaSWpoxERlQqtGk01a9YMx48fz7Pt6NGjaNasmUSJyg4Pp5d34AuKSJA2CBERERERFZmlsT62jG6MPvWdkKMS8c2em5iz7xZyVLwzHxGVf5I2pVJSUhAQEICAgAAAQEhICAICAhAaGgrg5aV3Q4cOVe8/btw4PHr0CFOnTkVwcDBWrVqFHTt24PPPP5cifpni7vyyKXUjPBEq/gAjIiIiItIaSoUcSz70xP91rgkA2Hj2McZsvoKUjGyJkxERaZakTakrV67Ay8sLXl5eAAAfHx94eXlh5syZAIDIyEh1gwoAqlSpAj8/Pxw9ehSenp5YsmQJ1q9fj86dO0uSvyypYWcKfYUMyenZePIsTeo4RERERET0FgRBwIR2rlg5sD6UChn+Do7BB6vP4WnCC6mjERFpjKRrSrVt2xaiWPisHl9f3wKPuX79ugZTaSc9uQx1HMwQEJaAG+EJqGJtLHUkIiIiIiJ6S909HOBUwRCjN11BcFQy+qw6B9+RjVDLvvzcpImIKJdWrSlFr+f5zyV8QeGJEichIiIiIqLiqudigb8mtoCrrQmiktLx4erzOPcwTupYREQljk2pcsTd2QIAcCOCTSkiIiIiIm3mZGGIP8c1R+PKlkjOyMawDZfwV0CE1LGIiEoUm1LliMc/M6VuRSTybh1ERERERFrO3EgPm0c1Rnd3B2TliJi0LQBrTz587RIoRETahE2pcqSajQkM9eRIzcxBSFyK1HGIiIiolK1evRoeHh4wMzODmZkZmjVrhoMHD0odi4jegYGeHMsHeGFkiyoAgAUHgzFn321+CE1E5QKbUuWIXCbAzenlAog3uK4UERGRznF2dsb333+Pq1ev4sqVK2jfvj3ef/993Lp1S+poRPQOZDIBM73rYEb32gAA33OPMXHrNaRn5UicjIjo3bApVc64O1kAYFOKiIhIF3l7e6Nbt26oXr06atSogfnz58PExAQXLlyQOhoRlYDRrapi+QAv6MtlOHgzCoPXX0RCWqbUsYiIio1NqXImd12pG+EJ0gYhIiIiSeXk5GDbtm1ITU1Fs2bNpI5DRCXE29MRm0Y2hqmBAleePEff1ecQ9ixN6lhERMWikDoAlSz33MXOnyYhO0cFhZx9RyIiIl0SFBSEZs2aIT09HSYmJti9ezfq1KlT4L4ZGRnIyMhQP05KSgIAqFQqqFSqUslbVqhUKoiiqHN1A7pdO6Cd9TepUgF/fNwUI3yv4GFsKvqsPocNwxqgrqP5W59LG+svSbpcvy7XDrB+Tddf1POyKVXOVLEyhqlSgeSMbNyPSUFtBzOpIxEREVEpqlmzJgICApCYmIidO3di2LBhOHnyZIGNqQULFmDOnDn5tsfGxiI9Pb004pYZKpUKiYmJEEURMplufainy7UD2lu/hQCs/bA6Pt/zAA/jXqD/2gtY0KMamlR6u/G/ttZfUnS5fl2uHWD9mq4/OTm5SPuxKVXOyGQC3JzMcf5RPILCE9mUIiIi0jH6+vpwdXUFADRo0ACXL1/GsmXLsHbt2nz7Tp8+HT4+PurHSUlJcHFxgY2NDczMdGsMoVKpIAgCbGxsdO6XE12uHdDu+m1tgT/H2+GTX6/h/KNn+OKvB/i+jzv61Hcq8jm0uf6SoMv163LtAOvXdP0GBgZF2o9NqXLIw/llU+pGRAL6NXKROg4RERFJSKVS5blE71VKpRJKpTLfdplMppMDdEEQWLsO1g5od/0WRkr4jmyM//vjBvYGPsWUnTcQnZyB8W2rQRCEIp1Dm+svCbpcvy7XDrB+TdZf1HOyKVUO5a4rFcQ78BEREemU6dOno2vXrqhYsSKSk5OxdetW+Pv74/Dhw1JHIyINUirkWNq/HhwsDLD25CMsOnwXTxNeYE7PulxjlojKNDalyiEPJwsAwJ3IZGRmq6Cv4A8iIiIiXRATE4OhQ4ciMjIS5ubm8PDwwOHDh9GpUyepoxGRhslkAqZ3rQ1Hc0PM3ncLv10MRXRSBpYP8IKhvlzqeEREBWJTqhxysTSEuaEeEl9k4W5UsnrmFBEREZVvv/zyi9QRiEhiw5pXhp2ZEp9tC8CxO9EYuP4CfhnWCJbG+lJHIyLKh1NoyiFBEODxTyPqRkSCtGGIiIiIiKhUdXFzwNbRTWBuqIfroQnou/ocnsSnSh2LiCgfNqXKKXcnritFRERERKSrGla2xJ+fNIeThSFC4lLRd/U5BIYlSB2LiCgPNqXKKfVMKTaliIiIiIh0kqutCXaPb466jmaIS8nERz9fwIngGKljERGpsSlVTnk4WwAA7kUnIz0rR9owREREREQkCVszA2z/uBlaVbfGi6wcjN58Bdsvh0odi4gIAJtS5ZaDuQGsTfSRrRJxJzJJ6jhERERERCQRE6UCG4Y3Qp/6TshRifjyzyD8ePQeRFGUOhoR6Tg2pcopQRD+XVcqgpfwERERERHpMj25DEs+9MTEdq4AgGXH72Pan0HIylFJnIyIdBmbUuWY+z+X8AWGsSlFRERERKTrBEHAlM41Mb+3G2QCsP1KGMZuuYa0TC73QUTSYFOqHPNQz5RKkDYIERERERGVGYOaVMLaIQ1hoCfDyXuxmPDnPcSlZEgdi4h0EJtS5Zj7P3fgexCTgtSMbInTEBERERFRWdGpjh22jmkKSyM93IlOw4drLyA0Pk3qWESkY9iUKsfszAxgZ6aESgRuc7FzIiIiIiJ6Rf2KFbBjXDM4mOnjSXwa+qw+h5tcj5aIShGbUuWcu5MFAOBGOH+4EBERERFRXlWtjbGufy3UdjBFXEoGPvr5As4+iJM6FhHpiGI1pcLCwhAeHq5+fOnSJUyePBk///xziQWjkuH5zyV8QeEJ0gYhIiIiIqIyydpYD7+PaYKmVS2RkpGN4RsvYW/gU6ljEZEOKFZTauDAgThx4gQAICoqCp06dcKlS5fw9ddfY+7cuSUakN5N7rpSNzgNl4iIiIiICmFmoIdNIxuju7sDsnJEfPb7dWw4EyJ1LCIq54rVlLp58yYaN24MANixYwfc3Nxw7tw5/Pbbb/D19S3JfPSO3P+5A9+j2FQkpWdJnIaIiIiIiMoqpUKOnwZ4YVizSgCAuftv4/uDwRBFUeJkRFReFasplZWVBaVSCQA4duwYevbsCQCoVasWIiMjSy4dvTMrEyWcLAwBALciuNg5EREREREVTi4TMLtnXfxf55oAgDUnH+KLPwKRlaOSOBkRlUfFakrVrVsXa9aswenTp3H06FF06dIFAPD06VNYWVmVaEB6dx6560rxEj4iIiIiInoDQRAwoZ0rFn3gAblMwK5rERiz+QrSMrOljkZE5UyxmlILFy7E2rVr0bZtWwwYMACenp4AgL1796ov66Oyw51NKSIiIiIieksfNnTBuqENYKAng//dWAxYdxHPUjOljkVE5UixmlJt27ZFXFwc4uLisGHDBvX2sWPHYs2aNSUWjkqGh5MFADaliIiItM21a9fQo0cPqWMQkQ5rX8sOW8c0hYWRHgLDEvDB6nMIe5YmdSwiKieK1ZR68eIFMjIyUKFCBQDAkydPsHTpUty9exe2trZvda6VK1eicuXKMDAwQJMmTXDp0qXX7r906VLUrFkThoaGcHFxweeff4709PTilKEzchc7D332AonpnHJLRERUlhw+fBhTpkzBV199hUePHgEAgoOD0atXLzRq1AgqFddxISJp1a9YATvHNYeThSEexaWiz+pzuP2U69US0bsrVlPq/fffx+bNmwEACQkJaNKkCZYsWYJevXph9erVRT7P9u3b4ePjg1mzZuHatWvw9PRE586dERMTU+D+W7duxbRp0zBr1izcuXMHv/zyC7Zv346vvvqqOGXoDHMjPVS2MgIABEfzUw0iIqKy4pdffkHXrl3h6+uLhQsXomnTpvj111/RrFkz2Nvb4+bNmzhw4IDUMYmI4Gprgl3jm6OWvSlikzPQf+15nHsYJ3UsItJyxWpKXbt2Da1atQIA7Ny5E3Z2dnjy5Ak2b96Mn376qcjn+eGHHzBmzBiMGDECderUwZo1a2BkZJTnksBXnTt3Di1atMDAgQNRuXJlvPfeexgwYMAbZ1cR4O5sAQAIjk6VNggRERGpLVu2DAsXLkRcXBx27NiBuLg4rFq1CkFBQVizZg1q164tdUQiIjU7MwNs/7gZGlexRHJGNoZvuAy/G7z7OhEVn6I4B6WlpcHU1BQAcOTIEfTp0wcymQxNmzbFkydPinSOzMxMXL16FdOnT1dvk8lk6NixI86fP1/gMc2bN8evv/6KS5cuoXHjxnj06BEOHDiAIUOGFPo6GRkZyMjIUD9OSno5zVSlUunUdHh3RzPsC3yK29GpOlV3LpVKBVEUdbJ2gPWzft2tX5drB1i/pusvifM+fPgQH374IQCgT58+UCgUWLRoEZydnd/53EREmmBuqIfNIxtj8rYAHLoVhYm/X0NcSl0Ma15Z6mhEpIWK1ZRydXXFnj170Lt3bxw+fBiff/45ACAmJgZmZmZFOkdcXBxycnJgZ2eXZ7udnR2Cg4MLPGbgwIGIi4tDy5YtIYoisrOzMW7cuNdevrdgwQLMmTMn3/bY2FidWovK2fjlwPl2VApiYmIgkxVrkpzWUqlUSExMhCiKOlc7wPpZv+7Wr8u1A6xf0/UnJye/8zlevHgBI6OXl9gLggClUgkHB4d3Pi8RkSYZ6MmxclB9zNp7E79eCMWsvbcQk5yOKe/VhCAIUscjIi1SrKbUzJkzMXDgQHz++edo3749mjVrBuDlrCkvL68SDfgqf39/fPfdd1i1ahWaNGmCBw8eYNKkSfj222/xzTffFHjM9OnT4ePjo36clJQEFxcX2NjYFLmBVh60MKsAQbiH2NQcyIzMYWtmKHWkUqVSqSAIAmxsbHT2FzPWz/p1sX5drh1g/Zqu38DAoETOs379epiYmAAAsrOz4evrC2tr6zz7fPbZZyXyWkREJUUuE/Dt+26wMzXAkqP3sPLEQ8QkZWBBH3co5Lr3M4eIiqdYTakPPvgALVu2RGRkJDw9PdXbO3TogN69exfpHNbW1pDL5YiOjs6zPTo6Gvb29gUe880332DIkCEYPXo0AMDd3R2pqakYO3Ysvv766wIHnEqlEkqlMt92mUymUwN0cyMlqlob42FsKm5FJsPewljqSKVOEASd+3N/Fetn/bpavy7XDrB+TdZfEuesWLEi1q1bp35sb2+PLVu25NlHEAQ2pYioTBIEAZ92qA4bUyW+2h2EP66GIz41EysH1oehvlzqeESkBYo9mrK3t4eXlxeePn2K8PBwAEDjxo1Rq1atIh2vr6+PBg0a4Pjx4+ptKpUKx48fV8+8+q+0tLR8A0C5/OU3O1EUi1OGTnF3MgcABIUnSpyEiIiIAODx48cICQkp9Ov06dPo2LGj1DGJiF7ro8YVsXZIQygVMvwdHIOB6y/geWqm1LGISAsUqymlUqkwd+5cmJubo1KlSqhUqRIsLCzw7bffvtWinz4+Pli3bh02bdqEO3fu4JNPPkFqaipGjBgBABg6dGiehdC9vb2xevVqbNu2DSEhITh69Ci++eYbeHt7q5tTVDh1UyoiSeIkREREVBTx8fH45ZdfpI5BRPRGnerY4bfRTWBuqIfroQnou+Ycwp+nSR2LiMq4Yl2+9/XXX+OXX37B999/jxYtWgAAzpw5g9mzZyM9PR3z588v0nn69++P2NhYzJw5E1FRUahXrx4OHTqkXvw8NDQ0z8yoGTNmQBAEzJgxAxEREbCxsYG3t3eRX0/XeTjnNqU4U4qIiIiIiEpWw8qW2DmuGYZtuIRHsanou/ocNo1sjFr2urOWLxG9nWI1pTZt2oT169ejZ8+e6m0eHh5wcnLC+PHj36pJNHHiREycOLHA5/z9/fOGVSgwa9YszJo1qzixdV4dBzPIBCAmOQNRiemwNy+ZBVqJiIiIiIgAoLqdKf4c3xzDNlzCvegUfLjmPNYPbYgmVa2kjkZEZVCxLt979uxZgWtH1apVC8+ePXvnUKQZhvpyVLF6ede9G+EJ0oYhIiIiIqJyycHcEH983ByNKldAcno2hmy4hEM3I6WORURlULFmSnl6emLFihX46aef8mxfsWIFPDw8SiQYaUZtWyM8jHuBoIhEvFe34LscEhERUeno06fPa59PSEgonSBERCXM3EgPW0Y1wWe/X8eR29H45LdrmNuzLoY0qyx1NCIqQ4rVlPrf//6H7t2749ixY+o75Z0/fx5hYWE4cOBAiQakklXLzgj7b8fjBu/AR0REJDlzc/M3Pj906NBSSkNEVLIM9ORYPbgBvvnrJrZeDMU3f91CZGI6/q9zTQiCIHU8IioDitWUatOmDe7du4eVK1ciODgYwMtP+saOHYt58+ahVatWJRqSSk5tO2MALxc7F0WRPwyIiIgktHHjRqkjEBFplFwmYH4vN9ibGeCHo/ewyv8hopLSsbCvB/TkxVpNhojKkWI1pQDA0dEx34LmgYGB+OWXX/Dzzz+/czDSDFdrQyhkAp6lZiIi4QWcKxhJHYmIiIiIiMoxQRDwWYfqsDczwPTdQdh1LQJxKZlYNag+TJTF/pWUiMoBtqZ1jFIhQ017UwBAEC/hIyIiIiKiUtKvkQvWD20IQz05Tt2LxYCfLyA2OUPqWEQkITaldJC708v1K25EsClFRERERESlp10tW/w+tiksjfURFJGIPqvPIiQuVepYRCQRNqV0kIfzP02p8ARpgxARERERkc6p52KBXZ80R0VLI4Q9e4G+q8/heuhzqWMRkQTe6gJe3ra4fHB3MgMA3AjnYudERERERFT6Klsb489PmmPUpsu4EZ6IAesuYOXA+uhQ207qaERUit5qppS5uflrvypVqsTbFmuB6ram0FfIkJyejSfxaVLHISIiIiIiHWRjqsTvY5qibU0bpGepMGbzFWy7FCp1LCIqRW81U4q3LS4f9BUy1HYwQ2BYAm5EJKKytbHUkYiIiIiISAcZKxVYN7QhvtoVhD+uhmPariBEJaVjUofqvKKDSAdwTSkd5fHPYudBXFeKiIiIiIgkpCeX4X8feODT9q4AgKXH7mP6riBk56gkTkZEmsamlI5yVy92zjvwERERERGRtARBwBfv1cS8Xm6QCcC2y2H4eMtVpGVmSx2NiDSITSkdlXsHvpsRiVCpRInTEBERERERAYObVsKawQ2gVMhwPDgGA9ddRHxKhtSxiEhD2JTSUa42JjDQkyE1MweP4lKljkNERERERAQAeK+uPbaOaQILIz0EhCXggzXnEcobNBGVS2xK6SiFXAY3x9xL+BKkDUNERERERPSKBpUssXNcczhZGCIkLhV9Vp/DzQguPUJU3rAppcO4rhQREVH5smDBAjRq1AimpqawtbVFr169cPfuXaljEREVi6utCXaPb446DmaIS8lA/7XncfJerNSxiKgEsSmlw3LXlQriJw5ERETlwsmTJzFhwgRcuHABR48eRVZWFt577z2kpvJSfSLSTrZmBtj+cVO0dLVGamYORvlexp9Xw6WORUQlRCF1AJKOu5MFAODW00Rk56igkLNHSUREpM0OHTqU57Gvry9sbW1x9epVtG7dWqJURETvxtRADxuGN8LUnYHYE/AUX/wRiKikdIxvWw2CIEgdj4jeAbsQOqyqtTGM9eVIz1LhQWyK1HGIiIiohCUmvpwNbWlpKXESIqJ3o6+Q4Yd+9fBxm6oAgEWH72LmX7eQwzuJE2k1zpTSYTKZADcnc1wMeYYb4YmoZW8mdSQiIiIqISqVCpMnT0aLFi3g5uZW4D4ZGRnIyPj3VutJSUnqY1UqVankLCtUKhVEUdS5ugHdrh1g/dpW/5eda8LOVIlv/e5gy4UniE5Kx9L+njDQkxfrfNpWf0nS5doB1q/p+ot6XjaldJyH88umVFB4Ivo1dJE6DhEREZWQCRMm4ObNmzhz5kyh+yxYsABz5szJtz02Nhbp6emajFfmqFQqJCYmQhRFyGS6dTGBLtcOsH5trL+bqxGUXati9uEQHLkdjY/WnsWinq4wN3j7X2+1sf6Sosu1A6xf0/UnJycXaT82pXScu7MFAOBGeIKkOYiIiKjkTJw4Efv378epU6fg7Oxc6H7Tp0+Hj4+P+nFSUhJcXFxgY2MDMzPdmkGtUqkgCAJsbGx07pcTXa4dYP3aWv8AW1tUdbTG2F+v4cbTVEz48wE2jmgEJwvDtzqPttZfEnS5doD1a7p+AwODIu3HppSO8/znDnx3IpORma2CvkL3/jESERGVF6Io4tNPP8Xu3bvh7++PKlWqvHZ/pVIJpVKZb7tMJtPJAbogCKxdB2sHWL+21t/M1QY7xzXH8I2X8CA2FR+sOY+NwxujjuPbNdW1tf6SoMu1A6xfk/UX9Zy6+c6TWkVLI5gZKJCZo8K96KJNryMiIqKyacKECfj111+xdetWmJqaIioqClFRUXjx4oXU0YiINKKmvSl2jW+OmnamiE7KQL+15+F/N0bqWERURGxK6ThBEOChvoQvUdowRERE9E5Wr16NxMREtG3bFg4ODuqv7du3Sx2NiEhjHMwNsWNcMzStaomUjGyM2nQFWy48kToWERUBm1IE938u4QuKSJA2CBEREb0TURQL/Bo+fLjU0YiINMrcUA+bRzbBBw2ckaMS8c2em5i3/zZyVKLU0YjoNdiUIng4vWxKcaYUERERERFpK32FDIs+8MD/da4JAFh/JgSf/HoVaZnZEicjosKwKUXqmVJ3o5KRnpUjcRoiIiIiIqLiEQQBE9q54qcBXtBXyHDkdjT6r72AmKR0qaMRUQHYlCI4WRjC0lgf2SoRwVFc7JyIiIiIiLRbT09H/D6mCSyN9REUkYheK88iOCpJ6lhE9B9sShEEQYC7+hK+BGnDEBERERERlYAGlSyxe3xzVLUxxtPEdHywmnfmIyprJG9KrVy5EpUrV4aBgQGaNGmCS5cuvXb/hIQETJgwAQ4ODlAqlahRowYOHDhQSmnLL09nritFRERERETlSyUrY+z+pAXvzEdURknalNq+fTt8fHwwa9YsXLt2DZ6enujcuTNiYgruXmdmZqJTp054/Pgxdu7cibt372LdunVwcnIq5eTlj7uzBQAgiE0pIiIiIiIqR8yNXt6Zr2993pmPqKxRSPniP/zwA8aMGYMRI0YAANasWQM/Pz9s2LAB06ZNy7f/hg0b8OzZM5w7dw56enoAgMqVK5dm5HLL45+ZUvdjkpGWmQ0jfUn/ahAREREREZUYfYUMiz/0QBVrIyw+cg/rz4Qg9FkafujnIXU0Ip0m2UypzMxMXL16FR07dvw3jEyGjh074vz58wUes3fvXjRr1gwTJkyAnZ0d3Nzc8N133yEnh3eMe1d2ZgawNVVCJQK3n3IBQCIiIiIiKl8EQcDE9tWx7KN66jvzfbTuIuJSs6SORqSzJJsOExcXh5ycHNjZ2eXZbmdnh+Dg4AKPefToEf7++28MGjQIBw4cwIMHDzB+/HhkZWVh1qxZBR6TkZGBjIwM9eOkpJcNF5VKBZVKVULVaAeVSgVRFAut293JHMeDYxAYloD6FS1KN5yGvan28o71s35drV+XawdYv6br19X3lYhI271fzwlOFoYYu+UqbkYkYdS2O9g4wgx1HM2ljkakc7TqGi2VSgVbW1v8/PPPkMvlaNCgASIiIrBo0aJCm1ILFizAnDlz8m2PjY1Fenq6piOXKSqVComJiRBFETJZ/klyVS3kOA7g8sNodK9uVPoBNehNtZd3rJ/162r9ulw7wPo1XX9ycnKJn5OIiEpHw8ov78w3YuNlPIpLRb+157FiYH20rWkrdTQinSJZU8ra2hpyuRzR0dF5tkdHR8Pe3r7AYxwcHKCnpwe5XK7eVrt2bURFRSEzMxP6+vr5jpk+fTp8fHzUj5OSkuDi4gIbGxuYmZmVUDXaQaVSQRAE2NjYFDg4b1oTWHchEvfiMmBrW76+Gb+p9vKO9bN+Xa1fl2sHWL+m6zcwMCjxcxIRUempZGWMneOaYrTvRVwLT8GoTVcwp2ddDG5aSepoRDpDsqaUvr4+GjRogOPHj6NXr14AXg4ejx8/jokTJxZ4TIsWLbB161aoVCr14PLevXtwcHAosCEFAEqlEkqlMt92mUymkwN0QRAKrd3TpQIA4FFcKlIzc2BqoFfa8TTqdbXrAtbP+nW1fl2uHWD9mqxfV99TIqLyxMJIH8t6V8fSszH481oEZuy5iSfxqZjWtTbkMkHqeETlnqSjKR8fH6xbtw6bNm3CnTt38MknnyA1NVV9N76hQ4di+vTp6v0/+eQTPHv2DJMmTcK9e/fg5+eH7777DhMmTJCqhHLF2kQJJwtDAMDNCC52TkRERERE5Z+eXIb/9XXHF51qAADWnQ7BJ79eRVpmtsTJiMo/SdeU6t+/P2JjYzFz5kxERUWhXr16OHTokHrx89DQ0DyfQrq4uODw4cP4/PPP4eHhAScnJ0yaNAlffvmlVCWUO+5O5ohIeIGgiAQ0q2YldRwiIiIiIiKNEwQBn3aojopWRvi/P27gyO1o9F97Ab8MawhbM16uTaQpki90PnHixEIv1/P398+3rVmzZrhw4YKGU+kud2dzHLoVhRvhiVJHISIiIiIiKlW5d+Ybs/kKgiIS0WvlWWwY0Qi17HVrPWKi0sLFECgPD+eXt0ENimBTioiIiIiIdM/LO/O1QFVrYzxNTMcHq8/D/26M1LGIyiU2pSgPd6eXTakn8WlITMuSOA0REREREVHpq2xtjF3jm6NJFUukZGRj1KYr+PXCE6ljEZU7bEpRHhZG+qhoaQSAs6WIiIiIiEh3WRjpY8uoJuhT3wk5KhEz9tzEfL/byFGJUkcjKjfYlKJ83P+5hC8wPEHaIERERERERBLSV8iw5ENP3pmPSEPYlKJ8PP65hC+Ii50TEREREZGOy70z37KP6kFfLsOR29Hos+ocQuPTpI5GpPXYlKJ8PJwtAPDyPSIiIiIiolzv13PC1jFNYG2iRHBUMrxXnMGpe7FSxyLSamxKUT5uTi9vdxqR8AJxKRkSpyEiIiIiIiobGla2xL5PW8DTxQKJL7IwfOMlrDn5EKLIdaaIioNNKcrH1EAPVW2MAXC2FBERERER0asczA2xfWxT9GvoDJUIfH8wGBN/v851poiKgU0pKhDXlSIiIiIiIiqYgZ4cC/t64NteblDIBPjdiESfVefwJD5V6mhEWoVNKSqQ+z/rSt1gU4qIiIiIiCgfQRAwpGkl/D62qXqdqZ4rzuIk15kiKjI2pahAHs4vZ0rdCE+QNggREREREVEZ1qiyJfZ/2hL1/llnasTGS1jtz3WmiIqCTSkqUB0HM8gEICY5A9FJ6VLHISIiIiIiKrPszQ2w/eOm6N/QBSoRWHgoGBO3XkdqBteZInodNqWoQMZKBVxtTQDwEj4iIiIiIqI3USrk+L6v+7/rTAVFou9qrjNF9DpsSlGh3J0sAABnH8RJG4SIiIiIiEgLcJ0porfDphQVqoenAwBgx5UwPE/NlDgNERERERGRduA6U0RFw6YUFaptDRvUcTBDWmYOfM89ljoOERERERGR1uA6U0RvxqYUFUoQBExo5woA8D33GCn85klERERERFRkuetMzevlBj0515ki+i82pei1urjZo6q1MRJfZGHrxSdSxyEiIiIiItIqgiBgcNNK+H0M15ki+i82pei15DIB49pUAwCsPx2C9KwciRMRERERERFpn4ZcZ4ooHzal6I16eTnBwdwAMckZ+PNauNRxiIiIiIiItFLuOlMfNeI6U0QAm1JUBPoKGca0qgoAWHvyEbJzVBInIiIiIiIi0k5KhRwL+uRdZ6rPKq4zRbqJTSkqko8au8DSWB+hz9LgFxQpdRwiIiIiIiKt9d91pu5GJ8N7+Rn4342ROhpRqWJTiorESF+BEc0rAwBWnXgIlYrXPRMREREREb2LV9eZSkrPxgjfy1jl/4DrTJHOYFOKimxos8owUSpwNzoZfwezg09ERERERPSuXl1nShSB/x26y3WmSGewKUVFZm6kh8FNKwEAVpxg956IiIiIiKgkKBVyfN/XA/N7/7vO1Psrz+L20ySpoxFpFJtS9FZGtqwMfYUMAWEJOP8oXuo4RERERERE5cagJi/XmbI1VeJBTAp6rTyLjWdDOCGAyi02peit2JoaoH9DFwDAav+HEqchIiIiIiIqXxpWtsTBSa3QoZYtMnNUmLPvNkb6XkZcSobU0YhKHJtS9NbGtq4KuUzA6ftxuBGeIHUcIiIiIiKicsXKRIn1wxpi7vt1oa+Q4cTdWHRZehon78VKHY2oRLEpRW/NxdII73s6Anh5Jz4iIiIiIiIqWYIgYGizytg7sQVq2JkgLiUDwzZcwrz9t5GRnSN1PKISwaYUFcsnbasBAA7disL96GSJ0xAREREREZVPtezNsHdiSwxt9vKmU+vPhKDPqnN4GJsicTKid8emFBVLdTtTvFfHDgCw+iRnSxEREZUFp06dgre3NxwdHSEIAvbs2SN1JCIiKgEGenLMfd8N64Y2RAUjPdx6moQeP53B9suhXASdtBqbUlRs49u5AgD+CniKsGdpEqchIiKi1NRUeHp6YuXKlVJHISIiDehUxw4HJ7VG82pWeJGVgy//DMLErdeRmJYldTSiYikTTamVK1eicuXKMDAwQJMmTXDp0qUiHbdt2zYIgoBevXppNiAVqJ6LBVq6WiNHJWLd6UdSxyEiItJ5Xbt2xbx589C7d2+poxARkYbYmxvg11FNMK1rLShkAvyCItF12SlcCnkmdTSit6aQOsD27dvh4+ODNWvWoEmTJli6dCk6d+6Mu3fvwtbWttDjHj9+jClTpqBVq1almJb+a3zbajjzIA7bL4fh0/bVYWOqlDoSERERFVFGRgYyMv69xXhSUhIAQKVSQaVSSRVLEiqVCqIo6lzdgG7XDrB+1q+99Y9tVQVNqlTA5O2BeBKfho9+Po8J7VzxabtqUMjfPP9Em2svCaxfs/UX9bySN6V++OEHjBkzBiNGjAAArFmzBn5+ftiwYQOmTZtW4DE5OTkYNGgQ5syZg9OnTyMhIaEUE9OrmlWzQj0XCwSEJWDD2RB82aWW1JGIiIioiBYsWIA5c+bk2x4bG4v09HQJEklHpVIhMTERoihCJisTFxOUGl2uHWD9rF+763fQBzb0r4ElJ8Jw4E48lv/9AP53IjGnSxU4mr9+woC21/6uWL9m609OLtoN0SRtSmVmZuLq1auYPn26eptMJkPHjh1x/vz5Qo+bO3cubG1tMWrUKJw+fbo0olIhBEHAhHauGLP5Cracf4JxbarB3FBP6lhERERUBNOnT4ePj4/6cVJSElxcXGBjYwMzMzMJk5U+lUoFQRBgY2Ojc7+c6HLtAOtn/eWj/hVDHLA38Clm7LmFoMhUDN0ajPm96sLb07HQY8pL7cXF+jVbv4GBQZH2k7QpFRcXh5ycHNjZ2eXZbmdnh+Dg4AKPOXPmDH755RcEBAQU6TU4Lf1fmpqe166GNWrYmuBeTAo2n3+MCW2rlej5SwKnZrJ+1q+b9ety7QDrLyvT0ssypVIJpTL/J+kymUwnB+iCILB2HawdYP2sv3zU38vLGQ0qWWLStuu4FpqASdsDcfpBPGb3rAsTZcG/+peX2ouL9Wuu/qKeU/LL995GcnIyhgwZgnXr1sHa2rpIx3Ba+r80OT1vYH1rzD6Ugl9OP4J3dWMY6JWtf9Scmsn6Wb9u1q/LtQOsv6xMSyciIiotLpZG2PFxM/x0/D5WnHiAnVfDceXxM/w0wAsezhZSxyPKR9KmlLW1NeRyOaKjo/Nsj46Ohr29fb79Hz58iMePH8Pb21u9LfdTSoVCgbt376JatbyzdDgt/V+anJ430Moav1yMRtjzF/j7STqGN69coud/V5yayfpZv27Wr8u1A6y/rExLL00pKSl48OCB+nFISAgCAgJgaWmJihUrSpiMiIhKi0Iug897NdHC1Rqfbw/A4/g09Fl1DlM618TYVlUhkwlSRyRSk7Qppa+vjwYNGuD48ePo1asXgJcDyOPHj2PixIn59q9VqxaCgoLybJsxYwaSk5OxbNkyuLi45DuG09Lz0tT0PH2ZDB+3qYYZe25i/ekQDG5aGfqKsvX+cmom62f9ulm/LtcOsP6yMC29NF25cgXt2rVTP879YG7YsGHw9fWVKBUREUmhSVUrHJzUGtN338CBoCh8fzAYp+/H4od+9WBnVvY+WCHdJPnlez4+Phg2bBgaNmyIxo0bY+nSpUhNTVXfjW/o0KFwcnLCggULYGBgADc3tzzHW1hYAEC+7VT6PmjgjGXH7+NpYjr2BESgX8P8TUIiIiLSnLZt20IURaljEBFRGWFupIeVA+tjx5UwzN57G2cfxKPL0lNY9IEn2teykToeEST/iK9///5YvHgxZs6ciXr16iEgIACHDh1SL34eGhqKyMhIiVNSURjoyTG6ZRUAwJqTD5Gj4qCYiIiIiIhISoIgoH+jitj3aUvUdTTD87QsjN58BbP23kJ6tvbftIO0m+RNKQCYOHEinjx5goyMDFy8eBFNmjRRP+fv7//a6ea+vr7Ys2eP5kNSkQxqWglmBgo8ik3F4VtRUschIiIiIiIiAK62Jtg1vjnGtHo5kWDLhVCM+v0OAsMTpA1GOq1MNKWo/DBRKjC8xctvcitPPOAlBERERERERGWEUiHH193rYNPIxrA20cfD+HT0WX0eM/+6iaT0LKnjkQ5iU4pK3IjmlWGoJ8etp0k4dT9O6jhERERERET0ijY1bHDws5boUssSoghsPv8EHZechN+NSE4soFLFphSVuArG+hjY5OVtp1eeePCGvYmIiIiIiKi0WZkoMbtLFWwZ2QhVrI0Rk5yBCVuvYYTvZYQ9S5M6HukINqVII0a3qgI9uYBLIc9w5fEzqeMQERERERFRAVq4WuPgpFaY1KE69OUy+N+NRacfT2KV/wNk5XAhdNIsNqVIIxzMDdG3vjMAYJX/Q4nTEBERERERUWEM9OT4vFMNHJzcCs2qWiE9S4X/HbqL7j+d5iQD0ig2pUhjPm5TDTIB+Ds4BrefJkkdh4iIiIiIiF6jmo0Jto5pgh/6ecLSWB/3olPwwZrzmPbnDSSkZUodj8ohNqVIY6pYG6ObuwMAYPVJzpYiIiIiIiIq6wRBQJ/6zvj7izb4qJELAGDb5TB0WHISu66FcyF0KlFsSpFGjW/rCgDwu/EUIXGpEqchIiIiIiKiorAw0sf3fT3wx7hmqGFngvjUTPjsCMSg9RfxKDZF6nhUTrApRRpVx9EM7WvZQiUCazlbioiIiIiISKs0qmyJ/Z+2wv91rgmlQoZzD+PRZelp/Hj0HtKzcqSOR1qOTSnSuPFtqwEA/rwWjqjEdInTEBERERER0dvQV8gwoZ0rjn7eBm1q2CAzR4Vlx++j27LTOPcgTup4pMXYlCKNa1jZEo2rWCIrR8S604+kjkNERERERETFUNHKCL4jGmHFQC/YmCrxKC4VA9dfxOfbAxCXkiF1PNJCbEpRqcidLbX1YiiepfKuDURERERERNpIEAT08HDE8S/aYGizShAEYPf1CHRYchLbLoVCpeJC6FR0bEpRqWhTwwZ1Hc3wIisHvuceSx2HiIiIiIiI3oGZgR7mvu+G3eNboI6DGRJfZGHariD0W3se96KTpY5HWoJNKSoVgiBgQruXd+LzPRuClIxsiRMRERERERHRu6rnYoG9E1tgRvfaMNKX48qT5+i27DQWHgrGi0wuhE6vx6YUlZrOde1R1doYSenZ2HrxidRxiIiIiIiIqAQo5DKMblUVx3za4L06dshWiVjt/xDvLT2JE3djpI5HZRibUlRq5DIB4/5ZW2rd6RDePpSIiIiIiKgccbQwxM9DG2Ld0IZwNDdA2LMXGLHxMkZvuoLbT5OkjkdlEJtSVKp61XOCo7kBYpMzsPNquNRxiIiIiIiIqIR1qmOHoz5tMKZVFchlAo7diUa3n07jk1+vIjiKzSn6F5tSVKr0FTKMaV0VALD21ENk56gkTkREREREREQlzVipwNfd6+Dw5Fbw9nSEIAAHb0ahy9LTmLD1Gu5zMXQCm1IkgY8aVYSlsT7Cnr3A/huRUschIiIiIiIiDXG1NcXyAV44PLk1urs7AAD8bkTivaWn8Nnv1/EgJkXihCQlNqWo1BnqyzGyRWUAwGr/h1CpRGkDERERERERkUbVsDPFykH1cWhyK3R1s4coAnsDn+K9H09i8rbreBTL5pQuYlOKJDGkWWWYKBW4G52M48G8GwMREREREZEuqGVvhtWDG8Dvs5Z4r44dVCKwJ+ApOv5wEj47AvA4LlXqiFSK2JQiSZgb6mFIs0oAgJUnHkAUOVuKiIiIiIhIV9R1NMfPQxti/6ct0bG2LVQisOtaBDr8cBL/90cgQuPTpI5IpYBNKZLMyBZVoFTIEBCWgPOP4qWOQ0RERERERKXMzckc64c1wl8TWqBdTRvkqET8cTUc7Zf4Y9qfNxD2jM2p8oxNKZKMjakS/Ru5AAAWHrrLTjgREREREZGO8nSxwMYRjbF7fHO0rmGDbJWIbZfD0G6xP6bvCkJEwgupI5IGsClFkhrbuir0FTIEhiWg7eITGP/bVQSEJUgdi4iIiIiIiCTgVbECNo9sjD8/aY5W1a2RrRLx+6VQtF10At/suYnIRDanyhOF1AFItzlXMMK2sU2x7Nh9nLwXiwNBUTgQFIXGVSwxtlVVtK9lC5lMePcXCr8Mg5BrQIw1oFC+/JLrAXIlINcHFPr//L/eP8/p//ulUAIy+btnICIiIiIioiJpUKkCtoxqgsuPn+HHo/dw7mE8tlx4gu2XwzCgsQvGt3OFnZmB1DHpHbEpRZKrX7ECNo1sjOCoJKw7FYK9gRG4FPIMl0KeoZqNMca0qopeXk4w0Ct+Y0gI2gGLy+uLH1KQvWxaKXKbVa82sN6iuaXeN/f5wvZ95XUU+q85jz4g5z9jIiIiIiIqnxpVtsTWMU1x4VE8fjh6D5dCnmHT+Sf4/XIYBjWpiE/aVoOtKZtT2oq/zVKZUcveDEv6eeL/OtfExnMh2HohFA9jUzFtVxAWH7mHES0qY1CTirAw0n/rc4vWNZDp0gr6ckDIyQJyMoCcLCA7A8jJ/PcrO/Of5zL/cwIVkP3i5VdZk9swy9PMytvcEuT6qJAjQDA0/rcBVmBD7dXGVwk01NgwIyIiIiKiEtC0qhW2j22K8w/j8eOxe7j8+Dk2nn2MrRdDMaRpJXzcphpsTJVSx6S3xN8YqcyxNzfA9K61MbGdK7ZdCsOGsyGITEzHosN3sfLEA/Rr6IJRLavAxdKo6CdtNAbPK70PW1tbCLIiLKUmii+bVnkaVv80snIy8v6/uplV2L6524vQCCvqefJkfaVhllFwOQIASb49C7J3mFlW0Ky0QmaLvamhJsghS00EUkRApniZSxD++e/rvoSXX0REREREJDlBENDc1RrNqlnhzIM4/Hj0Hq6FJmD9mRBsufAEXd3s8UEDFzSvZlUyy8CQxrEpRWWWqYEexrSuiuEtKmP/jaf4+VQI7kQmwffcY2w+/xjd3B3wcetqcHc2L/kXF4SXjQ7F28/K0jhR/P/27jw6qvL+H/j73lmTTPY9EMLigggEwxJTW/FbIstXKxRQpJwDbrQqWNtYi7FfQDhVEHrUoyLa/lTs0VrrAm6tFiIB1IAQtiKaAhIQspKQPbPe5/fHLJlJQhIhmZvMfb/OyZl7n/vcy/OZZzL58Jk79wKK8wLFLXunhTDFYUXD+XOIijBDVhwXVwjzFdTaF+P8t3VWMLO6f1QkA0i66L07KV7Juh4Wtn7Idt0l7t/Jj+x+lCAhymqDFB7hN/ZgjbGbPrLu0o/RoY/fOAHILTXugqQkuX9/INxT611u/9hhWyfrne3Xk2N7d7/Y/Tvd5n+8dsdWXDDV1QG10e7qdJdj8w2uF8fm334pz5v//hc4Tif7S4qCCKcMTPs/EBERUeiQJAk/uTwRP74sATuPuYtTB7+vw5aDZdhysAxp0WbMzhqMueMHY2hChNrDpS6wKEX9nkEn4+fXDMascYPw+fFz+PPO77Dr2Dl8dLgcHx0ux7XD4/Cr60dg8hWJ2qiGS5LnLCFDz/dRFFirqhCVlOQuVPQVb8GsfXHLv2h1wbPFOi+odXlWWlfH8ft3hNMGCBcgFEhC+aFBefZ19clTFgwSgB9wXmFIubSC5MAnA4hVexAqkgCER6SwKEVERBSiJEnC5CsScf3lCTh8ph5vF3+PDw6Woazeiue3H8fz249j4tBYzB0/GP87JhWR5h/wfygKChalaMDwVsN/cnkijpY14P/t+g4fHCrD7u9qsfu7WlyeZMHi64dj5rg0mPS8W54q/Atmxv7ziYRQFFRVVbV9fVMI91lcXf500kdxdd/nB23vyc9FjLXdOBVFQXNTAyzh4ZBwoeNd6lgv4rkIGOelPpfe7YGxC08hUkCCJElwn/nmeQTalnu0DX7r6Hy/nhzbVzu/yP0DtnV2nLY2AQkOpxMGgwGSJHdzbHTY/+LH1sW/8YOP3dPnveM2AaDVqddsUZaIiEgrJElCZnoMMtNj8H83jcK2byrxTvEZ7PxvNfaWnsfe0vNY+cHXmDE6FXPHD0bO8Hi1h0we/aIotWHDBqxfvx4VFRXIzMzEc889h0mTJnXa9y9/+Qv++te/4siRIwCA8ePH44knnrhgfwpNo9Ki8NS8cfjdtCvx6hcn8eZX3+NYVRN+/85h/OnTEtxx3VAsyM5AdBgr4dQJSXJ/xQsaKV4qCpqrqhDR02uqhRChKKj0L0hqjFAU1Go8/qaqKhaliIiINMRs0OHmsWm4eWwaKhuseG//WbxT/D1OVDdj84Gz2HzgLAbFhGH2NWmYnBGGJC2fVt8PqJ6hvvXWW8jLy8PKlSuxf/9+ZGZmYtq0aaiqquq0f2FhIebPn4/t27ejqKgI6enpmDp1Ks6ePRvkkVN/kBYThj/cNApf5v8U+TNGIiXKjKpGG9Z9UoIfrSnA6g+P4sz5FrWHSUREREREREGWHGXGfTeMwLa8ydh8/4+wIHsIIs16nK1rxXPbT2DupiOY9+fd+Mfe79Fkc6o9XE2ShPC/smnwZWdnY+LEiXj++ecBAIqiID09HQ888AAeeeSRbvd3uVyIjY3F888/j4ULF3bbv6GhAdHR0aivr0dUVNQlj38gUfy+wiSH6CfmdqeCDw+V4S+7vsO3FY0AAJ0s4X9Hp2D21dH40agMmAz94gTBoNLC3HeF8Ws3fi3HDjD+vo4/FHOKUIypp7T8+6Ll2AHGz/i1G79WY7c6XPj30Uq8s+977Dp2zncfmjCDzn33vgmDce2w0L97X3/Jk1T937ndbkdxcTHy8/N9bbIsIzc3F0VFRT06RktLCxwOB+Li4jrdbrPZYLO13RGsoaEBgHsCFOWHXvB4YFMUBUKIkI5bLwM/vyYNs8alYtexc/jzrpP48kQNPjxcjg8PlwP4FjFhBiRYjEiMNCHeYkKCxYgEiwmJkX7LFhPiLUYYdKHx5qyFue8K49du/FqOHWD8fR2/Vp9XIiKigcxs0OGWzDTcPCYFR06cwa4zNry7/yy+q27GewfO4j3P1/vmjB+MuVmDMSSeFwLoS6oWpc6dOweXy4Xk5OSA9uTkZHz77bc9OsayZcuQlpaG3NzcTrevWbMGq1at6tBeXV0Nq1Xd29QHm6IoqK+vhxBCE5XwkTHAUz8bipKqJLxRXIHPjp2HUwHqWh2oa3XgeHVzt8eIMusQF25AfLgBceF6xHkfIwLbYsP1/bqApbW5b4/xazd+LccOMP6+jr+xsbHXj0lERETBkxRpxH2TB+P+Gy7Dge/r8Pa+M/joUBnO1rXi2YJjeLbgGCYNi/Pdvc9i0t63bvragH5G165di7///e8oLCyE2WzutE9+fj7y8vJ86w0NDUhPT0diYqImT0uXJAmJiYma+s9JUhJw3aghqKyqgiEiBrUtDlQ32nCuyY5zTf6PgW0uRaDB6kKD1YXS2u4LmN4zsKLDDDAZdAgz6GA2yDD7lnUIM8gB28IMugusy759zAYdDDrvncMujlbn3ovxazd+LccOMP6+jv9CuQcRERENLJIkIWtILLKGxGLlz0bh068r8E7xGXx+/By+OlmLr07W4jHP3fumXZ2MiUPjEBthVHvYIUHVolRCQgJ0Oh0qKysD2isrK5GSktLlvn/605+wdu1abNu2DWPHjr1gP5PJBJPJ1KFdlmVNJuiSJGk2dp0sIyHSjKTocIxM7bqvogjUtTrcBapGG6qbbO0KWd51G2qa7HB6+te1Ovpk7LKEgCJVmFGHCKMO4UY9IkztHo06hJv0AdvDDDrYm5sxSIQj0mxAuFGHCJMeJr18ScWugUTLr31A2/FrOXaA8fdl/Fp9TomIiEKZ2aDDzHGDMHPcIJTVtWLzgbN4p/gMTp5rxrv7z+Dd/WcAAJclWTBxaBwmDo3FxKFxGBwbppn/W/UmVYtSRqMR48ePR0FBAWbNmgXA/almQUEBli5desH91q1bh8cffxyffvopJkyYEKTRkpbIsoS4CCPiIoy4Ijmyy76KIlDf6kC1p4DVYHXC5nSh1e6C1eFCq0OB1eFd7tjW1q749vG2KZ6r7ikCaLa70Gx3XWJkJYFxSkCEUY9wk8736C1sRZj0AdsiTO4CV0RAIcy/TY9wo05ThS4iIiIiIgpdaTFhWPI/l+H+G0Zg/+nz2HzgLIpO1OBEdTOOVzXheFUT3vzqNAAgJcqMCZ4C1cShcbgyJRK6EL9Yem9Q/et7eXl5WLRoESZMmIBJkybhmWeeQXNzM+68804AwMKFCzFo0CCsWbMGAPDkk09ixYoV+Nvf/oahQ4eioqICAGCxWGCxWFSLg7RLliXERhgR24MC1g8hhIDDJdDqcMHmKVJ5i1ctdidaPUWqFpsz8NHuRLPN8+hrd6KxxQ6rS6DF7kKLp7ilCKDR5kSjzQnA1vWAekgvSwg36mAx6X1nbLkLVnpYTLqAtrZCmA5hBndRK9zoPhss3HOmV5inrT9fs4uIiIiIiEKXJEkYnxGH8RnuG6zVNNlQfOo89pbWYm/peRw5W4+KBis+OlyOjw6XAwAiTXpkZcRi0rA4TMiIRWZ6DMwGnZph9EuqF6XmzZuH6upqrFixAhUVFRg3bhw++eQT38XPT58+HXB6/MaNG2G32zF37tyA46xcuRKPPfZYMIdO1KckSYJRL8Gol4EwwyUdq/3tPhXFXexq9hSymm1OtNhdaLY70WJzP/ra/B6bPQWv5oACmLut1eEudDkVgQarEw1WZ288DT4GnRRYrPIshxl1fsudFbZ0MOtlOK3NGNSsR1SYEZFmPSwm99ldRj2LXURERERE1HPxFhOmXp2CqVe7LzvUanfh4Pd1niJVLfafOo9GmxM7/luNHf+tBgAYdTLGDI52n02VEYcJQ2MRE87rUqlelAKApUuXXvDreoWFhQHrpaWlfT8gohAny5Lnq3e99xbgUgRa7O4CVpPNXdxqsjl9Z2y5i1f+Z3G1FbhaHS7fGVxWh8t3nFa7C07PdxgdLgGHy4lG66Wc1XW8Q4tRLyPSpIfFU6iymPS+opW7zdC27mmL9Dx33mWL2V0k49cWiai/2LBhA9avX4+KigpkZmbiueeew6RJk9QeFhERUUgKM+qQMyIeOSPiAQBOl4JvKxp9Raq9pedR3eg+u6r41Hm8hO8AAFckWzBhaBwmDXUXqQbFaO+6VP2iKEVEA59OlhBpNiDSbEByLx7X7nRfa6vVv1jlKWK12p1+y22FrY7tTtQ3W2F1SWiyOT3FMpfv+DVOO2qa7Zc0Tu/1uQx6GTpZgl6WoNdJ0MuB6zpZhkGW3G2e7XrPukHXsW/bcdrWjXrZd2dHs14Hk0GGSd92t0ez526O3jajToLVoUBRBHhdZqLQ99ZbbyEvLw8vvvgisrOz8cwzz2DatGkoKSlBUlKS2sMjIiIKeXqdjNGDojF6UDTuvG4YhBA4XduCr07WYl/peew9VYvvqpvx38om/LeyCX/b474uVWq0GROHxiEzPQYpUWYkWIxIiDQhwWJClFkfkgUrFqWIqF8z6mUY9TKicfFfYWz/9UXA/elFs+esriarE002BxqtTr91Z8d1mxNNVgeaPWeBNVodaLI5oYi263P10qW5+oxRJ8PkK17JMOvdRSyTvq3N5FnXSe5imSxLbcuSBJ2MDm16bz9Pu3s7AvYP2Me37Lk7WrtlWQJ0kuRZd/973nbZcwzJs9x+X/d+7n0gFNQ22SHMVsiyDCHanguBthX/dvc2v2Vx4X7tecfk/yihbdyS5B5n29jd29vvJ3v60cVxuhRYnQpabA5UN9mhtTrMU089hcWLF/uuz/niiy/i448/xiuvvIJHHnlE5dERERFpjyRJyIiPQEZ8BG6dkA4AONdkw77S89hXWou9p9zXpSqvt+KDQ2X44FBZh2MYdTLiLUYkWEzuYpXF5CtY+dY9y7HhRncuPACwKEVEmqTXyYgOkxF9idfrEsJ9fS5v4cqluC9Q71IEnIoCpyLg9Kw7FAUul3C3KYq7j6utX9u+nnWXgENpW3e6BJwuBXaXgM3hgtXpvvC9946NNqd3WYHN2fbocLVVUuwuBXaX4vkaJPV3vmIVOha72hexZL8inv92oSgw6HW+Al7HY7Tt7y2G6T1n7hn1sufRs66TYdB7HnWSb7t3W9u6e5vRs82gd7eZ/PrrZMn3em31uxtp+zb3zR6ULu9g2v4Y/q/51CgjvnhksHqTGGR2ux3FxcXIz8/3tcmyjNzcXBQVFak4MiIiIvKXYDFh+ugUTB/tvi5Vi92Jg6frsLf0PL4pb8C5JhvONdlQ02RHo80Ju0tBeb0V5fXWbo+t89xNPrBg5Ve4ijQhPtwAyeaA2p/dsShFRHQJJElCuNF9d0G139AvxO5w4kx5JSJj4mBX4C5gORRPUavtP/xWZ9uyzanAJQQUxV1EUxQBlxBwKYAi3AU0lyJ8y21tfts9+3v7utr1VTx93T9+y520CwHfvkLA7991FwZ9fZXOjic6nHXkv+ou+fhv7HSxw37t9xVwj807PoG2sV8sIQCX7wCXcCANu5TnfyA6d+4cXC6X74YxXsnJyfj222879LfZbLDZ2k7xbGhoAOA+w1RRlL4dbD+jKIr7/URjcQPajh1g/Ixfu/FrOXag/8Vv1su4dngcrh0e12Gb1eFCTZPdV6g612THuWY7aho9y37tda0OuBSB6kYbqhu7/hrHoGgjdjyc2ifx9PR5ZVGKiCjE6XUywo06xFtMAXcz1YLOvrqpBiH8C2htBSz/IpsAIJSOBS3/fVzKhQpffoU4pW1fp+JCTc15xMTGAJACx9CueOdf7HMpAnaX4rnBgAK7U3E/uhQ4nAJ2l/tsJG97Wx/vfv77CDiciq/dvew+A7DtGmjur46GeZbDDO5rpYV1ss3s18fbbvJbb9umg0EGzp2rVm3eB4I1a9Zg1apVHdqrq6thtXb/SWwoURQF9fX1EEJo8r1Sq7EDjJ/xazd+LccODLz4DQBSTUCqSQLiTQBMACI79HO6BM63OlDb4kRti/+jA+fbtcWaZFRVVfVJ/I2NjT3qx6IUERFRH5Mk9zW2Op571bcURUGV0Y6kpNgBkWz1tv7yyWcwJSQkQKfTobKyMqC9srISKSkpHfrn5+cjLy/Pt97Q0ID09HQkJiYiKiqqz8fbnyiKAkmSkJiYqLnfFy3HDjB+xq/d+LUcOxDa8af1oE9ff3hrNpt71I9FKSIiIqIQYTQaMX78eBQUFGDWrFkA3ElnQUEBli5d2qG/yWSCyWTq0C7Lcsgl6D0hSRJj12DsAONn/NqNX8uxA4zfG3tfxN/TY7IoRURERBRC8vLysGjRIkyYMAGTJk3CM888g+bmZt/d+IiIiIj6CxaliIiIiELIvHnzUF1djRUrVqCiogLjxo3DJ5980uHi50RERERqY1GKiIiIKMQsXbq006/rEREREfUn2vziJBERERERERERqYpFKSIiIiIiIiIiCjoWpYiIiIiIiIiIKOhYlCIiIiIiIiIioqBjUYqIiIiIiIiIiIKORSkiIiIiIiIiIgo6FqWIiIiIiIiIiCjo9GoPINiEEACAhoYGlUcSfIqioLGxEWazGbKsrXqklmMHGD/j1278Wo4dYPx9Hb83l/DmFqGAeZI2f1+0HDvA+Bm/duPXcuwA4+8veZLmilKNjY0AgPT0dJVHQkRERKGgsbER0dHRag+jVzBPIiIiot7UXZ4kiVD6eK8HFEVBWVkZIiMjIUmS2sMJqoaGBqSnp+P7779HVFSU2sMJKi3HDjB+xq/d+LUcO8D4+zp+IQQaGxuRlpYWMp+wMk/S5u+LlmMHGD/j1278Wo4dYPz9JU/S3JlSsixj8ODBag9DVVFRUZr8pQO0HTvA+Bm/duPXcuwA4+/L+EPlDCkv5kna/n3RcuwA42f82o1fy7EDjF/tPCk0PtYjIiIiIiIiIqIBhUUpIiIiIiIiIiIKOhalNMRkMmHlypUwmUxqDyXotBw7wPgZv3bj13LsAOPXevz0w2j59aLl2AHGz/i1G7+WYwcYf3+JX3MXOiciIiIiIiIiIvXxTCkiIiIiIiIiIgo6FqWIiIiIiIiIiCjoWJQiIiIiIiIiIqKgY1EqxKxZswYTJ05EZGQkkpKSMGvWLJSUlAT0ueGGGyBJUsDPvffeq9KIe9djjz3WIbaRI0f6tlutVixZsgTx8fGwWCyYM2cOKisrVRxx7xo6dGiH+CVJwpIlSwCE1tzv3LkTP/vZz5CWlgZJkrBly5aA7UIIrFixAqmpqQgLC0Nubi6OHTsW0Ke2thYLFixAVFQUYmJicPfdd6OpqSmIUVy8ruJ3OBxYtmwZxowZg4iICKSlpWHhwoUoKysLOEZnr5e1a9cGOZKL093833HHHR1imz59ekCfgTr/3cXe2XuAJElYv369r89Anvue/J3ryXv96dOncdNNNyE8PBxJSUl4+OGH4XQ6gxkKqYB5EvMk5kluzJOYJzFPYp7UX/IkFqVCzI4dO7BkyRLs3r0bW7duhcPhwNSpU9Hc3BzQb/HixSgvL/f9rFu3TqUR976rr746ILbPP//ct+23v/0tPvzwQ7z99tvYsWMHysrKMHv2bBVH27v27t0bEPvWrVsBALfeequvT6jMfXNzMzIzM7Fhw4ZOt69btw7PPvssXnzxRezZswcRERGYNm0arFarr8+CBQvw9ddfY+vWrfjoo4+wc+dO/PKXvwxWCJekq/hbWlqwf/9+LF++HPv378d7772HkpIS3HLLLR36rl69OuD18MADDwRj+Jesu/kHgOnTpwfE9uabbwZsH6jz313s/jGXl5fjlVdegSRJmDNnTkC/gTr3Pfk71917vcvlwk033QS73Y4vv/wSr732GjZt2oQVK1aoERIFEfMk5knMk9yYJzFPYp7EPKnf5EmCQlpVVZUAIHbs2OFrmzx5snjwwQfVG1QfWrlypcjMzOx0W11dnTAYDOLtt9/2tX3zzTcCgCgqKgrSCIPrwQcfFCNGjBCKogghQnfuAYjNmzf71hVFESkpKWL9+vW+trq6OmEymcSbb74phBDi6NGjAoDYu3evr8+//vUvIUmSOHv2bNDG3hvax9+Zr776SgAQp06d8rVlZGSIp59+um8HFwSdxb9o0SIxc+bMC+4TKvPfk7mfOXOm+OlPfxrQFipzL0THv3M9ea//5z//KWRZFhUVFb4+GzduFFFRUcJmswU3AFIV86Q2zJNCd+6ZJzFPYp50YcyT1M+TeKZUiKuvrwcAxMXFBbS/8cYbSEhIwOjRo5Gfn4+WlhY1htcnjh07hrS0NAwfPhwLFizA6dOnAQDFxcVwOBzIzc319R05ciSGDBmCoqIitYbbZ+x2O15//XXcddddkCTJ1x7Kc+918uRJVFRUBMx1dHQ0srOzfXNdVFSEmJgYTJgwwdcnNzcXsixjz549QR9zX6uvr4ckSYiJiQloX7t2LeLj43HNNddg/fr1IfX1pcLCQiQlJeHKK6/Efffdh5qaGt82rcx/ZWUlPv74Y9x9990dtoXK3Lf/O9eT9/qioiKMGTMGycnJvj7Tpk1DQ0MDvv766yCOntTGPIl5EvMkN+ZJzJOYJwUKlbkfCHmSvtePSP2Goij4zW9+g+uuuw6jR4/2tf/iF79ARkYG0tLScPjwYSxbtgwlJSV47733VBxt78jOzsamTZtw5ZVXory8HKtWrcJPfvITHDlyBBUVFTAajR3+2CQnJ6OiokKdAfehLVu2oK6uDnfccYevLZTn3p93Pv3fSL3r3m0VFRVISkoK2K7X6xEXFxdyrwer1Yply5Zh/vz5iIqK8rX/+te/RlZWFuLi4vDll18iPz8f5eXleOqpp1Qcbe+YPn06Zs+ejWHDhuHEiRN49NFHMWPGDBQVFUGn02lm/l977TVERkZ2+PpNqMx9Z3/nevJeX1FR0en7g3cbaQPzJOZJzJOYJwHMk5gnMU8C1M2TWJQKYUuWLMGRI0cCrhUAIOC7wGPGjEFqaiqmTJmCEydOYMSIEcEeZq+aMWOGb3ns2LHIzs5GRkYG/vGPfyAsLEzFkQXfyy+/jBkzZiAtLc3XFspzT51zOBy47bbbIITAxo0bA7bl5eX5lseOHQuj0Yhf/epXWLNmDUwmU7CH2qtuv/123/KYMWMwduxYjBgxAoWFhZgyZYqKIwuuV155BQsWLIDZbA5oD5W5v9DfOaKeYJ7EPIl5EjFPYp7EPEl9/PpeiFq6dCk++ugjbN++HYMHD+6yb3Z2NgDg+PHjwRhaUMXExOCKK67A8ePHkZKSArvdjrq6uoA+lZWVSElJUWeAfeTUqVPYtm0b7rnnni77herce+ez/V0k/Oc6JSUFVVVVAdudTidqa2tD5vXgTbROnTqFrVu3Bnz615ns7Gw4nU6UlpYGZ4BBNHz4cCQkJPhe61qY/127dqGkpKTb9wFgYM79hf7O9eS9PiUlpdP3B+82Cn3Mk9yYJzFP8sc8iXkS86TODcS5H0h5EotSIUYIgaVLl2Lz5s347LPPMGzYsG73OXjwIAAgNTW1j0cXfE1NTThx4gRSU1Mxfvx4GAwGFBQU+LaXlJTg9OnTyMnJUXGUve/VV19FUlISbrrppi77hercDxs2DCkpKQFz3dDQgD179vjmOicnB3V1dSguLvb1+eyzz6Aoii8JHci8idaxY8ewbds2xMfHd7vPwYMHIctyh9O1Q8GZM2dQU1Pje62H+vwD7rMAxo8fj8zMzG77DqS57+7vXE/e63NycvCf//wnIOH2/odk1KhRwQmEVME8KRDzJOZJXsyTmCcxT7qwgTT3AzJP6vVLp5Oq7rvvPhEdHS0KCwtFeXm576elpUUIIcTx48fF6tWrxb59+8TJkyfF+++/L4YPHy6uv/56lUfeOx566CFRWFgoTp48Kb744guRm5srEhISRFVVlRBCiHvvvVcMGTJEfPbZZ2Lfvn0iJydH5OTkqDzq3uVyucSQIUPEsmXLAtpDbe4bGxvFgQMHxIEDBwQA8dRTT4kDBw747pqydu1aERMTI95//31x+PBhMXPmTDFs2DDR2trqO8b06dPFNddcI/bs2SM+//xzcfnll4v58+erFdIP0lX8drtd3HLLLWLw4MHi4MGDAe8F3jtmfPnll+Lpp58WBw8eFCdOnBCvv/66SExMFAsXLlQ5sp7pKv7Gxkbxu9/9ThQVFYmTJ0+Kbdu2iaysLHH55ZcLq9XqO8ZAnf/uXvtCCFFfXy/Cw8PFxo0bO+w/0Oe+u79zQnT/Xu90OsXo0aPF1KlTxcGDB8Unn3wiEhMTRX5+vhohURAxT2KexDyJeRLzJOZJzJP6V57EolSIAdDpz6uvviqEEOL06dPi+uuvF3FxccJkMonLLrtMPPzww6K+vl7dgfeSefPmidTUVGE0GsWgQYPEvHnzxPHjx33bW1tbxf333y9iY2NFeHi4+PnPfy7Ky8tVHHHv+/TTTwUAUVJSEtAeanO/ffv2Tl/rixYtEkK4b3e8fPlykZycLEwmk5gyZUqH56SmpkbMnz9fWCwWERUVJe68807R2NioQjQ/XFfxnzx58oLvBdu3bxdCCFFcXCyys7NFdHS0MJvN4qqrrhJPPPFEQDLSn3UVf0tLi5g6dapITEwUBoNBZGRkiMWLFwfc1laIgTv/3b32hRDipZdeEmFhYaKurq7D/gN97rv7OydEz97rS0tLxYwZM0RYWJhISEgQDz30kHA4HEGOhoKNeRLzJOZJi4QQzJOYJzFPYp7Uf/IkyTNwIiIiIiIiIiKioOE1pYiIiIiIiIiIKOhYlCIiIiIiIiIioqBjUYqIiIiIiIiIiIKORSkiIiIiIiIiIgo6FqWIiIiIiIiIiCjoWJQiIiIiIiIiIqKgY1GKiIiIiIiIiIiCjkUpIiIiIiIiIiIKOhaliIiIiIiIiIgo6FiUIqKQV11djfvuuw9DhgyByWRCSkoKpk2bhi+++AIAIEkStmzZou4giYiIiFTAPImI1KRXewBERH1tzpw5sNvteO211zB8+HBUVlaioKAANTU1ag+NiIiISFXMk4hITZIQQqg9CCKivlJXV4fY2FgUFhZi8uTJHbYPHToUp06d8q1nZGSgtLQUAPD+++9j1apVOHr0KNLS0rBo0SL84Q9/gF7vrudLkoQXXngBH3zwAQoLC5Gamop169Zh7ty5QYmNiIiI6FIwTyIitfHre0QU0iwWCywWC7Zs2QKbzdZh+969ewEAr776KsrLy33ru3btwsKFC/Hggw/i6NGjeOmll7Bp0yY8/vjjAfsvX74cc+bMwaFDh7BgwQLcfvvt+Oabb/o+MCIiIqJLxDyJiNTGM6WIKOS9++67WLx4MVpbW5GVlYXJkyfj9ttvx9ixYwG4P8nbvHkzZs2a5dsnNzcXU6ZMQX5+vq/t9ddfx+9//3uUlZX59rv33nuxceNGX59rr70WWVlZeOGFF4ITHBEREdElYJ5ERGrimVJEFPLmzJmDsrIyfPDBB5g+fToKCwuRlZWFTZs2XXCfQ4cOYfXq1b5PEC0WCxYvXozy8nK0tLT4+uXk5ATsl5OTw08AiYiIaMBgnkREauKFzolIE8xmM2688UbceOONWL58Oe655x6sXLkSd9xxR6f9m5qasGrVKsyePbvTYxERERGFCuZJRKQWnilFRJo0atQoNDc3AwAMBgNcLlfA9qysLJSUlOCyyy7r8CPLbW+du3fvDthv9+7duOqqq/o+ACIiIqI+wjyJiIKFZ0oRUUirqanBrbfeirvuugtjx45FZGQk9u3bh3Xr1mHmzJkA3HeWKSgowHXXXQeTyYTY2FisWLECN998M4YMGYK5c+dClmUcOnQIR44cwR//+Eff8d9++21MmDABP/7xj/HGG2/gq6++wssvv6xWuEREREQ9xjyJiNTGC50TUUiz2Wx47LHH8O9//xsnTpyAw+FAeno6br31Vjz66KMICwvDhx9+iLy8PJSWlmLQoEG+Wx1/+umnWL16NQ4cOACDwYCRI0finnvuweLFiwG4L+C5YcMGbNmyBTt37kRqaiqefPJJ3HbbbSpGTERERNQzzJOISG0sShERXaTO7kZDRERERMyTiKhneE0pIiIiIiIiIiIKOhaliIiIiIiIiIgo6Pj1PSIiIiIiIiIiCjqeKUVEREREREREREHHohQREREREREREQUdi1JERERERERERBR0LEoREREREREREVHQsShFRERERERERERBx6IUEREREREREREFHYtSREREREREREQUdCxKERERERERERFR0LEoRUREREREREREQff/AU9dd42GW77kAAAAAElFTkSuQmCC", + "text/plain": [ + "

" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import matplotlib.pyplot as plt\n", + "from collections import defaultdict\n", + "\n", + "log_history = trainer.state.log_history\n", + "series = defaultdict(lambda: {'step': [], 'value': []})\n", + "\n", + "for entry in log_history:\n", + " step = entry.get('step')\n", + " for key, value in entry.items():\n", + " if key in {'loss', 'eval_loss', 'learning_rate'} and step is not None:\n", + " series[key]['step'].append(step)\n", + " series[key]['value'].append(value)\n", + "\n", + "fig, axes = plt.subplots(1, 2, figsize=(12, 4))\n", + "\n", + "if series['loss']['step']:\n", + " axes[0].plot(series['loss']['step'], series['loss']['value'], label='train loss')\n", + "if series['eval_loss']['step']:\n", + " axes[0].plot(series['eval_loss']['step'], series['eval_loss']['value'], label='eval loss')\n", + "axes[0].set_xlabel('Step')\n", + "axes[0].set_ylabel('Loss')\n", + "axes[0].set_title('Train / Eval Loss')\n", + "axes[0].grid(True, alpha=0.3)\n", + "axes[0].legend()\n", + "\n", + "if series['learning_rate']['step']:\n", + " axes[1].plot(series['learning_rate']['step'], series['learning_rate']['value'], label='learning rate')\n", + "axes[1].set_xlabel('Step')\n", + "axes[1].set_ylabel('LR')\n", + "axes[1].set_title('Learning Rate Schedule')\n", + "axes[1].grid(True, alpha=0.3)\n", + "axes[1].legend()\n", + "\n", + "plt.tight_layout()\n", + "plt.show()\n" + ] + }, + { + "cell_type": "markdown", + "id": "8958161c", + "metadata": {}, + "source": [ + "## 7. Save The Best-Loaded Adapter\n", + "\n", + "If `load_best_model_at_end=True` is supported by the installed TRL stack, the in-memory model should already be the best validation checkpoint here.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "4fef7d5f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "saved_adapter_dir= /root/aditya/agentic-traffic/artifacts/district_llm_adapter_v3/main_run/adapter\n", + "best_checkpoint_dir= /root/aditya/agentic-traffic/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150\n" + ] + } + ], + "source": [ + "ADAPTER_OUTPUT_DIR.mkdir(parents=True, exist_ok=True)\n", + "model.save_pretrained(str(ADAPTER_OUTPUT_DIR))\n", + "tokenizer.save_pretrained(str(ADAPTER_OUTPUT_DIR))\n", + "print('saved_adapter_dir=', ADAPTER_OUTPUT_DIR)\n", + "print('best_checkpoint_dir=', getattr(trainer.state, 'best_model_checkpoint', None))\n" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "3fdaf91a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "==((====))== Unsloth 2026.3.3: Fast Llama patching. Transformers: 5.2.0.\n", + " \\\\ /| NVIDIA H100 80GB HBM3. Num GPUs = 1. Max memory: 79.179 GB. Platform: Linux.\n", + "O^O/ \\_/ \\ Torch: 2.10.0+cu128. CUDA: 9.0. CUDA Toolkit: 12.8. Triton: 3.6.0\n", + "\\ / Bfloat16 = TRUE. FA [Xformers = 0.0.35. FA2 = False]\n", + " \"-____-\" Free license: http://github.com/unslothai/unsloth\n", + "Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/root/conda_envs/traffic-llm/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=23524) is multi-threaded, use of fork() may lead to deadlocks in the child.\n", + " self.pid = os.fork()\n", + "Loading weights: 100%|██████████| 291/291 [00:00<00:00, 318.30it/s, Materializing param=model.norm.weight] \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "loaded_model_dir= /root/aditya/agentic-traffic/artifacts/district_llm_adapter_v3/main_run/checkpoints/checkpoint-150\n" + ] + } + ], + "source": [ + "from unsloth import FastLanguageModel\n", + "\n", + "LOADABLE_MODEL_DIR = Path(getattr(trainer.state, 'best_model_checkpoint', '') or ADAPTER_OUTPUT_DIR)\n", + "if not LOADABLE_MODEL_DIR.exists():\n", + " LOADABLE_MODEL_DIR = ADAPTER_OUTPUT_DIR\n", + "\n", + "model, tokenizer = FastLanguageModel.from_pretrained(\n", + " model_name=str(LOADABLE_MODEL_DIR),\n", + " max_seq_length=MAX_SEQ_LENGTH,\n", + " load_in_4bit=LOAD_IN_4BIT,\n", + ")\n", + "\n", + "FastLanguageModel.for_inference(model)\n", + "print('loaded_model_dir=', LOADABLE_MODEL_DIR)\n" + ] + }, + { + "cell_type": "markdown", + "id": "68af15d6", + "metadata": {}, + "source": [ + "## 8. Quick Inference Sanity Check\n", + "\n", + "Run a short generation on validation messages before the offline evaluation pass.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "48ce3623", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "<|begin_of_text|>system: You are a district traffic coordinator for RL traffic lights. Return only valid JSON with exactly these keys: strategy, priority_corridor, target_intersections, phase_bias, duration_steps. target_intersections must be a JSON array with at most 3 unique ids. If candidate_intersections is present, target_intersections must use only ids from that list. Do not invent intersection ids. Deduplicate ids. If uncertain, prefer the most congested valid candidates.\n", + "user: ### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_03\n", + "district_type: residential\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 10\n", + "sim_time: 50\n", + "intersection_count: 18\n", + "avg_queue: 1.17\n", + "max_queue: 4.00\n", + "total_queue: 21.00\n", + "avg_wait: 0.22\n", + "max_wait: 1.00\n", + "total_wait: 4.00\n", + "avg_outgoing_load: 1.56\n", + "max_outgoing_load: 5.00\n", + "total_outgoing_load: 28.00\n", + "recent_throughput: 2.00\n", + "queue_change: 4.00\n", + "wait_change: 2.00\n", + "throughput_change: 0.00\n", + "ns_queue: 21.00\n", + "ew_queue: 0.00\n", + "ns_wait: 4.00\n", + "ew_wait: 0.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 12.00\n", + "boundary_wait_total: 2.00\n", + "spillback_risk: 0\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0014 q=3.00 w=1.00 out=5.00 phase=0 boundary=1\n", + "- i_0003 q=2.00 w=1.00 out=4.00 phase=1 boundary=0\n", + "- i_0025 q=4.00 w=0.00 out=0.00 phase=1 boundary=1\n", + "candidate_intersections:\n", + "- i_0014 q=3.00 w=1.00 out=5.00 phase=0 boundary=1 spillback=1 incident=0 overload=0 event=0 align=NS reasons=congested|boundary|spillback|outgoing\n", + "- i_0003 q=2.00 w=1.00 out=4.00 phase=1 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|outgoing\n", + "- i_0025 q=4.00 w=0.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary\n", + "- i_0036 q=1.00 w=1.00 out=3.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0002 q=3.00 w=0.00 out=1.00 phase=1 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0024 q=2.00 w=1.00 out=0.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "assistant: " + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "--- Logging error ---\n", + "Traceback (most recent call last):\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/logging/__init__.py\", line 1160, in emit\n", + " msg = self.format(record)\n", + " ^^^^^^^^^^^^^^^^^^^\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/logging/__init__.py\", line 999, in format\n", + " return fmt.format(record)\n", + " ^^^^^^^^^^^^^^^^^^\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/logging/__init__.py\", line 703, in format\n", + " record.message = record.getMessage()\n", + " ^^^^^^^^^^^^^^^^^^^\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/logging/__init__.py\", line 392, in getMessage\n", + " msg = msg % self.args\n", + " ~~~~^~~~~~~~~~~\n", + "TypeError: not all arguments converted during string formatting\n", + "Call stack:\n", + " File \"\", line 198, in _run_module_as_main\n", + " File \"\", line 88, in _run_code\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/ipykernel_launcher.py\", line 18, in \n", + " app.launch_new_instance()\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/traitlets/config/application.py\", line 1075, in launch_instance\n", + " app.start()\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/ipykernel/kernelapp.py\", line 758, in start\n", + " self.io_loop.start()\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/tornado/platform/asyncio.py\", line 211, in start\n", + " self.asyncio_loop.run_forever()\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/asyncio/base_events.py\", line 645, in run_forever\n", + " self._run_once()\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/asyncio/base_events.py\", line 1999, in _run_once\n", + " handle._run()\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/asyncio/events.py\", line 88, in _run\n", + " self._context.run(self._callback, *self._args)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/ipykernel/kernelbase.py\", line 621, in shell_main\n", + " await self.dispatch_shell(msg, subshell_id=subshell_id)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/ipykernel/kernelbase.py\", line 478, in dispatch_shell\n", + " await result\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/ipykernel/ipkernel.py\", line 372, in execute_request\n", + " await super().execute_request(stream, ident, parent)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/ipykernel/kernelbase.py\", line 834, in execute_request\n", + " reply_content = await reply_content\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/ipykernel/ipkernel.py\", line 464, in do_execute\n", + " res = shell.run_cell(\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/ipykernel/zmqshell.py\", line 663, in run_cell\n", + " return super().run_cell(*args, **kwargs)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/IPython/core/interactiveshell.py\", line 3169, in run_cell\n", + " result = self._run_cell(\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/IPython/core/interactiveshell.py\", line 3224, in _run_cell\n", + " result = runner(coro)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/IPython/core/async_helpers.py\", line 128, in _pseudo_sync_runner\n", + " coro.send(None)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/IPython/core/interactiveshell.py\", line 3446, in run_cell_async\n", + " has_raised = await self.run_ast_nodes(code_ast.body, cell_name,\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/IPython/core/interactiveshell.py\", line 3687, in run_ast_nodes\n", + " if await self.run_code(code, result, async_=asy):\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/IPython/core/interactiveshell.py\", line 3747, in run_code\n", + " exec(code_obj, self.user_global_ns, self.user_ns)\n", + " File \"/tmp/ipykernel_23524/2748769959.py\", line 9, in \n", + " _ = model.generate(**inputs, max_new_tokens=128, do_sample=False, streamer=streamer)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/peft/peft_model.py\", line 2048, in generate\n", + " outputs = self.base_model.generate(*args, **kwargs)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/unsloth/models/llama.py\", line 2128, in unsloth_fast_generate\n", + " output = self._old_generate(*args, **kwargs)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/utils/_contextlib.py\", line 124, in decorate_context\n", + " return func(*args, **kwargs)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/transformers/generation/utils.py\", line 2668, in generate\n", + " result = decoding_method(\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/transformers/generation/utils.py\", line 2863, in _sample\n", + " outputs = self._prefill(input_ids, generation_config, model_kwargs)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/transformers/generation/utils.py\", line 3857, in _prefill\n", + " return self(**model_inputs, return_dict=True)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1776, in _wrapped_call_impl\n", + " return self._call_impl(*args, **kwargs)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1787, in _call_impl\n", + " return forward_call(*args, **kwargs)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/unsloth/models/llama.py\", line 1474, in _CausalLM_fast_forward\n", + " outputs = self.model(\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1776, in _wrapped_call_impl\n", + " return self._call_impl(*args, **kwargs)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/torch/nn/modules/module.py\", line 1787, in _call_impl\n", + " return forward_call(*args, **kwargs)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/unsloth/models/llama.py\", line 1058, in LlamaModel_fast_forward\n", + " attention_mask = _prepare_4d_causal_attention_mask_for_sdpa(\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/transformers/modeling_attn_mask_utils.py\", line 394, in _prepare_4d_causal_attention_mask_for_sdpa\n", + " attn_mask_converter = AttentionMaskConverter(is_causal=True, sliding_window=sliding_window)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/transformers/modeling_attn_mask_utils.py\", line 74, in __init__\n", + " logger.warning_once(DEPRECATION_MESSAGE, FutureWarning)\n", + " File \"/root/conda_envs/traffic-llm/lib/python3.12/site-packages/transformers/utils/logging.py\", line 327, in warning_once\n", + " self.warning(*args, **kwargs)\n", + "Message: 'The attention mask API under `transformers.modeling_attn_mask_utils` (`AttentionMaskConverter`) is deprecated and will be removed in Transformers v5.10. Please use the new API in `transformers.masking_utils`.'\n", + "Arguments: (,)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0014\", \"i_0003\", \"i_0025\"]}<|end_of_text|>\n" + ] + } + ], + "source": [ + "from transformers import TextStreamer\n", + "\n", + "FastLanguageModel.for_inference(model)\n", + "sample_messages = dataset['val'][0]['messages'][:2]\n", + "prompt = render_messages(sample_messages, add_generation_prompt=True)\n", + "\n", + "inputs = tokenizer(prompt, return_tensors='pt').to(model.device)\n", + "streamer = TextStreamer(tokenizer)\n", + "_ = model.generate(**inputs, max_new_tokens=128, do_sample=False, streamer=streamer)\n" + ] + }, + { + "cell_type": "markdown", + "id": "f78caf1c", + "metadata": {}, + "source": [ + "## 9. Offline Evaluation With Before/After Repair Metrics\n", + "\n", + "This uses the updated offline evaluator to compare raw predictions against repaired predictions and optionally score only visible candidates.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "504b18c4", + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "\n", + "if str(REPO_ROOT) not in sys.path:\n", + " sys.path.insert(0, str(REPO_ROOT))\n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "541eb48e", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "eval: 100%|██████████| 250/250 [06:22<00:00, 1.53s/it]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\n", + " \"exact_full_object_accuracy\": 0.632,\n", + " \"exact_full_object_accuracy_after_repair\": 0.632,\n", + " \"field_accuracy\": {\n", + " \"duration_steps\": 1.0,\n", + " \"phase_bias\": 0.92,\n", + " \"priority_corridor\": 0.744,\n", + " \"strategy\": 0.872\n", + " },\n", + " \"field_accuracy_after_repair\": {\n", + " \"duration_steps\": 1.0,\n", + " \"phase_bias\": 0.92,\n", + " \"priority_corridor\": 0.744,\n", + " \"strategy\": 0.872\n", + " },\n", + " \"json_validity_rate\": 1.0,\n", + " \"num_examples\": 250,\n", + " \"schema_validity_rate\": 1.0,\n", + " \"target_intersections\": {\n", + " \"exact_list_match\": 0.972,\n", + " \"exact_set_match\": 0.972,\n", + " \"hit_at_1\": 1.0,\n", + " \"hit_at_2\": 1.0,\n", + " \"hit_at_3\": 0.972,\n", + " \"jaccard\": 0.986,\n", + " \"overlap_count\": 2.972,\n", + " \"overlap_rate\": 0.9906666666666666,\n", + " \"precision\": 0.9906666666666666,\n", + " \"recall\": 0.9906666666666666\n", + " },\n", + " \"target_intersections_after_repair\": {\n", + " \"exact_list_match\": 0.972,\n", + " \"exact_set_match\": 0.972,\n", + " \"hit_at_1\": 1.0,\n", + " \"hit_at_2\": 1.0,\n", + " \"hit_at_3\": 0.972,\n", + " \"jaccard\": 0.986,\n", + " \"overlap_count\": 2.972,\n", + " \"overlap_rate\": 0.9906666666666666,\n", + " \"precision\": 0.9906666666666666,\n", + " \"recall\": 0.9906666666666666\n", + " },\n", + " \"target_intersections_before_after_repair\": {\n", + " \"exact_set_match_after_repair\": 0.972,\n", + " \"exact_set_match_before_repair\": 0.972,\n", + " \"fallback_used_rate\": 0.0,\n", + " \"invalid_id_rate_after_repair\": 0.0,\n", + " \"invalid_id_rate_before_repair\": 0.0,\n", + " \"jaccard_after_repair\": 0.986,\n", + " \"jaccard_before_repair\": 0.986\n", + " },\n", + " \"target_intersections_before_repair\": {\n", + " \"exact_list_match\": 0.972,\n", + " \"exact_set_match\": 0.972,\n", + " \"hit_at_1\": 1.0,\n", + " \"hit_at_2\": 1.0,\n", + " \"hit_at_3\": 0.972,\n", + " \"jaccard\": 0.986,\n", + " \"overlap_count\": 2.972,\n", + " \"overlap_rate\": 0.9906666666666666,\n", + " \"precision\": 0.9906666666666666,\n", + " \"recall\": 0.9906666666666666\n", + " },\n", + " \"target_intersections_failure_buckets\": {\n", + " \"partial_overlap\": 250\n", + " },\n", + " \"target_intersections_restricted_to_visible_summary\": {\n", + " \"exact_list_match\": 0.972,\n", + " \"exact_set_match\": 0.972,\n", + " \"hit_at_1\": 1.0,\n", + " \"hit_at_2\": 1.0,\n", + " \"hit_at_3\": 0.972,\n", + " \"jaccard\": 0.986,\n", + " \"overlap_count\": 2.972,\n", + " \"overlap_rate\": 0.9906666666666666,\n", + " \"precision\": 0.9906666666666666,\n", + " \"recall\": 0.9906666666666666\n", + " },\n", + " \"target_intersections_restricted_to_visible_summary_after_repair\": {\n", + " \"exact_list_match\": 0.972,\n", + " \"exact_set_match\": 0.972,\n", + " \"hit_at_1\": 1.0,\n", + " \"hit_at_2\": 1.0,\n", + " \"hit_at_3\": 0.972,\n", + " \"jaccard\": 0.986,\n", + " \"overlap_count\": 2.972,\n", + " \"overlap_rate\": 0.9906666666666666,\n", + " \"precision\": 0.9906666666666666,\n", + " \"recall\": 0.9906666666666666\n", + " },\n", + " \"target_intersections_restricted_to_visible_summary_before_repair\": {\n", + " \"exact_list_match\": 0.972,\n", + " \"exact_set_match\": 0.972,\n", + " \"hit_at_1\": 1.0,\n", + " \"hit_at_2\": 1.0,\n", + " \"hit_at_3\": 0.972,\n", + " \"jaccard\": 0.986,\n", + " \"overlap_count\": 2.972,\n", + " \"overlap_rate\": 0.9906666666666666,\n", + " \"precision\": 0.9906666666666666,\n", + " \"recall\": 0.9906666666666666\n", + " }\n", + "}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + } + ], + "source": [ + "from district_llm.eval import (\n", + " DistrictTopologyIndex,\n", + " evaluate_rows,\n", + " load_rows,\n", + " print_debug_examples,\n", + ")\n", + "from district_llm.repair import RepairConfig\n", + "\n", + "FastLanguageModel.for_inference(model)\n", + "val_rows = load_rows(VAL_JSONL, max_examples=MAX_EVAL_EXAMPLES)\n", + "topology_index = DistrictTopologyIndex(REPO_ROOT / 'data' / 'generated')\n", + "\n", + "results = evaluate_rows(\n", + " rows=val_rows,\n", + " model=model,\n", + " tokenizer=tokenizer,\n", + " max_new_tokens=128,\n", + " topology_index=topology_index,\n", + " restrict_targets_to_visible_summary=RESTRICT_TARGETS_TO_VISIBLE_SUMMARY,\n", + " debug_examples=DEBUG_EXAMPLES,\n", + " repair_config=RepairConfig(\n", + " allow_only_visible_candidates=ALLOW_ONLY_VISIBLE_CANDIDATES,\n", + " max_target_intersections=MAX_TARGET_INTERSECTIONS,\n", + " fallback_on_empty_targets=FALLBACK_ON_EMPTY_TARGETS,\n", + " fallback_mode=FALLBACK_MODE,\n", + " ),\n", + " report_before_after_repair=True,\n", + ")\n", + "\n", + "summary = {key: value for key, value in results.items() if key != 'debug_examples'}\n", + "print(json.dumps(summary, indent=2, sort_keys=True))\n" + ] + }, + { + "cell_type": "markdown", + "id": "453dfcdc", + "metadata": {}, + "source": [ + "## 10. Inspect Debug Examples And Repair Behavior\n", + "\n", + "This prints sample predictions before and after repair, then surfaces the failure buckets and repair usage.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "589172b3", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[debug 1] district_summary:\n", + "### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_03\n", + "district_type: residential\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 10\n", + "sim_time: 50\n", + "intersection_count: 18\n", + "avg_queue: 1.17\n", + "max_queue: 4.00\n", + "total_queue: 21.00\n", + "avg_wait: 0.22\n", + "max_wait: 1.00\n", + "total_wait: 4.00\n", + "avg_outgoing_load: 1.56\n", + "max_outgoing_load: 5.00\n", + "total_outgoing_load: 28.00\n", + "recent_throughput: 2.00\n", + "queue_change: 4.00\n", + "wait_change: 2.00\n", + "throughput_change: 0.00\n", + "ns_queue: 21.00\n", + "ew_queue: 0.00\n", + "ns_wait: 4.00\n", + "ew_wait: 0.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 12.00\n", + "boundary_wait_total: 2.00\n", + "spillback_risk: 0\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0014 q=3.00 w=1.00 out=5.00 phase=0 boundary=1\n", + "- i_0003 q=2.00 w=1.00 out=4.00 phase=1 boundary=0\n", + "- i_0025 q=4.00 w=0.00 out=0.00 phase=1 boundary=1\n", + "candidate_intersections:\n", + "- i_0014 q=3.00 w=1.00 out=5.00 phase=0 boundary=1 spillback=1 incident=0 overload=0 event=0 align=NS reasons=congested|boundary|spillback|outgoing\n", + "- i_0003 q=2.00 w=1.00 out=4.00 phase=1 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|outgoing\n", + "- i_0025 q=4.00 w=0.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary\n", + "- i_0036 q=1.00 w=1.00 out=3.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0002 q=3.00 w=0.00 out=1.00 phase=1 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0024 q=2.00 w=1.00 out=0.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "[debug 1] predicted_json_raw= {\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0014\", \"i_0003\", \"i_0025\"]}\n", + "[debug 1] predicted_json_parsed_before_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0014\", \"i_0003\", \"i_0025\"]}\n", + "[debug 1] predicted_json_parsed_after_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0014\", \"i_0003\", \"i_0025\"]}\n", + "[debug 1] ground_truth_json={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0014\", \"i_0003\", \"i_0025\"]}\n", + "[debug 1] target_intersections_metrics_before_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 1] target_intersections_metrics_after_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 1] repair_report={\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0014\", \"i_0003\", \"i_0025\"], \"repaired_targets\": [\"i_0014\", \"i_0003\", \"i_0025\"], \"truncated\": false}\n", + "[debug 1] visible_candidate_ids=[\"i_0002\", \"i_0003\", \"i_0014\", \"i_0024\", \"i_0025\", \"i_0036\"]\n", + "[debug 1] failure_buckets=[\"partial_overlap\"]\n", + "[debug 2] district_summary:\n", + "### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_04\n", + "district_type: residential\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 10\n", + "sim_time: 50\n", + "intersection_count: 10\n", + "avg_queue: 0.90\n", + "max_queue: 3.00\n", + "total_queue: 9.00\n", + "avg_wait: 0.20\n", + "max_wait: 1.00\n", + "total_wait: 2.00\n", + "avg_outgoing_load: 0.90\n", + "max_outgoing_load: 3.00\n", + "total_outgoing_load: 9.00\n", + "recent_throughput: 2.00\n", + "queue_change: -3.00\n", + "wait_change: 0.00\n", + "throughput_change: 0.00\n", + "ns_queue: 9.00\n", + "ew_queue: 0.00\n", + "ns_wait: 2.00\n", + "ew_wait: 0.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 9.00\n", + "boundary_wait_total: 2.00\n", + "spillback_risk: 0\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0016 q=3.00 w=1.00 out=0.00 phase=1 boundary=1\n", + "- i_0027 q=1.00 w=1.00 out=3.00 phase=0 boundary=1\n", + "- i_0018 q=1.00 w=0.00 out=3.00 phase=1 boundary=1\n", + "candidate_intersections:\n", + "- i_0016 q=3.00 w=1.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary\n", + "- i_0027 q=1.00 w=1.00 out=3.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary|outgoing\n", + "- i_0018 q=1.00 w=0.00 out=3.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|outgoing\n", + "- i_0026 q=2.00 w=0.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0038 q=1.00 w=0.00 out=2.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0007 q=1.00 w=0.00 out=1.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "[debug 2] predicted_json_raw= {\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0016\", \"i_0027\", \"i_0018\"]}\n", + "[debug 2] predicted_json_parsed_before_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0016\", \"i_0027\", \"i_0018\"]}\n", + "[debug 2] predicted_json_parsed_after_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0016\", \"i_0027\", \"i_0018\"]}\n", + "[debug 2] ground_truth_json={\"duration_steps\": 10, \"phase_bias\": \"EW\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0016\", \"i_0027\", \"i_0018\"]}\n", + "[debug 2] target_intersections_metrics_before_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 2] target_intersections_metrics_after_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 2] repair_report={\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0016\", \"i_0027\", \"i_0018\"], \"repaired_targets\": [\"i_0016\", \"i_0027\", \"i_0018\"], \"truncated\": false}\n", + "[debug 2] visible_candidate_ids=[\"i_0007\", \"i_0016\", \"i_0018\", \"i_0026\", \"i_0027\", \"i_0038\"]\n", + "[debug 2] failure_buckets=[\"partial_overlap\"]\n", + "[debug 3] district_summary:\n", + "### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_01\n", + "district_type: residential\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 10\n", + "sim_time: 50\n", + "intersection_count: 30\n", + "avg_queue: 1.13\n", + "max_queue: 5.00\n", + "total_queue: 34.00\n", + "avg_wait: 0.20\n", + "max_wait: 2.00\n", + "total_wait: 6.00\n", + "avg_outgoing_load: 0.93\n", + "max_outgoing_load: 3.00\n", + "total_outgoing_load: 28.00\n", + "recent_throughput: 2.00\n", + "queue_change: 5.00\n", + "wait_change: -1.00\n", + "throughput_change: 0.00\n", + "ns_queue: 29.00\n", + "ew_queue: 5.00\n", + "ns_wait: 4.00\n", + "ew_wait: 2.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 24.00\n", + "boundary_wait_total: 4.00\n", + "spillback_risk: 1\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0049 q=4.00 w=1.00 out=3.00 phase=0 boundary=1\n", + "- i_0029 q=5.00 w=0.00 out=3.00 phase=0 boundary=1\n", + "- i_0128 q=3.00 w=2.00 out=0.00 phase=0 boundary=1\n", + "candidate_intersections:\n", + "- i_0049 q=4.00 w=1.00 out=3.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary|outgoing\n", + "- i_0029 q=5.00 w=0.00 out=3.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary|outgoing\n", + "- i_0128 q=3.00 w=2.00 out=0.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0071 q=4.00 w=0.00 out=2.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=BALANCED reasons=congested\n", + "- i_0050 q=2.00 w=2.00 out=0.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0040 q=3.00 w=0.00 out=2.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "[debug 3] predicted_json_raw= {\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0049\", \"i_0029\", \"i_0128\"]}\n", + "[debug 3] predicted_json_parsed_before_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0049\", \"i_0029\", \"i_0128\"]}\n", + "[debug 3] predicted_json_parsed_after_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0049\", \"i_0029\", \"i_0128\"]}\n", + "[debug 3] ground_truth_json={\"duration_steps\": 10, \"phase_bias\": \"EW\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0049\", \"i_0029\", \"i_0128\"]}\n", + "[debug 3] target_intersections_metrics_before_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 3] target_intersections_metrics_after_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 3] repair_report={\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0049\", \"i_0029\", \"i_0128\"], \"repaired_targets\": [\"i_0049\", \"i_0029\", \"i_0128\"], \"truncated\": false}\n", + "[debug 3] visible_candidate_ids=[\"i_0029\", \"i_0040\", \"i_0049\", \"i_0050\", \"i_0071\", \"i_0128\"]\n", + "[debug 3] failure_buckets=[\"partial_overlap\"]\n", + "[debug 4] district_summary:\n", + "### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_05\n", + "district_type: commercial\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 10\n", + "sim_time: 50\n", + "intersection_count: 16\n", + "avg_queue: 0.81\n", + "max_queue: 3.00\n", + "total_queue: 13.00\n", + "avg_wait: 0.31\n", + "max_wait: 3.00\n", + "total_wait: 5.00\n", + "avg_outgoing_load: 0.75\n", + "max_outgoing_load: 3.00\n", + "total_outgoing_load: 12.00\n", + "recent_throughput: 2.00\n", + "queue_change: 0.00\n", + "wait_change: 1.00\n", + "throughput_change: 0.00\n", + "ns_queue: 11.00\n", + "ew_queue: 2.00\n", + "ns_wait: 5.00\n", + "ew_wait: 0.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 8.00\n", + "boundary_wait_total: 2.00\n", + "spillback_risk: 1\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0053 q=3.00 w=3.00 out=1.00 phase=0 boundary=0\n", + "- i_0094 q=3.00 w=2.00 out=0.00 phase=0 boundary=1\n", + "- i_0073 q=2.00 w=0.00 out=3.00 phase=1 boundary=1\n", + "candidate_intersections:\n", + "- i_0053 q=3.00 w=3.00 out=1.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0094 q=3.00 w=2.00 out=0.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary\n", + "- i_0073 q=2.00 w=0.00 out=3.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=EW reasons=congested|boundary|outgoing\n", + "- i_0072 q=2.00 w=0.00 out=2.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0054 q=1.00 w=0.00 out=3.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=outgoing\n", + "- i_0052 q=1.00 w=0.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "[debug 4] predicted_json_raw= {\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"NS\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0053\", \"i_0094\", \"i_0073\"]}\n", + "[debug 4] predicted_json_parsed_before_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"NS\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0053\", \"i_0094\", \"i_0073\"]}\n", + "[debug 4] predicted_json_parsed_after_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"NS\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0053\", \"i_0094\", \"i_0073\"]}\n", + "[debug 4] ground_truth_json={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0053\", \"i_0094\", \"i_0073\"]}\n", + "[debug 4] target_intersections_metrics_before_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 4] target_intersections_metrics_after_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 4] repair_report={\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0053\", \"i_0094\", \"i_0073\"], \"repaired_targets\": [\"i_0053\", \"i_0094\", \"i_0073\"], \"truncated\": false}\n", + "[debug 4] visible_candidate_ids=[\"i_0052\", \"i_0053\", \"i_0054\", \"i_0072\", \"i_0073\", \"i_0094\"]\n", + "[debug 4] failure_buckets=[\"partial_overlap\"]\n", + "[debug 5] district_summary:\n", + "### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_00\n", + "district_type: residential\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 10\n", + "sim_time: 50\n", + "intersection_count: 23\n", + "avg_queue: 1.57\n", + "max_queue: 6.00\n", + "total_queue: 36.00\n", + "avg_wait: 0.39\n", + "max_wait: 4.00\n", + "total_wait: 9.00\n", + "avg_outgoing_load: 1.17\n", + "max_outgoing_load: 4.00\n", + "total_outgoing_load: 27.00\n", + "recent_throughput: 2.00\n", + "queue_change: 1.00\n", + "wait_change: 1.00\n", + "throughput_change: 0.00\n", + "ns_queue: 29.00\n", + "ew_queue: 7.00\n", + "ns_wait: 7.00\n", + "ew_wait: 2.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 25.00\n", + "boundary_wait_total: 7.00\n", + "spillback_risk: 1\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0047 q=6.00 w=4.00 out=1.00 phase=1 boundary=1\n", + "- i_0091 q=6.00 w=1.00 out=0.00 phase=1 boundary=1\n", + "- i_0089 q=5.00 w=1.00 out=0.00 phase=1 boundary=1\n", + "candidate_intersections:\n", + "- i_0047 q=6.00 w=4.00 out=1.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary\n", + "- i_0091 q=6.00 w=1.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary\n", + "- i_0089 q=5.00 w=1.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0102 q=2.00 w=1.00 out=1.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0068 q=0.00 w=0.00 out=4.00 phase=1 boundary=0 spillback=0 incident=0 overload=0 event=0 align=BALANCED reasons=outgoing\n", + "- i_0090 q=0.00 w=0.00 out=4.00 phase=1 boundary=0 spillback=0 incident=0 overload=0 event=0 align=BALANCED reasons=outgoing\n", + "[debug 5] predicted_json_raw= {\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0047\", \"i_0091\", \"i_0089\"]}\n", + "[debug 5] predicted_json_parsed_before_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0047\", \"i_0091\", \"i_0089\"]}\n", + "[debug 5] predicted_json_parsed_after_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0047\", \"i_0091\", \"i_0089\"]}\n", + "[debug 5] ground_truth_json={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0047\", \"i_0091\", \"i_0089\"]}\n", + "[debug 5] target_intersections_metrics_before_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 5] target_intersections_metrics_after_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 5] repair_report={\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0047\", \"i_0091\", \"i_0089\"], \"repaired_targets\": [\"i_0047\", \"i_0091\", \"i_0089\"], \"truncated\": false}\n", + "[debug 5] visible_candidate_ids=[\"i_0047\", \"i_0068\", \"i_0089\", \"i_0090\", \"i_0091\", \"i_0102\"]\n", + "[debug 5] failure_buckets=[\"partial_overlap\"]\n", + "[debug 6] district_summary:\n", + "### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_02\n", + "district_type: mixed\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 10\n", + "sim_time: 50\n", + "intersection_count: 18\n", + "avg_queue: 1.33\n", + "max_queue: 4.00\n", + "total_queue: 24.00\n", + "avg_wait: 0.28\n", + "max_wait: 3.00\n", + "total_wait: 5.00\n", + "avg_outgoing_load: 1.22\n", + "max_outgoing_load: 4.00\n", + "total_outgoing_load: 22.00\n", + "recent_throughput: 2.00\n", + "queue_change: 4.00\n", + "wait_change: 3.00\n", + "throughput_change: 0.00\n", + "ns_queue: 21.00\n", + "ew_queue: 3.00\n", + "ns_wait: 2.00\n", + "ew_wait: 3.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 17.00\n", + "boundary_wait_total: 5.00\n", + "spillback_risk: 1\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0097 q=4.00 w=3.00 out=0.00 phase=1 boundary=1\n", + "- i_0095 q=4.00 w=0.00 out=3.00 phase=1 boundary=1\n", + "- i_0084 q=3.00 w=1.00 out=0.00 phase=1 boundary=1\n", + "candidate_intersections:\n", + "- i_0097 q=4.00 w=3.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=EW reasons=congested|boundary\n", + "- i_0095 q=4.00 w=0.00 out=3.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary\n", + "- i_0084 q=3.00 w=1.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0085 q=3.00 w=1.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0108 q=2.00 w=0.00 out=4.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=outgoing\n", + "- i_0106 q=0.00 w=0.00 out=4.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=BALANCED reasons=outgoing\n", + "[debug 6] predicted_json_raw= {\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0097\", \"i_0095\", \"i_0084\"]}\n", + "[debug 6] predicted_json_parsed_before_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0097\", \"i_0095\", \"i_0084\"]}\n", + "[debug 6] predicted_json_parsed_after_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0097\", \"i_0095\", \"i_0084\"]}\n", + "[debug 6] ground_truth_json={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0097\", \"i_0095\", \"i_0084\"]}\n", + "[debug 6] target_intersections_metrics_before_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 6] target_intersections_metrics_after_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 6] repair_report={\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0097\", \"i_0095\", \"i_0084\"], \"repaired_targets\": [\"i_0097\", \"i_0095\", \"i_0084\"], \"truncated\": false}\n", + "[debug 6] visible_candidate_ids=[\"i_0084\", \"i_0085\", \"i_0095\", \"i_0097\", \"i_0106\", \"i_0108\"]\n", + "[debug 6] failure_buckets=[\"partial_overlap\"]\n", + "[debug 7] district_summary:\n", + "### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_06\n", + "district_type: commercial\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 10\n", + "sim_time: 50\n", + "intersection_count: 10\n", + "avg_queue: 0.80\n", + "max_queue: 2.00\n", + "total_queue: 8.00\n", + "avg_wait: 0.20\n", + "max_wait: 1.00\n", + "total_wait: 2.00\n", + "avg_outgoing_load: 1.00\n", + "max_outgoing_load: 3.00\n", + "total_outgoing_load: 10.00\n", + "recent_throughput: 2.00\n", + "queue_change: 1.00\n", + "wait_change: 1.00\n", + "throughput_change: 0.00\n", + "ns_queue: 8.00\n", + "ew_queue: 0.00\n", + "ns_wait: 2.00\n", + "ew_wait: 0.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 4.00\n", + "boundary_wait_total: 1.00\n", + "spillback_risk: 0\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0121 q=2.00 w=1.00 out=1.00 phase=0 boundary=0\n", + "- i_0088 q=2.00 w=0.00 out=3.00 phase=0 boundary=1\n", + "- i_0124 q=1.00 w=1.00 out=1.00 phase=0 boundary=1\n", + "candidate_intersections:\n", + "- i_0088 q=2.00 w=0.00 out=3.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary|outgoing\n", + "- i_0121 q=2.00 w=1.00 out=1.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|outgoing\n", + "- i_0124 q=1.00 w=1.00 out=1.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary\n", + "- i_0112 q=1.00 w=0.00 out=1.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0110 q=1.00 w=0.00 out=1.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0125 q=0.00 w=0.00 out=1.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=BALANCED reasons=congested\n", + "[debug 7] predicted_json_raw= {\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0088\", \"i_0121\", \"i_0124\"]}\n", + "[debug 7] predicted_json_parsed_before_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0088\", \"i_0121\", \"i_0124\"]}\n", + "[debug 7] predicted_json_parsed_after_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0088\", \"i_0121\", \"i_0124\"]}\n", + "[debug 7] ground_truth_json={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"NS\", \"strategy\": \"favor_NS\", \"target_intersections\": [\"i_0088\", \"i_0121\", \"i_0124\"]}\n", + "[debug 7] target_intersections_metrics_before_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 7] target_intersections_metrics_after_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 7] repair_report={\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0088\", \"i_0121\", \"i_0124\"], \"repaired_targets\": [\"i_0088\", \"i_0121\", \"i_0124\"], \"truncated\": false}\n", + "[debug 7] visible_candidate_ids=[\"i_0088\", \"i_0110\", \"i_0112\", \"i_0121\", \"i_0124\", \"i_0125\"]\n", + "[debug 7] failure_buckets=[\"partial_overlap\"]\n", + "[debug 8] district_summary:\n", + "### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_03\n", + "district_type: residential\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 20\n", + "sim_time: 100\n", + "intersection_count: 18\n", + "avg_queue: 1.56\n", + "max_queue: 5.00\n", + "total_queue: 28.00\n", + "avg_wait: 0.50\n", + "max_wait: 3.00\n", + "total_wait: 9.00\n", + "avg_outgoing_load: 1.61\n", + "max_outgoing_load: 4.00\n", + "total_outgoing_load: 29.00\n", + "recent_throughput: 3.00\n", + "queue_change: 4.00\n", + "wait_change: -2.00\n", + "throughput_change: -7.00\n", + "ns_queue: 26.00\n", + "ew_queue: 2.00\n", + "ns_wait: 8.00\n", + "ew_wait: 1.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 14.00\n", + "boundary_wait_total: 4.00\n", + "spillback_risk: 0\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0003 q=4.00 w=3.00 out=0.00 phase=1 boundary=0\n", + "- i_0036 q=4.00 w=1.00 out=4.00 phase=1 boundary=1\n", + "- i_0025 q=5.00 w=0.00 out=4.00 phase=0 boundary=1\n", + "candidate_intersections:\n", + "- i_0036 q=4.00 w=1.00 out=4.00 phase=1 boundary=1 spillback=1 incident=0 overload=0 event=0 align=NS reasons=congested|boundary|spillback|outgoing\n", + "- i_0025 q=5.00 w=0.00 out=4.00 phase=0 boundary=1 spillback=1 incident=0 overload=0 event=0 align=NS reasons=congested|boundary|spillback|outgoing\n", + "- i_0003 q=4.00 w=3.00 out=0.00 phase=1 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0014 q=2.00 w=2.00 out=3.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=BALANCED reasons=congested\n", + "- i_0001 q=3.00 w=2.00 out=1.00 phase=0 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0005 q=2.00 w=1.00 out=3.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "[debug 8] predicted_json_raw= {\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0036\", \"i_0025\", \"i_0003\"]}\n", + "[debug 8] predicted_json_parsed_before_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0036\", \"i_0025\", \"i_0003\"]}\n", + "[debug 8] predicted_json_parsed_after_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0036\", \"i_0025\", \"i_0003\"]}\n", + "[debug 8] ground_truth_json={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"outbound\", \"strategy\": \"drain_outbound\", \"target_intersections\": [\"i_0036\", \"i_0025\", \"i_0003\"]}\n", + "[debug 8] target_intersections_metrics_before_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 8] target_intersections_metrics_after_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 8] repair_report={\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0036\", \"i_0025\", \"i_0003\"], \"repaired_targets\": [\"i_0036\", \"i_0025\", \"i_0003\"], \"truncated\": false}\n", + "[debug 8] visible_candidate_ids=[\"i_0001\", \"i_0003\", \"i_0005\", \"i_0014\", \"i_0025\", \"i_0036\"]\n", + "[debug 8] failure_buckets=[\"partial_overlap\"]\n", + "[debug 9] district_summary:\n", + "### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_04\n", + "district_type: residential\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 20\n", + "sim_time: 100\n", + "intersection_count: 10\n", + "avg_queue: 2.20\n", + "max_queue: 6.00\n", + "total_queue: 22.00\n", + "avg_wait: 0.70\n", + "max_wait: 3.00\n", + "total_wait: 7.00\n", + "avg_outgoing_load: 2.00\n", + "max_outgoing_load: 4.00\n", + "total_outgoing_load: 20.00\n", + "recent_throughput: 3.00\n", + "queue_change: 3.00\n", + "wait_change: 1.00\n", + "throughput_change: -7.00\n", + "ns_queue: 18.00\n", + "ew_queue: 4.00\n", + "ns_wait: 6.00\n", + "ew_wait: 1.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 22.00\n", + "boundary_wait_total: 7.00\n", + "spillback_risk: 1\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0016 q=6.00 w=3.00 out=3.00 phase=1 boundary=1\n", + "- i_0038 q=4.00 w=2.00 out=2.00 phase=0 boundary=1\n", + "- i_0027 q=5.00 w=0.00 out=4.00 phase=0 boundary=1\n", + "candidate_intersections:\n", + "- i_0016 q=6.00 w=3.00 out=3.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary\n", + "- i_0027 q=5.00 w=0.00 out=4.00 phase=0 boundary=1 spillback=1 incident=0 overload=0 event=0 align=NS reasons=congested|boundary|spillback|outgoing\n", + "- i_0038 q=4.00 w=2.00 out=2.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0018 q=2.00 w=1.00 out=1.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0026 q=0.00 w=0.00 out=4.00 phase=1 boundary=1 spillback=1 incident=0 overload=0 event=0 align=BALANCED reasons=spillback|outgoing\n", + "- i_0006 q=2.00 w=1.00 out=0.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "[debug 9] predicted_json_raw= {\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0016\", \"i_0027\", \"i_0038\"]}\n", + "[debug 9] predicted_json_parsed_before_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0016\", \"i_0027\", \"i_0038\"]}\n", + "[debug 9] predicted_json_parsed_after_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0016\", \"i_0027\", \"i_0038\"]}\n", + "[debug 9] ground_truth_json={\"duration_steps\": 10, \"phase_bias\": \"EW\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0016\", \"i_0027\", \"i_0038\"]}\n", + "[debug 9] target_intersections_metrics_before_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 9] target_intersections_metrics_after_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 9] repair_report={\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0016\", \"i_0027\", \"i_0038\"], \"repaired_targets\": [\"i_0016\", \"i_0027\", \"i_0038\"], \"truncated\": false}\n", + "[debug 9] visible_candidate_ids=[\"i_0006\", \"i_0016\", \"i_0018\", \"i_0026\", \"i_0027\", \"i_0038\"]\n", + "[debug 9] failure_buckets=[\"partial_overlap\"]\n", + "[debug 10] district_summary:\n", + "### DISTRICT STATE\n", + "city_id: city_0009\n", + "district_id: d_01\n", + "district_type: residential\n", + "scenario: normal\n", + "scenario_type: moderate_rush\n", + "decision_step: 20\n", + "sim_time: 100\n", + "intersection_count: 30\n", + "avg_queue: 2.10\n", + "max_queue: 9.00\n", + "total_queue: 63.00\n", + "avg_wait: 0.60\n", + "max_wait: 5.00\n", + "total_wait: 18.00\n", + "avg_outgoing_load: 1.97\n", + "max_outgoing_load: 6.00\n", + "total_outgoing_load: 59.00\n", + "recent_throughput: 3.00\n", + "queue_change: 8.00\n", + "wait_change: 2.00\n", + "throughput_change: -7.00\n", + "ns_queue: 58.00\n", + "ew_queue: 5.00\n", + "ns_wait: 18.00\n", + "ew_wait: 0.00\n", + "dominant_flow: NS\n", + "boundary_queue_total: 49.00\n", + "boundary_wait_total: 15.00\n", + "spillback_risk: 1\n", + "incident_flag: 0\n", + "construction_flag: 0\n", + "overload_flag: 0\n", + "event_flag: 0\n", + "top_congested_intersections:\n", + "- i_0049 q=8.00 w=5.00 out=6.00 phase=0 boundary=1\n", + "- i_0071 q=9.00 w=2.00 out=0.00 phase=1 boundary=1\n", + "- i_0050 q=5.00 w=1.00 out=5.00 phase=1 boundary=0\n", + "candidate_intersections:\n", + "- i_0049 q=8.00 w=5.00 out=6.00 phase=0 boundary=1 spillback=1 incident=0 overload=0 event=0 align=NS reasons=congested|boundary|spillback|outgoing\n", + "- i_0071 q=9.00 w=2.00 out=0.00 phase=1 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested|boundary\n", + "- i_0051 q=5.00 w=1.00 out=4.00 phase=0 boundary=1 spillback=1 incident=0 overload=0 event=0 align=NS reasons=congested|spillback\n", + "- i_0060 q=5.00 w=0.00 out=6.00 phase=0 boundary=1 spillback=1 incident=0 overload=0 event=0 align=NS reasons=outgoing\n", + "- i_0050 q=5.00 w=1.00 out=5.00 phase=1 boundary=0 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "- i_0029 q=4.00 w=2.00 out=2.00 phase=0 boundary=1 spillback=0 incident=0 overload=0 event=0 align=NS reasons=congested\n", + "[debug 10] predicted_json_raw= {\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0049\", \"i_0071\", \"i_0051\"]}\n", + "[debug 10] predicted_json_parsed_before_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0049\", \"i_0071\", \"i_0051\"]}\n", + "[debug 10] predicted_json_parsed_after_repair={\"duration_steps\": 10, \"phase_bias\": \"NS\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0049\", \"i_0071\", \"i_0051\"]}\n", + "[debug 10] ground_truth_json={\"duration_steps\": 10, \"phase_bias\": \"EW\", \"priority_corridor\": \"inbound\", \"strategy\": \"clear_spillback\", \"target_intersections\": [\"i_0049\", \"i_0071\", \"i_0051\"]}\n", + "[debug 10] target_intersections_metrics_before_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 10] target_intersections_metrics_after_repair={\"exact_list_match\": 1.0, \"exact_set_match\": 1.0, \"hit_at_1\": 1.0, \"hit_at_2\": 1.0, \"hit_at_3\": 1.0, \"jaccard\": 1.0, \"overlap_count\": 3.0, \"overlap_rate\": 1.0, \"precision\": 1.0, \"recall\": 1.0}\n", + "[debug 10] repair_report={\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0049\", \"i_0071\", \"i_0051\"], \"repaired_targets\": [\"i_0049\", \"i_0071\", \"i_0051\"], \"truncated\": false}\n", + "[debug 10] visible_candidate_ids=[\"i_0029\", \"i_0049\", \"i_0050\", \"i_0051\", \"i_0060\", \"i_0071\"]\n", + "[debug 10] failure_buckets=[\"partial_overlap\"]\n", + "Failure buckets:\n", + "{\n", + " \"partial_overlap\": 250\n", + "}\n", + "Before/after repair summary:\n", + "{\n", + " \"exact_set_match_after_repair\": 0.972,\n", + " \"exact_set_match_before_repair\": 0.972,\n", + " \"fallback_used_rate\": 0.0,\n", + " \"invalid_id_rate_after_repair\": 0.0,\n", + " \"invalid_id_rate_before_repair\": 0.0,\n", + " \"jaccard_after_repair\": 0.986,\n", + " \"jaccard_before_repair\": 0.986\n", + "}\n", + "\n", + "[sample 1] before_repair_targets= {'strategy': 'clear_spillback', 'priority_corridor': 'inbound', 'target_intersections': ['i_0014', 'i_0003', 'i_0025'], 'phase_bias': 'NS', 'duration_steps': 10}\n", + "[sample 1] after_repair_targets= {'strategy': 'clear_spillback', 'priority_corridor': 'inbound', 'target_intersections': ['i_0014', 'i_0003', 'i_0025'], 'phase_bias': 'NS', 'duration_steps': 10}\n", + "[sample 1] repair_report= {\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0014\", \"i_0003\", \"i_0025\"], \"repaired_targets\": [\"i_0014\", \"i_0003\", \"i_0025\"], \"truncated\": false}\n", + "\n", + "[sample 2] before_repair_targets= {'strategy': 'clear_spillback', 'priority_corridor': 'inbound', 'target_intersections': ['i_0016', 'i_0027', 'i_0018'], 'phase_bias': 'NS', 'duration_steps': 10}\n", + "[sample 2] after_repair_targets= {'strategy': 'clear_spillback', 'priority_corridor': 'inbound', 'target_intersections': ['i_0016', 'i_0027', 'i_0018'], 'phase_bias': 'NS', 'duration_steps': 10}\n", + "[sample 2] repair_report= {\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0016\", \"i_0027\", \"i_0018\"], \"repaired_targets\": [\"i_0016\", \"i_0027\", \"i_0018\"], \"truncated\": false}\n", + "\n", + "[sample 3] before_repair_targets= {'strategy': 'clear_spillback', 'priority_corridor': 'inbound', 'target_intersections': ['i_0049', 'i_0029', 'i_0128'], 'phase_bias': 'NS', 'duration_steps': 10}\n", + "[sample 3] after_repair_targets= {'strategy': 'clear_spillback', 'priority_corridor': 'inbound', 'target_intersections': ['i_0049', 'i_0029', 'i_0128'], 'phase_bias': 'NS', 'duration_steps': 10}\n", + "[sample 3] repair_report= {\"deduplicated\": false, \"empty_after_filtering\": false, \"fallback_mode\": null, \"fallback_used\": false, \"invalid_ids_removed\": [], \"non_visible_ids_removed\": [], \"raw_targets\": [\"i_0049\", \"i_0029\", \"i_0128\"], \"repaired_targets\": [\"i_0049\", \"i_0029\", \"i_0128\"], \"truncated\": false}\n" + ] + } + ], + "source": [ + "print_debug_examples(results['debug_examples'])\n", + "\n", + "print('Failure buckets:')\n", + "print(json.dumps(results.get('target_intersections_failure_buckets', {}), indent=2, sort_keys=True))\n", + "\n", + "before_after = results.get('target_intersections_before_after_repair', {})\n", + "if before_after:\n", + " print('Before/after repair summary:')\n", + " print(json.dumps(before_after, indent=2, sort_keys=True))\n", + "\n", + "for index, item in enumerate(results['debug_examples'][:3], start=1):\n", + " print(f'\\n[sample {index}] before_repair_targets=', item['predicted_json_parsed_before_repair'])\n", + " print(f'[sample {index}] after_repair_targets=', item['predicted_json_parsed_after_repair'])\n", + " print(f'[sample {index}] repair_report=', json.dumps(item['repair_report'], sort_keys=True))\n" + ] + }, + { + "cell_type": "markdown", + "id": "d9f18ee5", + "metadata": {}, + "source": [ + "## 11. Optional: Evaluate The Saved Adapter From Disk\n", + "\n", + "These commands mirror the notebook flow from the CLI for the final ablation run.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8bab363b", + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (3839198296.py, line 11)", + "output_type": "error", + "traceback": [ + " \u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[16]\u001b[39m\u001b[32m, line 11\u001b[39m\n\u001b[31m \u001b[39m\u001b[31mpython -m district_llm.eval\u001b[39m\n ^\n\u001b[31mSyntaxError\u001b[39m\u001b[31m:\u001b[39m invalid syntax\n" + ] + } + ], + "source": [ + "# # Dataset generation\n", + "# # python scripts/generate_large_district_dataset.py\n", + "# # --num-train 10000\n", + "# # --num-val 2500\n", + "# # --output-dir data/district_llm_dataset_v3\n", + "# # --checkpoint artifacts/dqn_shared/best_validation.pt\n", + "# # --max-candidate-intersections 6\n", + "# # --max-target-intersections 3\n", + "\n", + "# # Offline evaluation\n", + "# python -m district_llm.eval\n", + "# --model-path artifacts/district_llm_adapter_v3/main_run/adapter\n", + "# --val-jsonl data/district_llm_dataset_v3/val.jsonl\n", + "# --generated-root data/generated\n", + "# --max-examples=250\n", + "# --debug-examples=10\n", + "# --allow-only-visible-candidates\n", + "# --max-target-intersections=3\n", + "# --fallback-on-empty-targets\n", + "# --fallback-mode heuristic\n", + "# --restrict-targets-to-visible-summary\n", + "# --report-before-after-repair\n" + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "gpuType": "A100", + "provenance": [] + }, + "kernelspec": { + "display_name": "traffic-llm", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/openenv.yaml b/openenv.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6c5b5af187ff82d1afe23780a0273cc375306593 --- /dev/null +++ b/openenv.yaml @@ -0,0 +1,13 @@ +name: districtflow-openenv-api +version: 0.1.0 +runtime: + type: docker + dockerfile: server/Dockerfile +server: + port: 7860 +env: + PORT: "7860" + DATA_DIR: /app/data/generated + SPLITS_DIR: /app/data/splits + CHECKPOINT_PATH: /app/artifacts/dqn_shared/best_validation.pt + DISTRICT_LLM_ADAPTER_PATH: /app/artifacts/district_llm_adapter_v3/main_run/adapter diff --git a/openenv_app/README.md b/openenv_app/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d1ff3e121d29b1330a63c69b0cbea46ba48b5012 --- /dev/null +++ b/openenv_app/README.md @@ -0,0 +1,13 @@ +# openenv_app + +OpenEnv-compatible district environment layer. + +## Main files + +- [app.py](/Users/aditya/Developer/traffic-llm/openenv_app/app.py) +- [openenv_wrapper.py](/Users/aditya/Developer/traffic-llm/openenv_app/openenv_wrapper.py) +- [schema.py](/Users/aditya/Developer/traffic-llm/openenv_app/schema.py) + +## Status + +This wrapper now sits on top of the active DQN local controller stack. External OpenEnv actions operate at the district level, and the wrapper emits district summaries plus executes slower district decisions over the current CityFlow environment. diff --git a/openenv_app/__init__.py b/openenv_app/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6f1fe7c700235215f360300c943d0e65c53168b2 --- /dev/null +++ b/openenv_app/__init__.py @@ -0,0 +1,3 @@ +from openenv_app.openenv_wrapper import OpenEnvTrafficWrapper + +__all__ = ["OpenEnvTrafficWrapper"] diff --git a/openenv_app/app.py b/openenv_app/app.py new file mode 100644 index 0000000000000000000000000000000000000000..60243328dd11d58adee20c896f8318a02bec6ea5 --- /dev/null +++ b/openenv_app/app.py @@ -0,0 +1,183 @@ +from __future__ import annotations + +import logging +from contextlib import asynccontextmanager +from pathlib import Path +import os + +from fastapi import FastAPI, HTTPException +from fastapi.responses import JSONResponse + +from openenv_app.openenv_wrapper import OpenEnvTrafficWrapper +from openenv_app.replay_runner import get_cached, run_and_cache +from openenv_app.schema import ( + HealthResponse, + ReplayResponse, + ResetRequest, + ResetResponse, + StateResponse, + StepRequest, + StepResponse, +) +from server.path_validators import validate_path_segment + +logger = logging.getLogger(__name__) + +_REPO_ROOT = Path(__file__).resolve().parents[1] +DATA_DIR = Path(os.environ.get("DATA_DIR", "") or (_REPO_ROOT / "data" / "generated")) +SPLITS_DIR = Path(os.environ.get("SPLITS_DIR", "") or (_REPO_ROOT / "data" / "splits")) +CHECKPOINT_PATH = Path( + os.environ.get("CHECKPOINT_PATH", "") + or (_REPO_ROOT / "artifacts" / "dqn_shared" / "best_validation.pt") +) + +# --------------------------------------------------------------------------- +# Startup / lifespan +# --------------------------------------------------------------------------- + + +@asynccontextmanager +async def lifespan(app: FastAPI): + """Load the DQN checkpoint once at startup so replay requests are fast.""" + if CHECKPOINT_PATH.exists(): + from server.policy_runner import load_dqn_checkpoint + load_dqn_checkpoint(CHECKPOINT_PATH) + else: + logger.warning("Checkpoint not found at %s — 'learned' policy will fail", CHECKPOINT_PATH) + yield + + +# --------------------------------------------------------------------------- +# App +# --------------------------------------------------------------------------- + +app = FastAPI( + title="DistrictFlow OpenEnv App", + description="OpenEnv-style traffic environment for district-level LLM coordination.", + version="0.1.0", + lifespan=lifespan, +) + +# Lazy-initialized: only constructed when /reset or /step is first called. +_wrapper: OpenEnvTrafficWrapper | None = None + + +def _get_wrapper() -> OpenEnvTrafficWrapper: + global _wrapper + if _wrapper is None: + _wrapper = OpenEnvTrafficWrapper( + generated_root=DATA_DIR, + splits_root=SPLITS_DIR, + ) + return _wrapper + + +# --------------------------------------------------------------------------- +# Health +# --------------------------------------------------------------------------- + + +@app.get("/", response_model=HealthResponse) +def root(): + return HealthResponse(status="ok", message="DistrictFlow OpenEnv app is running.") + + +@app.get("/health", response_model=HealthResponse) +def health(): + return HealthResponse(status="ok", message="healthy") + + +# --------------------------------------------------------------------------- +# Step / Reset / State +# --------------------------------------------------------------------------- + + +@app.post("/reset", response_model=ResetResponse) +def reset(request: ResetRequest): + payload = _get_wrapper().reset( + seed=request.seed, + city_id=request.city_id, + scenario_name=request.scenario_name, + ) + return ResetResponse(observation=payload["observation"], info=payload.get("info", {})) + + +@app.post("/step", response_model=StepResponse) +def step(request: StepRequest): + payload = _get_wrapper().step(action=request.action) + return StepResponse( + observation=payload["observation"], + reward=payload["reward"], + done=payload["done"], + truncated=payload.get("truncated", False), + info=payload.get("info", {}), + ) + + +@app.get("/state", response_model=StateResponse) +def state(): + payload = _get_wrapper().state() + return StateResponse(state=payload["state"]) + + +# --------------------------------------------------------------------------- +# Replay (on-demand simulation + in-memory cache) +# --------------------------------------------------------------------------- + +_VALID_POLICIES = {"no_intervention", "fixed", "random", "learned"} + + +@app.get("/replay/{city_id}/{scenario_name}/{policy_name}", response_model=ReplayResponse) +def get_replay(city_id: str, scenario_name: str, policy_name: str) -> ReplayResponse: + """Run a full simulation and return the CityFlow replay + metrics. + + Results are cached in memory so repeated calls are instant. + """ + validate_path_segment(city_id, "city_id") + validate_path_segment(scenario_name, "scenario_name") + + if policy_name not in _VALID_POLICIES: + raise HTTPException( + status_code=400, + detail=f"Unknown policy '{policy_name}'. Valid: {sorted(_VALID_POLICIES)}", + ) + + cached = get_cached(city_id, scenario_name, policy_name) + if cached is None: + try: + cached = run_and_cache( + city_id=city_id, + scenario_name=scenario_name, + policy_name=policy_name, + generated_root=DATA_DIR, + ) + except FileNotFoundError as exc: + logger.error("Replay file missing after simulation: %s", exc) + raise HTTPException( + status_code=500, + detail="Simulation completed but no replay file was produced.", + ) from exc + except Exception as exc: + logger.error("Simulation failed for %s/%s/%s: %s", city_id, scenario_name, policy_name, exc) + raise HTTPException(status_code=500, detail="Simulation failed.") from exc + + replay_text, roadnet_log, metrics = cached + return ReplayResponse( + city_id=city_id, + scenario_name=scenario_name, + policy_name=policy_name, + replay_text=replay_text, + roadnet_log=roadnet_log, + metrics=metrics, + ) + + +# --------------------------------------------------------------------------- +# Error handler +# --------------------------------------------------------------------------- + + +@app.exception_handler(Exception) +def unhandled_exception_handler(request, exc): + logger.error("Unhandled exception: %s: %s", type(exc).__name__, exc) + return JSONResponse(status_code=500, content={"error": "Internal server error"}) diff --git a/openenv_app/openenv_wrapper.py b/openenv_app/openenv_wrapper.py new file mode 100644 index 0000000000000000000000000000000000000000..3d03c63eeb5061d5af97864d262bec0d3e5e3fea --- /dev/null +++ b/openenv_app/openenv_wrapper.py @@ -0,0 +1,240 @@ +from __future__ import annotations + +import random +from pathlib import Path +from typing import Any + +import numpy as np + +from district_llm.guided_control import DistrictGuidedLocalController +from district_llm.schema import DistrictAction +from district_llm.summary_builder import DistrictStateSummaryBuilder +from district_llm.teachers import build_teacher, parse_teacher_spec +from env.observation_builder import ObservationConfig +from env.reward import RewardConfig +from env.traffic_env import EnvConfig, TrafficEnv +from training.cityflow_dataset import CityFlowDataset + + +class OpenEnvTrafficWrapper: + """ + OpenEnv-style district environment backed by the current DQN local stack. + + External action: + - a dict of district-level directives keyed by district_id + + Internal execution: + - the shared DQN (or a baseline fallback) produces low-level actions + - district directives bias those low-level actions over a slower district window + """ + + def __init__( + self, + generated_root: str | Path = "data/generated", + splits_root: str | Path = "data/splits", + split: str = "train", + controller_spec: str | None = None, + district_decision_interval: int = 10, + seed: int = 7, + ): + self.dataset = CityFlowDataset( + generated_root=generated_root, + splits_root=splits_root, + ) + self.dataset.generate_default_splits() + self.split = split + self.rng = random.Random(seed) + self.district_decision_interval = int(district_decision_interval) + self.summary_builder = DistrictStateSummaryBuilder() + + default_checkpoint = Path("artifacts/dqn_shared/best_validation.pt") + if controller_spec is None: + controller_spec = ( + f"rl_checkpoint={default_checkpoint}" + if default_checkpoint.exists() + else "queue_greedy" + ) + controller_type, checkpoint = parse_teacher_spec(controller_spec) + try: + self.teacher = build_teacher( + controller_type=controller_type, + checkpoint=checkpoint, + seed=seed, + ) + except ImportError: + if controller_spec != "queue_greedy": + self.teacher = build_teacher( + controller_type="queue_greedy", + checkpoint=None, + seed=seed, + ) + else: + raise + self.guided_controller = DistrictGuidedLocalController(base_teacher=self.teacher) + self.env_config = self.teacher.env_config or self._default_env_config() + + self.env: TrafficEnv | None = None + self.current_scenario_spec = None + self.last_obs: dict[str, Any] | None = None + self.last_info: dict[str, Any] | None = None + self.last_summaries: dict[str, Any] = {} + + def reset( + self, + seed: int | None = None, + city_id: str | None = None, + scenario_name: str | None = None, + ) -> dict[str, Any]: + scenario_spec = ( + self.dataset.build_scenario_spec(city_id, scenario_name) + if city_id and scenario_name + else self.dataset.sample_scenario( + split_name=self.split, + rng=self.rng, + city_id=city_id, + scenario_name=scenario_name, + ) + ) + self.current_scenario_spec = scenario_spec + self.env = TrafficEnv( + city_id=scenario_spec.city_id, + scenario_name=scenario_spec.scenario_name, + city_dir=scenario_spec.city_dir, + scenario_dir=scenario_spec.scenario_dir, + config_path=scenario_spec.config_path, + roadnet_path=scenario_spec.roadnet_path, + district_map_path=scenario_spec.district_map_path, + metadata_path=scenario_spec.metadata_path, + env_config=self.env_config, + ) + self.summary_builder.reset() + self.last_obs = self.env.reset(seed=seed) + self.last_summaries = self.summary_builder.build_all(self.env, self.last_obs) + self.last_info = { + "seed": seed, + "city_id": scenario_spec.city_id, + "scenario_name": scenario_spec.scenario_name, + "controller_type": self.teacher.metadata.controller_type, + "controller_family": self.teacher.metadata.controller_family, + "teacher_algorithm": self.teacher.metadata.teacher_algorithm, + "district_decision_interval": self.district_decision_interval, + } + return { + "observation": self._build_observation_payload(), + "info": self.last_info, + } + + def step(self, action: dict[str, Any]) -> dict[str, Any]: + if self.env is None or self.last_obs is None: + self.reset(seed=None) + + assert self.env is not None + district_actions = self._parse_district_actions(action.get("district_actions", {})) + done = False + reward_total = 0.0 + steps_executed = 0 + info: dict[str, Any] = {} + + for _ in range(self.district_decision_interval): + local_actions = self.guided_controller.act( + observation_batch=self.last_obs, + district_actions=district_actions, + ) + next_obs, rewards, done, info = self.env.step(local_actions) + reward_total += float(np.asarray(rewards, dtype=np.float32).mean()) + self.last_obs = next_obs + steps_executed += 1 + if done: + break + + self.last_summaries = self.summary_builder.build_all(self.env, self.last_obs) + self.last_info = { + **info, + "controller_type": self.teacher.metadata.controller_type, + "controller_family": self.teacher.metadata.controller_family, + "teacher_algorithm": self.teacher.metadata.teacher_algorithm, + "steps_executed": steps_executed, + "district_actions": { + district_id: directive.to_dict() + for district_id, directive in district_actions.items() + }, + } + return { + "observation": self._build_observation_payload(), + "reward": float(reward_total), + "done": bool(done), + "truncated": False, + "info": self.last_info, + } + + def state(self) -> dict[str, Any]: + return { + "state": { + "scenario": ( + None + if self.current_scenario_spec is None + else { + "city_id": self.current_scenario_spec.city_id, + "scenario_name": self.current_scenario_spec.scenario_name, + } + ), + "controller": self.teacher.metadata.to_dict(), + "district_decision_interval": self.district_decision_interval, + "district_summaries": { + district_id: summary.to_dict() + for district_id, summary in self.last_summaries.items() + }, + "last_info": self.last_info or {}, + } + } + + def health(self) -> dict[str, Any]: + return { + "status": "ok", + "message": "DistrictFlow OpenEnv wrapper is running.", + } + + def _build_observation_payload(self) -> dict[str, Any]: + if self.env is None or self.last_obs is None: + return {"district_summaries": {}} + return { + "city_id": self.env.city_id, + "scenario_name": self.env.scenario_name, + "decision_step": int(self.last_obs["decision_step"]), + "sim_time": int(self.last_obs["sim_time"]), + "district_summaries": { + district_id: summary.to_dict() + for district_id, summary in self.last_summaries.items() + }, + } + + def _parse_district_actions(self, payload: dict[str, Any]) -> dict[str, DistrictAction]: + if self.env is None: + return {} + parsed: dict[str, DistrictAction] = {} + for district_id in self.env.districts: + raw_action = payload.get(district_id) + if raw_action is None: + parsed[district_id] = DistrictAction.default_hold( + duration_steps=self.district_decision_interval + ) + continue + try: + parsed[district_id] = DistrictAction.from_dict(raw_action) + except Exception: + parsed[district_id] = DistrictAction.default_hold( + duration_steps=self.district_decision_interval + ) + return parsed + + @staticmethod + def _default_env_config() -> EnvConfig: + return EnvConfig( + simulator_interval=1, + decision_interval=5, + min_green_time=10, + thread_num=1, + max_episode_seconds=None, + observation=ObservationConfig(), + reward=RewardConfig(variant="wait_queue_throughput"), + ) diff --git a/openenv_app/replay_runner.py b/openenv_app/replay_runner.py new file mode 100644 index 0000000000000000000000000000000000000000..fd29109d566d7ce4829112c6e8114ca6c8b8edbb --- /dev/null +++ b/openenv_app/replay_runner.py @@ -0,0 +1,136 @@ +"""In-memory replay cache for the OpenEnv API. + +Runs a full CityFlow simulation on demand and caches the result so repeated +requests for the same (city, scenario, policy) triple are served instantly. + +Concurrency design +------------------ +A global dict-level lock (``_registry_lock``) protects only the +``_in_flight`` and ``_cache`` dicts. The actual simulation runs *outside* +any lock, guarded by a per-key ``threading.Event``. This means: + +- Two requests for the **same** key: the second waits on the Event; only + one simulation runs. +- Two requests for **different** keys: both simulations run in parallel. +""" +from __future__ import annotations + +import json +import logging +import tempfile +import threading +from pathlib import Path +from typing import Any + +logger = logging.getLogger(__name__) + +# --------------------------------------------------------------------------- +# State +# --------------------------------------------------------------------------- + +# Completed results: key → (replay_text, roadnet_log_dict, metrics_dict) +_cache: dict[str, tuple[str, dict[str, Any], dict[str, Any]]] = {} + +# In-flight simulations: key → Event that is set() once the result is cached. +_in_flight: dict[str, threading.Event] = {} + +# Lock protecting _cache and _in_flight (held only for dict reads/writes). +_registry_lock = threading.Lock() + + +def _cache_key(city_id: str, scenario_name: str, policy_name: str) -> str: + return f"{city_id}/{scenario_name}/{policy_name}" + + +# --------------------------------------------------------------------------- +# Public API +# --------------------------------------------------------------------------- + + +def get_cached( + city_id: str, scenario_name: str, policy_name: str +) -> tuple[str, dict[str, Any], dict[str, Any]] | None: + with _registry_lock: + return _cache.get(_cache_key(city_id, scenario_name, policy_name)) + + +def run_and_cache( + city_id: str, + scenario_name: str, + policy_name: str, + generated_root: Path, +) -> tuple[str, dict[str, Any], dict[str, Any]]: + """Return (replay_text, roadnet_log, metrics), running the simulation if needed.""" + key = _cache_key(city_id, scenario_name, policy_name) + + while True: + with _registry_lock: + if key in _cache: + return _cache[key] + + if key in _in_flight: + event = _in_flight[key] + else: + event = threading.Event() + _in_flight[key] = event + event = None # sentinel: we are the runner, not a waiter + + if event is not None: + event.wait() + continue + + # Runner path: execute the simulation outside all locks. + try: + result_tuple = _run_simulation(city_id, scenario_name, policy_name, generated_root) + except Exception: + with _registry_lock: + _in_flight.pop(key, None) + raise + + with _registry_lock: + _cache[key] = result_tuple + done_event = _in_flight.pop(key) + + done_event.set() + return result_tuple + + +# --------------------------------------------------------------------------- +# Internal +# --------------------------------------------------------------------------- + + +def _run_simulation( + city_id: str, + scenario_name: str, + policy_name: str, + generated_root: Path, +) -> tuple[str, dict[str, Any], dict[str, Any]]: + """Run one full episode and read results into memory.""" + from server.policy_runner import run_policy_for_city + + with tempfile.TemporaryDirectory() as tmp_dir: + tmp_path = Path(tmp_dir) + result = run_policy_for_city( + city_id=city_id, + scenario_name=scenario_name, + policy_name=policy_name, + generated_root=generated_root, + output_root=tmp_path, + ) + + if not result.replay_path.exists(): + raise FileNotFoundError( + f"CityFlow did not write a replay file for " + f"{city_id}/{scenario_name}/{policy_name}." + ) + + replay_text = result.replay_path.read_text(encoding="utf-8") + roadnet_log: dict[str, Any] = ( + json.loads(result.roadnet_log_path.read_text(encoding="utf-8")) + if result.roadnet_log_path.exists() + else {} + ) + + logger.info("Simulation complete: %s/%s/%s", city_id, scenario_name, policy_name) + return replay_text, roadnet_log, result.metrics diff --git a/openenv_app/requirements.txt b/openenv_app/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..e96b4bab02e3574afd8a62fa929ad5020a136b60 --- /dev/null +++ b/openenv_app/requirements.txt @@ -0,0 +1,27 @@ +numpy>=1.26.0 +scipy>=1.17.1 +pyyaml>=6.0.3 +tqdm>=4.67.3 +accelerate>=1.13.0 +fastapi>=0.135.1 +uvicorn>=0.41.0 +pydantic>=2.12.5 +requests>=2.32.5 +httpx>=0.28.1 +torch>=2.10.0 +openenv-core==0.2.1 +streamlit>=1.55.0 +pandas>=2.3 +matplotlib>=3.10.8 +plotly>=6.6.0 +tensorboard>=2.20.0 +setuptools==81.0 +ipython>=9.11.0 +ipykernel>=7.2.0 +peft>=0.18.1 +sentencepiece>=0.2.1 +bitsandbytes>=0.49.2 +xformers>=0.0.35 +triton>=3.6.0 +unsloth>=2026.3.3 +transformers>=5.2 diff --git a/openenv_app/schema.py b/openenv_app/schema.py new file mode 100644 index 0000000000000000000000000000000000000000..c0c60994b8f2ba91a7d3c59628c78dc7993bbab9 --- /dev/null +++ b/openenv_app/schema.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from typing import Any + +from pydantic import BaseModel, Field + + +class ResetRequest(BaseModel): + seed: int | None = None + city_id: str | None = None + scenario_name: str | None = None + + +class StepRequest(BaseModel): + action: dict[str, Any] = Field(default_factory=dict) + + +class ResetResponse(BaseModel): + observation: dict[str, Any] + info: dict[str, Any] = Field(default_factory=dict) + + +class StepResponse(BaseModel): + observation: dict[str, Any] + reward: float + done: bool + truncated: bool = False + info: dict[str, Any] = Field(default_factory=dict) + + +class StateResponse(BaseModel): + state: dict[str, Any] + + +class HealthResponse(BaseModel): + status: str + message: str + + +class ReplayResponse(BaseModel): + city_id: str + scenario_name: str + policy_name: str + replay_text: str + roadnet_log: dict[str, Any] = Field(default_factory=dict) + metrics: dict[str, Any] = Field(default_factory=dict) diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000000000000000000000000000000000000..e9aa63c5273e98d3f21278a2f2a98c6b36d32b68 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,6997 @@ +# This file is automatically @generated by Poetry 2.3.2 and should not be changed by hand. + +[[package]] +name = "absl-py" +version = "2.4.0" +description = "Abseil Python Common Libraries, see https://github.com/abseil/abseil-py." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "absl_py-2.4.0-py3-none-any.whl", hash = "sha256:88476fd881ca8aab94ffa78b7b6c632a782ab3ba1cd19c9bd423abc4fb4cd28d"}, + {file = "absl_py-2.4.0.tar.gz", hash = "sha256:8c6af82722b35cf71e0f4d1d47dcaebfff286e27110a99fc359349b247dfb5d4"}, +] + +[[package]] +name = "accelerate" +version = "1.13.0" +description = "Accelerate" +optional = false +python-versions = ">=3.10.0" +groups = ["main"] +files = [ + {file = "accelerate-1.13.0-py3-none-any.whl", hash = "sha256:cf1a3efb96c18f7b152eb0fa7490f3710b19c3f395699358f08decca2b8b62e0"}, + {file = "accelerate-1.13.0.tar.gz", hash = "sha256:d631b4e0f5b3de4aff2d7e9e6857d164810dfc3237d54d017f075122d057b236"}, +] + +[package.dependencies] +huggingface_hub = ">=0.21.0" +numpy = ">=1.17" +packaging = ">=20.0" +psutil = "*" +pyyaml = "*" +safetensors = ">=0.4.3" +torch = ">=2.0.0" + +[package.extras] +deepspeed = ["deepspeed"] +dev = ["bitsandbytes", "datasets", "diffusers", "evaluate", "parameterized", "pytest (>=7.2.0)", "pytest-order", "pytest-subtests", "pytest-xdist", "rich", "ruff (==0.13.1)", "scikit-learn", "scipy", "timm", "torchdata (>=0.8.0)", "torchpippy (>=0.2.0)", "tqdm", "transformers"] +quality = ["ruff (==0.13.1)"] +rich = ["rich"] +sagemaker = ["sagemaker"] +test-dev = ["bitsandbytes", "datasets", "diffusers", "evaluate", "scikit-learn", "scipy", "timm", "torchdata (>=0.8.0)", "torchpippy (>=0.2.0)", "tqdm", "transformers"] +test-fp8 = ["torchao"] +test-prod = ["parameterized", "pytest (>=7.2.0)", "pytest-order", "pytest-subtests", "pytest-xdist"] +test-trackers = ["comet-ml", "dvclive", "matplotlib", "swanlab[dashboard]", "tensorboard", "trackio", "wandb"] +testing = ["bitsandbytes", "datasets", "diffusers", "evaluate", "parameterized", "pytest (>=7.2.0)", "pytest-order", "pytest-subtests", "pytest-xdist", "scikit-learn", "scipy", "timm", "torchdata (>=0.8.0)", "torchpippy (>=0.2.0)", "tqdm", "transformers"] + +[[package]] +name = "aiofile" +version = "3.9.0" +description = "Asynchronous file operations." +optional = false +python-versions = "<4,>=3.8" +groups = ["main"] +files = [ + {file = "aiofile-3.9.0-py3-none-any.whl", hash = "sha256:ce2f6c1571538cbdfa0143b04e16b208ecb0e9cb4148e528af8a640ed51cc8aa"}, + {file = "aiofile-3.9.0.tar.gz", hash = "sha256:e5ad718bb148b265b6df1b3752c4d1d83024b93da9bd599df74b9d9ffcf7919b"}, +] + +[package.dependencies] +caio = ">=0.9.0,<0.10.0" + +[[package]] +name = "aiohappyeyeballs" +version = "2.6.1" +description = "Happy Eyeballs for asyncio" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "aiohappyeyeballs-2.6.1-py3-none-any.whl", hash = "sha256:f349ba8f4b75cb25c99c5c2d84e997e485204d2902a9597802b0371f09331fb8"}, + {file = "aiohappyeyeballs-2.6.1.tar.gz", hash = "sha256:c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558"}, +] + +[[package]] +name = "aiohttp" +version = "3.13.3" +description = "Async http client/server framework (asyncio)" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "aiohttp-3.13.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d5a372fd5afd301b3a89582817fdcdb6c34124787c70dbcc616f259013e7eef7"}, + {file = "aiohttp-3.13.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:147e422fd1223005c22b4fe080f5d93ced44460f5f9c105406b753612b587821"}, + {file = "aiohttp-3.13.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:859bd3f2156e81dd01432f5849fc73e2243d4a487c4fd26609b1299534ee1845"}, + {file = "aiohttp-3.13.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dca68018bf48c251ba17c72ed479f4dafe9dbd5a73707ad8d28a38d11f3d42af"}, + {file = "aiohttp-3.13.3-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fee0c6bc7db1de362252affec009707a17478a00ec69f797d23ca256e36d5940"}, + {file = "aiohttp-3.13.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c048058117fd649334d81b4b526e94bde3ccaddb20463a815ced6ecbb7d11160"}, + {file = "aiohttp-3.13.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:215a685b6fbbfcf71dfe96e3eba7a6f58f10da1dfdf4889c7dd856abe430dca7"}, + {file = "aiohttp-3.13.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2c184bb1fe2cbd2cefba613e9db29a5ab559323f994b6737e370d3da0ac455"}, + {file = "aiohttp-3.13.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:75ca857eba4e20ce9f546cd59c7007b33906a4cd48f2ff6ccf1ccfc3b646f279"}, + {file = "aiohttp-3.13.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:81e97251d9298386c2b7dbeb490d3d1badbdc69107fb8c9299dd04eb39bddc0e"}, + {file = "aiohttp-3.13.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c0e2d366af265797506f0283487223146af57815b388623f0357ef7eac9b209d"}, + {file = "aiohttp-3.13.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4e239d501f73d6db1522599e14b9b321a7e3b1de66ce33d53a765d975e9f4808"}, + {file = "aiohttp-3.13.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:0db318f7a6f065d84cb1e02662c526294450b314a02bd9e2a8e67f0d8564ce40"}, + {file = "aiohttp-3.13.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:bfc1cc2fe31a6026a8a88e4ecfb98d7f6b1fec150cfd708adbfd1d2f42257c29"}, + {file = "aiohttp-3.13.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:af71fff7bac6bb7508956696dce8f6eec2bbb045eceb40343944b1ae62b5ef11"}, + {file = "aiohttp-3.13.3-cp310-cp310-win32.whl", hash = "sha256:37da61e244d1749798c151421602884db5270faf479cf0ef03af0ff68954c9dd"}, + {file = "aiohttp-3.13.3-cp310-cp310-win_amd64.whl", hash = "sha256:7e63f210bc1b57ef699035f2b4b6d9ce096b5914414a49b0997c839b2bd2223c"}, + {file = "aiohttp-3.13.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5b6073099fb654e0a068ae678b10feff95c5cae95bbfcbfa7af669d361a8aa6b"}, + {file = "aiohttp-3.13.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cb93e166e6c28716c8c6aeb5f99dfb6d5ccf482d29fe9bf9a794110e6d0ab64"}, + {file = "aiohttp-3.13.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:28e027cf2f6b641693a09f631759b4d9ce9165099d2b5d92af9bd4e197690eea"}, + {file = "aiohttp-3.13.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3b61b7169ababd7802f9568ed96142616a9118dd2be0d1866e920e77ec8fa92a"}, + {file = "aiohttp-3.13.3-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:80dd4c21b0f6237676449c6baaa1039abae86b91636b6c91a7f8e61c87f89540"}, + {file = "aiohttp-3.13.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:65d2ccb7eabee90ce0503c17716fc77226be026dcc3e65cce859a30db715025b"}, + {file = "aiohttp-3.13.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5b179331a481cb5529fca8b432d8d3c7001cb217513c94cd72d668d1248688a3"}, + {file = "aiohttp-3.13.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d4c940f02f49483b18b079d1c27ab948721852b281f8b015c058100e9421dd1"}, + {file = "aiohttp-3.13.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f9444f105664c4ce47a2a7171a2418bce5b7bae45fb610f4e2c36045d85911d3"}, + {file = "aiohttp-3.13.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:694976222c711d1d00ba131904beb60534f93966562f64440d0c9d41b8cdb440"}, + {file = "aiohttp-3.13.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f33ed1a2bf1997a36661874b017f5c4b760f41266341af36febaf271d179f6d7"}, + {file = "aiohttp-3.13.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e636b3c5f61da31a92bf0d91da83e58fdfa96f178ba682f11d24f31944cdd28c"}, + {file = "aiohttp-3.13.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:5d2d94f1f5fcbe40838ac51a6ab5704a6f9ea42e72ceda48de5e6b898521da51"}, + {file = "aiohttp-3.13.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:2be0e9ccf23e8a94f6f0650ce06042cefc6ac703d0d7ab6c7a917289f2539ad4"}, + {file = "aiohttp-3.13.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9af5e68ee47d6534d36791bbe9b646d2a7c7deb6fc24d7943628edfbb3581f29"}, + {file = "aiohttp-3.13.3-cp311-cp311-win32.whl", hash = "sha256:a2212ad43c0833a873d0fb3c63fa1bacedd4cf6af2fee62bf4b739ceec3ab239"}, + {file = "aiohttp-3.13.3-cp311-cp311-win_amd64.whl", hash = "sha256:642f752c3eb117b105acbd87e2c143de710987e09860d674e068c4c2c441034f"}, + {file = "aiohttp-3.13.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b903a4dfee7d347e2d87697d0713be59e0b87925be030c9178c5faa58ea58d5c"}, + {file = "aiohttp-3.13.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a45530014d7a1e09f4a55f4f43097ba0fd155089372e105e4bff4ca76cb1b168"}, + {file = "aiohttp-3.13.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:27234ef6d85c914f9efeb77ff616dbf4ad2380be0cda40b4db086ffc7ddd1b7d"}, + {file = "aiohttp-3.13.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d32764c6c9aafb7fb55366a224756387cd50bfa720f32b88e0e6fa45b27dcf29"}, + {file = "aiohttp-3.13.3-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b1a6102b4d3ebc07dad44fbf07b45bb600300f15b552ddf1851b5390202ea2e3"}, + {file = "aiohttp-3.13.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c014c7ea7fb775dd015b2d3137378b7be0249a448a1612268b5a90c2d81de04d"}, + {file = "aiohttp-3.13.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2b8d8ddba8f95ba17582226f80e2de99c7a7948e66490ef8d947e272a93e9463"}, + {file = "aiohttp-3.13.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9ae8dd55c8e6c4257eae3a20fd2c8f41edaea5992ed67156642493b8daf3cecc"}, + {file = "aiohttp-3.13.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:01ad2529d4b5035578f5081606a465f3b814c542882804e2e8cda61adf5c71bf"}, + {file = "aiohttp-3.13.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:bb4f7475e359992b580559e008c598091c45b5088f28614e855e42d39c2f1033"}, + {file = "aiohttp-3.13.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:c19b90316ad3b24c69cd78d5c9b4f3aa4497643685901185b65166293d36a00f"}, + {file = "aiohttp-3.13.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:96d604498a7c782cb15a51c406acaea70d8c027ee6b90c569baa6e7b93073679"}, + {file = "aiohttp-3.13.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:084911a532763e9d3dd95adf78a78f4096cd5f58cdc18e6fdbc1b58417a45423"}, + {file = "aiohttp-3.13.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:7a4a94eb787e606d0a09404b9c38c113d3b099d508021faa615d70a0131907ce"}, + {file = "aiohttp-3.13.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:87797e645d9d8e222e04160ee32aa06bc5c163e8499f24db719e7852ec23093a"}, + {file = "aiohttp-3.13.3-cp312-cp312-win32.whl", hash = "sha256:b04be762396457bef43f3597c991e192ee7da460a4953d7e647ee4b1c28e7046"}, + {file = "aiohttp-3.13.3-cp312-cp312-win_amd64.whl", hash = "sha256:e3531d63d3bdfa7e3ac5e9b27b2dd7ec9df3206a98e0b3445fa906f233264c57"}, + {file = "aiohttp-3.13.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:5dff64413671b0d3e7d5918ea490bdccb97a4ad29b3f311ed423200b2203e01c"}, + {file = "aiohttp-3.13.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:87b9aab6d6ed88235aa2970294f496ff1a1f9adcd724d800e9b952395a80ffd9"}, + {file = "aiohttp-3.13.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:425c126c0dc43861e22cb1c14ba4c8e45d09516d0a3ae0a3f7494b79f5f233a3"}, + {file = "aiohttp-3.13.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7f9120f7093c2a32d9647abcaf21e6ad275b4fbec5b55969f978b1a97c7c86bf"}, + {file = "aiohttp-3.13.3-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:697753042d57f4bf7122cab985bf15d0cef23c770864580f5af4f52023a56bd6"}, + {file = "aiohttp-3.13.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6de499a1a44e7de70735d0b39f67c8f25eb3d91eb3103be99ca0fa882cdd987d"}, + {file = "aiohttp-3.13.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:37239e9f9a7ea9ac5bf6b92b0260b01f8a22281996da609206a84df860bc1261"}, + {file = "aiohttp-3.13.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f76c1e3fe7d7c8afad7ed193f89a292e1999608170dcc9751a7462a87dfd5bc0"}, + {file = "aiohttp-3.13.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fc290605db2a917f6e81b0e1e0796469871f5af381ce15c604a3c5c7e51cb730"}, + {file = "aiohttp-3.13.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4021b51936308aeea0367b8f006dc999ca02bc118a0cc78c303f50a2ff6afb91"}, + {file = "aiohttp-3.13.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:49a03727c1bba9a97d3e93c9f93ca03a57300f484b6e935463099841261195d3"}, + {file = "aiohttp-3.13.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3d9908a48eb7416dc1f4524e69f1d32e5d90e3981e4e37eb0aa1cd18f9cfa2a4"}, + {file = "aiohttp-3.13.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:2712039939ec963c237286113c68dbad80a82a4281543f3abf766d9d73228998"}, + {file = "aiohttp-3.13.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:7bfdc049127717581866fa4708791220970ce291c23e28ccf3922c700740fdc0"}, + {file = "aiohttp-3.13.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8057c98e0c8472d8846b9c79f56766bcc57e3e8ac7bfd510482332366c56c591"}, + {file = "aiohttp-3.13.3-cp313-cp313-win32.whl", hash = "sha256:1449ceddcdbcf2e0446957863af03ebaaa03f94c090f945411b61269e2cb5daf"}, + {file = "aiohttp-3.13.3-cp313-cp313-win_amd64.whl", hash = "sha256:693781c45a4033d31d4187d2436f5ac701e7bbfe5df40d917736108c1cc7436e"}, + {file = "aiohttp-3.13.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:ea37047c6b367fd4bd632bff8077449b8fa034b69e812a18e0132a00fae6e808"}, + {file = "aiohttp-3.13.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:6fc0e2337d1a4c3e6acafda6a78a39d4c14caea625124817420abceed36e2415"}, + {file = "aiohttp-3.13.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c685f2d80bb67ca8c3837823ad76196b3694b0159d232206d1e461d3d434666f"}, + {file = "aiohttp-3.13.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:48e377758516d262bde50c2584fc6c578af272559c409eecbdd2bae1601184d6"}, + {file = "aiohttp-3.13.3-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:34749271508078b261c4abb1767d42b8d0c0cc9449c73a4df494777dc55f0687"}, + {file = "aiohttp-3.13.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:82611aeec80eb144416956ec85b6ca45a64d76429c1ed46ae1b5f86c6e0c9a26"}, + {file = "aiohttp-3.13.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2fff83cfc93f18f215896e3a190e8e5cb413ce01553901aca925176e7568963a"}, + {file = "aiohttp-3.13.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bbe7d4cecacb439e2e2a8a1a7b935c25b812af7a5fd26503a66dadf428e79ec1"}, + {file = "aiohttp-3.13.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b928f30fe49574253644b1ca44b1b8adbd903aa0da4b9054a6c20fc7f4092a25"}, + {file = "aiohttp-3.13.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7b5e8fe4de30df199155baaf64f2fcd604f4c678ed20910db8e2c66dc4b11603"}, + {file = "aiohttp-3.13.3-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:8542f41a62bcc58fc7f11cf7c90e0ec324ce44950003feb70640fc2a9092c32a"}, + {file = "aiohttp-3.13.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:5e1d8c8b8f1d91cd08d8f4a3c2b067bfca6ec043d3ff36de0f3a715feeedf926"}, + {file = "aiohttp-3.13.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:90455115e5da1c3c51ab619ac57f877da8fd6d73c05aacd125c5ae9819582aba"}, + {file = "aiohttp-3.13.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:042e9e0bcb5fba81886c8b4fbb9a09d6b8a00245fd8d88e4d989c1f96c74164c"}, + {file = "aiohttp-3.13.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2eb752b102b12a76ca02dff751a801f028b4ffbbc478840b473597fc91a9ed43"}, + {file = "aiohttp-3.13.3-cp314-cp314-win32.whl", hash = "sha256:b556c85915d8efaed322bf1bdae9486aa0f3f764195a0fb6ee962e5c71ef5ce1"}, + {file = "aiohttp-3.13.3-cp314-cp314-win_amd64.whl", hash = "sha256:9bf9f7a65e7aa20dd764151fb3d616c81088f91f8df39c3893a536e279b4b984"}, + {file = "aiohttp-3.13.3-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:05861afbbec40650d8a07ea324367cb93e9e8cc7762e04dd4405df99fa65159c"}, + {file = "aiohttp-3.13.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2fc82186fadc4a8316768d61f3722c230e2c1dcab4200d52d2ebdf2482e47592"}, + {file = "aiohttp-3.13.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0add0900ff220d1d5c5ebbf99ed88b0c1bbf87aa7e4262300ed1376a6b13414f"}, + {file = "aiohttp-3.13.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:568f416a4072fbfae453dcf9a99194bbb8bdeab718e08ee13dfa2ba0e4bebf29"}, + {file = "aiohttp-3.13.3-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:add1da70de90a2569c5e15249ff76a631ccacfe198375eead4aadf3b8dc849dc"}, + {file = "aiohttp-3.13.3-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:10b47b7ba335d2e9b1239fa571131a87e2d8ec96b333e68b2a305e7a98b0bae2"}, + {file = "aiohttp-3.13.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3dd4dce1c718e38081c8f35f323209d4c1df7d4db4bab1b5c88a6b4d12b74587"}, + {file = "aiohttp-3.13.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:34bac00a67a812570d4a460447e1e9e06fae622946955f939051e7cc895cfab8"}, + {file = "aiohttp-3.13.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a19884d2ee70b06d9204b2727a7b9f983d0c684c650254679e716b0b77920632"}, + {file = "aiohttp-3.13.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5f8ca7f2bb6ba8348a3614c7918cc4bb73268c5ac2a207576b7afea19d3d9f64"}, + {file = "aiohttp-3.13.3-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:b0d95340658b9d2f11d9697f59b3814a9d3bb4b7a7c20b131df4bcef464037c0"}, + {file = "aiohttp-3.13.3-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:a1e53262fd202e4b40b70c3aff944a8155059beedc8a89bba9dc1f9ef06a1b56"}, + {file = "aiohttp-3.13.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:d60ac9663f44168038586cab2157e122e46bdef09e9368b37f2d82d354c23f72"}, + {file = "aiohttp-3.13.3-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:90751b8eed69435bac9ff4e3d2f6b3af1f57e37ecb0fbeee59c0174c9e2d41df"}, + {file = "aiohttp-3.13.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:fc353029f176fd2b3ec6cfc71be166aba1936fe5d73dd1992ce289ca6647a9aa"}, + {file = "aiohttp-3.13.3-cp314-cp314t-win32.whl", hash = "sha256:2e41b18a58da1e474a057b3d35248d8320029f61d70a37629535b16a0c8f3767"}, + {file = "aiohttp-3.13.3-cp314-cp314t-win_amd64.whl", hash = "sha256:44531a36aa2264a1860089ffd4dce7baf875ee5a6079d5fb42e261c704ef7344"}, + {file = "aiohttp-3.13.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:31a83ea4aead760dfcb6962efb1d861db48c34379f2ff72db9ddddd4cda9ea2e"}, + {file = "aiohttp-3.13.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:988a8c5e317544fdf0d39871559e67b6341065b87fceac641108c2096d5506b7"}, + {file = "aiohttp-3.13.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9b174f267b5cfb9a7dba9ee6859cecd234e9a681841eb85068059bc867fb8f02"}, + {file = "aiohttp-3.13.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:947c26539750deeaee933b000fb6517cc770bbd064bad6033f1cff4803881e43"}, + {file = "aiohttp-3.13.3-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9ebf57d09e131f5323464bd347135a88622d1c0976e88ce15b670e7ad57e4bd6"}, + {file = "aiohttp-3.13.3-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4ae5b5a0e1926e504c81c5b84353e7a5516d8778fbbff00429fe7b05bb25cbce"}, + {file = "aiohttp-3.13.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ba0eea45eb5cc3172dbfc497c066f19c41bac70963ea1a67d51fc92e4cf9a80"}, + {file = "aiohttp-3.13.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bae5c2ed2eae26cc382020edad80d01f36cb8e746da40b292e68fec40421dc6a"}, + {file = "aiohttp-3.13.3-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8a60e60746623925eab7d25823329941aee7242d559baa119ca2b253c88a7bd6"}, + {file = "aiohttp-3.13.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:e50a2e1404f063427c9d027378472316201a2290959a295169bcf25992d04558"}, + {file = "aiohttp-3.13.3-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:9a9dc347e5a3dc7dfdbc1f82da0ef29e388ddb2ed281bfce9dd8248a313e62b7"}, + {file = "aiohttp-3.13.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b46020d11d23fe16551466c77823df9cc2f2c1e63cc965daf67fa5eec6ca1877"}, + {file = "aiohttp-3.13.3-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:69c56fbc1993fa17043e24a546959c0178fe2b5782405ad4559e6c13975c15e3"}, + {file = "aiohttp-3.13.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:b99281b0704c103d4e11e72a76f1b543d4946fea7dd10767e7e1b5f00d4e5704"}, + {file = "aiohttp-3.13.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:40c5e40ecc29ba010656c18052b877a1c28f84344825efa106705e835c28530f"}, + {file = "aiohttp-3.13.3-cp39-cp39-win32.whl", hash = "sha256:56339a36b9f1fc708260c76c87e593e2afb30d26de9ae1eb445b5e051b98a7a1"}, + {file = "aiohttp-3.13.3-cp39-cp39-win_amd64.whl", hash = "sha256:c6b8568a3bb5819a0ad087f16d40e5a3fb6099f39ea1d5625a3edc1e923fc538"}, + {file = "aiohttp-3.13.3.tar.gz", hash = "sha256:a949eee43d3782f2daae4f4a2819b2cb9b0c5d3b7f7a927067cc84dafdbb9f88"}, +] + +[package.dependencies] +aiohappyeyeballs = ">=2.5.0" +aiosignal = ">=1.4.0" +attrs = ">=17.3.0" +frozenlist = ">=1.1.1" +multidict = ">=4.5,<7.0" +propcache = ">=0.2.0" +yarl = ">=1.17.0,<2.0" + +[package.extras] +speedups = ["Brotli (>=1.2) ; platform_python_implementation == \"CPython\"", "aiodns (>=3.3.0)", "backports.zstd ; platform_python_implementation == \"CPython\" and python_version < \"3.14\"", "brotlicffi (>=1.2) ; platform_python_implementation != \"CPython\""] + +[[package]] +name = "aiosignal" +version = "1.4.0" +description = "aiosignal: a list of registered asynchronous callbacks" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "aiosignal-1.4.0-py3-none-any.whl", hash = "sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e"}, + {file = "aiosignal-1.4.0.tar.gz", hash = "sha256:f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7"}, +] + +[package.dependencies] +frozenlist = ">=1.1.0" +typing-extensions = {version = ">=4.2", markers = "python_version < \"3.13\""} + +[[package]] +name = "altair" +version = "6.0.0" +description = "Vega-Altair: A declarative statistical visualization library for Python." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "altair-6.0.0-py3-none-any.whl", hash = "sha256:09ae95b53d5fe5b16987dccc785a7af8588f2dca50de1e7a156efa8a461515f8"}, + {file = "altair-6.0.0.tar.gz", hash = "sha256:614bf5ecbe2337347b590afb111929aa9c16c9527c4887d96c9bc7f6640756b4"}, +] + +[package.dependencies] +jinja2 = "*" +jsonschema = ">=3.0" +narwhals = ">=1.27.1" +packaging = "*" +typing-extensions = {version = ">=4.12.0", markers = "python_version < \"3.15\""} + +[package.extras] +all = ["altair-tiles (>=0.3.0)", "anywidget (>=0.9.0)", "numpy", "pandas (>=1.1.3)", "pyarrow (>=11)", "vegafusion (>=2.0.3)", "vl-convert-python (>=1.8.0)"] +dev = ["duckdb (>=1.0) ; python_version < \"3.14\"", "geopandas (>=0.14.3) ; python_version < \"3.14\"", "hatch (>=1.13.0)", "ipykernel", "ipython", "mistune", "mypy", "pandas (>=1.1.3)", "pandas-stubs", "polars (>=0.20.3)", "pyarrow-stubs", "pytest", "pytest-cov", "pytest-xdist[psutil] (>=3.5,<4.0)", "ruff (>=0.9.5)", "taskipy (>=1.14.1)", "tomli (>=2.2.1)", "types-jsonschema", "types-setuptools"] +doc = ["docutils", "jinja2", "myst-parser", "numpydoc", "pillow", "pydata-sphinx-theme (>=0.14.1)", "scipy", "scipy-stubs ; python_version >= \"3.10\"", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinxext-altair"] +save = ["vl-convert-python (>=1.8.0)"] + +[[package]] +name = "annotated-doc" +version = "0.0.4" +description = "Document parameters, class attributes, return types, and variables inline, with Annotated." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "annotated_doc-0.0.4-py3-none-any.whl", hash = "sha256:571ac1dc6991c450b25a9c2d84a3705e2ae7a53467b5d111c24fa8baabbed320"}, + {file = "annotated_doc-0.0.4.tar.gz", hash = "sha256:fbcda96e87e9c92ad167c2e53839e57503ecfda18804ea28102353485033faa4"}, +] + +[[package]] +name = "annotated-types" +version = "0.7.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, +] + +[[package]] +name = "anyio" +version = "4.12.1" +description = "High-level concurrency and networking framework on top of asyncio or Trio" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "anyio-4.12.1-py3-none-any.whl", hash = "sha256:d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c"}, + {file = "anyio-4.12.1.tar.gz", hash = "sha256:41cfcc3a4c85d3f05c932da7c26d0201ac36f72abd4435ba90d0464a3ffed703"}, +] + +[package.dependencies] +idna = ">=2.8" +typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} + +[package.extras] +trio = ["trio (>=0.31.0) ; python_version < \"3.10\"", "trio (>=0.32.0) ; python_version >= \"3.10\""] + +[[package]] +name = "appnope" +version = "0.1.4" +description = "Disable App Nap on macOS >= 10.9" +optional = false +python-versions = ">=3.6" +groups = ["main"] +markers = "platform_system == \"Darwin\"" +files = [ + {file = "appnope-0.1.4-py2.py3-none-any.whl", hash = "sha256:502575ee11cd7a28c0205f379b525beefebab9d161b7c964670864014ed7213c"}, + {file = "appnope-0.1.4.tar.gz", hash = "sha256:1de3860566df9caf38f01f86f65e0e13e379af54f9e4bee1e66b48f2efffd1ee"}, +] + +[[package]] +name = "asttokens" +version = "3.0.1" +description = "Annotate AST trees with source code positions" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "asttokens-3.0.1-py3-none-any.whl", hash = "sha256:15a3ebc0f43c2d0a50eeafea25e19046c68398e487b9f1f5b517f7c0f40f976a"}, + {file = "asttokens-3.0.1.tar.gz", hash = "sha256:71a4ee5de0bde6a31d64f6b13f2293ac190344478f081c3d1bccfcf5eacb0cb7"}, +] + +[package.extras] +astroid = ["astroid (>=2,<5)"] +test = ["astroid (>=2,<5)", "pytest (<9.0)", "pytest-cov", "pytest-xdist"] + +[[package]] +name = "attrs" +version = "25.4.0" +description = "Classes Without Boilerplate" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373"}, + {file = "attrs-25.4.0.tar.gz", hash = "sha256:16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11"}, +] + +[[package]] +name = "authlib" +version = "1.6.9" +description = "The ultimate Python library in building OAuth and OpenID Connect servers and clients." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "authlib-1.6.9-py2.py3-none-any.whl", hash = "sha256:f08b4c14e08f0861dc18a32357b33fbcfd2ea86cfe3fe149484b4d764c4a0ac3"}, + {file = "authlib-1.6.9.tar.gz", hash = "sha256:d8f2421e7e5980cc1ddb4e32d3f5fa659cfaf60d8eaf3281ebed192e4ab74f04"}, +] + +[package.dependencies] +cryptography = "*" + +[[package]] +name = "beartype" +version = "0.22.9" +description = "Unbearably fast near-real-time pure-Python runtime-static type-checker." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "beartype-0.22.9-py3-none-any.whl", hash = "sha256:d16c9bbc61ea14637596c5f6fbff2ee99cbe3573e46a716401734ef50c3060c2"}, + {file = "beartype-0.22.9.tar.gz", hash = "sha256:8f82b54aa723a2848a56008d18875f91c1db02c32ef6a62319a002e3e25a975f"}, +] + +[package.extras] +dev = ["autoapi (>=0.9.0)", "celery", "click", "coverage (>=5.5)", "docutils (>=0.22.0)", "equinox ; sys_platform == \"linux\" and python_version < \"3.15.0\"", "fastmcp ; python_version < \"3.14.0\"", "jax[cpu] ; sys_platform == \"linux\" and python_version < \"3.15.0\"", "jaxtyping ; sys_platform == \"linux\"", "langchain ; python_version < \"3.14.0\" and sys_platform != \"darwin\" and platform_python_implementation != \"PyPy\"", "mypy (>=0.800) ; platform_python_implementation != \"PyPy\"", "nuitka (>=1.2.6) ; sys_platform == \"linux\" and python_version < \"3.14.0\"", "numba ; python_version < \"3.14.0\"", "numpy ; python_version < \"3.15.0\" and sys_platform != \"darwin\" and platform_python_implementation != \"PyPy\"", "pandera (>=0.26.0) ; python_version < \"3.14.0\"", "poetry", "polars ; python_version < \"3.14.0\"", "pydata-sphinx-theme (<=0.7.2)", "pygments", "pyinstaller", "pyright (>=1.1.370)", "pytest (>=6.2.0)", "redis", "rich-click", "setuptools", "sphinx", "sphinx (>=4.2.0,<6.0.0)", "sphinxext-opengraph (>=0.7.5)", "sqlalchemy", "torch ; sys_platform == \"linux\" and python_version < \"3.14.0\"", "tox (>=3.20.1)", "typer", "typing-extensions (>=3.10.0.0)", "xarray ; python_version < \"3.15.0\""] +doc-ghp = ["mkdocs-material[imaging] (>=9.6.0)", "mkdocstrings-python (>=1.16.0)", "mkdocstrings-python-xref (>=1.16.0)"] +doc-rtd = ["autoapi (>=0.9.0)", "pydata-sphinx-theme (<=0.7.2)", "setuptools", "sphinx (>=4.2.0,<6.0.0)", "sphinxext-opengraph (>=0.7.5)"] +test = ["celery", "click", "coverage (>=5.5)", "docutils (>=0.22.0)", "equinox ; sys_platform == \"linux\" and python_version < \"3.15.0\"", "fastmcp ; python_version < \"3.14.0\"", "jax[cpu] ; sys_platform == \"linux\" and python_version < \"3.15.0\"", "jaxtyping ; sys_platform == \"linux\"", "langchain ; python_version < \"3.14.0\" and sys_platform != \"darwin\" and platform_python_implementation != \"PyPy\"", "mypy (>=0.800) ; platform_python_implementation != \"PyPy\"", "nuitka (>=1.2.6) ; sys_platform == \"linux\" and python_version < \"3.14.0\"", "numba ; python_version < \"3.14.0\"", "numpy ; python_version < \"3.15.0\" and sys_platform != \"darwin\" and platform_python_implementation != \"PyPy\"", "pandera (>=0.26.0) ; python_version < \"3.14.0\"", "poetry", "polars ; python_version < \"3.14.0\"", "pygments", "pyinstaller", "pyright (>=1.1.370)", "pytest (>=6.2.0)", "redis", "rich-click", "sphinx", "sqlalchemy", "torch ; sys_platform == \"linux\" and python_version < \"3.14.0\"", "tox (>=3.20.1)", "typer", "typing-extensions (>=3.10.0.0)", "xarray ; python_version < \"3.15.0\""] +test-tox = ["celery", "click", "docutils (>=0.22.0)", "equinox ; sys_platform == \"linux\" and python_version < \"3.15.0\"", "fastmcp ; python_version < \"3.14.0\"", "jax[cpu] ; sys_platform == \"linux\" and python_version < \"3.15.0\"", "jaxtyping ; sys_platform == \"linux\"", "langchain ; python_version < \"3.14.0\" and sys_platform != \"darwin\" and platform_python_implementation != \"PyPy\"", "mypy (>=0.800) ; platform_python_implementation != \"PyPy\"", "nuitka (>=1.2.6) ; sys_platform == \"linux\" and python_version < \"3.14.0\"", "numba ; python_version < \"3.14.0\"", "numpy ; python_version < \"3.15.0\" and sys_platform != \"darwin\" and platform_python_implementation != \"PyPy\"", "pandera (>=0.26.0) ; python_version < \"3.14.0\"", "poetry", "polars ; python_version < \"3.14.0\"", "pygments", "pyinstaller", "pyright (>=1.1.370)", "pytest (>=6.2.0)", "redis", "rich-click", "sphinx", "sqlalchemy", "torch ; sys_platform == \"linux\" and python_version < \"3.14.0\"", "typer", "typing-extensions (>=3.10.0.0)", "xarray ; python_version < \"3.15.0\""] +test-tox-coverage = ["coverage (>=5.5)"] + +[[package]] +name = "bitsandbytes" +version = "0.49.2" +description = "k-bit optimizers and matrix multiplication routines." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "bitsandbytes-0.49.2-py3-none-macosx_14_0_arm64.whl", hash = "sha256:87be5975edeac5396d699ecbc39dfc47cf2c026daaf2d5852a94368611a6823f"}, + {file = "bitsandbytes-0.49.2-py3-none-manylinux_2_24_aarch64.whl", hash = "sha256:2fc0830c5f7169be36e60e11f2be067c8f812dfcb829801a8703735842450750"}, + {file = "bitsandbytes-0.49.2-py3-none-manylinux_2_24_x86_64.whl", hash = "sha256:54b771f06e1a3c73af5c7f16ccf0fc23a846052813d4b008d10cb6e017dd1c8c"}, + {file = "bitsandbytes-0.49.2-py3-none-win_amd64.whl", hash = "sha256:2e0ddd09cd778155388023cbe81f00afbb7c000c214caef3ce83386e7144df7d"}, +] + +[package.dependencies] +numpy = ">=1.17" +packaging = ">=20.9" +torch = ">=2.3,<3" + +[package.extras] +benchmark = ["matplotlib", "pandas"] +dev = ["bitsandbytes[test]", "build (>=1.0.0,<2)", "pre-commit (>=3.5.0,<4)", "ruff (>=0.14.3,<0.15.0)", "wheel (>=0.42,<1)"] +docs = ["hf-doc-builder (==0.5.0)"] +test = ["einops (>=0.8.0,<0.9.0)", "lion-pytorch (==0.2.3)", "pytest (>=8.3,<9.0)", "scipy (>=1.11.4,<2)", "transformers (>=4.30.1,<5)"] + +[[package]] +name = "blinker" +version = "1.9.0" +description = "Fast, simple object-to-object and broadcast signaling" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc"}, + {file = "blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf"}, +] + +[[package]] +name = "cachetools" +version = "7.0.3" +description = "Extensible memoizing collections and decorators" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "cachetools-7.0.3-py3-none-any.whl", hash = "sha256:c128ffca156eef344c25fcd08a96a5952803786fa33097f5f2d49edf76f79d53"}, + {file = "cachetools-7.0.3.tar.gz", hash = "sha256:8c246313b95849964e54a909c03b327a87ab0428b068fac10da7b105ca275ef6"}, +] + +[[package]] +name = "caio" +version = "0.9.25" +description = "Asynchronous file IO for Linux MacOS or Windows." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "caio-0.9.25-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ca6c8ecda611478b6016cb94d23fd3eb7124852b985bdec7ecaad9f3116b9619"}, + {file = "caio-0.9.25-cp310-cp310-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:db9b5681e4af8176159f0d6598e73b2279bb661e718c7ac23342c550bd78c241"}, + {file = "caio-0.9.25-cp310-cp310-manylinux_2_34_aarch64.whl", hash = "sha256:bf61d7d0c4fd10ffdd98ca47f7e8db4d7408e74649ffaf4bef40b029ada3c21b"}, + {file = "caio-0.9.25-cp310-cp310-manylinux_2_34_x86_64.whl", hash = "sha256:ab52e5b643f8bbd64a0605d9412796cd3464cb8ca88593b13e95a0f0b10508ae"}, + {file = "caio-0.9.25-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d6956d9e4a27021c8bd6c9677f3a59eb1d820cc32d0343cea7961a03b1371965"}, + {file = "caio-0.9.25-cp311-cp311-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bf84bfa039f25ad91f4f52944452a5f6f405e8afab4d445450978cd6241d1478"}, + {file = "caio-0.9.25-cp311-cp311-manylinux_2_34_aarch64.whl", hash = "sha256:ae3d62587332bce600f861a8de6256b1014d6485cfd25d68c15caf1611dd1f7c"}, + {file = "caio-0.9.25-cp311-cp311-manylinux_2_34_x86_64.whl", hash = "sha256:fc220b8533dcf0f238a6b1a4a937f92024c71e7b10b5a2dfc1c73604a25709bc"}, + {file = "caio-0.9.25-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:fb7ff95af4c31ad3f03179149aab61097a71fd85e05f89b4786de0359dffd044"}, + {file = "caio-0.9.25-cp312-cp312-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:97084e4e30dfa598449d874c4d8e0c8d5ea17d2f752ef5e48e150ff9d240cd64"}, + {file = "caio-0.9.25-cp312-cp312-manylinux_2_34_aarch64.whl", hash = "sha256:4fa69eba47e0f041b9d4f336e2ad40740681c43e686b18b191b6c5f4c5544bfb"}, + {file = "caio-0.9.25-cp312-cp312-manylinux_2_34_x86_64.whl", hash = "sha256:6bebf6f079f1341d19f7386db9b8b1f07e8cc15ae13bfdaff573371ba0575d69"}, + {file = "caio-0.9.25-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:d6c2a3411af97762a2b03840c3cec2f7f728921ff8adda53d7ea2315a8563451"}, + {file = "caio-0.9.25-cp313-cp313-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0998210a4d5cd5cb565b32ccfe4e53d67303f868a76f212e002a8554692870e6"}, + {file = "caio-0.9.25-cp313-cp313-manylinux_2_34_aarch64.whl", hash = "sha256:1a177d4777141b96f175fe2c37a3d96dec7911ed9ad5f02bac38aaa1c936611f"}, + {file = "caio-0.9.25-cp313-cp313-manylinux_2_34_x86_64.whl", hash = "sha256:9ed3cfb28c0e99fec5e208c934e5c157d0866aa9c32aa4dc5e9b6034af6286b7"}, + {file = "caio-0.9.25-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fab6078b9348e883c80a5e14b382e6ad6aabbc4429ca034e76e730cf464269db"}, + {file = "caio-0.9.25-cp314-cp314-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:44a6b58e52d488c75cfaa5ecaa404b2b41cc965e6c417e03251e868ecd5b6d77"}, + {file = "caio-0.9.25-cp314-cp314-manylinux_2_34_aarch64.whl", hash = "sha256:628a630eb7fb22381dd8e3c8ab7f59e854b9c806639811fc3f4310c6bd711d79"}, + {file = "caio-0.9.25-cp314-cp314-manylinux_2_34_x86_64.whl", hash = "sha256:0ba16aa605ccb174665357fc729cf500679c2d94d5f1458a6f0d5ca48f2060a7"}, + {file = "caio-0.9.25-py3-none-any.whl", hash = "sha256:06c0bb02d6b929119b1cfbe1ca403c768b2013a369e2db46bfa2a5761cf82e40"}, + {file = "caio-0.9.25.tar.gz", hash = "sha256:16498e7f81d1d0f5a4c0ad3f2540e65fe25691376e0a5bd367f558067113ed10"}, +] + +[package.extras] +develop = ["aiomisc-pytest", "coveralls", "pylama[toml]", "pytest", "pytest-cov", "setuptools"] + +[[package]] +name = "certifi" +version = "2026.2.25" +description = "Python package for providing Mozilla's CA Bundle." +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "certifi-2026.2.25-py3-none-any.whl", hash = "sha256:027692e4402ad994f1c42e52a4997a9763c646b73e4096e4d5d6db8af1d6f0fa"}, + {file = "certifi-2026.2.25.tar.gz", hash = "sha256:e887ab5cee78ea814d3472169153c2d12cd43b14bd03329a39a9c6e2e80bfba7"}, +] + +[[package]] +name = "cffi" +version = "2.0.0" +description = "Foreign Function Interface for Python calling C code." +optional = false +python-versions = ">=3.9" +groups = ["main"] +markers = "platform_python_implementation != \"PyPy\" or implementation_name == \"pypy\"" +files = [ + {file = "cffi-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44"}, + {file = "cffi-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49"}, + {file = "cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c"}, + {file = "cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb"}, + {file = "cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0"}, + {file = "cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4"}, + {file = "cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453"}, + {file = "cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495"}, + {file = "cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5"}, + {file = "cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb"}, + {file = "cffi-2.0.0-cp310-cp310-win32.whl", hash = "sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a"}, + {file = "cffi-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739"}, + {file = "cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe"}, + {file = "cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c"}, + {file = "cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92"}, + {file = "cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93"}, + {file = "cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5"}, + {file = "cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664"}, + {file = "cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26"}, + {file = "cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9"}, + {file = "cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414"}, + {file = "cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743"}, + {file = "cffi-2.0.0-cp311-cp311-win32.whl", hash = "sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5"}, + {file = "cffi-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5"}, + {file = "cffi-2.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d"}, + {file = "cffi-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d"}, + {file = "cffi-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c"}, + {file = "cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe"}, + {file = "cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062"}, + {file = "cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e"}, + {file = "cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037"}, + {file = "cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba"}, + {file = "cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94"}, + {file = "cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187"}, + {file = "cffi-2.0.0-cp312-cp312-win32.whl", hash = "sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18"}, + {file = "cffi-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5"}, + {file = "cffi-2.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6"}, + {file = "cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb"}, + {file = "cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca"}, + {file = "cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b"}, + {file = "cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b"}, + {file = "cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2"}, + {file = "cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3"}, + {file = "cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26"}, + {file = "cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c"}, + {file = "cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b"}, + {file = "cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27"}, + {file = "cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75"}, + {file = "cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91"}, + {file = "cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5"}, + {file = "cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13"}, + {file = "cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b"}, + {file = "cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c"}, + {file = "cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef"}, + {file = "cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775"}, + {file = "cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205"}, + {file = "cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1"}, + {file = "cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f"}, + {file = "cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25"}, + {file = "cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad"}, + {file = "cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9"}, + {file = "cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d"}, + {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c"}, + {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8"}, + {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc"}, + {file = "cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592"}, + {file = "cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512"}, + {file = "cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4"}, + {file = "cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e"}, + {file = "cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6"}, + {file = "cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9"}, + {file = "cffi-2.0.0-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:fe562eb1a64e67dd297ccc4f5addea2501664954f2692b69a76449ec7913ecbf"}, + {file = "cffi-2.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:de8dad4425a6ca6e4e5e297b27b5c824ecc7581910bf9aee86cb6835e6812aa7"}, + {file = "cffi-2.0.0-cp39-cp39-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:4647afc2f90d1ddd33441e5b0e85b16b12ddec4fca55f0d9671fef036ecca27c"}, + {file = "cffi-2.0.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3f4d46d8b35698056ec29bca21546e1551a205058ae1a181d871e278b0b28165"}, + {file = "cffi-2.0.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e6e73b9e02893c764e7e8d5bb5ce277f1a009cd5243f8228f75f842bf937c534"}, + {file = "cffi-2.0.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:cb527a79772e5ef98fb1d700678fe031e353e765d1ca2d409c92263c6d43e09f"}, + {file = "cffi-2.0.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:61d028e90346df14fedc3d1e5441df818d095f3b87d286825dfcbd6459b7ef63"}, + {file = "cffi-2.0.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0f6084a0ea23d05d20c3edcda20c3d006f9b6f3fefeac38f59262e10cef47ee2"}, + {file = "cffi-2.0.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1cd13c99ce269b3ed80b417dcd591415d3372bcac067009b6e0f59c7d4015e65"}, + {file = "cffi-2.0.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:89472c9762729b5ae1ad974b777416bfda4ac5642423fa93bd57a09204712322"}, + {file = "cffi-2.0.0-cp39-cp39-win32.whl", hash = "sha256:2081580ebb843f759b9f617314a24ed5738c51d2aee65d31e02f6f7a2b97707a"}, + {file = "cffi-2.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:b882b3df248017dba09d6b16defe9b5c407fe32fc7c65a9c69798e6175601be9"}, + {file = "cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529"}, +] + +[package.dependencies] +pycparser = {version = "*", markers = "implementation_name != \"PyPy\""} + +[[package]] +name = "charset-normalizer" +version = "3.4.4" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "charset_normalizer-3.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-win32.whl", hash = "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d"}, + {file = "charset_normalizer-3.4.4-cp310-cp310-win_arm64.whl", hash = "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-win32.whl", hash = "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016"}, + {file = "charset_normalizer-3.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525"}, + {file = "charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14"}, + {file = "charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c"}, + {file = "charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ce8a0633f41a967713a59c4139d29110c07e826d131a316b50ce11b1d79b4f84"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaabd426fe94daf8fd157c32e571c85cb12e66692f15516a83a03264b08d06c3"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c4ef880e27901b6cc782f1b95f82da9313c0eb95c3af699103088fa0ac3ce9ac"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2aaba3b0819274cc41757a1da876f810a3e4d7b6eb25699253a4effef9e8e4af"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:778d2e08eda00f4256d7f672ca9fef386071c9202f5e4607920b86d7803387f2"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f155a433c2ec037d4e8df17d18922c3a0d9b3232a396690f17175d2946f0218d"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a8bf8d0f749c5757af2142fe7903a9df1d2e8aa3841559b2bad34b08d0e2bcf3"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:194f08cbb32dc406d6e1aea671a68be0823673db2832b38405deba2fb0d88f63"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:6aee717dcfead04c6eb1ce3bd29ac1e22663cdea57f943c87d1eab9a025438d7"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:cd4b7ca9984e5e7985c12bc60a6f173f3c958eae74f3ef6624bb6b26e2abbae4"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_riscv64.whl", hash = "sha256:b7cf1017d601aa35e6bb650b6ad28652c9cd78ee6caff19f3c28d03e1c80acbf"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:e912091979546adf63357d7e2ccff9b44f026c075aeaf25a52d0e95ad2281074"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:5cb4d72eea50c8868f5288b7f7f33ed276118325c1dfd3957089f6b519e1382a"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-win32.whl", hash = "sha256:837c2ce8c5a65a2035be9b3569c684358dfbf109fd3b6969630a87535495ceaa"}, + {file = "charset_normalizer-3.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:44c2a8734b333e0578090c4cd6b16f275e07aa6614ca8715e6c038e865e70576"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a9768c477b9d7bd54bc0c86dbaebdec6f03306675526c9927c0e8a04e8f94af9"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1bee1e43c28aa63cb16e5c14e582580546b08e535299b8b6158a7c9c768a1f3d"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fd44c878ea55ba351104cb93cc85e74916eb8fa440ca7903e57575e97394f608"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0f04b14ffe5fdc8c4933862d8306109a2c51e0704acfa35d51598eb45a1e89fc"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:cd09d08005f958f370f539f186d10aec3377d55b9eeb0d796025d4886119d76e"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4fe7859a4e3e8457458e2ff592f15ccb02f3da787fcd31e0183879c3ad4692a1"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fa09f53c465e532f4d3db095e0c55b615f010ad81803d383195b6b5ca6cbf5f3"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7fa17817dc5625de8a027cb8b26d9fefa3ea28c8253929b8d6649e705d2835b6"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:5947809c8a2417be3267efc979c47d76a079758166f7d43ef5ae8e9f92751f88"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:4902828217069c3c5c71094537a8e623f5d097858ac6ca8252f7b4d10b7560f1"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:7c308f7e26e4363d79df40ca5b2be1c6ba9f02bdbccfed5abddb7859a6ce72cf"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:2c9d3c380143a1fedbff95a312aa798578371eb29da42106a29019368a475318"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cb01158d8b88ee68f15949894ccc6712278243d95f344770fa7593fa2d94410c"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-win32.whl", hash = "sha256:2677acec1a2f8ef614c6888b5b4ae4060cc184174a938ed4e8ef690e15d3e505"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:f8e160feb2aed042cd657a72acc0b481212ed28b1b9a95c0cee1621b524e1966"}, + {file = "charset_normalizer-3.4.4-cp39-cp39-win_arm64.whl", hash = "sha256:b5d84d37db046c5ca74ee7bb47dd6cbc13f80665fdde3e8040bdd3fb015ecb50"}, + {file = "charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f"}, + {file = "charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a"}, +] + +[[package]] +name = "click" +version = "8.3.1" +description = "Composable command line interface toolkit" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6"}, + {file = "click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["main"] +markers = "platform_system == \"Windows\" or sys_platform == \"win32\"" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "comm" +version = "0.2.3" +description = "Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "comm-0.2.3-py3-none-any.whl", hash = "sha256:c615d91d75f7f04f095b30d1c1711babd43bdc6419c1be9886a85f2f4e489417"}, + {file = "comm-0.2.3.tar.gz", hash = "sha256:2dc8048c10962d55d7ad693be1e7045d891b7ce8d999c97963a5e3e99c055971"}, +] + +[package.extras] +test = ["pytest"] + +[[package]] +name = "contourpy" +version = "1.3.3" +description = "Python library for calculating contours of 2D quadrilateral grids" +optional = false +python-versions = ">=3.11" +groups = ["main"] +files = [ + {file = "contourpy-1.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:709a48ef9a690e1343202916450bc48b9e51c049b089c7f79a267b46cffcdaa1"}, + {file = "contourpy-1.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:23416f38bfd74d5d28ab8429cc4d63fa67d5068bd711a85edb1c3fb0c3e2f381"}, + {file = "contourpy-1.3.3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:929ddf8c4c7f348e4c0a5a3a714b5c8542ffaa8c22954862a46ca1813b667ee7"}, + {file = "contourpy-1.3.3-cp311-cp311-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9e999574eddae35f1312c2b4b717b7885d4edd6cb46700e04f7f02db454e67c1"}, + {file = "contourpy-1.3.3-cp311-cp311-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0bf67e0e3f482cb69779dd3061b534eb35ac9b17f163d851e2a547d56dba0a3a"}, + {file = "contourpy-1.3.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:51e79c1f7470158e838808d4a996fa9bac72c498e93d8ebe5119bc1e6becb0db"}, + {file = "contourpy-1.3.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:598c3aaece21c503615fd59c92a3598b428b2f01bfb4b8ca9c4edeecc2438620"}, + {file = "contourpy-1.3.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:322ab1c99b008dad206d406bb61d014cf0174df491ae9d9d0fac6a6fda4f977f"}, + {file = "contourpy-1.3.3-cp311-cp311-win32.whl", hash = "sha256:fd907ae12cd483cd83e414b12941c632a969171bf90fc937d0c9f268a31cafff"}, + {file = "contourpy-1.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:3519428f6be58431c56581f1694ba8e50626f2dd550af225f82fb5f5814d2a42"}, + {file = "contourpy-1.3.3-cp311-cp311-win_arm64.whl", hash = "sha256:15ff10bfada4bf92ec8b31c62bf7c1834c244019b4a33095a68000d7075df470"}, + {file = "contourpy-1.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b08a32ea2f8e42cf1d4be3169a98dd4be32bafe4f22b6c4cb4ba810fa9e5d2cb"}, + {file = "contourpy-1.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:556dba8fb6f5d8742f2923fe9457dbdd51e1049c4a43fd3986a0b14a1d815fc6"}, + {file = "contourpy-1.3.3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92d9abc807cf7d0e047b95ca5d957cf4792fcd04e920ca70d48add15c1a90ea7"}, + {file = "contourpy-1.3.3-cp312-cp312-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b2e8faa0ed68cb29af51edd8e24798bb661eac3bd9f65420c1887b6ca89987c8"}, + {file = "contourpy-1.3.3-cp312-cp312-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:626d60935cf668e70a5ce6ff184fd713e9683fb458898e4249b63be9e28286ea"}, + {file = "contourpy-1.3.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4d00e655fcef08aba35ec9610536bfe90267d7ab5ba944f7032549c55a146da1"}, + {file = "contourpy-1.3.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:451e71b5a7d597379ef572de31eeb909a87246974d960049a9848c3bc6c41bf7"}, + {file = "contourpy-1.3.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:459c1f020cd59fcfe6650180678a9993932d80d44ccde1fa1868977438f0b411"}, + {file = "contourpy-1.3.3-cp312-cp312-win32.whl", hash = "sha256:023b44101dfe49d7d53932be418477dba359649246075c996866106da069af69"}, + {file = "contourpy-1.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:8153b8bfc11e1e4d75bcb0bff1db232f9e10b274e0929de9d608027e0d34ff8b"}, + {file = "contourpy-1.3.3-cp312-cp312-win_arm64.whl", hash = "sha256:07ce5ed73ecdc4a03ffe3e1b3e3c1166db35ae7584be76f65dbbe28a7791b0cc"}, + {file = "contourpy-1.3.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:177fb367556747a686509d6fef71d221a4b198a3905fe824430e5ea0fda54eb5"}, + {file = "contourpy-1.3.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d002b6f00d73d69333dac9d0b8d5e84d9724ff9ef044fd63c5986e62b7c9e1b1"}, + {file = "contourpy-1.3.3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:348ac1f5d4f1d66d3322420f01d42e43122f43616e0f194fc1c9f5d830c5b286"}, + {file = "contourpy-1.3.3-cp313-cp313-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:655456777ff65c2c548b7c454af9c6f33f16c8884f11083244b5819cc214f1b5"}, + {file = "contourpy-1.3.3-cp313-cp313-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:644a6853d15b2512d67881586bd03f462c7ab755db95f16f14d7e238f2852c67"}, + {file = "contourpy-1.3.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4debd64f124ca62069f313a9cb86656ff087786016d76927ae2cf37846b006c9"}, + {file = "contourpy-1.3.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a15459b0f4615b00bbd1e91f1b9e19b7e63aea7483d03d804186f278c0af2659"}, + {file = "contourpy-1.3.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ca0fdcd73925568ca027e0b17ab07aad764be4706d0a925b89227e447d9737b7"}, + {file = "contourpy-1.3.3-cp313-cp313-win32.whl", hash = "sha256:b20c7c9a3bf701366556e1b1984ed2d0cedf999903c51311417cf5f591d8c78d"}, + {file = "contourpy-1.3.3-cp313-cp313-win_amd64.whl", hash = "sha256:1cadd8b8969f060ba45ed7c1b714fe69185812ab43bd6b86a9123fe8f99c3263"}, + {file = "contourpy-1.3.3-cp313-cp313-win_arm64.whl", hash = "sha256:fd914713266421b7536de2bfa8181aa8c699432b6763a0ea64195ebe28bff6a9"}, + {file = "contourpy-1.3.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:88df9880d507169449d434c293467418b9f6cbe82edd19284aa0409e7fdb933d"}, + {file = "contourpy-1.3.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:d06bb1f751ba5d417047db62bca3c8fde202b8c11fb50742ab3ab962c81e8216"}, + {file = "contourpy-1.3.3-cp313-cp313t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e4e6b05a45525357e382909a4c1600444e2a45b4795163d3b22669285591c1ae"}, + {file = "contourpy-1.3.3-cp313-cp313t-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ab3074b48c4e2cf1a960e6bbeb7f04566bf36b1861d5c9d4d8ac04b82e38ba20"}, + {file = "contourpy-1.3.3-cp313-cp313t-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6c3d53c796f8647d6deb1abe867daeb66dcc8a97e8455efa729516b997b8ed99"}, + {file = "contourpy-1.3.3-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50ed930df7289ff2a8d7afeb9603f8289e5704755c7e5c3bbd929c90c817164b"}, + {file = "contourpy-1.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4feffb6537d64b84877da813a5c30f1422ea5739566abf0bd18065ac040e120a"}, + {file = "contourpy-1.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2b7e9480ffe2b0cd2e787e4df64270e3a0440d9db8dc823312e2c940c167df7e"}, + {file = "contourpy-1.3.3-cp313-cp313t-win32.whl", hash = "sha256:283edd842a01e3dcd435b1c5116798d661378d83d36d337b8dde1d16a5fc9ba3"}, + {file = "contourpy-1.3.3-cp313-cp313t-win_amd64.whl", hash = "sha256:87acf5963fc2b34825e5b6b048f40e3635dd547f590b04d2ab317c2619ef7ae8"}, + {file = "contourpy-1.3.3-cp313-cp313t-win_arm64.whl", hash = "sha256:3c30273eb2a55024ff31ba7d052dde990d7d8e5450f4bbb6e913558b3d6c2301"}, + {file = "contourpy-1.3.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fde6c716d51c04b1c25d0b90364d0be954624a0ee9d60e23e850e8d48353d07a"}, + {file = "contourpy-1.3.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:cbedb772ed74ff5be440fa8eee9bd49f64f6e3fc09436d9c7d8f1c287b121d77"}, + {file = "contourpy-1.3.3-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:22e9b1bd7a9b1d652cd77388465dc358dafcd2e217d35552424aa4f996f524f5"}, + {file = "contourpy-1.3.3-cp314-cp314-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a22738912262aa3e254e4f3cb079a95a67132fc5a063890e224393596902f5a4"}, + {file = "contourpy-1.3.3-cp314-cp314-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:afe5a512f31ee6bd7d0dda52ec9864c984ca3d66664444f2d72e0dc4eb832e36"}, + {file = "contourpy-1.3.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f64836de09927cba6f79dcd00fdd7d5329f3fccc633468507079c829ca4db4e3"}, + {file = "contourpy-1.3.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:1fd43c3be4c8e5fd6e4f2baeae35ae18176cf2e5cced681cca908addf1cdd53b"}, + {file = "contourpy-1.3.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6afc576f7b33cf00996e5c1102dc2a8f7cc89e39c0b55df93a0b78c1bd992b36"}, + {file = "contourpy-1.3.3-cp314-cp314-win32.whl", hash = "sha256:66c8a43a4f7b8df8b71ee1840e4211a3c8d93b214b213f590e18a1beca458f7d"}, + {file = "contourpy-1.3.3-cp314-cp314-win_amd64.whl", hash = "sha256:cf9022ef053f2694e31d630feaacb21ea24224be1c3ad0520b13d844274614fd"}, + {file = "contourpy-1.3.3-cp314-cp314-win_arm64.whl", hash = "sha256:95b181891b4c71de4bb404c6621e7e2390745f887f2a026b2d99e92c17892339"}, + {file = "contourpy-1.3.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:33c82d0138c0a062380332c861387650c82e4cf1747aaa6938b9b6516762e772"}, + {file = "contourpy-1.3.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ea37e7b45949df430fe649e5de8351c423430046a2af20b1c1961cae3afcda77"}, + {file = "contourpy-1.3.3-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d304906ecc71672e9c89e87c4675dc5c2645e1f4269a5063b99b0bb29f232d13"}, + {file = "contourpy-1.3.3-cp314-cp314t-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ca658cd1a680a5c9ea96dc61cdbae1e85c8f25849843aa799dfd3cb370ad4fbe"}, + {file = "contourpy-1.3.3-cp314-cp314t-manylinux_2_26_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ab2fd90904c503739a75b7c8c5c01160130ba67944a7b77bbf36ef8054576e7f"}, + {file = "contourpy-1.3.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b7301b89040075c30e5768810bc96a8e8d78085b47d8be6e4c3f5a0b4ed478a0"}, + {file = "contourpy-1.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:2a2a8b627d5cc6b7c41a4beff6c5ad5eb848c88255fda4a8745f7e901b32d8e4"}, + {file = "contourpy-1.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:fd6ec6be509c787f1caf6b247f0b1ca598bef13f4ddeaa126b7658215529ba0f"}, + {file = "contourpy-1.3.3-cp314-cp314t-win32.whl", hash = "sha256:e74a9a0f5e3fff48fb5a7f2fd2b9b70a3fe014a67522f79b7cca4c0c7e43c9ae"}, + {file = "contourpy-1.3.3-cp314-cp314t-win_amd64.whl", hash = "sha256:13b68d6a62db8eafaebb8039218921399baf6e47bf85006fd8529f2a08ef33fc"}, + {file = "contourpy-1.3.3-cp314-cp314t-win_arm64.whl", hash = "sha256:b7448cb5a725bb1e35ce88771b86fba35ef418952474492cf7c764059933ff8b"}, + {file = "contourpy-1.3.3-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:cd5dfcaeb10f7b7f9dc8941717c6c2ade08f587be2226222c12b25f0483ed497"}, + {file = "contourpy-1.3.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:0c1fc238306b35f246d61a1d416a627348b5cf0648648a031e14bb8705fcdfe8"}, + {file = "contourpy-1.3.3-pp311-pypy311_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:70f9aad7de812d6541d29d2bbf8feb22ff7e1c299523db288004e3157ff4674e"}, + {file = "contourpy-1.3.3-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5ed3657edf08512fc3fe81b510e35c2012fbd3081d2e26160f27ca28affec989"}, + {file = "contourpy-1.3.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:3d1a3799d62d45c18bafd41c5fa05120b96a28079f2393af559b843d1a966a77"}, + {file = "contourpy-1.3.3.tar.gz", hash = "sha256:083e12155b210502d0bca491432bb04d56dc3432f95a979b429f2848c3dbe880"}, +] + +[package.dependencies] +numpy = ">=1.25" + +[package.extras] +bokeh = ["bokeh", "selenium"] +docs = ["furo", "sphinx (>=7.2)", "sphinx-copybutton"] +mypy = ["bokeh", "contourpy[bokeh,docs]", "docutils-stubs", "mypy (==1.17.0)", "types-Pillow"] +test = ["Pillow", "contourpy[test-no-images]", "matplotlib"] +test-no-images = ["pytest", "pytest-cov", "pytest-rerunfailures", "pytest-xdist", "wurlitzer"] + +[[package]] +name = "cryptography" +version = "46.0.5" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +optional = false +python-versions = "!=3.9.0,!=3.9.1,>=3.8" +groups = ["main"] +files = [ + {file = "cryptography-46.0.5-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:351695ada9ea9618b3500b490ad54c739860883df6c1f555e088eaf25b1bbaad"}, + {file = "cryptography-46.0.5-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c18ff11e86df2e28854939acde2d003f7984f721eba450b56a200ad90eeb0e6b"}, + {file = "cryptography-46.0.5-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d7e3d356b8cd4ea5aff04f129d5f66ebdc7b6f8eae802b93739ed520c47c79b"}, + {file = "cryptography-46.0.5-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:50bfb6925eff619c9c023b967d5b77a54e04256c4281b0e21336a130cd7fc263"}, + {file = "cryptography-46.0.5-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:803812e111e75d1aa73690d2facc295eaefd4439be1023fefc4995eaea2af90d"}, + {file = "cryptography-46.0.5-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3ee190460e2fbe447175cda91b88b84ae8322a104fc27766ad09428754a618ed"}, + {file = "cryptography-46.0.5-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:f145bba11b878005c496e93e257c1e88f154d278d2638e6450d17e0f31e558d2"}, + {file = "cryptography-46.0.5-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:e9251e3be159d1020c4030bd2e5f84d6a43fe54b6c19c12f51cde9542a2817b2"}, + {file = "cryptography-46.0.5-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:47fb8a66058b80e509c47118ef8a75d14c455e81ac369050f20ba0d23e77fee0"}, + {file = "cryptography-46.0.5-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:4c3341037c136030cb46e4b1e17b7418ea4cbd9dd207e4a6f3b2b24e0d4ac731"}, + {file = "cryptography-46.0.5-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:890bcb4abd5a2d3f852196437129eb3667d62630333aacc13dfd470fad3aaa82"}, + {file = "cryptography-46.0.5-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:80a8d7bfdf38f87ca30a5391c0c9ce4ed2926918e017c29ddf643d0ed2778ea1"}, + {file = "cryptography-46.0.5-cp311-abi3-win32.whl", hash = "sha256:60ee7e19e95104d4c03871d7d7dfb3d22ef8a9b9c6778c94e1c8fcc8365afd48"}, + {file = "cryptography-46.0.5-cp311-abi3-win_amd64.whl", hash = "sha256:38946c54b16c885c72c4f59846be9743d699eee2b69b6988e0a00a01f46a61a4"}, + {file = "cryptography-46.0.5-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:94a76daa32eb78d61339aff7952ea819b1734b46f73646a07decb40e5b3448e2"}, + {file = "cryptography-46.0.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5be7bf2fb40769e05739dd0046e7b26f9d4670badc7b032d6ce4db64dddc0678"}, + {file = "cryptography-46.0.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fe346b143ff9685e40192a4960938545c699054ba11d4f9029f94751e3f71d87"}, + {file = "cryptography-46.0.5-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:c69fd885df7d089548a42d5ec05be26050ebcd2283d89b3d30676eb32ff87dee"}, + {file = "cryptography-46.0.5-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:8293f3dea7fc929ef7240796ba231413afa7b68ce38fd21da2995549f5961981"}, + {file = "cryptography-46.0.5-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:1abfdb89b41c3be0365328a410baa9df3ff8a9110fb75e7b52e66803ddabc9a9"}, + {file = "cryptography-46.0.5-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:d66e421495fdb797610a08f43b05269e0a5ea7f5e652a89bfd5a7d3c1dee3648"}, + {file = "cryptography-46.0.5-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:4e817a8920bfbcff8940ecfd60f23d01836408242b30f1a708d93198393a80b4"}, + {file = "cryptography-46.0.5-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:68f68d13f2e1cb95163fa3b4db4bf9a159a418f5f6e7242564fc75fcae667fd0"}, + {file = "cryptography-46.0.5-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:a3d1fae9863299076f05cb8a778c467578262fae09f9dc0ee9b12eb4268ce663"}, + {file = "cryptography-46.0.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c4143987a42a2397f2fc3b4d7e3a7d313fbe684f67ff443999e803dd75a76826"}, + {file = "cryptography-46.0.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:7d731d4b107030987fd61a7f8ab512b25b53cef8f233a97379ede116f30eb67d"}, + {file = "cryptography-46.0.5-cp314-cp314t-win32.whl", hash = "sha256:c3bcce8521d785d510b2aad26ae2c966092b7daa8f45dd8f44734a104dc0bc1a"}, + {file = "cryptography-46.0.5-cp314-cp314t-win_amd64.whl", hash = "sha256:4d8ae8659ab18c65ced284993c2265910f6c9e650189d4e3f68445ef82a810e4"}, + {file = "cryptography-46.0.5-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:4108d4c09fbbf2789d0c926eb4152ae1760d5a2d97612b92d508d96c861e4d31"}, + {file = "cryptography-46.0.5-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7d1f30a86d2757199cb2d56e48cce14deddf1f9c95f1ef1b64ee91ea43fe2e18"}, + {file = "cryptography-46.0.5-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:039917b0dc418bb9f6edce8a906572d69e74bd330b0b3fea4f79dab7f8ddd235"}, + {file = "cryptography-46.0.5-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ba2a27ff02f48193fc4daeadf8ad2590516fa3d0adeeb34336b96f7fa64c1e3a"}, + {file = "cryptography-46.0.5-cp38-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:61aa400dce22cb001a98014f647dc21cda08f7915ceb95df0c9eaf84b4b6af76"}, + {file = "cryptography-46.0.5-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3ce58ba46e1bc2aac4f7d9290223cead56743fa6ab94a5d53292ffaac6a91614"}, + {file = "cryptography-46.0.5-cp38-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:420d0e909050490d04359e7fdb5ed7e667ca5c3c402b809ae2563d7e66a92229"}, + {file = "cryptography-46.0.5-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:582f5fcd2afa31622f317f80426a027f30dc792e9c80ffee87b993200ea115f1"}, + {file = "cryptography-46.0.5-cp38-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:bfd56bb4b37ed4f330b82402f6f435845a5f5648edf1ad497da51a8452d5d62d"}, + {file = "cryptography-46.0.5-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:a3d507bb6a513ca96ba84443226af944b0f7f47dcc9a399d110cd6146481d24c"}, + {file = "cryptography-46.0.5-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9f16fbdf4da055efb21c22d81b89f155f02ba420558db21288b3d0035bafd5f4"}, + {file = "cryptography-46.0.5-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ced80795227d70549a411a4ab66e8ce307899fad2220ce5ab2f296e687eacde9"}, + {file = "cryptography-46.0.5-cp38-abi3-win32.whl", hash = "sha256:02f547fce831f5096c9a567fd41bc12ca8f11df260959ecc7c3202555cc47a72"}, + {file = "cryptography-46.0.5-cp38-abi3-win_amd64.whl", hash = "sha256:556e106ee01aa13484ce9b0239bca667be5004efb0aabbed28d353df86445595"}, + {file = "cryptography-46.0.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:3b4995dc971c9fb83c25aa44cf45f02ba86f71ee600d81091c2f0cbae116b06c"}, + {file = "cryptography-46.0.5-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:bc84e875994c3b445871ea7181d424588171efec3e185dced958dad9e001950a"}, + {file = "cryptography-46.0.5-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:2ae6971afd6246710480e3f15824ed3029a60fc16991db250034efd0b9fb4356"}, + {file = "cryptography-46.0.5-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:d861ee9e76ace6cf36a6a89b959ec08e7bc2493ee39d07ffe5acb23ef46d27da"}, + {file = "cryptography-46.0.5-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:2b7a67c9cd56372f3249b39699f2ad479f6991e62ea15800973b956f4b73e257"}, + {file = "cryptography-46.0.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:8456928655f856c6e1533ff59d5be76578a7157224dbd9ce6872f25055ab9ab7"}, + {file = "cryptography-46.0.5.tar.gz", hash = "sha256:abace499247268e3757271b2f1e244b36b06f8515cf27c4d49468fc9eb16e93d"}, +] + +[package.dependencies] +cffi = {version = ">=2.0.0", markers = "python_full_version >= \"3.9.0\" and platform_python_implementation != \"PyPy\""} + +[package.extras] +docs = ["sphinx (>=5.3.0)", "sphinx-inline-tabs", "sphinx-rtd-theme (>=3.0.0)"] +docstest = ["pyenchant (>=3)", "readme-renderer (>=30.0)", "sphinxcontrib-spelling (>=7.3.1)"] +nox = ["nox[uv] (>=2024.4.15)"] +pep8test = ["check-sdist", "click (>=8.0.1)", "mypy (>=1.14)", "ruff (>=0.11.11)"] +sdist = ["build (>=1.0.0)"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["certifi (>=2024)", "cryptography-vectors (==46.0.5)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] +test-randomorder = ["pytest-randomly"] + +[[package]] +name = "cuda-bindings" +version = "12.9.4" +description = "Python bindings for CUDA" +optional = false +python-versions = "*" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "cuda_bindings-12.9.4-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a022c96b8bd847e8dc0675523431149a4c3e872f440e3002213dbb9e08f0331a"}, + {file = "cuda_bindings-12.9.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4d3c842c2a4303b2a580fe955018e31aea30278be19795ae05226235268032e5"}, + {file = "cuda_bindings-12.9.4-cp310-cp310-win_amd64.whl", hash = "sha256:f69107389e6b9948969bfd0a20c4f571fd1aefcfb1d2e1b72cc8ba5ecb7918ab"}, + {file = "cuda_bindings-12.9.4-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a6a429dc6c13148ff1e27c44f40a3dd23203823e637b87fd0854205195988306"}, + {file = "cuda_bindings-12.9.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c912a3d9e6b6651853eed8eed96d6800d69c08e94052c292fec3f282c5a817c9"}, + {file = "cuda_bindings-12.9.4-cp311-cp311-win_amd64.whl", hash = "sha256:443b0875916879c2e4c3722941e25e42d5ab9bcbf34c9e83404fb100fa1f6913"}, + {file = "cuda_bindings-12.9.4-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:694ba35023846625ef471257e6b5a4bc8af690f961d197d77d34b1d1db393f56"}, + {file = "cuda_bindings-12.9.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fda147a344e8eaeca0c6ff113d2851ffca8f7dfc0a6c932374ee5c47caa649c8"}, + {file = "cuda_bindings-12.9.4-cp312-cp312-win_amd64.whl", hash = "sha256:696ca75d249ddf287d01b9a698b8e2d8a05046495a9c051ca15659dc52d17615"}, + {file = "cuda_bindings-12.9.4-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cf8bfaedc238f3b115d957d1fd6562b7e8435ba57f6d0e2f87d0e7149ccb2da5"}, + {file = "cuda_bindings-12.9.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:32bdc5a76906be4c61eb98f546a6786c5773a881f3b166486449b5d141e4a39f"}, + {file = "cuda_bindings-12.9.4-cp313-cp313-win_amd64.whl", hash = "sha256:a2e82c8985948f953c2be51df45c3fe11c812a928fca525154fb9503190b3e64"}, + {file = "cuda_bindings-12.9.4-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3adf4958dcf68ae7801a59b73fb00a8b37f8d0595060d66ceae111b1002de38d"}, + {file = "cuda_bindings-12.9.4-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:56e0043c457a99ac473ddc926fe0dc4046694d99caef633e92601ab52cbe17eb"}, + {file = "cuda_bindings-12.9.4-cp313-cp313t-win_amd64.whl", hash = "sha256:b32d8b685f0e66f5658bcf4601ef034e89fc2843582886f0a58784a4302da06c"}, + {file = "cuda_bindings-12.9.4-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1f53a7f453d4b2643d8663d036bafe29b5ba89eb904c133180f295df6dc151e5"}, + {file = "cuda_bindings-12.9.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8b72ee72a9cc1b531db31eebaaee5c69a8ec3500e32c6933f2d3b15297b53686"}, + {file = "cuda_bindings-12.9.4-cp314-cp314-win_amd64.whl", hash = "sha256:53a10c71fdbdb743e0268d07964e5a996dd00b4e43831cbfce9804515d97d575"}, + {file = "cuda_bindings-12.9.4-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:20f2699d61d724de3eb3f3369d57e2b245f93085cab44fd37c3bea036cea1a6f"}, + {file = "cuda_bindings-12.9.4-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d80bffc357df9988dca279734bc9674c3934a654cab10cadeed27ce17d8635ee"}, + {file = "cuda_bindings-12.9.4-cp314-cp314t-win_amd64.whl", hash = "sha256:53e11991a92ff6f26a0c8a98554cd5d6721c308a6b7bfb08bebac9201e039e43"}, + {file = "cuda_bindings-12.9.4-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:893ca68114b5b769c1d4c02583b91ed22691887c3ed513b59467d23540104db4"}, + {file = "cuda_bindings-12.9.4-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9866ceec83e39337d1a1d64837864c964ad902992478caa288a0bc1be95f21aa"}, + {file = "cuda_bindings-12.9.4-cp39-cp39-win_amd64.whl", hash = "sha256:37744e721a18a514423e81863f52a4f7f46f5a6f9cccd569f2735f8067f4d8c2"}, +] + +[package.dependencies] +cuda-pathfinder = ">=1.1,<2.0" + +[package.extras] +all = ["nvidia-cuda-nvcc-cu12", "nvidia-cuda-nvrtc-cu12", "nvidia-cufile-cu12 ; sys_platform == \"linux\"", "nvidia-nvjitlink-cu12 (>=12.3)"] +test = ["cython (>=3.1,<3.2)", "numpy (>=1.21.1)", "pyglet (>=2.1.9)", "pytest (>=6.2.4)", "pytest-benchmark (>=3.4.1)", "setuptools (>=77.0.0)"] + +[[package]] +name = "cuda-pathfinder" +version = "1.4.0" +description = "Pathfinder for CUDA components" +optional = false +python-versions = ">=3.10" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "cuda_pathfinder-1.4.0-py3-none-any.whl", hash = "sha256:437079ca59e7b61ae439ecc501d69ed87b3accc34d58153ef1e54815e2c2e118"}, +] + +[[package]] +name = "cut-cross-entropy" +version = "25.1.1" +description = "Code for cut cross entropy, a memory efficient implementation of linear-cross-entropy loss." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "cut_cross_entropy-25.1.1-py3-none-any.whl", hash = "sha256:e46f26d348f6a67927d17e65c5a212e795be13dcad5b10a77a200d6b8102d9d1"}, + {file = "cut_cross_entropy-25.1.1.tar.gz", hash = "sha256:5fe5924509248b1aea5c890f8887c6a7759f7c8b1ebc0490e42c247c4f7c1e34"}, +] + +[package.dependencies] +torch = "*" +triton = {version = "*", markers = "platform_system == \"Linux\""} + +[package.extras] +all = ["accelerate (>=0.34.2)", "cut-cross-entropy[transformers]", "datasets (>=3.1.0)", "deepspeed (>=0.15.1) ; platform_system != \"Darwin\"", "fire", "huggingface_hub (>=0.26.2)", "pandas", "tqdm"] +dev = ["build", "cut-cross-entropy[all,test]", "pre-commit", "twine"] +test = ["pytest"] +transformers = ["transformers (>=4.44.2)"] + +[[package]] +name = "cycler" +version = "0.12.1" +description = "Composable style cycles" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30"}, + {file = "cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c"}, +] + +[package.extras] +docs = ["ipython", "matplotlib", "numpydoc", "sphinx"] +tests = ["pytest", "pytest-cov", "pytest-xdist"] + +[[package]] +name = "cyclopts" +version = "4.7.0" +description = "Intuitive, easy CLIs based on type hints." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "cyclopts-4.7.0-py3-none-any.whl", hash = "sha256:c659d930797a8470f2914a8f8f8be263b339cb6ffb6593b4a59fa9d84b8e0e38"}, + {file = "cyclopts-4.7.0.tar.gz", hash = "sha256:1d0fd440b8d21a55d14f830033eb1ac156933424df3e90afeea34cfb3ed73822"}, +] + +[package.dependencies] +attrs = ">=23.1.0" +docstring-parser = ">=0.15,<4.0" +rich = ">=13.6.0" +rich-rst = ">=1.3.1,<2.0.0" + +[package.extras] +debug = ["ipdb (>=0.13.9)", "line-profiler (>=3.5.1)"] +dev = ["coverage[toml] (>=5.1)", "mkdocs (>=1.4.0)", "pre-commit (>=2.16.0)", "pydantic (>=2.11.2,<3.0.0)", "pytest (>=8.2.0)", "pytest-cov (>=3.0.0)", "pytest-mock (>=3.7.0)", "pyyaml (>=6.0.1)", "syrupy (>=4.0.0)", "toml (>=0.10.2,<1.0.0)", "trio (>=0.10.0)"] +docs = ["gitpython (>=3.1.31)", "myst-parser[linkify] (>=3.0.1,<5.0.0)", "sphinx (>=7.4.7,<8.2.0)", "sphinx-autodoc-typehints (>=1.25.2,<4.0.0)", "sphinx-copybutton (>=0.5,<1.0)", "sphinx-rtd-dark-mode (>=1.3.0,<2.0.0)", "sphinx-rtd-theme (>=3.0.0,<4.0.0)"] +mkdocs = ["markdown (>=3.3)", "mkdocs (>=1.4.0)", "pymdown-extensions (>=10.0)"] +toml = ["tomli (>=2.0.0) ; python_version < \"3.11\""] +trio = ["trio (>=0.10.0)"] +yaml = ["pyyaml (>=6.0.1)"] + +[[package]] +name = "datasets" +version = "4.3.0" +description = "HuggingFace community-driven open-source library of datasets" +optional = false +python-versions = ">=3.9.0" +groups = ["main"] +files = [ + {file = "datasets-4.3.0-py3-none-any.whl", hash = "sha256:0ea157e72138b3ca6c7d2415f19a164ecf7d4c4fa72da2a570da286882e96903"}, + {file = "datasets-4.3.0.tar.gz", hash = "sha256:bc9118ed9afd92346c5be7ed3aaa00177eb907c25467f9d072a0d22777efbd2b"}, +] + +[package.dependencies] +dill = ">=0.3.0,<0.4.1" +filelock = "*" +fsspec = {version = ">=2023.1.0,<=2025.9.0", extras = ["http"]} +httpx = "<1.0.0" +huggingface-hub = ">=0.25.0,<2.0" +multiprocess = "<0.70.17" +numpy = ">=1.17" +packaging = "*" +pandas = "*" +pyarrow = ">=21.0.0" +pyyaml = ">=5.1" +requests = ">=2.32.2" +tqdm = ">=4.66.3" +xxhash = "*" + +[package.extras] +audio = ["torch (>=2.8.0)", "torchcodec (>=0.6.0)"] +benchmarks = ["tensorflow (==2.12.0)", "torch (==2.0.1)", "transformers (==4.30.1)"] +dev = ["Pillow (>=9.4.0)", "absl-py", "aiohttp", "decorator", "elasticsearch (>=7.17.12,<8.0.0)", "faiss-cpu (>=1.8.0.post1)", "h5py", "jax (>=0.3.14) ; sys_platform != \"win32\"", "jaxlib (>=0.3.14) ; sys_platform != \"win32\"", "joblib (<1.3.0)", "joblibspark", "lz4", "moto[server]", "numba (>=0.56.4)", "polars[timezone] (>=0.20.0)", "protobuf (<4.0.0)", "py7zr", "pyspark (>=3.4)", "pytest", "pytest-datadir", "pytest-xdist", "rarfile (>=4.0)", "ruff (>=0.3.0)", "sqlalchemy", "tensorflow (>=2.16.0) ; python_version >= \"3.10\" and sys_platform != \"win32\"", "tensorflow (>=2.6.0)", "tensorflow (>=2.6.0) ; python_version < \"3.10\" and sys_platform != \"win32\"", "tiktoken", "torch", "torch (>=2.8.0)", "torchcodec (>=0.7.0)", "torchdata", "transformers", "transformers (>=4.42.0)", "zstandard"] +docs = ["tensorflow (>=2.6.0)", "torch", "transformers"] +jax = ["jax (>=0.3.14)", "jaxlib (>=0.3.14)"] +pdfs = ["pdfplumber (>=0.11.4)"] +quality = ["ruff (>=0.3.0)"] +tensorflow = ["tensorflow (>=2.6.0)"] +tensorflow-gpu = ["tensorflow (>=2.6.0)"] +tests = ["Pillow (>=9.4.0)", "absl-py", "aiohttp", "decorator", "elasticsearch (>=7.17.12,<8.0.0)", "faiss-cpu (>=1.8.0.post1)", "h5py", "jax (>=0.3.14) ; sys_platform != \"win32\"", "jaxlib (>=0.3.14) ; sys_platform != \"win32\"", "joblib (<1.3.0)", "joblibspark", "lz4", "moto[server]", "numba (>=0.56.4)", "polars[timezone] (>=0.20.0)", "protobuf (<4.0.0)", "py7zr", "pyspark (>=3.4)", "pytest", "pytest-datadir", "pytest-xdist", "rarfile (>=4.0)", "sqlalchemy", "tensorflow (>=2.16.0) ; python_version >= \"3.10\" and sys_platform != \"win32\"", "tensorflow (>=2.6.0) ; python_version < \"3.10\" and sys_platform != \"win32\"", "tiktoken", "torch (>=2.8.0)", "torchcodec (>=0.7.0)", "torchdata", "transformers (>=4.42.0)", "zstandard"] +tests-numpy2 = ["Pillow (>=9.4.0)", "absl-py", "aiohttp", "decorator", "elasticsearch (>=7.17.12,<8.0.0)", "h5py", "jax (>=0.3.14) ; sys_platform != \"win32\"", "jaxlib (>=0.3.14) ; sys_platform != \"win32\"", "joblib (<1.3.0)", "joblibspark", "lz4", "moto[server]", "numba (>=0.56.4)", "polars[timezone] (>=0.20.0)", "protobuf (<4.0.0)", "py7zr", "pyspark (>=3.4)", "pytest", "pytest-datadir", "pytest-xdist", "rarfile (>=4.0)", "sqlalchemy", "tiktoken", "torch (>=2.8.0)", "torchcodec (>=0.7.0)", "torchdata", "transformers (>=4.42.0)", "zstandard"] +torch = ["torch"] +vision = ["Pillow (>=9.4.0)"] + +[[package]] +name = "debugpy" +version = "1.8.20" +description = "An implementation of the Debug Adapter Protocol for Python" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "debugpy-1.8.20-cp310-cp310-macosx_15_0_x86_64.whl", hash = "sha256:157e96ffb7f80b3ad36d808646198c90acb46fdcfd8bb1999838f0b6f2b59c64"}, + {file = "debugpy-1.8.20-cp310-cp310-manylinux_2_34_x86_64.whl", hash = "sha256:c1178ae571aff42e61801a38b007af504ec8e05fde1c5c12e5a7efef21009642"}, + {file = "debugpy-1.8.20-cp310-cp310-win32.whl", hash = "sha256:c29dd9d656c0fbd77906a6e6a82ae4881514aa3294b94c903ff99303e789b4a2"}, + {file = "debugpy-1.8.20-cp310-cp310-win_amd64.whl", hash = "sha256:3ca85463f63b5dd0aa7aaa933d97cbc47c174896dcae8431695872969f981893"}, + {file = "debugpy-1.8.20-cp311-cp311-macosx_15_0_universal2.whl", hash = "sha256:eada6042ad88fa1571b74bd5402ee8b86eded7a8f7b827849761700aff171f1b"}, + {file = "debugpy-1.8.20-cp311-cp311-manylinux_2_34_x86_64.whl", hash = "sha256:7de0b7dfeedc504421032afba845ae2a7bcc32ddfb07dae2c3ca5442f821c344"}, + {file = "debugpy-1.8.20-cp311-cp311-win32.whl", hash = "sha256:773e839380cf459caf73cc533ea45ec2737a5cc184cf1b3b796cd4fd98504fec"}, + {file = "debugpy-1.8.20-cp311-cp311-win_amd64.whl", hash = "sha256:1f7650546e0eded1902d0f6af28f787fa1f1dbdbc97ddabaf1cd963a405930cb"}, + {file = "debugpy-1.8.20-cp312-cp312-macosx_15_0_universal2.whl", hash = "sha256:4ae3135e2089905a916909ef31922b2d733d756f66d87345b3e5e52b7a55f13d"}, + {file = "debugpy-1.8.20-cp312-cp312-manylinux_2_34_x86_64.whl", hash = "sha256:88f47850a4284b88bd2bfee1f26132147d5d504e4e86c22485dfa44b97e19b4b"}, + {file = "debugpy-1.8.20-cp312-cp312-win32.whl", hash = "sha256:4057ac68f892064e5f98209ab582abfee3b543fb55d2e87610ddc133a954d390"}, + {file = "debugpy-1.8.20-cp312-cp312-win_amd64.whl", hash = "sha256:a1a8f851e7cf171330679ef6997e9c579ef6dd33c9098458bd9986a0f4ca52e3"}, + {file = "debugpy-1.8.20-cp313-cp313-macosx_15_0_universal2.whl", hash = "sha256:5dff4bb27027821fdfcc9e8f87309a28988231165147c31730128b1c983e282a"}, + {file = "debugpy-1.8.20-cp313-cp313-manylinux_2_34_x86_64.whl", hash = "sha256:84562982dd7cf5ebebfdea667ca20a064e096099997b175fe204e86817f64eaf"}, + {file = "debugpy-1.8.20-cp313-cp313-win32.whl", hash = "sha256:da11dea6447b2cadbf8ce2bec59ecea87cc18d2c574980f643f2d2dfe4862393"}, + {file = "debugpy-1.8.20-cp313-cp313-win_amd64.whl", hash = "sha256:eb506e45943cab2efb7c6eafdd65b842f3ae779f020c82221f55aca9de135ed7"}, + {file = "debugpy-1.8.20-cp314-cp314-macosx_15_0_universal2.whl", hash = "sha256:9c74df62fc064cd5e5eaca1353a3ef5a5d50da5eb8058fcef63106f7bebe6173"}, + {file = "debugpy-1.8.20-cp314-cp314-manylinux_2_34_x86_64.whl", hash = "sha256:077a7447589ee9bc1ff0cdf443566d0ecf540ac8aa7333b775ebcb8ce9f4ecad"}, + {file = "debugpy-1.8.20-cp314-cp314-win32.whl", hash = "sha256:352036a99dd35053b37b7803f748efc456076f929c6a895556932eaf2d23b07f"}, + {file = "debugpy-1.8.20-cp314-cp314-win_amd64.whl", hash = "sha256:a98eec61135465b062846112e5ecf2eebb855305acc1dfbae43b72903b8ab5be"}, + {file = "debugpy-1.8.20-cp38-cp38-macosx_15_0_x86_64.whl", hash = "sha256:b773eb026a043e4d9c76265742bc846f2f347da7e27edf7fe97716ea19d6bfc5"}, + {file = "debugpy-1.8.20-cp38-cp38-manylinux_2_34_x86_64.whl", hash = "sha256:20d6e64ea177ab6732bffd3ce8fc6fb8879c60484ce14c3b3fe183b1761459ca"}, + {file = "debugpy-1.8.20-cp38-cp38-win32.whl", hash = "sha256:0dfd9adb4b3c7005e9c33df430bcdd4e4ebba70be533e0066e3a34d210041b66"}, + {file = "debugpy-1.8.20-cp38-cp38-win_amd64.whl", hash = "sha256:60f89411a6c6afb89f18e72e9091c3dfbcfe3edc1066b2043a1f80a3bbb3e11f"}, + {file = "debugpy-1.8.20-cp39-cp39-macosx_15_0_x86_64.whl", hash = "sha256:bff8990f040dacb4c314864da95f7168c5a58a30a66e0eea0fb85e2586a92cd6"}, + {file = "debugpy-1.8.20-cp39-cp39-manylinux_2_34_x86_64.whl", hash = "sha256:70ad9ae09b98ac307b82c16c151d27ee9d68ae007a2e7843ba621b5ce65333b5"}, + {file = "debugpy-1.8.20-cp39-cp39-win32.whl", hash = "sha256:9eeed9f953f9a23850c85d440bf51e3c56ed5d25f8560eeb29add815bd32f7ee"}, + {file = "debugpy-1.8.20-cp39-cp39-win_amd64.whl", hash = "sha256:760813b4fff517c75bfe7923033c107104e76acfef7bda011ffea8736e9a66f8"}, + {file = "debugpy-1.8.20-py2.py3-none-any.whl", hash = "sha256:5be9bed9ae3be00665a06acaa48f8329d2b9632f15fd09f6a9a8c8d9907e54d7"}, + {file = "debugpy-1.8.20.tar.gz", hash = "sha256:55bc8701714969f1ab89a6d5f2f3d40c36f91b2cbe2f65d98bf8196f6a6a2c33"}, +] + +[[package]] +name = "decorator" +version = "5.2.1" +description = "Decorators for Humans" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "decorator-5.2.1-py3-none-any.whl", hash = "sha256:d316bb415a2d9e2d2b3abcc4084c6502fc09240e292cd76a76afc106a1c8e04a"}, + {file = "decorator-5.2.1.tar.gz", hash = "sha256:65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360"}, +] + +[[package]] +name = "diffusers" +version = "0.37.0" +description = "State-of-the-art diffusion in PyTorch and JAX." +optional = false +python-versions = ">=3.10.0" +groups = ["main"] +files = [ + {file = "diffusers-0.37.0-py3-none-any.whl", hash = "sha256:7eab74bf896974250b5e1027cae813aba1004f02d97c9b44891b83713386aa08"}, + {file = "diffusers-0.37.0.tar.gz", hash = "sha256:408789af73898585f525afd07ca72b3955affea4216a669558e9f59b5b1fe704"}, +] + +[package.dependencies] +filelock = "*" +httpx = "<1.0.0" +huggingface-hub = ">=0.34.0,<2.0" +importlib_metadata = "*" +numpy = "*" +Pillow = "*" +regex = "!=2019.12.17" +requests = "*" +safetensors = ">=0.3.1" + +[package.extras] +bitsandbytes = ["accelerate (>=0.31.0)", "bitsandbytes (>=0.43.3)"] +dev = ["GitPython (<3.1.19)", "Jinja2", "Jinja2", "accelerate (>=0.31.0)", "accelerate (>=0.31.0)", "compel (==0.1.8)", "datasets", "datasets", "flax (>=0.4.1)", "ftfy", "hf-doc-builder (>=0.3.0)", "hf-doc-builder (>=0.3.0)", "invisible-watermark (>=0.2.0)", "isort (>=5.5.4)", "jax (>=0.4.1)", "jaxlib (>=0.4.1)", "librosa", "parameterized", "peft (>=0.17.0)", "phonemizer", "protobuf (>=3.20.3,<4)", "protobuf (>=3.20.3,<4)", "pytest", "pytest-timeout", "pytest-xdist", "requests-mock (==1.10.0)", "ruff (==0.9.10)", "safetensors (>=0.3.1)", "scipy", "sentencepiece (>=0.1.91,!=0.1.92)", "tensorboard", "tiktoken (>=0.7.0)", "timm", "torch (>=1.4)", "torchsde", "torchvision", "transformers (>=4.41.2)", "urllib3 (<=2.0.0)"] +docs = ["hf-doc-builder (>=0.3.0)"] +flax = ["flax (>=0.4.1)", "jax (>=0.4.1)", "jaxlib (>=0.4.1)"] +gguf = ["accelerate (>=0.31.0)", "gguf (>=0.10.0)"] +nvidia-modelopt = ["nvidia_modelopt[hf] (>=0.33.1)"] +optimum-quanto = ["accelerate (>=0.31.0)", "optimum_quanto (>=0.2.6)"] +quality = ["hf-doc-builder (>=0.3.0)", "isort (>=5.5.4)", "ruff (==0.9.10)", "urllib3 (<=2.0.0)"] +test = ["GitPython (<3.1.19)", "Jinja2", "compel (==0.1.8)", "datasets", "ftfy", "invisible-watermark (>=0.2.0)", "librosa", "parameterized", "phonemizer", "protobuf (>=3.20.3,<4)", "pytest", "pytest-timeout", "pytest-xdist", "requests-mock (==1.10.0)", "safetensors (>=0.3.1)", "scipy", "sentencepiece (>=0.1.91,!=0.1.92)", "tiktoken (>=0.7.0)", "torchsde", "torchvision", "transformers (>=4.41.2)"] +torch = ["accelerate (>=0.31.0)", "torch (>=1.4)"] +torchao = ["accelerate (>=0.31.0)", "torchao (>=0.7.0)"] +training = ["Jinja2", "accelerate (>=0.31.0)", "datasets", "peft (>=0.17.0)", "protobuf (>=3.20.3,<4)", "tensorboard", "timm"] + +[[package]] +name = "dill" +version = "0.4.0" +description = "serialize all of Python" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "dill-0.4.0-py3-none-any.whl", hash = "sha256:44f54bf6412c2c8464c14e8243eb163690a9800dbe2c367330883b19c7561049"}, + {file = "dill-0.4.0.tar.gz", hash = "sha256:0633f1d2df477324f53a895b02c901fb961bdbf65a17122586ea7019292cbcf0"}, +] + +[package.extras] +graph = ["objgraph (>=1.7.2)"] +profile = ["gprof2dot (>=2022.7.29)"] + +[[package]] +name = "distro" +version = "1.9.0" +description = "Distro - an OS platform information API" +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2"}, + {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, +] + +[[package]] +name = "dnspython" +version = "2.8.0" +description = "DNS toolkit" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "dnspython-2.8.0-py3-none-any.whl", hash = "sha256:01d9bbc4a2d76bf0db7c1f729812ded6d912bd318d3b1cf81d30c0f845dbf3af"}, + {file = "dnspython-2.8.0.tar.gz", hash = "sha256:181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f"}, +] + +[package.extras] +dev = ["black (>=25.1.0)", "coverage (>=7.0)", "flake8 (>=7)", "hypercorn (>=0.17.0)", "mypy (>=1.17)", "pylint (>=3)", "pytest (>=8.4)", "pytest-cov (>=6.2.0)", "quart-trio (>=0.12.0)", "sphinx (>=8.2.0)", "sphinx-rtd-theme (>=3.0.0)", "twine (>=6.1.0)", "wheel (>=0.45.0)"] +dnssec = ["cryptography (>=45)"] +doh = ["h2 (>=4.2.0)", "httpcore (>=1.0.0)", "httpx (>=0.28.0)"] +doq = ["aioquic (>=1.2.0)"] +idna = ["idna (>=3.10)"] +trio = ["trio (>=0.30)"] +wmi = ["wmi (>=1.5.1) ; platform_system == \"Windows\""] + +[[package]] +name = "docstring-parser" +version = "0.17.0" +description = "Parse Python docstrings in reST, Google and Numpydoc format" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "docstring_parser-0.17.0-py3-none-any.whl", hash = "sha256:cf2569abd23dce8099b300f9b4fa8191e9582dda731fd533daf54c4551658708"}, + {file = "docstring_parser-0.17.0.tar.gz", hash = "sha256:583de4a309722b3315439bb31d64ba3eebada841f2e2cee23b99df001434c912"}, +] + +[package.extras] +dev = ["pre-commit (>=2.16.0) ; python_version >= \"3.9\"", "pydoctor (>=25.4.0)", "pytest"] +docs = ["pydoctor (>=25.4.0)"] +test = ["pytest"] + +[[package]] +name = "docutils" +version = "0.22.4" +description = "Docutils -- Python Documentation Utilities" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "docutils-0.22.4-py3-none-any.whl", hash = "sha256:d0013f540772d1420576855455d050a2180186c91c15779301ac2ccb3eeb68de"}, + {file = "docutils-0.22.4.tar.gz", hash = "sha256:4db53b1fde9abecbb74d91230d32ab626d94f6badfc575d6db9194a49df29968"}, +] + +[[package]] +name = "email-validator" +version = "2.3.0" +description = "A robust email address syntax and deliverability validation library." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "email_validator-2.3.0-py3-none-any.whl", hash = "sha256:80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4"}, + {file = "email_validator-2.3.0.tar.gz", hash = "sha256:9fc05c37f2f6cf439ff414f8fc46d917929974a82244c20eb10231ba60c54426"}, +] + +[package.dependencies] +dnspython = ">=2.0.0" +idna = ">=2.0.0" + +[[package]] +name = "exceptiongroup" +version = "1.3.1" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598"}, + {file = "exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.6.0", markers = "python_version < \"3.13\""} + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "executing" +version = "2.2.1" +description = "Get the currently executing AST node of a frame, and other information" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "executing-2.2.1-py2.py3-none-any.whl", hash = "sha256:760643d3452b4d777d295bb167ccc74c64a81df23fb5e08eff250c425a4b2017"}, + {file = "executing-2.2.1.tar.gz", hash = "sha256:3632cc370565f6648cc328b32435bd120a1e4ebb20c77e3fdde9a13cd1e533c4"}, +] + +[package.extras] +tests = ["asttokens (>=2.1.0)", "coverage", "coverage-enable-subprocess", "ipython", "littleutils", "pytest", "rich ; python_version >= \"3.11\""] + +[[package]] +name = "fastapi" +version = "0.135.1" +description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "fastapi-0.135.1-py3-none-any.whl", hash = "sha256:46e2fc5745924b7c840f71ddd277382af29ce1cdb7d5eab5bf697e3fb9999c9e"}, + {file = "fastapi-0.135.1.tar.gz", hash = "sha256:d04115b508d936d254cea545b7312ecaa58a7b3a0f84952535b4c9afae7668cd"}, +] + +[package.dependencies] +annotated-doc = ">=0.0.2" +pydantic = ">=2.7.0" +starlette = ">=0.46.0" +typing-extensions = ">=4.8.0" +typing-inspection = ">=0.4.2" + +[package.extras] +all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=3.1.5)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "pyyaml (>=5.3.1)", "uvicorn[standard] (>=0.12.0)"] +standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "jinja2 (>=3.1.5)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] +standard-no-fastapi-cloud-cli = ["email-validator (>=2.0.0)", "fastapi-cli[standard-no-fastapi-cloud-cli] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "jinja2 (>=3.1.5)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] + +[[package]] +name = "fastmcp" +version = "3.1.0" +description = "The fast, Pythonic way to build MCP servers and clients." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "fastmcp-3.1.0-py3-none-any.whl", hash = "sha256:b1f73b56fd3b0cb2bd9e2a144fc650d5cc31587ed129d996db7710e464ae8010"}, + {file = "fastmcp-3.1.0.tar.gz", hash = "sha256:e25264794c734b9977502a51466961eeecff92a0c2f3b49c40c070993628d6d0"}, +] + +[package.dependencies] +authlib = ">=1.6.5" +cyclopts = ">=4.0.0" +exceptiongroup = ">=1.2.2" +httpx = ">=0.28.1,<1.0" +jsonref = ">=1.1.0" +jsonschema-path = ">=0.3.4" +mcp = ">=1.24.0,<2.0" +openapi-pydantic = ">=0.5.1" +opentelemetry-api = ">=1.20.0" +packaging = ">=24.0" +platformdirs = ">=4.0.0" +py-key-value-aio = {version = ">=0.4.4,<0.5.0", extras = ["filetree", "keyring", "memory"]} +pydantic = {version = ">=2.11.7", extras = ["email"]} +pyperclip = ">=1.9.0" +python-dotenv = ">=1.1.0" +pyyaml = ">=6.0,<7.0" +rich = ">=13.9.4" +uncalled-for = ">=0.2.0" +uvicorn = ">=0.35" +watchfiles = ">=1.0.0" +websockets = ">=15.0.1" + +[package.extras] +anthropic = ["anthropic (>=0.40.0)"] +apps = ["prefab-ui (>=0.6.0)"] +azure = ["azure-identity (>=1.16.0)"] +code-mode = ["pydantic-monty (>=0.0.7)"] +gemini = ["google-genai (>=1.18.0)"] +openai = ["openai (>=1.102.0)"] +tasks = ["pydocket (>=0.18.0)"] + +[[package]] +name = "filelock" +version = "3.25.0" +description = "A platform independent file lock." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "filelock-3.25.0-py3-none-any.whl", hash = "sha256:5ccf8069f7948f494968fc0713c10e5c182a9c9d9eef3a636307a20c2490f047"}, + {file = "filelock-3.25.0.tar.gz", hash = "sha256:8f00faf3abf9dc730a1ffe9c354ae5c04e079ab7d3a683b7c32da5dd05f26af3"}, +] + +[[package]] +name = "fonttools" +version = "4.61.1" +description = "Tools to manipulate font files" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "fonttools-4.61.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c7db70d57e5e1089a274cbb2b1fd635c9a24de809a231b154965d415d6c6d24"}, + {file = "fonttools-4.61.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5fe9fd43882620017add5eabb781ebfbc6998ee49b35bd7f8f79af1f9f99a958"}, + {file = "fonttools-4.61.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d8db08051fc9e7d8bc622f2112511b8107d8f27cd89e2f64ec45e9825e8288da"}, + {file = "fonttools-4.61.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a76d4cb80f41ba94a6691264be76435e5f72f2cb3cab0b092a6212855f71c2f6"}, + {file = "fonttools-4.61.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a13fc8aeb24bad755eea8f7f9d409438eb94e82cf86b08fe77a03fbc8f6a96b1"}, + {file = "fonttools-4.61.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b846a1fcf8beadeb9ea4f44ec5bdde393e2f1569e17d700bfc49cd69bde75881"}, + {file = "fonttools-4.61.1-cp310-cp310-win32.whl", hash = "sha256:78a7d3ab09dc47ac1a363a493e6112d8cabed7ba7caad5f54dbe2f08676d1b47"}, + {file = "fonttools-4.61.1-cp310-cp310-win_amd64.whl", hash = "sha256:eff1ac3cc66c2ac7cda1e64b4e2f3ffef474b7335f92fc3833fc632d595fcee6"}, + {file = "fonttools-4.61.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c6604b735bb12fef8e0efd5578c9fb5d3d8532d5001ea13a19cddf295673ee09"}, + {file = "fonttools-4.61.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5ce02f38a754f207f2f06557523cd39a06438ba3aafc0639c477ac409fc64e37"}, + {file = "fonttools-4.61.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77efb033d8d7ff233385f30c62c7c79271c8885d5c9657d967ede124671bbdfb"}, + {file = "fonttools-4.61.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:75c1a6dfac6abd407634420c93864a1e274ebc1c7531346d9254c0d8f6ca00f9"}, + {file = "fonttools-4.61.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0de30bfe7745c0d1ffa2b0b7048fb7123ad0d71107e10ee090fa0b16b9452e87"}, + {file = "fonttools-4.61.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:58b0ee0ab5b1fc9921eccfe11d1435added19d6494dde14e323f25ad2bc30c56"}, + {file = "fonttools-4.61.1-cp311-cp311-win32.whl", hash = "sha256:f79b168428351d11e10c5aeb61a74e1851ec221081299f4cf56036a95431c43a"}, + {file = "fonttools-4.61.1-cp311-cp311-win_amd64.whl", hash = "sha256:fe2efccb324948a11dd09d22136fe2ac8a97d6c1347cf0b58a911dcd529f66b7"}, + {file = "fonttools-4.61.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f3cb4a569029b9f291f88aafc927dd53683757e640081ca8c412781ea144565e"}, + {file = "fonttools-4.61.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41a7170d042e8c0024703ed13b71893519a1a6d6e18e933e3ec7507a2c26a4b2"}, + {file = "fonttools-4.61.1-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:10d88e55330e092940584774ee5e8a6971b01fc2f4d3466a1d6c158230880796"}, + {file = "fonttools-4.61.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:15acc09befd16a0fb8a8f62bc147e1a82817542d72184acca9ce6e0aeda9fa6d"}, + {file = "fonttools-4.61.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e6bcdf33aec38d16508ce61fd81838f24c83c90a1d1b8c68982857038673d6b8"}, + {file = "fonttools-4.61.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5fade934607a523614726119164ff621e8c30e8fa1ffffbbd358662056ba69f0"}, + {file = "fonttools-4.61.1-cp312-cp312-win32.whl", hash = "sha256:75da8f28eff26defba42c52986de97b22106cb8f26515b7c22443ebc9c2d3261"}, + {file = "fonttools-4.61.1-cp312-cp312-win_amd64.whl", hash = "sha256:497c31ce314219888c0e2fce5ad9178ca83fe5230b01a5006726cdf3ac9f24d9"}, + {file = "fonttools-4.61.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8c56c488ab471628ff3bfa80964372fc13504ece601e0d97a78ee74126b2045c"}, + {file = "fonttools-4.61.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dc492779501fa723b04d0ab1f5be046797fee17d27700476edc7ee9ae535a61e"}, + {file = "fonttools-4.61.1-cp313-cp313-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:64102ca87e84261419c3747a0d20f396eb024bdbeb04c2bfb37e2891f5fadcb5"}, + {file = "fonttools-4.61.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4c1b526c8d3f615a7b1867f38a9410849c8f4aef078535742198e942fba0e9bd"}, + {file = "fonttools-4.61.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:41ed4b5ec103bd306bb68f81dc166e77409e5209443e5773cb4ed837bcc9b0d3"}, + {file = "fonttools-4.61.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b501c862d4901792adaec7c25b1ecc749e2662543f68bb194c42ba18d6eec98d"}, + {file = "fonttools-4.61.1-cp313-cp313-win32.whl", hash = "sha256:4d7092bb38c53bbc78e9255a59158b150bcdc115a1e3b3ce0b5f267dc35dd63c"}, + {file = "fonttools-4.61.1-cp313-cp313-win_amd64.whl", hash = "sha256:21e7c8d76f62ab13c9472ccf74515ca5b9a761d1bde3265152a6dc58700d895b"}, + {file = "fonttools-4.61.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fff4f534200a04b4a36e7ae3cb74493afe807b517a09e99cb4faa89a34ed6ecd"}, + {file = "fonttools-4.61.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d9203500f7c63545b4ce3799319fe4d9feb1a1b89b28d3cb5abd11b9dd64147e"}, + {file = "fonttools-4.61.1-cp314-cp314-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fa646ecec9528bef693415c79a86e733c70a4965dd938e9a226b0fc64c9d2e6c"}, + {file = "fonttools-4.61.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:11f35ad7805edba3aac1a3710d104592df59f4b957e30108ae0ba6c10b11dd75"}, + {file = "fonttools-4.61.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b931ae8f62db78861b0ff1ac017851764602288575d65b8e8ff1963fed419063"}, + {file = "fonttools-4.61.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b148b56f5de675ee16d45e769e69f87623a4944f7443850bf9a9376e628a89d2"}, + {file = "fonttools-4.61.1-cp314-cp314-win32.whl", hash = "sha256:9b666a475a65f4e839d3d10473fad6d47e0a9db14a2f4a224029c5bfde58ad2c"}, + {file = "fonttools-4.61.1-cp314-cp314-win_amd64.whl", hash = "sha256:4f5686e1fe5fce75d82d93c47a438a25bf0d1319d2843a926f741140b2b16e0c"}, + {file = "fonttools-4.61.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:e76ce097e3c57c4bcb67c5aa24a0ecdbd9f74ea9219997a707a4061fbe2707aa"}, + {file = "fonttools-4.61.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:9cfef3ab326780c04d6646f68d4b4742aae222e8b8ea1d627c74e38afcbc9d91"}, + {file = "fonttools-4.61.1-cp314-cp314t-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a75c301f96db737e1c5ed5fd7d77d9c34466de16095a266509e13da09751bd19"}, + {file = "fonttools-4.61.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:91669ccac46bbc1d09e9273546181919064e8df73488ea087dcac3e2968df9ba"}, + {file = "fonttools-4.61.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c33ab3ca9d3ccd581d58e989d67554e42d8d4ded94ab3ade3508455fe70e65f7"}, + {file = "fonttools-4.61.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:664c5a68ec406f6b1547946683008576ef8b38275608e1cee6c061828171c118"}, + {file = "fonttools-4.61.1-cp314-cp314t-win32.whl", hash = "sha256:aed04cabe26f30c1647ef0e8fbb207516fd40fe9472e9439695f5c6998e60ac5"}, + {file = "fonttools-4.61.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2180f14c141d2f0f3da43f3a81bc8aa4684860f6b0e6f9e165a4831f24e6a23b"}, + {file = "fonttools-4.61.1-py3-none-any.whl", hash = "sha256:17d2bf5d541add43822bcf0c43d7d847b160c9bb01d15d5007d84e2217aaa371"}, + {file = "fonttools-4.61.1.tar.gz", hash = "sha256:6675329885c44657f826ef01d9e4fb33b9158e9d93c537d84ad8399539bc6f69"}, +] + +[package.extras] +all = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "lxml (>=4.0)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\"", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.45.0)", "unicodedata2 (>=17.0.0) ; python_version <= \"3.14\"", "xattr ; sys_platform == \"darwin\"", "zopfli (>=0.1.4)"] +graphite = ["lz4 (>=1.7.4.2)"] +interpolatable = ["munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\""] +lxml = ["lxml (>=4.0)"] +pathops = ["skia-pathops (>=0.5.0)"] +plot = ["matplotlib"] +repacker = ["uharfbuzz (>=0.45.0)"] +symfont = ["sympy"] +type1 = ["xattr ; sys_platform == \"darwin\""] +unicode = ["unicodedata2 (>=17.0.0) ; python_version <= \"3.14\""] +woff = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "zopfli (>=0.1.4)"] + +[[package]] +name = "frozenlist" +version = "1.8.0" +description = "A list-like structure which implements collections.abc.MutableSequence" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "frozenlist-1.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b37f6d31b3dcea7deb5e9696e529a6aa4a898adc33db82da12e4c60a7c4d2011"}, + {file = "frozenlist-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef2b7b394f208233e471abc541cc6991f907ffd47dc72584acee3147899d6565"}, + {file = "frozenlist-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a88f062f072d1589b7b46e951698950e7da00442fc1cacbe17e19e025dc327ad"}, + {file = "frozenlist-1.8.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f57fb59d9f385710aa7060e89410aeb5058b99e62f4d16b08b91986b9a2140c2"}, + {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:799345ab092bee59f01a915620b5d014698547afd011e691a208637312db9186"}, + {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c23c3ff005322a6e16f71bf8692fcf4d5a304aaafe1e262c98c6d4adc7be863e"}, + {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8a76ea0f0b9dfa06f254ee06053d93a600865b3274358ca48a352ce4f0798450"}, + {file = "frozenlist-1.8.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c7366fe1418a6133d5aa824ee53d406550110984de7637d65a178010f759c6ef"}, + {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13d23a45c4cebade99340c4165bd90eeb4a56c6d8a9d8aa49568cac19a6d0dc4"}, + {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:e4a3408834f65da56c83528fb52ce7911484f0d1eaf7b761fc66001db1646eff"}, + {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:42145cd2748ca39f32801dad54aeea10039da6f86e303659db90db1c4b614c8c"}, + {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e2de870d16a7a53901e41b64ffdf26f2fbb8917b3e6ebf398098d72c5b20bd7f"}, + {file = "frozenlist-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:20e63c9493d33ee48536600d1a5c95eefc870cd71e7ab037763d1fbb89cc51e7"}, + {file = "frozenlist-1.8.0-cp310-cp310-win32.whl", hash = "sha256:adbeebaebae3526afc3c96fad434367cafbfd1b25d72369a9e5858453b1bb71a"}, + {file = "frozenlist-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:667c3777ca571e5dbeb76f331562ff98b957431df140b54c85fd4d52eea8d8f6"}, + {file = "frozenlist-1.8.0-cp310-cp310-win_arm64.whl", hash = "sha256:80f85f0a7cc86e7a54c46d99c9e1318ff01f4687c172ede30fd52d19d1da1c8e"}, + {file = "frozenlist-1.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:09474e9831bc2b2199fad6da3c14c7b0fbdd377cce9d3d77131be28906cb7d84"}, + {file = "frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:17c883ab0ab67200b5f964d2b9ed6b00971917d5d8a92df149dc2c9779208ee9"}, + {file = "frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa47e444b8ba08fffd1c18e8cdb9a75db1b6a27f17507522834ad13ed5922b93"}, + {file = "frozenlist-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2552f44204b744fba866e573be4c1f9048d6a324dfe14475103fd51613eb1d1f"}, + {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:957e7c38f250991e48a9a73e6423db1bb9dd14e722a10f6b8bb8e16a0f55f695"}, + {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8585e3bb2cdea02fc88ffa245069c36555557ad3609e83be0ec71f54fd4abb52"}, + {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:edee74874ce20a373d62dc28b0b18b93f645633c2943fd90ee9d898550770581"}, + {file = "frozenlist-1.8.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c9a63152fe95756b85f31186bddf42e4c02c6321207fd6601a1c89ebac4fe567"}, + {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b6db2185db9be0a04fecf2f241c70b63b1a242e2805be291855078f2b404dd6b"}, + {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f4be2e3d8bc8aabd566f8d5b8ba7ecc09249d74ba3c9ed52e54dc23a293f0b92"}, + {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c8d1634419f39ea6f5c427ea2f90ca85126b54b50837f31497f3bf38266e853d"}, + {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a7fa382a4a223773ed64242dbe1c9c326ec09457e6b8428efb4118c685c3dfd"}, + {file = "frozenlist-1.8.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:11847b53d722050808926e785df837353bd4d75f1d494377e59b23594d834967"}, + {file = "frozenlist-1.8.0-cp311-cp311-win32.whl", hash = "sha256:27c6e8077956cf73eadd514be8fb04d77fc946a7fe9f7fe167648b0b9085cc25"}, + {file = "frozenlist-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:ac913f8403b36a2c8610bbfd25b8013488533e71e62b4b4adce9c86c8cea905b"}, + {file = "frozenlist-1.8.0-cp311-cp311-win_arm64.whl", hash = "sha256:d4d3214a0f8394edfa3e303136d0575eece0745ff2b47bd2cb2e66dd92d4351a"}, + {file = "frozenlist-1.8.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:78f7b9e5d6f2fdb88cdde9440dc147259b62b9d3b019924def9f6478be254ac1"}, + {file = "frozenlist-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:229bf37d2e4acdaf808fd3f06e854a4a7a3661e871b10dc1f8f1896a3b05f18b"}, + {file = "frozenlist-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f833670942247a14eafbb675458b4e61c82e002a148f49e68257b79296e865c4"}, + {file = "frozenlist-1.8.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:494a5952b1c597ba44e0e78113a7266e656b9794eec897b19ead706bd7074383"}, + {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96f423a119f4777a4a056b66ce11527366a8bb92f54e541ade21f2374433f6d4"}, + {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3462dd9475af2025c31cc61be6652dfa25cbfb56cbbf52f4ccfe029f38decaf8"}, + {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4c800524c9cd9bac5166cd6f55285957fcfc907db323e193f2afcd4d9abd69b"}, + {file = "frozenlist-1.8.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d6a5df73acd3399d893dafc71663ad22534b5aa4f94e8a2fabfe856c3c1b6a52"}, + {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:405e8fe955c2280ce66428b3ca55e12b3c4e9c336fb2103a4937e891c69a4a29"}, + {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:908bd3f6439f2fef9e85031b59fd4f1297af54415fb60e4254a95f75b3cab3f3"}, + {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:294e487f9ec720bd8ffcebc99d575f7eff3568a08a253d1ee1a0378754b74143"}, + {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:74c51543498289c0c43656701be6b077f4b265868fa7f8a8859c197006efb608"}, + {file = "frozenlist-1.8.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:776f352e8329135506a1d6bf16ac3f87bc25b28e765949282dcc627af36123aa"}, + {file = "frozenlist-1.8.0-cp312-cp312-win32.whl", hash = "sha256:433403ae80709741ce34038da08511d4a77062aa924baf411ef73d1146e74faf"}, + {file = "frozenlist-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:34187385b08f866104f0c0617404c8eb08165ab1272e884abc89c112e9c00746"}, + {file = "frozenlist-1.8.0-cp312-cp312-win_arm64.whl", hash = "sha256:fe3c58d2f5db5fbd18c2987cba06d51b0529f52bc3a6cdc33d3f4eab725104bd"}, + {file = "frozenlist-1.8.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8d92f1a84bb12d9e56f818b3a746f3efba93c1b63c8387a73dde655e1e42282a"}, + {file = "frozenlist-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:96153e77a591c8adc2ee805756c61f59fef4cf4073a9275ee86fe8cba41241f7"}, + {file = "frozenlist-1.8.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f21f00a91358803399890ab167098c131ec2ddd5f8f5fd5fe9c9f2c6fcd91e40"}, + {file = "frozenlist-1.8.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fb30f9626572a76dfe4293c7194a09fb1fe93ba94c7d4f720dfae3b646b45027"}, + {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaa352d7047a31d87dafcacbabe89df0aa506abb5b1b85a2fb91bc3faa02d822"}, + {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:03ae967b4e297f58f8c774c7eabcce57fe3c2434817d4385c50661845a058121"}, + {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f6292f1de555ffcc675941d65fffffb0a5bcd992905015f85d0592201793e0e5"}, + {file = "frozenlist-1.8.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29548f9b5b5e3460ce7378144c3010363d8035cea44bc0bf02d57f5a685e084e"}, + {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ec3cc8c5d4084591b4237c0a272cc4f50a5b03396a47d9caaf76f5d7b38a4f11"}, + {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:517279f58009d0b1f2e7c1b130b377a349405da3f7621ed6bfae50b10adf20c1"}, + {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:db1e72ede2d0d7ccb213f218df6a078a9c09a7de257c2fe8fcef16d5925230b1"}, + {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b4dec9482a65c54a5044486847b8a66bf10c9cb4926d42927ec4e8fd5db7fed8"}, + {file = "frozenlist-1.8.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:21900c48ae04d13d416f0e1e0c4d81f7931f73a9dfa0b7a8746fb2fe7dd970ed"}, + {file = "frozenlist-1.8.0-cp313-cp313-win32.whl", hash = "sha256:8b7b94a067d1c504ee0b16def57ad5738701e4ba10cec90529f13fa03c833496"}, + {file = "frozenlist-1.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:878be833caa6a3821caf85eb39c5ba92d28e85df26d57afb06b35b2efd937231"}, + {file = "frozenlist-1.8.0-cp313-cp313-win_arm64.whl", hash = "sha256:44389d135b3ff43ba8cc89ff7f51f5a0bb6b63d829c8300f79a2fe4fe61bcc62"}, + {file = "frozenlist-1.8.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:e25ac20a2ef37e91c1b39938b591457666a0fa835c7783c3a8f33ea42870db94"}, + {file = "frozenlist-1.8.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07cdca25a91a4386d2e76ad992916a85038a9b97561bf7a3fd12d5d9ce31870c"}, + {file = "frozenlist-1.8.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4e0c11f2cc6717e0a741f84a527c52616140741cd812a50422f83dc31749fb52"}, + {file = "frozenlist-1.8.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b3210649ee28062ea6099cfda39e147fa1bc039583c8ee4481cb7811e2448c51"}, + {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:581ef5194c48035a7de2aefc72ac6539823bb71508189e5de01d60c9dcd5fa65"}, + {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3ef2d026f16a2b1866e1d86fc4e1291e1ed8a387b2c333809419a2f8b3a77b82"}, + {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5500ef82073f599ac84d888e3a8c1f77ac831183244bfd7f11eaa0289fb30714"}, + {file = "frozenlist-1.8.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:50066c3997d0091c411a66e710f4e11752251e6d2d73d70d8d5d4c76442a199d"}, + {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:5c1c8e78426e59b3f8005e9b19f6ff46e5845895adbde20ece9218319eca6506"}, + {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:eefdba20de0d938cec6a89bd4d70f346a03108a19b9df4248d3cf0d88f1b0f51"}, + {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cf253e0e1c3ceb4aaff6df637ce033ff6535fb8c70a764a8f46aafd3d6ab798e"}, + {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:032efa2674356903cd0261c4317a561a6850f3ac864a63fc1583147fb05a79b0"}, + {file = "frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6da155091429aeba16851ecb10a9104a108bcd32f6c1642867eadaee401c1c41"}, + {file = "frozenlist-1.8.0-cp313-cp313t-win32.whl", hash = "sha256:0f96534f8bfebc1a394209427d0f8a63d343c9779cda6fc25e8e121b5fd8555b"}, + {file = "frozenlist-1.8.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5d63a068f978fc69421fb0e6eb91a9603187527c86b7cd3f534a5b77a592b888"}, + {file = "frozenlist-1.8.0-cp313-cp313t-win_arm64.whl", hash = "sha256:bf0a7e10b077bf5fb9380ad3ae8ce20ef919a6ad93b4552896419ac7e1d8e042"}, + {file = "frozenlist-1.8.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cee686f1f4cadeb2136007ddedd0aaf928ab95216e7691c63e50a8ec066336d0"}, + {file = "frozenlist-1.8.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:119fb2a1bd47307e899c2fac7f28e85b9a543864df47aa7ec9d3c1b4545f096f"}, + {file = "frozenlist-1.8.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4970ece02dbc8c3a92fcc5228e36a3e933a01a999f7094ff7c23fbd2beeaa67c"}, + {file = "frozenlist-1.8.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:cba69cb73723c3f329622e34bdbf5ce1f80c21c290ff04256cff1cd3c2036ed2"}, + {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:778a11b15673f6f1df23d9586f83c4846c471a8af693a22e066508b77d201ec8"}, + {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0325024fe97f94c41c08872db482cf8ac4800d80e79222c6b0b7b162d5b13686"}, + {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:97260ff46b207a82a7567b581ab4190bd4dfa09f4db8a8b49d1a958f6aa4940e"}, + {file = "frozenlist-1.8.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:54b2077180eb7f83dd52c40b2750d0a9f175e06a42e3213ce047219de902717a"}, + {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2f05983daecab868a31e1da44462873306d3cbfd76d1f0b5b69c473d21dbb128"}, + {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:33f48f51a446114bc5d251fb2954ab0164d5be02ad3382abcbfe07e2531d650f"}, + {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:154e55ec0655291b5dd1b8731c637ecdb50975a2ae70c606d100750a540082f7"}, + {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:4314debad13beb564b708b4a496020e5306c7333fa9a3ab90374169a20ffab30"}, + {file = "frozenlist-1.8.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:073f8bf8becba60aa931eb3bc420b217bb7d5b8f4750e6f8b3be7f3da85d38b7"}, + {file = "frozenlist-1.8.0-cp314-cp314-win32.whl", hash = "sha256:bac9c42ba2ac65ddc115d930c78d24ab8d4f465fd3fc473cdedfccadb9429806"}, + {file = "frozenlist-1.8.0-cp314-cp314-win_amd64.whl", hash = "sha256:3e0761f4d1a44f1d1a47996511752cf3dcec5bbdd9cc2b4fe595caf97754b7a0"}, + {file = "frozenlist-1.8.0-cp314-cp314-win_arm64.whl", hash = "sha256:d1eaff1d00c7751b7c6662e9c5ba6eb2c17a2306ba5e2a37f24ddf3cc953402b"}, + {file = "frozenlist-1.8.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d3bb933317c52d7ea5004a1c442eef86f426886fba134ef8cf4226ea6ee1821d"}, + {file = "frozenlist-1.8.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:8009897cdef112072f93a0efdce29cd819e717fd2f649ee3016efd3cd885a7ed"}, + {file = "frozenlist-1.8.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2c5dcbbc55383e5883246d11fd179782a9d07a986c40f49abe89ddf865913930"}, + {file = "frozenlist-1.8.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:39ecbc32f1390387d2aa4f5a995e465e9e2f79ba3adcac92d68e3e0afae6657c"}, + {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92db2bf818d5cc8d9c1f1fc56b897662e24ea5adb36ad1f1d82875bd64e03c24"}, + {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2dc43a022e555de94c3b68a4ef0b11c4f747d12c024a520c7101709a2144fb37"}, + {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb89a7f2de3602cfed448095bab3f178399646ab7c61454315089787df07733a"}, + {file = "frozenlist-1.8.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:33139dc858c580ea50e7e60a1b0ea003efa1fd42e6ec7fdbad78fff65fad2fd2"}, + {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:168c0969a329b416119507ba30b9ea13688fafffac1b7822802537569a1cb0ef"}, + {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:28bd570e8e189d7f7b001966435f9dac6718324b5be2990ac496cf1ea9ddb7fe"}, + {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b2a095d45c5d46e5e79ba1e5b9cb787f541a8dee0433836cea4b96a2c439dcd8"}, + {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:eab8145831a0d56ec9c4139b6c3e594c7a83c2c8be25d5bcf2d86136a532287a"}, + {file = "frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:974b28cf63cc99dfb2188d8d222bc6843656188164848c4f679e63dae4b0708e"}, + {file = "frozenlist-1.8.0-cp314-cp314t-win32.whl", hash = "sha256:342c97bf697ac5480c0a7ec73cd700ecfa5a8a40ac923bd035484616efecc2df"}, + {file = "frozenlist-1.8.0-cp314-cp314t-win_amd64.whl", hash = "sha256:06be8f67f39c8b1dc671f5d83aaefd3358ae5cdcf8314552c57e7ed3e6475bdd"}, + {file = "frozenlist-1.8.0-cp314-cp314t-win_arm64.whl", hash = "sha256:102e6314ca4da683dca92e3b1355490fed5f313b768500084fbe6371fddfdb79"}, + {file = "frozenlist-1.8.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d8b7138e5cd0647e4523d6685b0eac5d4be9a184ae9634492f25c6eb38c12a47"}, + {file = "frozenlist-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a6483e309ca809f1efd154b4d37dc6d9f61037d6c6a81c2dc7a15cb22c8c5dca"}, + {file = "frozenlist-1.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1b9290cf81e95e93fdf90548ce9d3c1211cf574b8e3f4b3b7cb0537cf2227068"}, + {file = "frozenlist-1.8.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:59a6a5876ca59d1b63af8cd5e7ffffb024c3dc1e9cf9301b21a2e76286505c95"}, + {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6dc4126390929823e2d2d9dc79ab4046ed74680360fc5f38b585c12c66cdf459"}, + {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:332db6b2563333c5671fecacd085141b5800cb866be16d5e3eb15a2086476675"}, + {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9ff15928d62a0b80bb875655c39bf517938c7d589554cbd2669be42d97c2cb61"}, + {file = "frozenlist-1.8.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7bf6cdf8e07c8151fba6fe85735441240ec7f619f935a5205953d58009aef8c6"}, + {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:48e6d3f4ec5c7273dfe83ff27c91083c6c9065af655dc2684d2c200c94308bb5"}, + {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:1a7607e17ad33361677adcd1443edf6f5da0ce5e5377b798fba20fae194825f3"}, + {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:5a3a935c3a4e89c733303a2d5a7c257ea44af3a56c8202df486b7f5de40f37e1"}, + {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:940d4a017dbfed9daf46a3b086e1d2167e7012ee297fef9e1c545c4d022f5178"}, + {file = "frozenlist-1.8.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b9be22a69a014bc47e78072d0ecae716f5eb56c15238acca0f43d6eb8e4a5bda"}, + {file = "frozenlist-1.8.0-cp39-cp39-win32.whl", hash = "sha256:1aa77cb5697069af47472e39612976ed05343ff2e84a3dcf15437b232cbfd087"}, + {file = "frozenlist-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:7398c222d1d405e796970320036b1b563892b65809d9e5261487bb2c7f7b5c6a"}, + {file = "frozenlist-1.8.0-cp39-cp39-win_arm64.whl", hash = "sha256:b4f3b365f31c6cd4af24545ca0a244a53688cad8834e32f56831c4923b50a103"}, + {file = "frozenlist-1.8.0-py3-none-any.whl", hash = "sha256:0c18a16eab41e82c295618a77502e17b195883241c563b00f0aa5106fc4eaa0d"}, + {file = "frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad"}, +] + +[[package]] +name = "fsspec" +version = "2025.9.0" +description = "File-system specification" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "fsspec-2025.9.0-py3-none-any.whl", hash = "sha256:530dc2a2af60a414a832059574df4a6e10cce927f6f4a78209390fe38955cfb7"}, + {file = "fsspec-2025.9.0.tar.gz", hash = "sha256:19fd429483d25d28b65ec68f9f4adc16c17ea2c7c7bf54ec61360d478fb19c19"}, +] + +[package.dependencies] +aiohttp = {version = "<4.0.0a0 || >4.0.0a0,<4.0.0a1 || >4.0.0a1", optional = true, markers = "extra == \"http\""} + +[package.extras] +abfs = ["adlfs"] +adl = ["adlfs"] +arrow = ["pyarrow (>=1)"] +dask = ["dask", "distributed"] +dev = ["pre-commit", "ruff (>=0.5)"] +doc = ["numpydoc", "sphinx", "sphinx-design", "sphinx-rtd-theme", "yarl"] +dropbox = ["dropbox", "dropboxdrivefs", "requests"] +full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"] +fuse = ["fusepy"] +gcs = ["gcsfs"] +git = ["pygit2"] +github = ["requests"] +gs = ["gcsfs"] +gui = ["panel"] +hdfs = ["pyarrow (>=1)"] +http = ["aiohttp (!=4.0.0a0,!=4.0.0a1)"] +libarchive = ["libarchive-c"] +oci = ["ocifs"] +s3 = ["s3fs"] +sftp = ["paramiko"] +smb = ["smbprotocol"] +ssh = ["paramiko"] +test = ["aiohttp (!=4.0.0a0,!=4.0.0a1)", "numpy", "pytest", "pytest-asyncio (!=0.22.0)", "pytest-benchmark", "pytest-cov", "pytest-mock", "pytest-recording", "pytest-rerunfailures", "requests"] +test-downstream = ["aiobotocore (>=2.5.4,<3.0.0)", "dask[dataframe,test]", "moto[server] (>4,<5)", "pytest-timeout", "xarray"] +test-full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "cloudpickle", "dask", "distributed", "dropbox", "dropboxdrivefs", "fastparquet", "fusepy", "gcsfs", "jinja2", "kerchunk", "libarchive-c", "lz4", "notebook", "numpy", "ocifs", "pandas", "panel", "paramiko", "pyarrow", "pyarrow (>=1)", "pyftpdlib", "pygit2", "pytest", "pytest-asyncio (!=0.22.0)", "pytest-benchmark", "pytest-cov", "pytest-mock", "pytest-recording", "pytest-rerunfailures", "python-snappy", "requests", "smbprotocol", "tqdm", "urllib3", "zarr", "zstandard ; python_version < \"3.14\""] +tqdm = ["tqdm"] + +[[package]] +name = "gitdb" +version = "4.0.12" +description = "Git Object Database" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "gitdb-4.0.12-py3-none-any.whl", hash = "sha256:67073e15955400952c6565cc3e707c554a4eea2e428946f7a4c162fab9bd9bcf"}, + {file = "gitdb-4.0.12.tar.gz", hash = "sha256:5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571"}, +] + +[package.dependencies] +smmap = ">=3.0.1,<6" + +[[package]] +name = "gitpython" +version = "3.1.46" +description = "GitPython is a Python library used to interact with Git repositories" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "gitpython-3.1.46-py3-none-any.whl", hash = "sha256:79812ed143d9d25b6d176a10bb511de0f9c67b1fa641d82097b0ab90398a2058"}, + {file = "gitpython-3.1.46.tar.gz", hash = "sha256:400124c7d0ef4ea03f7310ac2fbf7151e09ff97f2a3288d64a440c584a29c37f"}, +] + +[package.dependencies] +gitdb = ">=4.0.1,<5" + +[package.extras] +doc = ["sphinx (>=7.1.2,<7.2)", "sphinx-autodoc-typehints", "sphinx_rtd_theme"] +test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock ; python_version < \"3.8\"", "mypy (==1.18.2) ; python_version >= \"3.9\"", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions ; python_version < \"3.11\""] + +[[package]] +name = "grpcio" +version = "1.78.0" +description = "HTTP/2-based RPC framework" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "grpcio-1.78.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:7cc47943d524ee0096f973e1081cb8f4f17a4615f2116882a5f1416e4cfe92b5"}, + {file = "grpcio-1.78.0-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:c3f293fdc675ccba4db5a561048cca627b5e7bd1c8a6973ffedabe7d116e22e2"}, + {file = "grpcio-1.78.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:10a9a644b5dd5aec3b82b5b0b90d41c0fa94c85ef42cb42cf78a23291ddb5e7d"}, + {file = "grpcio-1.78.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:4c5533d03a6cbd7f56acfc9cfb44ea64f63d29091e40e44010d34178d392d7eb"}, + {file = "grpcio-1.78.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ff870aebe9a93a85283837801d35cd5f8814fe2ad01e606861a7fb47c762a2b7"}, + {file = "grpcio-1.78.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:391e93548644e6b2726f1bb84ed60048d4bcc424ce5e4af0843d28ca0b754fec"}, + {file = "grpcio-1.78.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:df2c8f3141f7cbd112a6ebbd760290b5849cda01884554f7c67acc14e7b1758a"}, + {file = "grpcio-1.78.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:bd8cb8026e5f5b50498a3c4f196f57f9db344dad829ffae16b82e4fdbaea2813"}, + {file = "grpcio-1.78.0-cp310-cp310-win32.whl", hash = "sha256:f8dff3d9777e5d2703a962ee5c286c239bf0ba173877cc68dc02c17d042e29de"}, + {file = "grpcio-1.78.0-cp310-cp310-win_amd64.whl", hash = "sha256:94f95cf5d532d0e717eed4fc1810e8e6eded04621342ec54c89a7c2f14b581bf"}, + {file = "grpcio-1.78.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:2777b783f6c13b92bd7b716667452c329eefd646bfb3f2e9dabea2e05dbd34f6"}, + {file = "grpcio-1.78.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:9dca934f24c732750389ce49d638069c3892ad065df86cb465b3fa3012b70c9e"}, + {file = "grpcio-1.78.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:459ab414b35f4496138d0ecd735fed26f1318af5e52cb1efbc82a09f0d5aa911"}, + {file = "grpcio-1.78.0-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:082653eecbdf290e6e3e2c276ab2c54b9e7c299e07f4221872380312d8cf395e"}, + {file = "grpcio-1.78.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:85f93781028ec63f383f6bc90db785a016319c561cc11151fbb7b34e0d012303"}, + {file = "grpcio-1.78.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:f12857d24d98441af6a1d5c87442d624411db486f7ba12550b07788f74b67b04"}, + {file = "grpcio-1.78.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5397fff416b79e4b284959642a4e95ac4b0f1ece82c9993658e0e477d40551ec"}, + {file = "grpcio-1.78.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:fbe6e89c7ffb48518384068321621b2a69cab509f58e40e4399fdd378fa6d074"}, + {file = "grpcio-1.78.0-cp311-cp311-win32.whl", hash = "sha256:6092beabe1966a3229f599d7088b38dfc8ffa1608b5b5cdda31e591e6500f856"}, + {file = "grpcio-1.78.0-cp311-cp311-win_amd64.whl", hash = "sha256:1afa62af6e23f88629f2b29ec9e52ec7c65a7176c1e0a83292b93c76ca882558"}, + {file = "grpcio-1.78.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:f9ab915a267fc47c7e88c387a3a28325b58c898e23d4995f765728f4e3dedb97"}, + {file = "grpcio-1.78.0-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:3f8904a8165ab21e07e58bf3e30a73f4dffc7a1e0dbc32d51c61b5360d26f43e"}, + {file = "grpcio-1.78.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:859b13906ce098c0b493af92142ad051bf64c7870fa58a123911c88606714996"}, + {file = "grpcio-1.78.0-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:b2342d87af32790f934a79c3112641e7b27d63c261b8b4395350dad43eff1dc7"}, + {file = "grpcio-1.78.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:12a771591ae40bc65ba67048fa52ef4f0e6db8279e595fd349f9dfddeef571f9"}, + {file = "grpcio-1.78.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:185dea0d5260cbb2d224c507bf2a5444d5abbb1fa3594c1ed7e4c709d5eb8383"}, + {file = "grpcio-1.78.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:51b13f9aed9d59ee389ad666b8c2214cc87b5de258fa712f9ab05f922e3896c6"}, + {file = "grpcio-1.78.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fd5f135b1bd58ab088930b3c613455796dfa0393626a6972663ccdda5b4ac6ce"}, + {file = "grpcio-1.78.0-cp312-cp312-win32.whl", hash = "sha256:94309f498bcc07e5a7d16089ab984d42ad96af1d94b5a4eb966a266d9fcabf68"}, + {file = "grpcio-1.78.0-cp312-cp312-win_amd64.whl", hash = "sha256:9566fe4ababbb2610c39190791e5b829869351d14369603702e890ef3ad2d06e"}, + {file = "grpcio-1.78.0-cp313-cp313-linux_armv7l.whl", hash = "sha256:ce3a90455492bf8bfa38e56fbbe1dbd4f872a3d8eeaf7337dc3b1c8aa28c271b"}, + {file = "grpcio-1.78.0-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:2bf5e2e163b356978b23652c4818ce4759d40f4712ee9ec5a83c4be6f8c23a3a"}, + {file = "grpcio-1.78.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8f2ac84905d12918e4e55a16da17939eb63e433dc11b677267c35568aa63fc84"}, + {file = "grpcio-1.78.0-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:b58f37edab4a3881bc6c9bca52670610e0c9ca14e2ea3cf9debf185b870457fb"}, + {file = "grpcio-1.78.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:735e38e176a88ce41840c21bb49098ab66177c64c82426e24e0082500cc68af5"}, + {file = "grpcio-1.78.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2045397e63a7a0ee7957c25f7dbb36ddc110e0cfb418403d110c0a7a68a844e9"}, + {file = "grpcio-1.78.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:a9f136fbafe7ccf4ac7e8e0c28b31066e810be52d6e344ef954a3a70234e1702"}, + {file = "grpcio-1.78.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:748b6138585379c737adc08aeffd21222abbda1a86a0dca2a39682feb9196c20"}, + {file = "grpcio-1.78.0-cp313-cp313-win32.whl", hash = "sha256:271c73e6e5676afe4fc52907686670c7cea22ab2310b76a59b678403ed40d670"}, + {file = "grpcio-1.78.0-cp313-cp313-win_amd64.whl", hash = "sha256:f2d4e43ee362adfc05994ed479334d5a451ab7bc3f3fee1b796b8ca66895acb4"}, + {file = "grpcio-1.78.0-cp314-cp314-linux_armv7l.whl", hash = "sha256:e87cbc002b6f440482b3519e36e1313eb5443e9e9e73d6a52d43bd2004fcfd8e"}, + {file = "grpcio-1.78.0-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:c41bc64626db62e72afec66b0c8a0da76491510015417c127bfc53b2fe6d7f7f"}, + {file = "grpcio-1.78.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8dfffba826efcf366b1e3ccc37e67afe676f290e13a3b48d31a46739f80a8724"}, + {file = "grpcio-1.78.0-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:74be1268d1439eaaf552c698cdb11cd594f0c49295ae6bb72c34ee31abbe611b"}, + {file = "grpcio-1.78.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:be63c88b32e6c0f1429f1398ca5c09bc64b0d80950c8bb7807d7d7fb36fb84c7"}, + {file = "grpcio-1.78.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:3c586ac70e855c721bda8f548d38c3ca66ac791dc49b66a8281a1f99db85e452"}, + {file = "grpcio-1.78.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:35eb275bf1751d2ffbd8f57cdbc46058e857cf3971041521b78b7db94bdaf127"}, + {file = "grpcio-1.78.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:207db540302c884b8848036b80db352a832b99dfdf41db1eb554c2c2c7800f65"}, + {file = "grpcio-1.78.0-cp314-cp314-win32.whl", hash = "sha256:57bab6deef2f4f1ca76cc04565df38dc5713ae6c17de690721bdf30cb1e0545c"}, + {file = "grpcio-1.78.0-cp314-cp314-win_amd64.whl", hash = "sha256:dce09d6116df20a96acfdbf85e4866258c3758180e8c49845d6ba8248b6d0bbb"}, + {file = "grpcio-1.78.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:86f85dd7c947baa707078a236288a289044836d4b640962018ceb9cd1f899af5"}, + {file = "grpcio-1.78.0-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:de8cb00d1483a412a06394b8303feec5dcb3b55f81d83aa216dbb6a0b86a94f5"}, + {file = "grpcio-1.78.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e888474dee2f59ff68130f8a397792d8cb8e17e6b3434339657ba4ee90845a8c"}, + {file = "grpcio-1.78.0-cp39-cp39-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:86ce2371bfd7f212cf60d8517e5e854475c2c43ce14aa910e136ace72c6db6c1"}, + {file = "grpcio-1.78.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b0c689c02947d636bc7fab3e30cc3a3445cca99c834dfb77cd4a6cabfc1c5597"}, + {file = "grpcio-1.78.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:ce7599575eeb25c0f4dc1be59cada6219f3b56176f799627f44088b21381a28a"}, + {file = "grpcio-1.78.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:684083fd383e9dc04c794adb838d4faea08b291ce81f64ecd08e4577c7398adf"}, + {file = "grpcio-1.78.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:ab399ef5e3cd2a721b1038a0f3021001f19c5ab279f145e1146bb0b9f1b2b12c"}, + {file = "grpcio-1.78.0-cp39-cp39-win32.whl", hash = "sha256:f3d6379493e18ad4d39537a82371c5281e153e963cecb13f953ebac155756525"}, + {file = "grpcio-1.78.0-cp39-cp39-win_amd64.whl", hash = "sha256:5361a0630a7fdb58a6a97638ab70e1dae2893c4d08d7aba64ded28bb9e7a29df"}, + {file = "grpcio-1.78.0.tar.gz", hash = "sha256:7382b95189546f375c174f53a5fa873cef91c4b8005faa05cc5b3beea9c4f1c5"}, +] + +[package.dependencies] +typing-extensions = ">=4.12,<5.0" + +[package.extras] +protobuf = ["grpcio-tools (>=1.78.0)"] + +[[package]] +name = "h11" +version = "0.16.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, +] + +[[package]] +name = "hf-transfer" +version = "0.1.9" +description = "Speed up file transfers with the Hugging Face Hub." +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "hf_transfer-0.1.9-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:6e94e8822da79573c9b6ae4d6b2f847c59a7a06c5327d7db20751b68538dc4f6"}, + {file = "hf_transfer-0.1.9-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3ebc4ab9023414880c8b1d3c38174d1c9989eb5022d37e814fa91a3060123eb0"}, + {file = "hf_transfer-0.1.9-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8674026f21ed369aa2a0a4b46000aca850fc44cd2b54af33a172ce5325b4fc82"}, + {file = "hf_transfer-0.1.9-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a736dfbb2c84f5a2c975478ad200c0c8bfcb58a25a35db402678fb87ce17fa4"}, + {file = "hf_transfer-0.1.9-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:504b8427fd785dd8546d53b9fafe6e436bd7a3adf76b9dce556507650a7b4567"}, + {file = "hf_transfer-0.1.9-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2c7fc1b85f4d0f76e452765d7648c9f4bfd0aedb9ced2ae1ebfece2d8cfaf8e2"}, + {file = "hf_transfer-0.1.9-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d991376f0eac70a60f0cbc95602aa708a6f7c8617f28b4945c1431d67b8e3c8"}, + {file = "hf_transfer-0.1.9-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e6ac4eddcd99575ed3735ed911ddf9d1697e2bd13aa3f0ad7e3904dd4863842e"}, + {file = "hf_transfer-0.1.9-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:57fd9880da1ee0f47250f735f791fab788f0aa1ee36afc49f761349869c8b4d9"}, + {file = "hf_transfer-0.1.9-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:5d561f0520f493c66b016d99ceabe69c23289aa90be38dd802d2aef279f15751"}, + {file = "hf_transfer-0.1.9-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a5b366d34cd449fe9b20ef25941e6eef0460a2f74e7389f02e673e1f88ebd538"}, + {file = "hf_transfer-0.1.9-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:e66acf91df4a8b72f60223059df3003062a5ae111757187ed1a06750a30e911b"}, + {file = "hf_transfer-0.1.9-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:8669dbcc7a3e2e8d61d42cd24da9c50d57770bd74b445c65123291ca842a7e7a"}, + {file = "hf_transfer-0.1.9-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8fd0167c4407a3bc4cdd0307e65ada2294ec04f1813d8a69a5243e379b22e9d8"}, + {file = "hf_transfer-0.1.9-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ee8b10afedcb75f71091bcc197c526a6ebf5c58bbbadb34fdeee6160f55f619f"}, + {file = "hf_transfer-0.1.9-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5828057e313de59300dd1abb489444bc452efe3f479d3c55b31a8f680936ba42"}, + {file = "hf_transfer-0.1.9-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fc6bd19e1cc177c66bdef15ef8636ad3bde79d5a4f608c158021153b4573509d"}, + {file = "hf_transfer-0.1.9-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdca9bfb89e6f8f281890cc61a8aff2d3cecaff7e1a4d275574d96ca70098557"}, + {file = "hf_transfer-0.1.9-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:89a23f58b7b7effbc047b8ca286f131b17728c99a9f972723323003ffd1bb916"}, + {file = "hf_transfer-0.1.9-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:dc7fff1345980d6c0ebb92c811d24afa4b98b3e07ed070c8e38cc91fd80478c5"}, + {file = "hf_transfer-0.1.9-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:1a6bd16c667ebe89a069ca163060127a794fa3a3525292c900b8c8cc47985b0d"}, + {file = "hf_transfer-0.1.9-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d2fde99d502093ade3ab1b53f80da18480e9902aa960dab7f74fb1b9e5bc5746"}, + {file = "hf_transfer-0.1.9-cp38-abi3-win32.whl", hash = "sha256:435cc3cdc8524ce57b074032b8fd76eed70a4224d2091232fa6a8cef8fd6803e"}, + {file = "hf_transfer-0.1.9-cp38-abi3-win_amd64.whl", hash = "sha256:16f208fc678911c37e11aa7b586bc66a37d02e636208f18b6bc53d29b5df40ad"}, + {file = "hf_transfer-0.1.9.tar.gz", hash = "sha256:035572865dab29d17e783fbf1e84cf1cb24f3fcf8f1b17db1cfc7fdf139f02bf"}, +] + +[[package]] +name = "hf-xet" +version = "1.3.2" +description = "Fast transfer of large files with the Hugging Face Hub." +optional = false +python-versions = ">=3.8" +groups = ["main"] +markers = "platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"arm64\" or platform_machine == \"aarch64\"" +files = [ + {file = "hf_xet-1.3.2-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:335a8f36c55fd35a92d0062f4e9201b4015057e62747b7e7001ffb203c0ee1d2"}, + {file = "hf_xet-1.3.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c1ae4d3a716afc774e66922f3cac8206bfa707db13f6a7e62dfff74bfc95c9a8"}, + {file = "hf_xet-1.3.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d6dbdf231efac0b9b39adcf12a07f0c030498f9212a18e8c50224d0e84ab803d"}, + {file = "hf_xet-1.3.2-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:c1980abfb68ecf6c1c7983379ed7b1e2b49a1aaf1a5aca9acc7d48e5e2e0a961"}, + {file = "hf_xet-1.3.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1c88fbd90ad0d27c46b77a445f0a436ebaa94e14965c581123b68b1c52f5fd30"}, + {file = "hf_xet-1.3.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:35b855024ca37f2dd113ac1c08993e997fbe167b9d61f9ef66d3d4f84015e508"}, + {file = "hf_xet-1.3.2-cp313-cp313t-win_amd64.whl", hash = "sha256:31612ba0629046e425ba50375685a2586e11fb9144270ebabd75878c3eaf6378"}, + {file = "hf_xet-1.3.2-cp313-cp313t-win_arm64.whl", hash = "sha256:433c77c9f4e132b562f37d66c9b22c05b5479f243a1f06a120c1c06ce8b1502a"}, + {file = "hf_xet-1.3.2-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:c34e2c7aefad15792d57067c1c89b2b02c1bbaeabd7f8456ae3d07b4bbaf4094"}, + {file = "hf_xet-1.3.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:4bc995d6c41992831f762096020dc14a65fdf3963f86ffed580b596d04de32e3"}, + {file = "hf_xet-1.3.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:959083c89dee30f7d6f890b36cdadda823386c4de63b1a30384a75bfd2ae995d"}, + {file = "hf_xet-1.3.2-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:cfa760888633b08c01b398d212ce7e8c0d7adac6c86e4b20dfb2397d8acd78ee"}, + {file = "hf_xet-1.3.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:3155a02e083aa21fd733a7485c7c36025e49d5975c8d6bda0453d224dd0b0ac4"}, + {file = "hf_xet-1.3.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:91b1dc03c31cbf733d35dc03df7c5353686233d86af045e716f1e0ea4a2673cf"}, + {file = "hf_xet-1.3.2-cp314-cp314t-win_amd64.whl", hash = "sha256:211f30098512d95e85ad03ae63bd7dd2c4df476558a5095d09f9e38e78cbf674"}, + {file = "hf_xet-1.3.2-cp314-cp314t-win_arm64.whl", hash = "sha256:4a6817c41de7c48ed9270da0b02849347e089c5ece9a0e72ae4f4b3a57617f82"}, + {file = "hf_xet-1.3.2-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:f93b7595f1d8fefddfede775c18b5c9256757824f7f6832930b49858483cd56f"}, + {file = "hf_xet-1.3.2-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:a85d3d43743174393afe27835bde0cd146e652b5fcfdbcd624602daef2ef3259"}, + {file = "hf_xet-1.3.2-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7c2a054a97c44e136b1f7f5a78f12b3efffdf2eed3abc6746fc5ea4b39511633"}, + {file = "hf_xet-1.3.2-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:06b724a361f670ae557836e57801b82c75b534812e351a87a2c739f77d1e0635"}, + {file = "hf_xet-1.3.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:305f5489d7241a47e0458ef49334be02411d1d0f480846363c1c8084ed9916f7"}, + {file = "hf_xet-1.3.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:06cdbde243c85f39a63b28e9034321399c507bcd5e7befdd17ed2ccc06dfe14e"}, + {file = "hf_xet-1.3.2-cp37-abi3-win_amd64.whl", hash = "sha256:9298b47cce6037b7045ae41482e703c471ce36b52e73e49f71226d2e8e5685a1"}, + {file = "hf_xet-1.3.2-cp37-abi3-win_arm64.whl", hash = "sha256:83d8ec273136171431833a6957e8f3af496bee227a0fe47c7b8b39c106d1749a"}, + {file = "hf_xet-1.3.2.tar.gz", hash = "sha256:e130ee08984783d12717444e538587fa2119385e5bd8fc2bb9f930419b73a7af"}, +] + +[package.extras] +tests = ["pytest"] + +[[package]] +name = "httpcore" +version = "1.0.9" +description = "A minimal low-level HTTP client." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, +] + +[package.dependencies] +certifi = "*" +h11 = ">=0.16" + +[package.extras] +asyncio = ["anyio (>=4.0,<5.0)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] +trio = ["trio (>=0.22.0,<1.0)"] + +[[package]] +name = "httpx" +version = "0.28.1" +description = "The next generation HTTP client." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, +] + +[package.dependencies] +anyio = "*" +certifi = "*" +httpcore = "==1.*" +idna = "*" + +[package.extras] +brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] +zstd = ["zstandard (>=0.18.0)"] + +[[package]] +name = "httpx-sse" +version = "0.4.3" +description = "Consume Server-Sent Event (SSE) messages with HTTPX." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "httpx_sse-0.4.3-py3-none-any.whl", hash = "sha256:0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc"}, + {file = "httpx_sse-0.4.3.tar.gz", hash = "sha256:9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d"}, +] + +[[package]] +name = "huggingface-hub" +version = "1.5.0" +description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" +optional = false +python-versions = ">=3.9.0" +groups = ["main"] +files = [ + {file = "huggingface_hub-1.5.0-py3-none-any.whl", hash = "sha256:c9c0b3ab95a777fc91666111f3b3ede71c0cdced3614c553a64e98920585c4ee"}, + {file = "huggingface_hub-1.5.0.tar.gz", hash = "sha256:f281838db29265880fb543de7a23b0f81d3504675de82044307ea3c6c62f799d"}, +] + +[package.dependencies] +filelock = ">=3.10.0" +fsspec = ">=2023.5.0" +hf-xet = {version = ">=1.2.0,<2.0.0", markers = "platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"arm64\" or platform_machine == \"aarch64\""} +httpx = ">=0.23.0,<1" +packaging = ">=20.9" +pyyaml = ">=5.1" +tqdm = ">=4.42.1" +typer = "*" +typing-extensions = ">=4.1.0" + +[package.extras] +all = ["Jinja2", "Pillow", "authlib (>=1.3.2)", "fastapi", "fastapi", "httpx", "itsdangerous", "jedi", "libcst (>=1.4.0)", "mypy (==1.15.0)", "numpy", "pytest (>=8.4.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures (<16.0)", "pytest-vcr", "pytest-xdist", "ruff (>=0.9.0)", "soundfile", "ty", "types-PyYAML", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] +dev = ["Jinja2", "Pillow", "authlib (>=1.3.2)", "fastapi", "fastapi", "httpx", "itsdangerous", "jedi", "libcst (>=1.4.0)", "mypy (==1.15.0)", "numpy", "pytest (>=8.4.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures (<16.0)", "pytest-vcr", "pytest-xdist", "ruff (>=0.9.0)", "soundfile", "ty", "types-PyYAML", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"] +fastai = ["fastai (>=2.4)", "fastcore (>=1.3.27)", "toml"] +hf-xet = ["hf-xet (>=1.2.0,<2.0.0)"] +mcp = ["mcp (>=1.8.0)"] +oauth = ["authlib (>=1.3.2)", "fastapi", "httpx", "itsdangerous"] +quality = ["libcst (>=1.4.0)", "mypy (==1.15.0)", "ruff (>=0.9.0)", "ty"] +testing = ["Jinja2", "Pillow", "authlib (>=1.3.2)", "fastapi", "fastapi", "httpx", "itsdangerous", "jedi", "numpy", "pytest (>=8.4.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures (<16.0)", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"] +torch = ["safetensors[torch]", "torch"] +typing = ["types-PyYAML", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)"] + +[[package]] +name = "idna" +version = "3.11" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"}, + {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"}, +] + +[package.extras] +all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] + +[[package]] +name = "importlib-metadata" +version = "8.7.1" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "importlib_metadata-8.7.1-py3-none-any.whl", hash = "sha256:5a1f80bf1daa489495071efbb095d75a634cf28a8bc299581244063b53176151"}, + {file = "importlib_metadata-8.7.1.tar.gz", hash = "sha256:49fef1ae6440c182052f407c8d34a68f72efc36db9ca90dc0113398f2fdde8bb"}, +] + +[package.dependencies] +zipp = ">=3.20" + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=3.4)"] +perf = ["ipython"] +test = ["flufl.flake8", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +type = ["mypy (<1.19) ; platform_python_implementation == \"PyPy\"", "pytest-mypy (>=1.0.1)"] + +[[package]] +name = "ipykernel" +version = "7.2.0" +description = "IPython Kernel for Jupyter" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "ipykernel-7.2.0-py3-none-any.whl", hash = "sha256:3bbd4420d2b3cc105cbdf3756bfc04500b1e52f090a90716851f3916c62e1661"}, + {file = "ipykernel-7.2.0.tar.gz", hash = "sha256:18ed160b6dee2cbb16e5f3575858bc19d8f1fe6046a9a680c708494ce31d909e"}, +] + +[package.dependencies] +appnope = {version = ">=0.1.2", markers = "platform_system == \"Darwin\""} +comm = ">=0.1.1" +debugpy = ">=1.6.5" +ipython = ">=7.23.1" +jupyter-client = ">=8.8.0" +jupyter-core = ">=5.1,<6.0.dev0 || >=6.1.dev0" +matplotlib-inline = ">=0.1" +nest-asyncio = ">=1.4" +packaging = ">=22" +psutil = ">=5.7" +pyzmq = ">=25" +tornado = ">=6.4.1" +traitlets = ">=5.4.0" + +[package.extras] +cov = ["coverage[toml]", "matplotlib", "pytest-cov", "trio"] +docs = ["intersphinx-registry", "myst-parser", "pydata-sphinx-theme", "sphinx (<8.2.0)", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling", "trio"] +pyqt5 = ["pyqt5"] +pyside6 = ["pyside6"] +test = ["flaky", "ipyparallel", "pre-commit", "pytest (>=7.0,<10)", "pytest-asyncio (>=0.23.5)", "pytest-cov", "pytest-timeout"] + +[[package]] +name = "ipython" +version = "9.11.0" +description = "IPython: Productive Interactive Computing" +optional = false +python-versions = ">=3.12" +groups = ["main"] +files = [ + {file = "ipython-9.11.0-py3-none-any.whl", hash = "sha256:6922d5bcf944c6e525a76a0a304451b60a2b6f875e86656d8bc2dfda5d710e19"}, + {file = "ipython-9.11.0.tar.gz", hash = "sha256:2a94bc4406b22ecc7e4cb95b98450f3ea493a76bec8896cda11b78d7752a6667"}, +] + +[package.dependencies] +colorama = {version = ">=0.4.4", markers = "sys_platform == \"win32\""} +decorator = ">=5.1.0" +ipython-pygments-lexers = ">=1.0.0" +jedi = ">=0.18.2" +matplotlib-inline = ">=0.1.6" +pexpect = {version = ">4.6", markers = "sys_platform != \"win32\" and sys_platform != \"emscripten\""} +prompt_toolkit = ">=3.0.41,<3.1.0" +pygments = ">=2.14.0" +stack_data = ">=0.6.0" +traitlets = ">=5.13.0" + +[package.extras] +all = ["argcomplete (>=3.0)", "ipython[doc,matplotlib,terminal,test,test-extra]", "types-decorator"] +black = ["black"] +doc = ["docrepr", "exceptiongroup", "intersphinx_registry", "ipykernel", "ipython[matplotlib,test]", "setuptools (>=80.0)", "sphinx (>=8.0)", "sphinx-rtd-theme (>=0.1.8)", "sphinx_toml (==0.0.4)", "typing_extensions"] +matplotlib = ["matplotlib (>3.9)"] +test = ["packaging (>=23.0.0)", "pytest (>=7.0.0)", "pytest-asyncio (>=1.0.0)", "setuptools (>=80.0)", "testpath (>=0.2)"] +test-extra = ["curio", "ipykernel (>6.30)", "ipython[matplotlib]", "ipython[test]", "jupyter_ai", "nbclient", "nbformat", "numpy (>=2.0)", "pandas (>2.1)", "trio (>=0.22.0)"] + +[[package]] +name = "ipython-pygments-lexers" +version = "1.1.1" +description = "Defines a variety of Pygments lexers for highlighting IPython code." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "ipython_pygments_lexers-1.1.1-py3-none-any.whl", hash = "sha256:a9462224a505ade19a605f71f8fa63c2048833ce50abc86768a0d81d876dc81c"}, + {file = "ipython_pygments_lexers-1.1.1.tar.gz", hash = "sha256:09c0138009e56b6854f9535736f4171d855c8c08a563a0dcd8022f78355c7e81"}, +] + +[package.dependencies] +pygments = "*" + +[[package]] +name = "jaraco-classes" +version = "3.4.0" +description = "Utility functions for Python class constructs" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "jaraco.classes-3.4.0-py3-none-any.whl", hash = "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790"}, + {file = "jaraco.classes-3.4.0.tar.gz", hash = "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd"}, +] + +[package.dependencies] +more-itertools = "*" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] + +[[package]] +name = "jaraco-context" +version = "6.1.0" +description = "Useful decorators and context managers" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "jaraco_context-6.1.0-py3-none-any.whl", hash = "sha256:a43b5ed85815223d0d3cfdb6d7ca0d2bc8946f28f30b6f3216bda070f68badda"}, + {file = "jaraco_context-6.1.0.tar.gz", hash = "sha256:129a341b0a85a7db7879e22acd66902fda67882db771754574338898b2d5d86f"}, +] + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=3.4)"] +test = ["jaraco.test (>=5.6.0)", "portend", "pytest (>=6,!=8.1.*)"] +type = ["mypy (<1.19) ; platform_python_implementation == \"PyPy\"", "pytest-mypy (>=1.0.1)"] + +[[package]] +name = "jaraco-functools" +version = "4.4.0" +description = "Functools like those found in stdlib" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "jaraco_functools-4.4.0-py3-none-any.whl", hash = "sha256:9eec1e36f45c818d9bf307c8948eb03b2b56cd44087b3cdc989abca1f20b9176"}, + {file = "jaraco_functools-4.4.0.tar.gz", hash = "sha256:da21933b0417b89515562656547a77b4931f98176eb173644c0d35032a33d6bb"}, +] + +[package.dependencies] +more_itertools = "*" + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=3.4)"] +test = ["jaraco.classes", "pytest (>=6,!=8.1.*)"] +type = ["mypy (<1.19) ; platform_python_implementation == \"PyPy\"", "pytest-mypy (>=1.0.1)"] + +[[package]] +name = "jedi" +version = "0.19.2" +description = "An autocompletion tool for Python that can be used for text editors." +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "jedi-0.19.2-py2.py3-none-any.whl", hash = "sha256:a8ef22bde8490f57fe5c7681a3c83cb58874daf72b4784de3cce5b6ef6edb5b9"}, + {file = "jedi-0.19.2.tar.gz", hash = "sha256:4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0"}, +] + +[package.dependencies] +parso = ">=0.8.4,<0.9.0" + +[package.extras] +docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alabaster (==0.7.12)", "babel (==2.9.1)", "chardet (==4.0.0)", "commonmark (==0.8.1)", "docutils (==0.17.1)", "future (==0.18.2)", "idna (==2.10)", "imagesize (==1.2.0)", "mock (==1.0.1)", "packaging (==20.9)", "pyparsing (==2.4.7)", "pytz (==2021.1)", "readthedocs-sphinx-ext (==2.1.4)", "recommonmark (==0.5.0)", "requests (==2.25.1)", "six (==1.15.0)", "snowballstemmer (==2.1.0)", "sphinx (==1.8.5)", "sphinx-rtd-theme (==0.4.3)", "sphinxcontrib-serializinghtml (==1.1.4)", "sphinxcontrib-websupport (==1.2.4)", "urllib3 (==1.26.4)"] +qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] +testing = ["Django", "attrs", "colorama", "docopt", "pytest (<9.0.0)"] + +[[package]] +name = "jeepney" +version = "0.9.0" +description = "Low-level, pure Python DBus protocol wrapper." +optional = false +python-versions = ">=3.7" +groups = ["main"] +markers = "sys_platform == \"linux\"" +files = [ + {file = "jeepney-0.9.0-py3-none-any.whl", hash = "sha256:97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683"}, + {file = "jeepney-0.9.0.tar.gz", hash = "sha256:cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732"}, +] + +[package.extras] +test = ["async-timeout ; python_version < \"3.11\"", "pytest", "pytest-asyncio (>=0.17)", "pytest-trio", "testpath", "trio"] +trio = ["trio"] + +[[package]] +name = "jinja2" +version = "3.1.6" +description = "A very fast and expressive template engine." +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, + {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "jiter" +version = "0.13.0" +description = "Fast iterable JSON parser." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "jiter-0.13.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2ffc63785fd6c7977defe49b9824ae6ce2b2e2b77ce539bdaf006c26da06342e"}, + {file = "jiter-0.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4a638816427006c1e3f0013eb66d391d7a3acda99a7b0cf091eff4497ccea33a"}, + {file = "jiter-0.13.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19928b5d1ce0ff8c1ee1b9bdef3b5bfc19e8304f1b904e436caf30bc15dc6cf5"}, + {file = "jiter-0.13.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:309549b778b949d731a2f0e1594a3f805716be704a73bf3ad9a807eed5eb5721"}, + {file = "jiter-0.13.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bcdabaea26cb04e25df3103ce47f97466627999260290349a88c8136ecae0060"}, + {file = "jiter-0.13.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a3a377af27b236abbf665a69b2bdd680e3b5a0bd2af825cd3b81245279a7606c"}, + {file = "jiter-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe49d3ff6db74321f144dff9addd4a5874d3105ac5ba7c5b77fac099cfae31ae"}, + {file = "jiter-0.13.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2113c17c9a67071b0f820733c0893ed1d467b5fcf4414068169e5c2cabddb1e2"}, + {file = "jiter-0.13.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:ab1185ca5c8b9491b55ebf6c1e8866b8f68258612899693e24a92c5fdb9455d5"}, + {file = "jiter-0.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:9621ca242547edc16400981ca3231e0c91c0c4c1ab8573a596cd9bb3575d5c2b"}, + {file = "jiter-0.13.0-cp310-cp310-win32.whl", hash = "sha256:a7637d92b1c9d7a771e8c56f445c7f84396d48f2e756e5978840ecba2fac0894"}, + {file = "jiter-0.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c1b609e5cbd2f52bb74fb721515745b407df26d7b800458bd97cb3b972c29e7d"}, + {file = "jiter-0.13.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ea026e70a9a28ebbdddcbcf0f1323128a8db66898a06eaad3a4e62d2f554d096"}, + {file = "jiter-0.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:66aa3e663840152d18cc8ff1e4faad3dd181373491b9cfdc6004b92198d67911"}, + {file = "jiter-0.13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3524798e70655ff19aec58c7d05adb1f074fecff62da857ea9be2b908b6d701"}, + {file = "jiter-0.13.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ec7e287d7fbd02cb6e22f9a00dd9c9cd504c40a61f2c61e7e1f9690a82726b4c"}, + {file = "jiter-0.13.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:47455245307e4debf2ce6c6e65a717550a0244231240dcf3b8f7d64e4c2f22f4"}, + {file = "jiter-0.13.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ee9da221dca6e0429c2704c1b3655fe7b025204a71d4d9b73390c759d776d165"}, + {file = "jiter-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24ab43126d5e05f3d53a36a8e11eb2f23304c6c1117844aaaf9a0aa5e40b5018"}, + {file = "jiter-0.13.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9da38b4fedde4fb528c740c2564628fbab737166a0e73d6d46cb4bb5463ff411"}, + {file = "jiter-0.13.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0b34c519e17658ed88d5047999a93547f8889f3c1824120c26ad6be5f27b6cf5"}, + {file = "jiter-0.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d2a6394e6af690d462310a86b53c47ad75ac8c21dc79f120714ea449979cb1d3"}, + {file = "jiter-0.13.0-cp311-cp311-win32.whl", hash = "sha256:0f0c065695f616a27c920a56ad0d4fc46415ef8b806bf8fc1cacf25002bd24e1"}, + {file = "jiter-0.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:0733312953b909688ae3c2d58d043aa040f9f1a6a75693defed7bc2cc4bf2654"}, + {file = "jiter-0.13.0-cp311-cp311-win_arm64.whl", hash = "sha256:5d9b34ad56761b3bf0fbe8f7e55468704107608512350962d3317ffd7a4382d5"}, + {file = "jiter-0.13.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:0a2bd69fc1d902e89925fc34d1da51b2128019423d7b339a45d9e99c894e0663"}, + {file = "jiter-0.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f917a04240ef31898182f76a332f508f2cc4b57d2b4d7ad2dbfebbfe167eb505"}, + {file = "jiter-0.13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c1e2b199f446d3e82246b4fd9236d7cb502dc2222b18698ba0d986d2fecc6152"}, + {file = "jiter-0.13.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04670992b576fa65bd056dbac0c39fe8bd67681c380cb2b48efa885711d9d726"}, + {file = "jiter-0.13.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5a1aff1fbdb803a376d4d22a8f63f8e7ccbce0b4890c26cc7af9e501ab339ef0"}, + {file = "jiter-0.13.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b3fb8c2053acaef8580809ac1d1f7481a0a0bdc012fd7f5d8b18fb696a5a089"}, + {file = "jiter-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bdaba7d87e66f26a2c45d8cbadcbfc4bf7884182317907baf39cfe9775bb4d93"}, + {file = "jiter-0.13.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7b88d649135aca526da172e48083da915ec086b54e8e73a425ba50999468cc08"}, + {file = "jiter-0.13.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:e404ea551d35438013c64b4f357b0474c7abf9f781c06d44fcaf7a14c69ff9e2"}, + {file = "jiter-0.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:1f4748aad1b4a93c8bdd70f604d0f748cdc0e8744c5547798acfa52f10e79228"}, + {file = "jiter-0.13.0-cp312-cp312-win32.whl", hash = "sha256:0bf670e3b1445fc4d31612199f1744f67f889ee1bbae703c4b54dc097e5dd394"}, + {file = "jiter-0.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:15db60e121e11fe186c0b15236bd5d18381b9ddacdcf4e659feb96fc6c969c92"}, + {file = "jiter-0.13.0-cp312-cp312-win_arm64.whl", hash = "sha256:41f92313d17989102f3cb5dd533a02787cdb99454d494344b0361355da52fcb9"}, + {file = "jiter-0.13.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:1f8a55b848cbabf97d861495cd65f1e5c590246fabca8b48e1747c4dfc8f85bf"}, + {file = "jiter-0.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f556aa591c00f2c45eb1b89f68f52441a016034d18b65da60e2d2875bbbf344a"}, + {file = "jiter-0.13.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f7e1d61da332ec412350463891923f960c3073cf1aae93b538f0bb4c8cd46efb"}, + {file = "jiter-0.13.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3097d665a27bc96fd9bbf7f86178037db139f319f785e4757ce7ccbf390db6c2"}, + {file = "jiter-0.13.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d01ecc3a8cbdb6f25a37bd500510550b64ddf9f7d64a107d92f3ccb25035d0f"}, + {file = "jiter-0.13.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ed9bbc30f5d60a3bdf63ae76beb3f9db280d7f195dfcfa61af792d6ce912d159"}, + {file = "jiter-0.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98fbafb6e88256f4454de33c1f40203d09fc33ed19162a68b3b257b29ca7f663"}, + {file = "jiter-0.13.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5467696f6b827f1116556cb0db620440380434591e93ecee7fd14d1a491b6daa"}, + {file = "jiter-0.13.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:2d08c9475d48b92892583df9da592a0e2ac49bcd41fae1fec4f39ba6cf107820"}, + {file = "jiter-0.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:aed40e099404721d7fcaf5b89bd3b4568a4666358bcac7b6b15c09fb6252ab68"}, + {file = "jiter-0.13.0-cp313-cp313-win32.whl", hash = "sha256:36ebfbcffafb146d0e6ffb3e74d51e03d9c35ce7c625c8066cdbfc7b953bdc72"}, + {file = "jiter-0.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:8d76029f077379374cf0dbc78dbe45b38dec4a2eb78b08b5194ce836b2517afc"}, + {file = "jiter-0.13.0-cp313-cp313-win_arm64.whl", hash = "sha256:bb7613e1a427cfcb6ea4544f9ac566b93d5bf67e0d48c787eca673ff9c9dff2b"}, + {file = "jiter-0.13.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fa476ab5dd49f3bf3a168e05f89358c75a17608dbabb080ef65f96b27c19ab10"}, + {file = "jiter-0.13.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ade8cb6ff5632a62b7dbd4757d8c5573f7a2e9ae285d6b5b841707d8363205ef"}, + {file = "jiter-0.13.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9950290340acc1adaded363edd94baebcee7dabdfa8bee4790794cd5cfad2af6"}, + {file = "jiter-0.13.0-cp313-cp313t-win_amd64.whl", hash = "sha256:2b4972c6df33731aac0742b64fd0d18e0a69bc7d6e03108ce7d40c85fd9e3e6d"}, + {file = "jiter-0.13.0-cp313-cp313t-win_arm64.whl", hash = "sha256:701a1e77d1e593c1b435315ff625fd071f0998c5f02792038a5ca98899261b7d"}, + {file = "jiter-0.13.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:cc5223ab19fe25e2f0bf2643204ad7318896fe3729bf12fde41b77bfc4fafff0"}, + {file = "jiter-0.13.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9776ebe51713acf438fd9b4405fcd86893ae5d03487546dae7f34993217f8a91"}, + {file = "jiter-0.13.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:879e768938e7b49b5e90b7e3fecc0dbec01b8cb89595861fb39a8967c5220d09"}, + {file = "jiter-0.13.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:682161a67adea11e3aae9038c06c8b4a9a71023228767477d683f69903ebc607"}, + {file = "jiter-0.13.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a13b68cd1cd8cc9de8f244ebae18ccb3e4067ad205220ef324c39181e23bbf66"}, + {file = "jiter-0.13.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87ce0f14c6c08892b610686ae8be350bf368467b6acd5085a5b65441e2bf36d2"}, + {file = "jiter-0.13.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c365005b05505a90d1c47856420980d0237adf82f70c4aff7aebd3c1cc143ad"}, + {file = "jiter-0.13.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1317fdffd16f5873e46ce27d0e0f7f4f90f0cdf1d86bf6abeaea9f63ca2c401d"}, + {file = "jiter-0.13.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:c05b450d37ba0c9e21c77fef1f205f56bcee2330bddca68d344baebfc55ae0df"}, + {file = "jiter-0.13.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:775e10de3849d0631a97c603f996f518159272db00fdda0a780f81752255ee9d"}, + {file = "jiter-0.13.0-cp314-cp314-win32.whl", hash = "sha256:632bf7c1d28421c00dd8bbb8a3bac5663e1f57d5cd5ed962bce3c73bf62608e6"}, + {file = "jiter-0.13.0-cp314-cp314-win_amd64.whl", hash = "sha256:f22ef501c3f87ede88f23f9b11e608581c14f04db59b6a801f354397ae13739f"}, + {file = "jiter-0.13.0-cp314-cp314-win_arm64.whl", hash = "sha256:07b75fe09a4ee8e0c606200622e571e44943f47254f95e2436c8bdcaceb36d7d"}, + {file = "jiter-0.13.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:964538479359059a35fb400e769295d4b315ae61e4105396d355a12f7fef09f0"}, + {file = "jiter-0.13.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e104da1db1c0991b3eaed391ccd650ae8d947eab1480c733e5a3fb28d4313e40"}, + {file = "jiter-0.13.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e3a5f0cde8ff433b8e88e41aa40131455420fb3649a3c7abdda6145f8cb7202"}, + {file = "jiter-0.13.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:57aab48f40be1db920a582b30b116fe2435d184f77f0e4226f546794cedd9cf0"}, + {file = "jiter-0.13.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7772115877c53f62beeb8fd853cab692dbc04374ef623b30f997959a4c0e7e95"}, + {file = "jiter-0.13.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1211427574b17b633cfceba5040de8081e5abf114f7a7602f73d2e16f9fdaa59"}, + {file = "jiter-0.13.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7beae3a3d3b5212d3a55d2961db3c292e02e302feb43fce6a3f7a31b90ea6dfe"}, + {file = "jiter-0.13.0-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:e5562a0f0e90a6223b704163ea28e831bd3a9faa3512a711f031611e6b06c939"}, + {file = "jiter-0.13.0-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:6c26a424569a59140fb51160a56df13f438a2b0967365e987889186d5fc2f6f9"}, + {file = "jiter-0.13.0-cp314-cp314t-win32.whl", hash = "sha256:24dc96eca9f84da4131cdf87a95e6ce36765c3b156fc9ae33280873b1c32d5f6"}, + {file = "jiter-0.13.0-cp314-cp314t-win_amd64.whl", hash = "sha256:0a8d76c7524087272c8ae913f5d9d608bd839154b62c4322ef65723d2e5bb0b8"}, + {file = "jiter-0.13.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2c26cf47e2cad140fa23b6d58d435a7c0161f5c514284802f25e87fddfe11024"}, + {file = "jiter-0.13.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:4397ee562b9f69d283e5674445551b47a5e8076fdde75e71bfac5891113dc543"}, + {file = "jiter-0.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f90023f8f672e13ea1819507d2d21b9d2d1c18920a3b3a5f1541955a85b5504"}, + {file = "jiter-0.13.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed0240dd1536a98c3ab55e929c60dfff7c899fecafcb7d01161b21a99fc8c363"}, + {file = "jiter-0.13.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6207fc61c395b26fffdcf637a0b06b4326f35bfa93c6e92fe1a166a21aeb6731"}, + {file = "jiter-0.13.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00203f47c214156df427b5989de74cb340c65c8180d09be1bf9de81d0abad599"}, + {file = "jiter-0.13.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c26ad6967c9dcedf10c995a21539c3aa57d4abad7001b7a84f621a263a6b605"}, + {file = "jiter-0.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a576f5dce9ac7de5d350b8e2f552cf364f32975ed84717c35379a51c7cb198bd"}, + {file = "jiter-0.13.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b22945be8425d161f2e536cdae66da300b6b000f1c0ba3ddf237d1bfd45d21b8"}, + {file = "jiter-0.13.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:6eeb7db8bc77dc20476bc2f7407a23dbe3d46d9cc664b166e3d474e1c1de4baa"}, + {file = "jiter-0.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:19cd6f85e1dc090277c3ce90a5b7d96f32127681d825e71c9dce28788e39fc0c"}, + {file = "jiter-0.13.0-cp39-cp39-win32.whl", hash = "sha256:dc3ce84cfd4fa9628fe62c4f85d0d597a4627d4242cfafac32a12cc1455d00f7"}, + {file = "jiter-0.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:9ffda299e417dc83362963966c50cb76d42da673ee140de8a8ac762d4bb2378b"}, + {file = "jiter-0.13.0-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b1cbfa133241d0e6bdab48dcdc2604e8ba81512f6bbd68ec3e8e1357dd3c316c"}, + {file = "jiter-0.13.0-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:db367d8be9fad6e8ebbac4a7578b7af562e506211036cba2c06c3b998603c3d2"}, + {file = "jiter-0.13.0-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45f6f8efb2f3b0603092401dc2df79fa89ccbc027aaba4174d2d4133ed661434"}, + {file = "jiter-0.13.0-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:597245258e6ad085d064780abfb23a284d418d3e61c57362d9449c6c7317ee2d"}, + {file = "jiter-0.13.0-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:3d744a6061afba08dd7ae375dcde870cffb14429b7477e10f67e9e6d68772a0a"}, + {file = "jiter-0.13.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:ff732bd0a0e778f43d5009840f20b935e79087b4dc65bd36f1cd0f9b04b8ff7f"}, + {file = "jiter-0.13.0-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab44b178f7981fcaea7e0a5df20e773c663d06ffda0198f1a524e91b2fde7e59"}, + {file = "jiter-0.13.0-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bb00b6d26db67a05fe3e12c76edc75f32077fb51deed13822dc648fa373bc19"}, + {file = "jiter-0.13.0.tar.gz", hash = "sha256:f2839f9c2c7e2dffc1bc5929a510e14ce0a946be9365fd1219e7ef342dae14f4"}, +] + +[[package]] +name = "joblib" +version = "1.5.3" +description = "Lightweight pipelining with Python functions" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "joblib-1.5.3-py3-none-any.whl", hash = "sha256:5fc3c5039fc5ca8c0276333a188bbd59d6b7ab37fe6632daa76bc7f9ec18e713"}, + {file = "joblib-1.5.3.tar.gz", hash = "sha256:8561a3269e6801106863fd0d6d84bb737be9e7631e33aaed3fb9ce5953688da3"}, +] + +[[package]] +name = "jsonref" +version = "1.1.0" +description = "jsonref is a library for automatic dereferencing of JSON Reference objects for Python." +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "jsonref-1.1.0-py3-none-any.whl", hash = "sha256:590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9"}, + {file = "jsonref-1.1.0.tar.gz", hash = "sha256:32fe8e1d85af0fdefbebce950af85590b22b60f9e95443176adbde4e1ecea552"}, +] + +[[package]] +name = "jsonschema" +version = "4.26.0" +description = "An implementation of JSON Schema validation for Python" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "jsonschema-4.26.0-py3-none-any.whl", hash = "sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce"}, + {file = "jsonschema-4.26.0.tar.gz", hash = "sha256:0c26707e2efad8aa1bfc5b7ce170f3fccc2e4918ff85989ba9ffa9facb2be326"}, +] + +[package.dependencies] +attrs = ">=22.2.0" +jsonschema-specifications = ">=2023.3.6" +referencing = ">=0.28.4" +rpds-py = ">=0.25.0" + +[package.extras] +format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "rfc3987-syntax (>=1.1.0)", "uri-template", "webcolors (>=24.6.0)"] + +[[package]] +name = "jsonschema-path" +version = "0.4.5" +description = "JSONSchema Spec with object-oriented paths" +optional = false +python-versions = "<4.0.0,>=3.10" +groups = ["main"] +files = [ + {file = "jsonschema_path-0.4.5-py3-none-any.whl", hash = "sha256:7d77a2c3f3ec569a40efe5c5f942c44c1af2a6f96fe0866794c9ef5b8f87fd65"}, + {file = "jsonschema_path-0.4.5.tar.gz", hash = "sha256:c6cd7d577ae290c7defd4f4029e86fdb248ca1bd41a07557795b3c95e5144918"}, +] + +[package.dependencies] +pathable = ">=0.5.0,<0.6.0" +PyYAML = ">=5.1" +referencing = "<0.38.0" + +[package.extras] +requests = ["requests (>=2.31.0,<3.0.0)"] + +[[package]] +name = "jsonschema-specifications" +version = "2025.9.1" +description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe"}, + {file = "jsonschema_specifications-2025.9.1.tar.gz", hash = "sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d"}, +] + +[package.dependencies] +referencing = ">=0.31.0" + +[[package]] +name = "jupyter-client" +version = "8.8.0" +description = "Jupyter protocol implementation and client libraries" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "jupyter_client-8.8.0-py3-none-any.whl", hash = "sha256:f93a5b99c5e23a507b773d3a1136bd6e16c67883ccdbd9a829b0bbdb98cd7d7a"}, + {file = "jupyter_client-8.8.0.tar.gz", hash = "sha256:d556811419a4f2d96c869af34e854e3f059b7cc2d6d01a9cd9c85c267691be3e"}, +] + +[package.dependencies] +jupyter-core = ">=5.1" +python-dateutil = ">=2.8.2" +pyzmq = ">=25.0" +tornado = ">=6.4.1" +traitlets = ">=5.3" + +[package.extras] +docs = ["ipykernel", "myst-parser", "pydata-sphinx-theme", "sphinx (>=4)", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling"] +orjson = ["orjson"] +test = ["anyio", "coverage", "ipykernel (>=6.14)", "msgpack", "mypy ; platform_python_implementation != \"PyPy\"", "paramiko ; sys_platform == \"win32\"", "pre-commit", "pytest", "pytest-cov", "pytest-jupyter[client] (>=0.6.2)", "pytest-timeout"] + +[[package]] +name = "jupyter-core" +version = "5.9.1" +description = "Jupyter core package. A base package on which Jupyter projects rely." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "jupyter_core-5.9.1-py3-none-any.whl", hash = "sha256:ebf87fdc6073d142e114c72c9e29a9d7ca03fad818c5d300ce2adc1fb0743407"}, + {file = "jupyter_core-5.9.1.tar.gz", hash = "sha256:4d09aaff303b9566c3ce657f580bd089ff5c91f5f89cf7d8846c3cdf465b5508"}, +] + +[package.dependencies] +platformdirs = ">=2.5" +traitlets = ">=5.3" + +[package.extras] +docs = ["intersphinx-registry", "myst-parser", "pydata-sphinx-theme", "sphinx-autodoc-typehints", "sphinxcontrib-spelling", "traitlets"] +test = ["ipykernel", "pre-commit", "pytest (<9)", "pytest-cov", "pytest-timeout"] + +[[package]] +name = "keyring" +version = "25.7.0" +description = "Store and access your passwords safely." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "keyring-25.7.0-py3-none-any.whl", hash = "sha256:be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f"}, + {file = "keyring-25.7.0.tar.gz", hash = "sha256:fe01bd85eb3f8fb3dd0405defdeac9a5b4f6f0439edbb3149577f244a2e8245b"}, +] + +[package.dependencies] +"jaraco.classes" = "*" +"jaraco.context" = "*" +"jaraco.functools" = "*" +jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} +pywin32-ctypes = {version = ">=0.2.0", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +completion = ["shtab (>=1.1.0)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=3.4)"] +test = ["pyfakefs", "pytest (>=6,!=8.1.*)"] +type = ["pygobject-stubs", "pytest-mypy (>=1.0.1)", "shtab", "types-pywin32"] + +[[package]] +name = "kiwisolver" +version = "1.4.9" +description = "A fast implementation of the Cassowary constraint solver" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "kiwisolver-1.4.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b4b4d74bda2b8ebf4da5bd42af11d02d04428b2c32846e4c2c93219df8a7987b"}, + {file = "kiwisolver-1.4.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fb3b8132019ea572f4611d770991000d7f58127560c4889729248eb5852a102f"}, + {file = "kiwisolver-1.4.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:84fd60810829c27ae375114cd379da1fa65e6918e1da405f356a775d49a62bcf"}, + {file = "kiwisolver-1.4.9-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b78efa4c6e804ecdf727e580dbb9cba85624d2e1c6b5cb059c66290063bd99a9"}, + {file = "kiwisolver-1.4.9-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d4efec7bcf21671db6a3294ff301d2fc861c31faa3c8740d1a94689234d1b415"}, + {file = "kiwisolver-1.4.9-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:90f47e70293fc3688b71271100a1a5453aa9944a81d27ff779c108372cf5567b"}, + {file = "kiwisolver-1.4.9-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8fdca1def57a2e88ef339de1737a1449d6dbf5fab184c54a1fca01d541317154"}, + {file = "kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9cf554f21be770f5111a1690d42313e140355e687e05cf82cb23d0a721a64a48"}, + {file = "kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fc1795ac5cd0510207482c3d1d3ed781143383b8cfd36f5c645f3897ce066220"}, + {file = "kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:ccd09f20ccdbbd341b21a67ab50a119b64a403b09288c27481575105283c1586"}, + {file = "kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:540c7c72324d864406a009d72f5d6856f49693db95d1fbb46cf86febef873634"}, + {file = "kiwisolver-1.4.9-cp310-cp310-win_amd64.whl", hash = "sha256:ede8c6d533bc6601a47ad4046080d36b8fc99f81e6f1c17b0ac3c2dc91ac7611"}, + {file = "kiwisolver-1.4.9-cp310-cp310-win_arm64.whl", hash = "sha256:7b4da0d01ac866a57dd61ac258c5607b4cd677f63abaec7b148354d2b2cdd536"}, + {file = "kiwisolver-1.4.9-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:eb14a5da6dc7642b0f3a18f13654847cd8b7a2550e2645a5bda677862b03ba16"}, + {file = "kiwisolver-1.4.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:39a219e1c81ae3b103643d2aedb90f1ef22650deb266ff12a19e7773f3e5f089"}, + {file = "kiwisolver-1.4.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2405a7d98604b87f3fc28b1716783534b1b4b8510d8142adca34ee0bc3c87543"}, + {file = "kiwisolver-1.4.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:dc1ae486f9abcef254b5618dfb4113dd49f94c68e3e027d03cf0143f3f772b61"}, + {file = "kiwisolver-1.4.9-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8a1f570ce4d62d718dce3f179ee78dac3b545ac16c0c04bb363b7607a949c0d1"}, + {file = "kiwisolver-1.4.9-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb27e7b78d716c591e88e0a09a2139c6577865d7f2e152488c2cc6257f460872"}, + {file = "kiwisolver-1.4.9-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:15163165efc2f627eb9687ea5f3a28137217d217ac4024893d753f46bce9de26"}, + {file = "kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bdee92c56a71d2b24c33a7d4c2856bd6419d017e08caa7802d2963870e315028"}, + {file = "kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:412f287c55a6f54b0650bd9b6dce5aceddb95864a1a90c87af16979d37c89771"}, + {file = "kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:2c93f00dcba2eea70af2be5f11a830a742fe6b579a1d4e00f47760ef13be247a"}, + {file = "kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f117e1a089d9411663a3207ba874f31be9ac8eaa5b533787024dc07aeb74f464"}, + {file = "kiwisolver-1.4.9-cp311-cp311-win_amd64.whl", hash = "sha256:be6a04e6c79819c9a8c2373317d19a96048e5a3f90bec587787e86a1153883c2"}, + {file = "kiwisolver-1.4.9-cp311-cp311-win_arm64.whl", hash = "sha256:0ae37737256ba2de764ddc12aed4956460277f00c4996d51a197e72f62f5eec7"}, + {file = "kiwisolver-1.4.9-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ac5a486ac389dddcc5bef4f365b6ae3ffff2c433324fb38dd35e3fab7c957999"}, + {file = "kiwisolver-1.4.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f2ba92255faa7309d06fe44c3a4a97efe1c8d640c2a79a5ef728b685762a6fd2"}, + {file = "kiwisolver-1.4.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a2899935e724dd1074cb568ce7ac0dce28b2cd6ab539c8e001a8578eb106d14"}, + {file = "kiwisolver-1.4.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f6008a4919fdbc0b0097089f67a1eb55d950ed7e90ce2cc3e640abadd2757a04"}, + {file = "kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:67bb8b474b4181770f926f7b7d2f8c0248cbcb78b660fdd41a47054b28d2a752"}, + {file = "kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2327a4a30d3ee07d2fbe2e7933e8a37c591663b96ce42a00bc67461a87d7df77"}, + {file = "kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7a08b491ec91b1d5053ac177afe5290adacf1f0f6307d771ccac5de30592d198"}, + {file = "kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d8fc5c867c22b828001b6a38d2eaeb88160bf5783c6cb4a5e440efc981ce286d"}, + {file = "kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:3b3115b2581ea35bb6d1f24a4c90af37e5d9b49dcff267eeed14c3893c5b86ab"}, + {file = "kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:858e4c22fb075920b96a291928cb7dea5644e94c0ee4fcd5af7e865655e4ccf2"}, + {file = "kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ed0fecd28cc62c54b262e3736f8bb2512d8dcfdc2bcf08be5f47f96bf405b145"}, + {file = "kiwisolver-1.4.9-cp312-cp312-win_amd64.whl", hash = "sha256:f68208a520c3d86ea51acf688a3e3002615a7f0238002cccc17affecc86a8a54"}, + {file = "kiwisolver-1.4.9-cp312-cp312-win_arm64.whl", hash = "sha256:2c1a4f57df73965f3f14df20b80ee29e6a7930a57d2d9e8491a25f676e197c60"}, + {file = "kiwisolver-1.4.9-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a5d0432ccf1c7ab14f9949eec60c5d1f924f17c037e9f8b33352fa05799359b8"}, + {file = "kiwisolver-1.4.9-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efb3a45b35622bb6c16dbfab491a8f5a391fe0e9d45ef32f4df85658232ca0e2"}, + {file = "kiwisolver-1.4.9-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1a12cf6398e8a0a001a059747a1cbf24705e18fe413bc22de7b3d15c67cffe3f"}, + {file = "kiwisolver-1.4.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b67e6efbf68e077dd71d1a6b37e43e1a99d0bff1a3d51867d45ee8908b931098"}, + {file = "kiwisolver-1.4.9-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5656aa670507437af0207645273ccdfee4f14bacd7f7c67a4306d0dcaeaf6eed"}, + {file = "kiwisolver-1.4.9-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bfc08add558155345129c7803b3671cf195e6a56e7a12f3dde7c57d9b417f525"}, + {file = "kiwisolver-1.4.9-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:40092754720b174e6ccf9e845d0d8c7d8e12c3d71e7fc35f55f3813e96376f78"}, + {file = "kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:497d05f29a1300d14e02e6441cf0f5ee81c1ff5a304b0d9fb77423974684e08b"}, + {file = "kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:bdd1a81a1860476eb41ac4bc1e07b3f07259e6d55bbf739b79c8aaedcf512799"}, + {file = "kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e6b93f13371d341afee3be9f7c5964e3fe61d5fa30f6a30eb49856935dfe4fc3"}, + {file = "kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d75aa530ccfaa593da12834b86a0724f58bff12706659baa9227c2ccaa06264c"}, + {file = "kiwisolver-1.4.9-cp313-cp313-win_amd64.whl", hash = "sha256:dd0a578400839256df88c16abddf9ba14813ec5f21362e1fe65022e00c883d4d"}, + {file = "kiwisolver-1.4.9-cp313-cp313-win_arm64.whl", hash = "sha256:d4188e73af84ca82468f09cadc5ac4db578109e52acb4518d8154698d3a87ca2"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:5a0f2724dfd4e3b3ac5a82436a8e6fd16baa7d507117e4279b660fe8ca38a3a1"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:1b11d6a633e4ed84fc0ddafd4ebfd8ea49b3f25082c04ad12b8315c11d504dc1"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:61874cdb0a36016354853593cffc38e56fc9ca5aa97d2c05d3dcf6922cd55a11"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:60c439763a969a6af93b4881db0eed8fadf93ee98e18cbc35bc8da868d0c4f0c"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92a2f997387a1b79a75e7803aa7ded2cfbe2823852ccf1ba3bcf613b62ae3197"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a31d512c812daea6d8b3be3b2bfcbeb091dbb09177706569bcfc6240dcf8b41c"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:52a15b0f35dad39862d376df10c5230155243a2c1a436e39eb55623ccbd68185"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a30fd6fdef1430fd9e1ba7b3398b5ee4e2887783917a687d86ba69985fb08748"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cc9617b46837c6468197b5945e196ee9ca43057bb7d9d1ae688101e4e1dddf64"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:0ab74e19f6a2b027ea4f845a78827969af45ce790e6cb3e1ebab71bdf9f215ff"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:dba5ee5d3981160c28d5490f0d1b7ed730c22470ff7f6cc26cfcfaacb9896a07"}, + {file = "kiwisolver-1.4.9-cp313-cp313t-win_arm64.whl", hash = "sha256:0749fd8f4218ad2e851e11cc4dc05c7cbc0cbc4267bdfdb31782e65aace4ee9c"}, + {file = "kiwisolver-1.4.9-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:9928fe1eb816d11ae170885a74d074f57af3a0d65777ca47e9aeb854a1fba386"}, + {file = "kiwisolver-1.4.9-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:d0005b053977e7b43388ddec89fa567f43d4f6d5c2c0affe57de5ebf290dc552"}, + {file = "kiwisolver-1.4.9-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:2635d352d67458b66fd0667c14cb1d4145e9560d503219034a18a87e971ce4f3"}, + {file = "kiwisolver-1.4.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:767c23ad1c58c9e827b649a9ab7809fd5fd9db266a9cf02b0e926ddc2c680d58"}, + {file = "kiwisolver-1.4.9-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:72d0eb9fba308b8311685c2268cf7d0a0639a6cd027d8128659f72bdd8a024b4"}, + {file = "kiwisolver-1.4.9-cp314-cp314-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f68e4f3eeca8fb22cc3d731f9715a13b652795ef657a13df1ad0c7dc0e9731df"}, + {file = "kiwisolver-1.4.9-cp314-cp314-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d84cd4061ae292d8ac367b2c3fa3aad11cb8625a95d135fe93f286f914f3f5a6"}, + {file = "kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a60ea74330b91bd22a29638940d115df9dc00af5035a9a2a6ad9399ffb4ceca5"}, + {file = "kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:ce6a3a4e106cf35c2d9c4fa17c05ce0b180db622736845d4315519397a77beaf"}, + {file = "kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:77937e5e2a38a7b48eef0585114fe7930346993a88060d0bf886086d2aa49ef5"}, + {file = "kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:24c175051354f4a28c5d6a31c93906dc653e2bf234e8a4bbfb964892078898ce"}, + {file = "kiwisolver-1.4.9-cp314-cp314-win_amd64.whl", hash = "sha256:0763515d4df10edf6d06a3c19734e2566368980d21ebec439f33f9eb936c07b7"}, + {file = "kiwisolver-1.4.9-cp314-cp314-win_arm64.whl", hash = "sha256:0e4e2bf29574a6a7b7f6cb5fa69293b9f96c928949ac4a53ba3f525dffb87f9c"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d976bbb382b202f71c67f77b0ac11244021cfa3f7dfd9e562eefcea2df711548"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2489e4e5d7ef9a1c300a5e0196e43d9c739f066ef23270607d45aba368b91f2d"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e2ea9f7ab7fbf18fffb1b5434ce7c69a07582f7acc7717720f1d69f3e806f90c"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b34e51affded8faee0dfdb705416153819d8ea9250bbbf7ea1b249bdeb5f1122"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d8aacd3d4b33b772542b2e01beb50187536967b514b00003bdda7589722d2a64"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7cf974dd4e35fa315563ac99d6287a1024e4dc2077b8a7d7cd3d2fb65d283134"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:85bd218b5ecfbee8c8a82e121802dcb519a86044c9c3b2e4aef02fa05c6da370"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:0856e241c2d3df4efef7c04a1e46b1936b6120c9bcf36dd216e3acd84bc4fb21"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:9af39d6551f97d31a4deebeac6f45b156f9755ddc59c07b402c148f5dbb6482a"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:bb4ae2b57fc1d8cbd1cf7b1d9913803681ffa903e7488012be5b76dedf49297f"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:aedff62918805fb62d43a4aa2ecd4482c380dc76cd31bd7c8878588a61bd0369"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-win_amd64.whl", hash = "sha256:1fa333e8b2ce4d9660f2cda9c0e1b6bafcfb2457a9d259faa82289e73ec24891"}, + {file = "kiwisolver-1.4.9-cp314-cp314t-win_arm64.whl", hash = "sha256:4a48a2ce79d65d363597ef7b567ce3d14d68783d2b2263d98db3d9477805ba32"}, + {file = "kiwisolver-1.4.9-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:4d1d9e582ad4d63062d34077a9a1e9f3c34088a2ec5135b1f7190c07cf366527"}, + {file = "kiwisolver-1.4.9-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:deed0c7258ceb4c44ad5ec7d9918f9f14fd05b2be86378d86cf50e63d1e7b771"}, + {file = "kiwisolver-1.4.9-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0a590506f303f512dff6b7f75fd2fd18e16943efee932008fe7140e5fa91d80e"}, + {file = "kiwisolver-1.4.9-pp310-pypy310_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e09c2279a4d01f099f52d5c4b3d9e208e91edcbd1a175c9662a8b16e000fece9"}, + {file = "kiwisolver-1.4.9-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:c9e7cdf45d594ee04d5be1b24dd9d49f3d1590959b2271fb30b5ca2b262c00fb"}, + {file = "kiwisolver-1.4.9-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:720e05574713db64c356e86732c0f3c5252818d05f9df320f0ad8380641acea5"}, + {file = "kiwisolver-1.4.9-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:17680d737d5335b552994a2008fab4c851bcd7de33094a82067ef3a576ff02fa"}, + {file = "kiwisolver-1.4.9-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:85b5352f94e490c028926ea567fc569c52ec79ce131dadb968d3853e809518c2"}, + {file = "kiwisolver-1.4.9-pp311-pypy311_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:464415881e4801295659462c49461a24fb107c140de781d55518c4b80cb6790f"}, + {file = "kiwisolver-1.4.9-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:fb940820c63a9590d31d88b815e7a3aa5915cad3ce735ab45f0c730b39547de1"}, + {file = "kiwisolver-1.4.9.tar.gz", hash = "sha256:c3b22c26c6fd6811b0ae8363b95ca8ce4ea3c202d3d0975b2914310ceb1bcc4d"}, +] + +[[package]] +name = "markdown" +version = "3.10.2" +description = "Python implementation of John Gruber's Markdown." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "markdown-3.10.2-py3-none-any.whl", hash = "sha256:e91464b71ae3ee7afd3017d9f358ef0baf158fd9a298db92f1d4761133824c36"}, + {file = "markdown-3.10.2.tar.gz", hash = "sha256:994d51325d25ad8aa7ce4ebaec003febcce822c3f8c911e3b17c52f7f589f950"}, +] + +[package.extras] +docs = ["mdx_gh_links (>=0.2)", "mkdocs (>=1.6)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python] (>=0.28.3)"] +testing = ["coverage", "pyyaml"] + +[[package]] +name = "markdown-it-py" +version = "4.0.0" +description = "Python port of markdown-it. Markdown parsing, done right!" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "markdown_it_py-4.0.0-py3-none-any.whl", hash = "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147"}, + {file = "markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3"}, +] + +[package.dependencies] +mdurl = ">=0.1,<1.0" + +[package.extras] +benchmarking = ["psutil", "pytest", "pytest-benchmark"] +compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "markdown-it-pyrs", "mistletoe (>=1.0,<2.0)", "mistune (>=3.0,<4.0)", "panflute (>=2.3,<3.0)"] +linkify = ["linkify-it-py (>=1,<3)"] +plugins = ["mdit-py-plugins (>=0.5.0)"] +profiling = ["gprof2dot"] +rtd = ["ipykernel", "jupyter_sphinx", "mdit-py-plugins (>=0.5.0)", "myst-parser", "pyyaml", "sphinx", "sphinx-book-theme (>=1.0,<2.0)", "sphinx-copybutton", "sphinx-design"] +testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions", "requests"] + +[[package]] +name = "markupsafe" +version = "3.0.3" +description = "Safely add untrusted strings to HTML/XML markup." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559"}, + {file = "markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419"}, + {file = "markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695"}, + {file = "markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591"}, + {file = "markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c"}, + {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f"}, + {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6"}, + {file = "markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1"}, + {file = "markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa"}, + {file = "markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8"}, + {file = "markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1"}, + {file = "markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad"}, + {file = "markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a"}, + {file = "markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50"}, + {file = "markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf"}, + {file = "markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f"}, + {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a"}, + {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115"}, + {file = "markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a"}, + {file = "markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19"}, + {file = "markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01"}, + {file = "markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c"}, + {file = "markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e"}, + {file = "markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce"}, + {file = "markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d"}, + {file = "markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d"}, + {file = "markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a"}, + {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b"}, + {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f"}, + {file = "markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b"}, + {file = "markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d"}, + {file = "markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c"}, + {file = "markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f"}, + {file = "markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795"}, + {file = "markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219"}, + {file = "markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6"}, + {file = "markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676"}, + {file = "markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9"}, + {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1"}, + {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc"}, + {file = "markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12"}, + {file = "markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed"}, + {file = "markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5"}, + {file = "markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485"}, + {file = "markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73"}, + {file = "markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37"}, + {file = "markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19"}, + {file = "markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025"}, + {file = "markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6"}, + {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f"}, + {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb"}, + {file = "markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009"}, + {file = "markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354"}, + {file = "markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218"}, + {file = "markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287"}, + {file = "markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe"}, + {file = "markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026"}, + {file = "markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737"}, + {file = "markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97"}, + {file = "markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d"}, + {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda"}, + {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf"}, + {file = "markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe"}, + {file = "markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9"}, + {file = "markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581"}, + {file = "markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4"}, + {file = "markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab"}, + {file = "markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175"}, + {file = "markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634"}, + {file = "markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50"}, + {file = "markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e"}, + {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5"}, + {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523"}, + {file = "markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc"}, + {file = "markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d"}, + {file = "markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9"}, + {file = "markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa"}, + {file = "markupsafe-3.0.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:15d939a21d546304880945ca1ecb8a039db6b4dc49b2c5a400387cdae6a62e26"}, + {file = "markupsafe-3.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f71a396b3bf33ecaa1626c255855702aca4d3d9fea5e051b41ac59a9c1c41edc"}, + {file = "markupsafe-3.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f4b68347f8c5eab4a13419215bdfd7f8c9b19f2b25520968adfad23eb0ce60c"}, + {file = "markupsafe-3.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e8fc20152abba6b83724d7ff268c249fa196d8259ff481f3b1476383f8f24e42"}, + {file = "markupsafe-3.0.3-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:949b8d66bc381ee8b007cd945914c721d9aba8e27f71959d750a46f7c282b20b"}, + {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:3537e01efc9d4dccdf77221fb1cb3b8e1a38d5428920e0657ce299b20324d758"}, + {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:591ae9f2a647529ca990bc681daebdd52c8791ff06c2bfa05b65163e28102ef2"}, + {file = "markupsafe-3.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a320721ab5a1aba0a233739394eb907f8c8da5c98c9181d1161e77a0c8e36f2d"}, + {file = "markupsafe-3.0.3-cp39-cp39-win32.whl", hash = "sha256:df2449253ef108a379b8b5d6b43f4b1a8e81a061d6537becd5582fba5f9196d7"}, + {file = "markupsafe-3.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:7c3fb7d25180895632e5d3148dbdc29ea38ccb7fd210aa27acbd1201a1902c6e"}, + {file = "markupsafe-3.0.3-cp39-cp39-win_arm64.whl", hash = "sha256:38664109c14ffc9e7437e86b4dceb442b0096dfe3541d7864d9cbe1da4cf36c8"}, + {file = "markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698"}, +] + +[[package]] +name = "matplotlib" +version = "3.10.8" +description = "Python plotting package" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "matplotlib-3.10.8-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:00270d217d6b20d14b584c521f810d60c5c78406dc289859776550df837dcda7"}, + {file = "matplotlib-3.10.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:37b3c1cc42aa184b3f738cfa18c1c1d72fd496d85467a6cf7b807936d39aa656"}, + {file = "matplotlib-3.10.8-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ee40c27c795bda6a5292e9cff9890189d32f7e3a0bf04e0e3c9430c4a00c37df"}, + {file = "matplotlib-3.10.8-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a48f2b74020919552ea25d222d5cc6af9ca3f4eb43a93e14d068457f545c2a17"}, + {file = "matplotlib-3.10.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f254d118d14a7f99d616271d6c3c27922c092dac11112670b157798b89bf4933"}, + {file = "matplotlib-3.10.8-cp310-cp310-win_amd64.whl", hash = "sha256:f9b587c9c7274c1613a30afabf65a272114cd6cdbe67b3406f818c79d7ab2e2a"}, + {file = "matplotlib-3.10.8-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6be43b667360fef5c754dda5d25a32e6307a03c204f3c0fc5468b78fa87b4160"}, + {file = "matplotlib-3.10.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a2b336e2d91a3d7006864e0990c83b216fcdca64b5a6484912902cef87313d78"}, + {file = "matplotlib-3.10.8-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:efb30e3baaea72ce5928e32bab719ab4770099079d66726a62b11b1ef7273be4"}, + {file = "matplotlib-3.10.8-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d56a1efd5bfd61486c8bc968fa18734464556f0fb8e51690f4ac25d85cbbbbc2"}, + {file = "matplotlib-3.10.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:238b7ce5717600615c895050239ec955d91f321c209dd110db988500558e70d6"}, + {file = "matplotlib-3.10.8-cp311-cp311-win_amd64.whl", hash = "sha256:18821ace09c763ec93aef5eeff087ee493a24051936d7b9ebcad9662f66501f9"}, + {file = "matplotlib-3.10.8-cp311-cp311-win_arm64.whl", hash = "sha256:bab485bcf8b1c7d2060b4fcb6fc368a9e6f4cd754c9c2fea281f4be21df394a2"}, + {file = "matplotlib-3.10.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:64fcc24778ca0404ce0cb7b6b77ae1f4c7231cdd60e6778f999ee05cbd581b9a"}, + {file = "matplotlib-3.10.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b9a5ca4ac220a0cdd1ba6bcba3608547117d30468fefce49bb26f55c1a3d5c58"}, + {file = "matplotlib-3.10.8-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3ab4aabc72de4ff77b3ec33a6d78a68227bf1123465887f9905ba79184a1cc04"}, + {file = "matplotlib-3.10.8-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:24d50994d8c5816ddc35411e50a86ab05f575e2530c02752e02538122613371f"}, + {file = "matplotlib-3.10.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:99eefd13c0dc3b3c1b4d561c1169e65fe47aab7b8158754d7c084088e2329466"}, + {file = "matplotlib-3.10.8-cp312-cp312-win_amd64.whl", hash = "sha256:dd80ecb295460a5d9d260df63c43f4afbdd832d725a531f008dad1664f458adf"}, + {file = "matplotlib-3.10.8-cp312-cp312-win_arm64.whl", hash = "sha256:3c624e43ed56313651bc18a47f838b60d7b8032ed348911c54906b130b20071b"}, + {file = "matplotlib-3.10.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:3f2e409836d7f5ac2f1c013110a4d50b9f7edc26328c108915f9075d7d7a91b6"}, + {file = "matplotlib-3.10.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:56271f3dac49a88d7fca5060f004d9d22b865f743a12a23b1e937a0be4818ee1"}, + {file = "matplotlib-3.10.8-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a0a7f52498f72f13d4a25ea70f35f4cb60642b466cbb0a9be951b5bc3f45a486"}, + {file = "matplotlib-3.10.8-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:646d95230efb9ca614a7a594d4fcacde0ac61d25e37dd51710b36477594963ce"}, + {file = "matplotlib-3.10.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f89c151aab2e2e23cb3fe0acad1e8b82841fd265379c4cecd0f3fcb34c15e0f6"}, + {file = "matplotlib-3.10.8-cp313-cp313-win_amd64.whl", hash = "sha256:e8ea3e2d4066083e264e75c829078f9e149fa119d27e19acd503de65e0b13149"}, + {file = "matplotlib-3.10.8-cp313-cp313-win_arm64.whl", hash = "sha256:c108a1d6fa78a50646029cb6d49808ff0fc1330fda87fa6f6250c6b5369b6645"}, + {file = "matplotlib-3.10.8-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ad3d9833a64cf48cc4300f2b406c3d0f4f4724a91c0bd5640678a6ba7c102077"}, + {file = "matplotlib-3.10.8-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:eb3823f11823deade26ce3b9f40dcb4a213da7a670013929f31d5f5ed1055b22"}, + {file = "matplotlib-3.10.8-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d9050fee89a89ed57b4fb2c1bfac9a3d0c57a0d55aed95949eedbc42070fea39"}, + {file = "matplotlib-3.10.8-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b44d07310e404ba95f8c25aa5536f154c0a8ec473303535949e52eb71d0a1565"}, + {file = "matplotlib-3.10.8-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:0a33deb84c15ede243aead39f77e990469fff93ad1521163305095b77b72ce4a"}, + {file = "matplotlib-3.10.8-cp313-cp313t-win_amd64.whl", hash = "sha256:3a48a78d2786784cc2413e57397981fb45c79e968d99656706018d6e62e57958"}, + {file = "matplotlib-3.10.8-cp313-cp313t-win_arm64.whl", hash = "sha256:15d30132718972c2c074cd14638c7f4592bd98719e2308bccea40e0538bc0cb5"}, + {file = "matplotlib-3.10.8-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:b53285e65d4fa4c86399979e956235deb900be5baa7fc1218ea67fbfaeaadd6f"}, + {file = "matplotlib-3.10.8-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:32f8dce744be5569bebe789e46727946041199030db8aeb2954d26013a0eb26b"}, + {file = "matplotlib-3.10.8-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4cf267add95b1c88300d96ca837833d4112756045364f5c734a2276038dae27d"}, + {file = "matplotlib-3.10.8-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2cf5bd12cecf46908f286d7838b2abc6c91cda506c0445b8223a7c19a00df008"}, + {file = "matplotlib-3.10.8-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:41703cc95688f2516b480f7f339d8851a6035f18e100ee6a32bc0b8536a12a9c"}, + {file = "matplotlib-3.10.8-cp314-cp314-win_amd64.whl", hash = "sha256:83d282364ea9f3e52363da262ce32a09dfe241e4080dcedda3c0db059d3c1f11"}, + {file = "matplotlib-3.10.8-cp314-cp314-win_arm64.whl", hash = "sha256:2c1998e92cd5999e295a731bcb2911c75f597d937341f3030cc24ef2733d78a8"}, + {file = "matplotlib-3.10.8-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:b5a2b97dbdc7d4f353ebf343744f1d1f1cca8aa8bfddb4262fcf4306c3761d50"}, + {file = "matplotlib-3.10.8-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:3f5c3e4da343bba819f0234186b9004faba952cc420fbc522dc4e103c1985908"}, + {file = "matplotlib-3.10.8-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f62550b9a30afde8c1c3ae450e5eb547d579dd69b25c2fc7a1c67f934c1717a"}, + {file = "matplotlib-3.10.8-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:495672de149445ec1b772ff2c9ede9b769e3cb4f0d0aa7fa730d7f59e2d4e1c1"}, + {file = "matplotlib-3.10.8-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:595ba4d8fe983b88f0eec8c26a241e16d6376fe1979086232f481f8f3f67494c"}, + {file = "matplotlib-3.10.8-cp314-cp314t-win_amd64.whl", hash = "sha256:25d380fe8b1dc32cf8f0b1b448470a77afb195438bafdf1d858bfb876f3edf7b"}, + {file = "matplotlib-3.10.8-cp314-cp314t-win_arm64.whl", hash = "sha256:113bb52413ea508ce954a02c10ffd0d565f9c3bc7f2eddc27dfe1731e71c7b5f"}, + {file = "matplotlib-3.10.8-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:f97aeb209c3d2511443f8797e3e5a569aebb040d4f8bc79aa3ee78a8fb9e3dd8"}, + {file = "matplotlib-3.10.8-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fb061f596dad3a0f52b60dc6a5dec4a0c300dec41e058a7efe09256188d170b7"}, + {file = "matplotlib-3.10.8-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:12d90df9183093fcd479f4172ac26b322b1248b15729cb57f42f71f24c7e37a3"}, + {file = "matplotlib-3.10.8-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:6da7c2ce169267d0d066adcf63758f0604aa6c3eebf67458930f9d9b79ad1db1"}, + {file = "matplotlib-3.10.8-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:9153c3292705be9f9c64498a8872118540c3f4123d1a1c840172edf262c8be4a"}, + {file = "matplotlib-3.10.8-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ae029229a57cd1e8fe542485f27e7ca7b23aa9e8944ddb4985d0bc444f1eca2"}, + {file = "matplotlib-3.10.8.tar.gz", hash = "sha256:2299372c19d56bcd35cf05a2738308758d32b9eaed2371898d8f5bd33f084aa3"}, +] + +[package.dependencies] +contourpy = ">=1.0.1" +cycler = ">=0.10" +fonttools = ">=4.22.0" +kiwisolver = ">=1.3.1" +numpy = ">=1.23" +packaging = ">=20.0" +pillow = ">=8" +pyparsing = ">=3" +python-dateutil = ">=2.7" + +[package.extras] +dev = ["meson-python (>=0.13.1,<0.17.0)", "pybind11 (>=2.13.2,!=2.13.3)", "setuptools (>=64)", "setuptools_scm (>=7)"] + +[[package]] +name = "matplotlib-inline" +version = "0.2.1" +description = "Inline Matplotlib backend for Jupyter" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "matplotlib_inline-0.2.1-py3-none-any.whl", hash = "sha256:d56ce5156ba6085e00a9d54fead6ed29a9c47e215cd1bba2e976ef39f5710a76"}, + {file = "matplotlib_inline-0.2.1.tar.gz", hash = "sha256:e1ee949c340d771fc39e241ea75683deb94762c8fa5f2927ec57c83c4dffa9fe"}, +] + +[package.dependencies] +traitlets = "*" + +[package.extras] +test = ["flake8", "nbdime", "nbval", "notebook", "pytest"] + +[[package]] +name = "mcp" +version = "1.26.0" +description = "Model Context Protocol SDK" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "mcp-1.26.0-py3-none-any.whl", hash = "sha256:904a21c33c25aa98ddbeb47273033c435e595bbacfdb177f4bd87f6dceebe1ca"}, + {file = "mcp-1.26.0.tar.gz", hash = "sha256:db6e2ef491eecc1a0d93711a76f28dec2e05999f93afd48795da1c1137142c66"}, +] + +[package.dependencies] +anyio = ">=4.5" +httpx = ">=0.27.1" +httpx-sse = ">=0.4" +jsonschema = ">=4.20.0" +pydantic = ">=2.11.0,<3.0.0" +pydantic-settings = ">=2.5.2" +pyjwt = {version = ">=2.10.1", extras = ["crypto"]} +python-multipart = ">=0.0.9" +pywin32 = {version = ">=310", markers = "sys_platform == \"win32\""} +sse-starlette = ">=1.6.1" +starlette = ">=0.27" +typing-extensions = ">=4.9.0" +typing-inspection = ">=0.4.1" +uvicorn = {version = ">=0.31.1", markers = "sys_platform != \"emscripten\""} + +[package.extras] +cli = ["python-dotenv (>=1.0.0)", "typer (>=0.16.0)"] +rich = ["rich (>=13.9.4)"] +ws = ["websockets (>=15.0.1)"] + +[[package]] +name = "mdurl" +version = "0.1.2" +description = "Markdown URL utilities" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, + {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, +] + +[[package]] +name = "more-itertools" +version = "10.8.0" +description = "More routines for operating on iterables, beyond itertools" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "more_itertools-10.8.0-py3-none-any.whl", hash = "sha256:52d4362373dcf7c52546bc4af9a86ee7c4579df9a8dc268be0a2f949d376cc9b"}, + {file = "more_itertools-10.8.0.tar.gz", hash = "sha256:f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd"}, +] + +[[package]] +name = "mpmath" +version = "1.3.0" +description = "Python library for arbitrary-precision floating-point arithmetic" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"}, + {file = "mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f"}, +] + +[package.extras] +develop = ["codecov", "pycodestyle", "pytest (>=4.6)", "pytest-cov", "wheel"] +docs = ["sphinx"] +gmpy = ["gmpy2 (>=2.1.0a4) ; platform_python_implementation != \"PyPy\""] +tests = ["pytest (>=4.6)"] + +[[package]] +name = "msgspec" +version = "0.20.0" +description = "A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "msgspec-0.20.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:23a6ec2a3b5038c233b04740a545856a068bc5cb8db184ff493a58e08c994fbf"}, + {file = "msgspec-0.20.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cde2c41ed3eaaef6146365cb0d69580078a19f974c6cb8165cc5dcd5734f573e"}, + {file = "msgspec-0.20.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5da0daa782f95d364f0d95962faed01e218732aa1aa6cad56b25a5d2092e75a4"}, + {file = "msgspec-0.20.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9369d5266144bef91be2940a3821e03e51a93c9080fde3ef72728c3f0a3a8bb7"}, + {file = "msgspec-0.20.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:90fb865b306ca92c03964a5f3d0cd9eb1adda14f7e5ac7943efd159719ea9f10"}, + {file = "msgspec-0.20.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e8112cd48b67dfc0cfa49fc812b6ce7eb37499e1d95b9575061683f3428975d3"}, + {file = "msgspec-0.20.0-cp310-cp310-win_amd64.whl", hash = "sha256:666b966d503df5dc27287675f525a56b6e66a2b8e8ccd2877b0c01328f19ae6c"}, + {file = "msgspec-0.20.0-cp310-cp310-win_arm64.whl", hash = "sha256:099e3e85cd5b238f2669621be65f0728169b8c7cb7ab07f6137b02dc7feea781"}, + {file = "msgspec-0.20.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:09e0efbf1ac641fedb1d5496c59507c2f0dc62a052189ee62c763e0aae217520"}, + {file = "msgspec-0.20.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:23ee3787142e48f5ee746b2909ce1b76e2949fbe0f97f9f6e70879f06c218b54"}, + {file = "msgspec-0.20.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:81f4ac6f0363407ac0465eff5c7d4d18f26870e00674f8fcb336d898a1e36854"}, + {file = "msgspec-0.20.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bb4d873f24ae18cd1334f4e37a178ed46c9d186437733351267e0a269bdf7e53"}, + {file = "msgspec-0.20.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b92b8334427b8393b520c24ff53b70f326f79acf5f74adb94fd361bcff8a1d4e"}, + {file = "msgspec-0.20.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:562c44b047c05cc0384e006fae7a5e715740215c799429e0d7e3e5adf324285a"}, + {file = "msgspec-0.20.0-cp311-cp311-win_amd64.whl", hash = "sha256:d1dcc93a3ce3d3195985bfff18a48274d0b5ffbc96fa1c5b89da6f0d9af81b29"}, + {file = "msgspec-0.20.0-cp311-cp311-win_arm64.whl", hash = "sha256:aa387aa330d2e4bd69995f66ea8fdc87099ddeedf6fdb232993c6a67711e7520"}, + {file = "msgspec-0.20.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2aba22e2e302e9231e85edc24f27ba1f524d43c223ef5765bd8624c7df9ec0a5"}, + {file = "msgspec-0.20.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:716284f898ab2547fedd72a93bb940375de9fbfe77538f05779632dc34afdfde"}, + {file = "msgspec-0.20.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:558ed73315efa51b1538fa8f1d3b22c8c5ff6d9a2a62eff87d25829b94fc5054"}, + {file = "msgspec-0.20.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:509ac1362a1d53aa66798c9b9fd76872d7faa30fcf89b2fba3bcbfd559d56eb0"}, + {file = "msgspec-0.20.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1353c2c93423602e7dea1aa4c92f3391fdfc25ff40e0bacf81d34dbc68adb870"}, + {file = "msgspec-0.20.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cb33b5eb5adb3c33d749684471c6a165468395d7aa02d8867c15103b81e1da3e"}, + {file = "msgspec-0.20.0-cp312-cp312-win_amd64.whl", hash = "sha256:fb1d934e435dd3a2b8cf4bbf47a8757100b4a1cfdc2afdf227541199885cdacb"}, + {file = "msgspec-0.20.0-cp312-cp312-win_arm64.whl", hash = "sha256:00648b1e19cf01b2be45444ba9dc961bd4c056ffb15706651e64e5d6ec6197b7"}, + {file = "msgspec-0.20.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9c1ff8db03be7598b50dd4b4a478d6fe93faae3bd54f4f17aa004d0e46c14c46"}, + {file = "msgspec-0.20.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f6532369ece217fd37c5ebcfd7e981f2615628c21121b7b2df9d3adcf2fd69b8"}, + {file = "msgspec-0.20.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f9a1697da2f85a751ac3cc6a97fceb8e937fc670947183fb2268edaf4016d1ee"}, + {file = "msgspec-0.20.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7fac7e9c92eddcd24c19d9e5f6249760941485dff97802461ae7c995a2450111"}, + {file = "msgspec-0.20.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f953a66f2a3eb8d5ea64768445e2bb301d97609db052628c3e1bcb7d87192a9f"}, + {file = "msgspec-0.20.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:247af0313ae64a066d3aea7ba98840f6681ccbf5c90ba9c7d17f3e39dbba679c"}, + {file = "msgspec-0.20.0-cp313-cp313-win_amd64.whl", hash = "sha256:67d5e4dfad52832017018d30a462604c80561aa62a9d548fc2bd4e430b66a352"}, + {file = "msgspec-0.20.0-cp313-cp313-win_arm64.whl", hash = "sha256:91a52578226708b63a9a13de287b1ec3ed1123e4a088b198143860c087770458"}, + {file = "msgspec-0.20.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:eead16538db1b3f7ec6e3ed1f6f7c5dec67e90f76e76b610e1ffb5671815633a"}, + {file = "msgspec-0.20.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:703c3bb47bf47801627fb1438f106adbfa2998fe586696d1324586a375fca238"}, + {file = "msgspec-0.20.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6cdb227dc585fb109305cee0fd304c2896f02af93ecf50a9c84ee54ee67dbb42"}, + {file = "msgspec-0.20.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:27d35044dd8818ac1bd0fedb2feb4fbdff4e3508dd7c5d14316a12a2d96a0de0"}, + {file = "msgspec-0.20.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b4296393a29ee42dd25947981c65506fd4ad39beaf816f614146fa0c5a6c91ae"}, + {file = "msgspec-0.20.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:205fbdadd0d8d861d71c8f3399fe1a82a2caf4467bc8ff9a626df34c12176980"}, + {file = "msgspec-0.20.0-cp314-cp314-win_amd64.whl", hash = "sha256:7dfebc94fe7d3feec6bc6c9df4f7e9eccc1160bb5b811fbf3e3a56899e398a6b"}, + {file = "msgspec-0.20.0-cp314-cp314-win_arm64.whl", hash = "sha256:2ad6ae36e4a602b24b4bf4eaf8ab5a441fec03e1f1b5931beca8ebda68f53fc0"}, + {file = "msgspec-0.20.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:f84703e0e6ef025663dd1de828ca028774797b8155e070e795c548f76dde65d5"}, + {file = "msgspec-0.20.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7c83fc24dd09cf1275934ff300e3951b3adc5573f0657a643515cc16c7dee131"}, + {file = "msgspec-0.20.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f13ccb1c335a124e80c4562573b9b90f01ea9521a1a87f7576c2e281d547f56"}, + {file = "msgspec-0.20.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:17c2b5ca19f19306fc83c96d85e606d2cc107e0caeea85066b5389f664e04846"}, + {file = "msgspec-0.20.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d931709355edabf66c2dd1a756b2d658593e79882bc81aae5964969d5a291b63"}, + {file = "msgspec-0.20.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:565f915d2e540e8a0c93a01ff67f50aebe1f7e22798c6a25873f9fda8d1325f8"}, + {file = "msgspec-0.20.0-cp314-cp314t-win_amd64.whl", hash = "sha256:726f3e6c3c323f283f6021ebb6c8ccf58d7cd7baa67b93d73bfbe9a15c34ab8d"}, + {file = "msgspec-0.20.0-cp314-cp314t-win_arm64.whl", hash = "sha256:93f23528edc51d9f686808a361728e903d6f2be55c901d6f5c92e44c6d546bfc"}, + {file = "msgspec-0.20.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eee56472ced14602245ac47516e179d08c6c892d944228796f239e983de7449c"}, + {file = "msgspec-0.20.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:19395e9a08cc5bd0e336909b3e13b4ae5ee5e47b82e98f8b7801d5a13806bb6f"}, + {file = "msgspec-0.20.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d5bb7ce84fe32f6ce9f62aa7e7109cb230ad542cc5bc9c46e587f1dac4afc48e"}, + {file = "msgspec-0.20.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8c6da9ae2d76d11181fbb0ea598f6e1d558ef597d07ec46d689d17f68133769f"}, + {file = "msgspec-0.20.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:84d88bd27d906c471a5ca232028671db734111996ed1160e37171a8d1f07a599"}, + {file = "msgspec-0.20.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:03907bf733f94092a6b4c5285b274f79947cad330bd8a9d8b45c0369e1a3c7f0"}, + {file = "msgspec-0.20.0-cp39-cp39-win_amd64.whl", hash = "sha256:9fbcb660632a2f5c247c0dc820212bf3a423357ac6241ff6dc6cfc6f72584016"}, + {file = "msgspec-0.20.0-cp39-cp39-win_arm64.whl", hash = "sha256:f7cd0e89b86a16005745cb99bd1858e8050fc17f63de571504492b267bca188a"}, + {file = "msgspec-0.20.0.tar.gz", hash = "sha256:692349e588fde322875f8d3025ac01689fead5901e7fb18d6870a44519d62a29"}, +] + +[package.extras] +toml = ["tomli ; python_version < \"3.11\"", "tomli_w"] +yaml = ["pyyaml"] + +[[package]] +name = "multidict" +version = "6.7.1" +description = "multidict implementation" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "multidict-6.7.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c93c3db7ea657dd4637d57e74ab73de31bccefe144d3d4ce370052035bc85fb5"}, + {file = "multidict-6.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:974e72a2474600827abaeda71af0c53d9ebbc3c2eb7da37b37d7829ae31232d8"}, + {file = "multidict-6.7.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdea2e7b2456cfb6694fb113066fd0ec7ea4d67e3a35e1f4cbeea0b448bf5872"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:17207077e29342fdc2c9a82e4b306f1127bf1ea91f8b71e02d4798a70bb99991"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d4f49cb5661344764e4c7c7973e92a47a59b8fc19b6523649ec9dc4960e58a03"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a9fc4caa29e2e6ae408d1c450ac8bf19892c5fca83ee634ecd88a53332c59981"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c5f0c21549ab432b57dcc82130f388d84ad8179824cc3f223d5e7cfbfd4143f6"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7dfb78d966b2c906ae1d28ccf6e6712a3cd04407ee5088cd276fe8cb42186190"}, + {file = "multidict-6.7.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9b0d9b91d1aa44db9c1f1ecd0d9d2ae610b2f4f856448664e01a3b35899f3f92"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:dd96c01a9dcd4889dcfcf9eb5544ca0c77603f239e3ffab0524ec17aea9a93ee"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:067343c68cd6612d375710f895337b3a98a033c94f14b9a99eff902f205424e2"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:5884a04f4ff56c6120f6ccf703bdeb8b5079d808ba604d4d53aec0d55dc33568"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8affcf1c98b82bc901702eb73b6947a1bfa170823c153fe8a47b5f5f02e48e40"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0d17522c37d03e85c8098ec8431636309b2682cf12e58f4dbc76121fb50e4962"}, + {file = "multidict-6.7.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:24c0cf81544ca5e17cfcb6e482e7a82cd475925242b308b890c9452a074d4505"}, + {file = "multidict-6.7.1-cp310-cp310-win32.whl", hash = "sha256:d82dd730a95e6643802f4454b8fdecdf08667881a9c5670db85bc5a56693f122"}, + {file = "multidict-6.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:cf37cbe5ced48d417ba045aca1b21bafca67489452debcde94778a576666a1df"}, + {file = "multidict-6.7.1-cp310-cp310-win_arm64.whl", hash = "sha256:59bc83d3f66b41dac1e7460aac1d196edc70c9ba3094965c467715a70ecb46db"}, + {file = "multidict-6.7.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7ff981b266af91d7b4b3793ca3382e53229088d193a85dfad6f5f4c27fc73e5d"}, + {file = "multidict-6.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:844c5bca0b5444adb44a623fb0a1310c2f4cd41f402126bb269cd44c9b3f3e1e"}, + {file = "multidict-6.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f2a0a924d4c2e9afcd7ec64f9de35fcd96915149b2216e1cb2c10a56df483855"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8be1802715a8e892c784c0197c2ace276ea52702a0ede98b6310c8f255a5afb3"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2e2d2ed645ea29f31c4c7ea1552fcfd7cb7ba656e1eafd4134a6620c9f5fdd9e"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:95922cee9a778659e91db6497596435777bd25ed116701a4c034f8e46544955a"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6b83cabdc375ffaaa15edd97eb7c0c672ad788e2687004990074d7d6c9b140c8"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:38fb49540705369bab8484db0689d86c0a33a0a9f2c1b197f506b71b4b6c19b0"}, + {file = "multidict-6.7.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:439cbebd499f92e9aa6793016a8acaa161dfa749ae86d20960189f5398a19144"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6d3bc717b6fe763b8be3f2bee2701d3c8eb1b2a8ae9f60910f1b2860c82b6c49"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:619e5a1ac57986dbfec9f0b301d865dddf763696435e2962f6d9cf2fdff2bb71"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:0b38ebffd9be37c1170d33bc0f36f4f262e0a09bc1aac1c34c7aa51a7293f0b3"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:10ae39c9cfe6adedcdb764f5e8411d4a92b055e35573a2eaa88d3323289ef93c"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:25167cc263257660290fba06b9318d2026e3c910be240a146e1f66dd114af2b0"}, + {file = "multidict-6.7.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:128441d052254f42989ef98b7b6a6ecb1e6f708aa962c7984235316db59f50fa"}, + {file = "multidict-6.7.1-cp311-cp311-win32.whl", hash = "sha256:d62b7f64ffde3b99d06b707a280db04fb3855b55f5a06df387236051d0668f4a"}, + {file = "multidict-6.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:bdbf9f3b332abd0cdb306e7c2113818ab1e922dc84b8f8fd06ec89ed2a19ab8b"}, + {file = "multidict-6.7.1-cp311-cp311-win_arm64.whl", hash = "sha256:b8c990b037d2fff2f4e33d3f21b9b531c5745b33a49a7d6dbe7a177266af44f6"}, + {file = "multidict-6.7.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a90f75c956e32891a4eda3639ce6dd86e87105271f43d43442a3aedf3cddf172"}, + {file = "multidict-6.7.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3fccb473e87eaa1382689053e4a4618e7ba7b9b9b8d6adf2027ee474597128cd"}, + {file = "multidict-6.7.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b0fa96985700739c4c7853a43c0b3e169360d6855780021bfc6d0f1ce7c123e7"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cb2a55f408c3043e42b40cc8eecd575afa27b7e0b956dfb190de0f8499a57a53"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eb0ce7b2a32d09892b3dd6cc44877a0d02a33241fafca5f25c8b6b62374f8b75"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c3a32d23520ee37bf327d1e1a656fec76a2edd5c038bf43eddfa0572ec49c60b"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9c90fed18bffc0189ba814749fdcc102b536e83a9f738a9003e569acd540a733"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:da62917e6076f512daccfbbde27f46fed1c98fee202f0559adec8ee0de67f71a"}, + {file = "multidict-6.7.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bfde23ef6ed9db7eaee6c37dcec08524cb43903c60b285b172b6c094711b3961"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3758692429e4e32f1ba0df23219cd0b4fc0a52f476726fff9337d1a57676a582"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:398c1478926eca669f2fd6a5856b6de9c0acf23a2cb59a14c0ba5844fa38077e"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c102791b1c4f3ab36ce4101154549105a53dc828f016356b3e3bcae2e3a039d3"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:a088b62bd733e2ad12c50dad01b7d0166c30287c166e137433d3b410add807a6"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3d51ff4785d58d3f6c91bdbffcb5e1f7ddfda557727043aa20d20ec4f65e324a"}, + {file = "multidict-6.7.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fc5907494fccf3e7d3f94f95c91d6336b092b5fc83811720fae5e2765890dfba"}, + {file = "multidict-6.7.1-cp312-cp312-win32.whl", hash = "sha256:28ca5ce2fd9716631133d0e9a9b9a745ad7f60bac2bccafb56aa380fc0b6c511"}, + {file = "multidict-6.7.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcee94dfbd638784645b066074b338bc9cc155d4b4bffa4adce1615c5a426c19"}, + {file = "multidict-6.7.1-cp312-cp312-win_arm64.whl", hash = "sha256:ba0a9fb644d0c1a2194cf7ffb043bd852cea63a57f66fbd33959f7dae18517bf"}, + {file = "multidict-6.7.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2b41f5fed0ed563624f1c17630cb9941cf2309d4df00e494b551b5f3e3d67a23"}, + {file = "multidict-6.7.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84e61e3af5463c19b67ced91f6c634effb89ef8bfc5ca0267f954451ed4bb6a2"}, + {file = "multidict-6.7.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:935434b9853c7c112eee7ac891bc4cb86455aa631269ae35442cb316790c1445"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:432feb25a1cb67fe82a9680b4d65fb542e4635cb3166cd9c01560651ad60f177"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e82d14e3c948952a1a85503817e038cba5905a3352de76b9a465075d072fba23"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4cfb48c6ea66c83bcaaf7e4dfa7ec1b6bbcf751b7db85a328902796dfde4c060"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1d540e51b7e8e170174555edecddbd5538105443754539193e3e1061864d444d"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:273d23f4b40f3dce4d6c8a821c741a86dec62cded82e1175ba3d99be128147ed"}, + {file = "multidict-6.7.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d624335fd4fa1c08a53f8b4be7676ebde19cd092b3895c421045ca87895b429"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:12fad252f8b267cc75b66e8fc51b3079604e8d43a75428ffe193cd9e2195dfd6"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:03ede2a6ffbe8ef936b92cb4529f27f42be7f56afcdab5ab739cd5f27fb1cbf9"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:90efbcf47dbe33dcf643a1e400d67d59abeac5db07dc3f27d6bdeae497a2198c"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5c4b9bfc148f5a91be9244d6264c53035c8a0dcd2f51f1c3c6e30e30ebaa1c84"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:401c5a650f3add2472d1d288c26deebc540f99e2fb83e9525007a74cd2116f1d"}, + {file = "multidict-6.7.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:97891f3b1b3ffbded884e2916cacf3c6fc87b66bb0dde46f7357404750559f33"}, + {file = "multidict-6.7.1-cp313-cp313-win32.whl", hash = "sha256:e1c5988359516095535c4301af38d8a8838534158f649c05dd1050222321bcb3"}, + {file = "multidict-6.7.1-cp313-cp313-win_amd64.whl", hash = "sha256:960c83bf01a95b12b08fd54324a4eb1d5b52c88932b5cba5d6e712bb3ed12eb5"}, + {file = "multidict-6.7.1-cp313-cp313-win_arm64.whl", hash = "sha256:563fe25c678aaba333d5399408f5ec3c383ca5b663e7f774dd179a520b8144df"}, + {file = "multidict-6.7.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:c76c4bec1538375dad9d452d246ca5368ad6e1c9039dadcf007ae59c70619ea1"}, + {file = "multidict-6.7.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:57b46b24b5d5ebcc978da4ec23a819a9402b4228b8a90d9c656422b4bdd8a963"}, + {file = "multidict-6.7.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e954b24433c768ce78ab7929e84ccf3422e46deb45a4dc9f93438f8217fa2d34"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3bd231490fa7217cc832528e1cd8752a96f0125ddd2b5749390f7c3ec8721b65"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:253282d70d67885a15c8a7716f3a73edf2d635793ceda8173b9ecc21f2fb8292"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0b4c48648d7649c9335cf1927a8b87fa692de3dcb15faa676c6a6f1f1aabda43"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:98bc624954ec4d2c7cb074b8eefc2b5d0ce7d482e410df446414355d158fe4ca"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1b99af4d9eec0b49927b4402bcbb58dea89d3e0db8806a4086117019939ad3dd"}, + {file = "multidict-6.7.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6aac4f16b472d5b7dc6f66a0d49dd57b0e0902090be16594dc9ebfd3d17c47e7"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:21f830fe223215dffd51f538e78c172ed7c7f60c9b96a2bf05c4848ad49921c3"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:f5dd81c45b05518b9aa4da4aa74e1c93d715efa234fd3e8a179df611cc85e5f4"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:eb304767bca2bb92fb9c5bd33cedc95baee5bb5f6c88e63706533a1c06ad08c8"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:c9035dde0f916702850ef66460bc4239d89d08df4d02023a5926e7446724212c"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:af959b9beeb66c822380f222f0e0a1889331597e81f1ded7f374f3ecb0fd6c52"}, + {file = "multidict-6.7.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:41f2952231456154ee479651491e94118229844dd7226541788be783be2b5108"}, + {file = "multidict-6.7.1-cp313-cp313t-win32.whl", hash = "sha256:df9f19c28adcb40b6aae30bbaa1478c389efd50c28d541d76760199fc1037c32"}, + {file = "multidict-6.7.1-cp313-cp313t-win_amd64.whl", hash = "sha256:d54ecf9f301853f2c5e802da559604b3e95bb7a3b01a9c295c6ee591b9882de8"}, + {file = "multidict-6.7.1-cp313-cp313t-win_arm64.whl", hash = "sha256:5a37ca18e360377cfda1d62f5f382ff41f2b8c4ccb329ed974cc2e1643440118"}, + {file = "multidict-6.7.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8f333ec9c5eb1b7105e3b84b53141e66ca05a19a605368c55450b6ba208cb9ee"}, + {file = "multidict-6.7.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a407f13c188f804c759fc6a9f88286a565c242a76b27626594c133b82883b5c2"}, + {file = "multidict-6.7.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0e161ddf326db5577c3a4cc2d8648f81456e8a20d40415541587a71620d7a7d1"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1e3a8bb24342a8201d178c3b4984c26ba81a577c80d4d525727427460a50c22d"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97231140a50f5d447d3164f994b86a0bed7cd016e2682f8650d6a9158e14fd31"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6b10359683bd8806a200fd2909e7c8ca3a7b24ec1d8132e483d58e791d881048"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:283ddac99f7ac25a4acadbf004cb5ae34480bbeb063520f70ce397b281859362"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:538cec1e18c067d0e6103aa9a74f9e832904c957adc260e61cd9d8cf0c3b3d37"}, + {file = "multidict-6.7.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7eee46ccb30ff48a1e35bb818cc90846c6be2b68240e42a78599166722cea709"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fa263a02f4f2dd2d11a7b1bb4362aa7cb1049f84a9235d31adf63f30143469a0"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:2e1425e2f99ec5bd36c15a01b690a1a2456209c5deed58f95469ffb46039ccbb"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:497394b3239fc6f0e13a78a3e1b61296e72bf1c5f94b4c4eb80b265c37a131cd"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:233b398c29d3f1b9676b4b6f75c518a06fcb2ea0b925119fb2c1bc35c05e1601"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:93b1818e4a6e0930454f0f2af7dfce69307ca03cdcfb3739bf4d91241967b6c1"}, + {file = "multidict-6.7.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f33dc2a3abe9249ea5d8360f969ec7f4142e7ac45ee7014d8f8d5acddf178b7b"}, + {file = "multidict-6.7.1-cp314-cp314-win32.whl", hash = "sha256:3ab8b9d8b75aef9df299595d5388b14530839f6422333357af1339443cff777d"}, + {file = "multidict-6.7.1-cp314-cp314-win_amd64.whl", hash = "sha256:5e01429a929600e7dab7b166062d9bb54a5eed752384c7384c968c2afab8f50f"}, + {file = "multidict-6.7.1-cp314-cp314-win_arm64.whl", hash = "sha256:4885cb0e817aef5d00a2e8451d4665c1808378dc27c2705f1bf4ef8505c0d2e5"}, + {file = "multidict-6.7.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:0458c978acd8e6ea53c81eefaddbbee9c6c5e591f41b3f5e8e194780fe026581"}, + {file = "multidict-6.7.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:c0abd12629b0af3cf590982c0b413b1e7395cd4ec026f30986818ab95bfaa94a"}, + {file = "multidict-6.7.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:14525a5f61d7d0c94b368a42cff4c9a4e7ba2d52e2672a7b23d84dc86fb02b0c"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:17307b22c217b4cf05033dabefe68255a534d637c6c9b0cc8382718f87be4262"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7a7e590ff876a3eaf1c02a4dfe0724b6e69a9e9de6d8f556816f29c496046e59"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5fa6a95dfee63893d80a34758cd0e0c118a30b8dcb46372bf75106c591b77889"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a0543217a6a017692aa6ae5cc39adb75e587af0f3a82288b1492eb73dd6cc2a4"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f99fe611c312b3c1c0ace793f92464d8cd263cc3b26b5721950d977b006b6c4d"}, + {file = "multidict-6.7.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9004d8386d133b7e6135679424c91b0b854d2d164af6ea3f289f8f2761064609"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e628ef0e6859ffd8273c69412a2465c4be4a9517d07261b33334b5ec6f3c7489"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:841189848ba629c3552035a6a7f5bf3b02eb304e9fea7492ca220a8eda6b0e5c"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:ce1bbd7d780bb5a0da032e095c951f7014d6b0a205f8318308140f1a6aba159e"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b26684587228afed0d50cf804cc71062cc9c1cdf55051c4c6345d372947b268c"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:9f9af11306994335398293f9958071019e3ab95e9a707dc1383a35613f6abcb9"}, + {file = "multidict-6.7.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:b4938326284c4f1224178a560987b6cf8b4d38458b113d9b8c1db1a836e640a2"}, + {file = "multidict-6.7.1-cp314-cp314t-win32.whl", hash = "sha256:98655c737850c064a65e006a3df7c997cd3b220be4ec8fe26215760b9697d4d7"}, + {file = "multidict-6.7.1-cp314-cp314t-win_amd64.whl", hash = "sha256:497bde6223c212ba11d462853cfa4f0ae6ef97465033e7dc9940cdb3ab5b48e5"}, + {file = "multidict-6.7.1-cp314-cp314t-win_arm64.whl", hash = "sha256:2bbd113e0d4af5db41d5ebfe9ccaff89de2120578164f86a5d17d5a576d1e5b2"}, + {file = "multidict-6.7.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:65573858d27cdeaca41893185677dc82395159aa28875a8867af66532d413a8f"}, + {file = "multidict-6.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c524c6fb8fc342793708ab111c4dbc90ff9abd568de220432500e47e990c0358"}, + {file = "multidict-6.7.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:aa23b001d968faef416ff70dc0f1ab045517b9b42a90edd3e9bcdb06479e31d5"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:6704fa2b7453b2fb121740555fa1ee20cd98c4d011120caf4d2b8d4e7c76eec0"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:121a34e5bfa410cdf2c8c49716de160de3b1dbcd86b49656f5681e4543bcd1a8"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:026d264228bcd637d4e060844e39cdc60f86c479e463d49075dedc21b18fbbe0"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0e697826df7eb63418ee190fd06ce9f1803593bb4b9517d08c60d9b9a7f69d8f"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bb08271280173720e9fea9ede98e5231defcbad90f1624bea26f32ec8a956e2f"}, + {file = "multidict-6.7.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c6b3228e1d80af737b72925ce5fb4daf5a335e49cd7ab77ed7b9fdfbf58c526e"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:3943debf0fbb57bdde5901695c11094a9a36723e5c03875f87718ee15ca2f4d2"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:98c5787b0a0d9a41d9311eae44c3b76e6753def8d8870ab501320efe75a6a5f8"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:08ccb2a6dc72009093ebe7f3f073e5ec5964cba9a706fa94b1a1484039b87941"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:eb351f72c26dc9abe338ca7294661aa22969ad8ffe7ef7d5541d19f368dc854a"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ac1c665bad8b5d762f5f85ebe4d94130c26965f11de70c708c75671297c776de"}, + {file = "multidict-6.7.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1fa6609d0364f4f6f58351b4659a1f3e0e898ba2a8c5cac04cb2c7bc556b0bc5"}, + {file = "multidict-6.7.1-cp39-cp39-win32.whl", hash = "sha256:6f77ce314a29263e67adadc7e7c1bc699fcb3a305059ab973d038f87caa42ed0"}, + {file = "multidict-6.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:f537b55778cd3cbee430abe3131255d3a78202e0f9ea7ffc6ada893a4bcaeea4"}, + {file = "multidict-6.7.1-cp39-cp39-win_arm64.whl", hash = "sha256:749aa54f578f2e5f439538706a475aa844bfa8ef75854b1401e6e528e4937cf9"}, + {file = "multidict-6.7.1-py3-none-any.whl", hash = "sha256:55d97cc6dae627efa6a6e548885712d4864b81110ac76fa4e534c03819fa4a56"}, + {file = "multidict-6.7.1.tar.gz", hash = "sha256:ec6652a1bee61c53a3e5776b6049172c53b6aaba34f18c9ad04f82712bac623d"}, +] + +[[package]] +name = "multiprocess" +version = "0.70.16" +description = "better multiprocessing and multithreading in Python" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "multiprocess-0.70.16-pp310-pypy310_pp73-macosx_10_13_x86_64.whl", hash = "sha256:476887be10e2f59ff183c006af746cb6f1fd0eadcfd4ef49e605cbe2659920ee"}, + {file = "multiprocess-0.70.16-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:d951bed82c8f73929ac82c61f01a7b5ce8f3e5ef40f5b52553b4f547ce2b08ec"}, + {file = "multiprocess-0.70.16-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:37b55f71c07e2d741374998c043b9520b626a8dddc8b3129222ca4f1a06ef67a"}, + {file = "multiprocess-0.70.16-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:ba8c31889abf4511c7308a8c52bb4a30b9d590e7f58523302ba00237702ca054"}, + {file = "multiprocess-0.70.16-pp39-pypy39_pp73-macosx_10_13_x86_64.whl", hash = "sha256:0dfd078c306e08d46d7a8d06fb120313d87aa43af60d66da43ffff40b44d2f41"}, + {file = "multiprocess-0.70.16-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e7b9d0f307cd9bd50851afaac0dba2cb6c44449efff697df7c7645f7d3f2be3a"}, + {file = "multiprocess-0.70.16-py310-none-any.whl", hash = "sha256:c4a9944c67bd49f823687463660a2d6daae94c289adff97e0f9d696ba6371d02"}, + {file = "multiprocess-0.70.16-py311-none-any.whl", hash = "sha256:af4cabb0dac72abfb1e794fa7855c325fd2b55a10a44628a3c1ad3311c04127a"}, + {file = "multiprocess-0.70.16-py312-none-any.whl", hash = "sha256:fc0544c531920dde3b00c29863377f87e1632601092ea2daca74e4beb40faa2e"}, + {file = "multiprocess-0.70.16-py38-none-any.whl", hash = "sha256:a71d82033454891091a226dfc319d0cfa8019a4e888ef9ca910372a446de4435"}, + {file = "multiprocess-0.70.16-py39-none-any.whl", hash = "sha256:a0bafd3ae1b732eac64be2e72038231c1ba97724b60b09400d68f229fcc2fbf3"}, + {file = "multiprocess-0.70.16.tar.gz", hash = "sha256:161af703d4652a0e1410be6abccecde4a7ddffd19341be0a7011b94aeb171ac1"}, +] + +[package.dependencies] +dill = ">=0.3.8" + +[[package]] +name = "narwhals" +version = "2.17.0" +description = "Extremely lightweight compatibility layer between dataframe libraries" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "narwhals-2.17.0-py3-none-any.whl", hash = "sha256:2ac5307b7c2b275a7d66eeda906b8605e3d7a760951e188dcfff86e8ebe083dd"}, + {file = "narwhals-2.17.0.tar.gz", hash = "sha256:ebd5bc95bcfa2f8e89a8ac09e2765a63055162837208e67b42d6eeb6651d5e67"}, +] + +[package.extras] +cudf = ["cudf-cu12 (>=24.10.0)"] +dask = ["dask[dataframe] (>=2024.8)"] +duckdb = ["duckdb (>=1.1)"] +ibis = ["ibis-framework (>=6.0.0)", "packaging", "pyarrow-hotfix", "rich"] +modin = ["modin"] +pandas = ["pandas (>=1.1.3)"] +polars = ["polars (>=0.20.4)"] +pyarrow = ["pyarrow (>=13.0.0)"] +pyspark = ["pyspark (>=3.5.0)"] +pyspark-connect = ["pyspark[connect] (>=3.5.0)"] +sql = ["duckdb (>=1.1)", "sqlparse"] +sqlframe = ["sqlframe (>=3.22.0,!=3.39.3)"] + +[[package]] +name = "nest-asyncio" +version = "1.6.0" +description = "Patch asyncio to allow nested event loops" +optional = false +python-versions = ">=3.5" +groups = ["main"] +files = [ + {file = "nest_asyncio-1.6.0-py3-none-any.whl", hash = "sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c"}, + {file = "nest_asyncio-1.6.0.tar.gz", hash = "sha256:6f172d5449aca15afd6c646851f4e31e02c598d553a667e38cafa997cfec55fe"}, +] + +[[package]] +name = "networkx" +version = "3.6" +description = "Python package for creating and manipulating graphs and networks" +optional = false +python-versions = ">=3.11" +groups = ["main"] +files = [ + {file = "networkx-3.6-py3-none-any.whl", hash = "sha256:cdb395b105806062473d3be36458d8f1459a4e4b98e236a66c3a48996e07684f"}, + {file = "networkx-3.6.tar.gz", hash = "sha256:285276002ad1f7f7da0f7b42f004bcba70d381e936559166363707fdad3d72ad"}, +] + +[package.extras] +benchmarking = ["asv", "virtualenv"] +default = ["matplotlib (>=3.8)", "numpy (>=1.25)", "pandas (>=2.0)", "scipy (>=1.11.2)"] +developer = ["mypy (>=1.15)", "pre-commit (>=4.1)"] +doc = ["intersphinx-registry", "myst-nb (>=1.1)", "numpydoc (>=1.8.0)", "pillow (>=10)", "pydata-sphinx-theme (>=0.16)", "sphinx (>=8.0)", "sphinx-gallery (>=0.18)", "texext (>=0.6.7)"] +example = ["cairocffi (>=1.7)", "contextily (>=1.6)", "igraph (>=0.11)", "iplotx (>=0.9.0)", "momepy (>=0.7.2)", "osmnx (>=2.0.0)", "scikit-learn (>=1.5)", "seaborn (>=0.13)"] +extra = ["lxml (>=4.6)", "pydot (>=3.0.1)", "pygraphviz (>=1.14)", "sympy (>=1.10)"] +release = ["build (>=0.10)", "changelist (==0.5)", "twine (>=4.0)", "wheel (>=0.40)"] +test = ["pytest (>=7.2)", "pytest-cov (>=4.0)", "pytest-xdist (>=3.0)"] +test-extras = ["pytest-mpl", "pytest-randomly"] + +[[package]] +name = "numpy" +version = "2.4.2" +description = "Fundamental package for array computing in Python" +optional = false +python-versions = ">=3.11" +groups = ["main"] +files = [ + {file = "numpy-2.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e7e88598032542bd49af7c4747541422884219056c268823ef6e5e89851c8825"}, + {file = "numpy-2.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7edc794af8b36ca37ef5fcb5e0d128c7e0595c7b96a2318d1badb6fcd8ee86b1"}, + {file = "numpy-2.4.2-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:6e9f61981ace1360e42737e2bae58b27bf28a1b27e781721047d84bd754d32e7"}, + {file = "numpy-2.4.2-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:cb7bbb88aa74908950d979eeaa24dbdf1a865e3c7e45ff0121d8f70387b55f73"}, + {file = "numpy-2.4.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4f069069931240b3fc703f1e23df63443dbd6390614c8c44a87d96cd0ec81eb1"}, + {file = "numpy-2.4.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c02ef4401a506fb60b411467ad501e1429a3487abca4664871d9ae0b46c8ba32"}, + {file = "numpy-2.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2653de5c24910e49c2b106499803124dde62a5a1fe0eedeaecf4309a5f639390"}, + {file = "numpy-2.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1ae241bbfc6ae276f94a170b14785e561cb5e7f626b6688cf076af4110887413"}, + {file = "numpy-2.4.2-cp311-cp311-win32.whl", hash = "sha256:df1b10187212b198dd45fa943d8985a3c8cf854aed4923796e0e019e113a1bda"}, + {file = "numpy-2.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:b9c618d56a29c9cb1c4da979e9899be7578d2e0b3c24d52079c166324c9e8695"}, + {file = "numpy-2.4.2-cp311-cp311-win_arm64.whl", hash = "sha256:47c5a6ed21d9452b10227e5e8a0e1c22979811cad7dcc19d8e3e2fb8fa03f1a3"}, + {file = "numpy-2.4.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:21982668592194c609de53ba4933a7471880ccbaadcc52352694a59ecc860b3a"}, + {file = "numpy-2.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40397bda92382fcec844066efb11f13e1c9a3e2a8e8f318fb72ed8b6db9f60f1"}, + {file = "numpy-2.4.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:b3a24467af63c67829bfaa61eecf18d5432d4f11992688537be59ecd6ad32f5e"}, + {file = "numpy-2.4.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:805cc8de9fd6e7a22da5aed858e0ab16be5a4db6c873dde1d7451c541553aa27"}, + {file = "numpy-2.4.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d82351358ffbcdcd7b686b90742a9b86632d6c1c051016484fa0b326a0a1548"}, + {file = "numpy-2.4.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e35d3e0144137d9fdae62912e869136164534d64a169f86438bc9561b6ad49f"}, + {file = "numpy-2.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:adb6ed2ad29b9e15321d167d152ee909ec73395901b70936f029c3bc6d7f4460"}, + {file = "numpy-2.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8906e71fd8afcb76580404e2a950caef2685df3d2a57fe82a86ac8d33cc007ba"}, + {file = "numpy-2.4.2-cp312-cp312-win32.whl", hash = "sha256:ec055f6dae239a6299cace477b479cca2fc125c5675482daf1dd886933a1076f"}, + {file = "numpy-2.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:209fae046e62d0ce6435fcfe3b1a10537e858249b3d9b05829e2a05218296a85"}, + {file = "numpy-2.4.2-cp312-cp312-win_arm64.whl", hash = "sha256:fbde1b0c6e81d56f5dccd95dd4a711d9b95df1ae4009a60887e56b27e8d903fa"}, + {file = "numpy-2.4.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:25f2059807faea4b077a2b6837391b5d830864b3543627f381821c646f31a63c"}, + {file = "numpy-2.4.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bd3a7a9f5847d2fb8c2c6d1c862fa109c31a9abeca1a3c2bd5a64572955b2979"}, + {file = "numpy-2.4.2-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:8e4549f8a3c6d13d55041925e912bfd834285ef1dd64d6bc7d542583355e2e98"}, + {file = "numpy-2.4.2-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:aea4f66ff44dfddf8c2cffd66ba6538c5ec67d389285292fe428cb2c738c8aef"}, + {file = "numpy-2.4.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c3cd545784805de05aafe1dde61752ea49a359ccba9760c1e5d1c88a93bbf2b7"}, + {file = "numpy-2.4.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d0d9b7c93578baafcbc5f0b83eaf17b79d345c6f36917ba0c67f45226911d499"}, + {file = "numpy-2.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f74f0f7779cc7ae07d1810aab8ac6b1464c3eafb9e283a40da7309d5e6e48fbb"}, + {file = "numpy-2.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c7ac672d699bf36275c035e16b65539931347d68b70667d28984c9fb34e07fa7"}, + {file = "numpy-2.4.2-cp313-cp313-win32.whl", hash = "sha256:8e9afaeb0beff068b4d9cd20d322ba0ee1cecfb0b08db145e4ab4dd44a6b5110"}, + {file = "numpy-2.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:7df2de1e4fba69a51c06c28f5a3de36731eb9639feb8e1cf7e4a7b0daf4cf622"}, + {file = "numpy-2.4.2-cp313-cp313-win_arm64.whl", hash = "sha256:0fece1d1f0a89c16b03442eae5c56dc0be0c7883b5d388e0c03f53019a4bfd71"}, + {file = "numpy-2.4.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5633c0da313330fd20c484c78cdd3f9b175b55e1a766c4a174230c6b70ad8262"}, + {file = "numpy-2.4.2-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:d9f64d786b3b1dd742c946c42d15b07497ed14af1a1f3ce840cce27daa0ce913"}, + {file = "numpy-2.4.2-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:b21041e8cb6a1eb5312dd1d2f80a94d91efffb7a06b70597d44f1bd2dfc315ab"}, + {file = "numpy-2.4.2-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:00ab83c56211a1d7c07c25e3217ea6695e50a3e2f255053686b081dc0b091a82"}, + {file = "numpy-2.4.2-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2fb882da679409066b4603579619341c6d6898fc83a8995199d5249f986e8e8f"}, + {file = "numpy-2.4.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:66cb9422236317f9d44b67b4d18f44efe6e9c7f8794ac0462978513359461554"}, + {file = "numpy-2.4.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:0f01dcf33e73d80bd8dc0f20a71303abbafa26a19e23f6b68d1aa9990af90257"}, + {file = "numpy-2.4.2-cp313-cp313t-win32.whl", hash = "sha256:52b913ec40ff7ae845687b0b34d8d93b60cb66dcee06996dd5c99f2fc9328657"}, + {file = "numpy-2.4.2-cp313-cp313t-win_amd64.whl", hash = "sha256:5eea80d908b2c1f91486eb95b3fb6fab187e569ec9752ab7d9333d2e66bf2d6b"}, + {file = "numpy-2.4.2-cp313-cp313t-win_arm64.whl", hash = "sha256:fd49860271d52127d61197bb50b64f58454e9f578cb4b2c001a6de8b1f50b0b1"}, + {file = "numpy-2.4.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:444be170853f1f9d528428eceb55f12918e4fda5d8805480f36a002f1415e09b"}, + {file = "numpy-2.4.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:d1240d50adff70c2a88217698ca844723068533f3f5c5fa6ee2e3220e3bdb000"}, + {file = "numpy-2.4.2-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:7cdde6de52fb6664b00b056341265441192d1291c130e99183ec0d4b110ff8b1"}, + {file = "numpy-2.4.2-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:cda077c2e5b780200b6b3e09d0b42205a3d1c68f30c6dceb90401c13bff8fe74"}, + {file = "numpy-2.4.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d30291931c915b2ab5717c2974bb95ee891a1cf22ebc16a8006bd59cd210d40a"}, + {file = "numpy-2.4.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bba37bc29d4d85761deed3954a1bc62be7cf462b9510b51d367b769a8c8df325"}, + {file = "numpy-2.4.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b2f0073ed0868db1dcd86e052d37279eef185b9c8db5bf61f30f46adac63c909"}, + {file = "numpy-2.4.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:7f54844851cdb630ceb623dcec4db3240d1ac13d4990532446761baede94996a"}, + {file = "numpy-2.4.2-cp314-cp314-win32.whl", hash = "sha256:12e26134a0331d8dbd9351620f037ec470b7c75929cb8a1537f6bfe411152a1a"}, + {file = "numpy-2.4.2-cp314-cp314-win_amd64.whl", hash = "sha256:068cdb2d0d644cdb45670810894f6a0600797a69c05f1ac478e8d31670b8ee75"}, + {file = "numpy-2.4.2-cp314-cp314-win_arm64.whl", hash = "sha256:6ed0be1ee58eef41231a5c943d7d1375f093142702d5723ca2eb07db9b934b05"}, + {file = "numpy-2.4.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:98f16a80e917003a12c0580f97b5f875853ebc33e2eaa4bccfc8201ac6869308"}, + {file = "numpy-2.4.2-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:20abd069b9cda45874498b245c8015b18ace6de8546bf50dfa8cea1696ed06ef"}, + {file = "numpy-2.4.2-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:e98c97502435b53741540a5717a6749ac2ada901056c7db951d33e11c885cc7d"}, + {file = "numpy-2.4.2-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:da6cad4e82cb893db4b69105c604d805e0c3ce11501a55b5e9f9083b47d2ffe8"}, + {file = "numpy-2.4.2-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e4424677ce4b47fe73c8b5556d876571f7c6945d264201180db2dc34f676ab5"}, + {file = "numpy-2.4.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:2b8f157c8a6f20eb657e240f8985cc135598b2b46985c5bccbde7616dc9c6b1e"}, + {file = "numpy-2.4.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5daf6f3914a733336dab21a05cdec343144600e964d2fcdabaac0c0269874b2a"}, + {file = "numpy-2.4.2-cp314-cp314t-win32.whl", hash = "sha256:8c50dd1fc8826f5b26a5ee4d77ca55d88a895f4e4819c7ecc2a9f5905047a443"}, + {file = "numpy-2.4.2-cp314-cp314t-win_amd64.whl", hash = "sha256:fcf92bee92742edd401ba41135185866f7026c502617f422eb432cfeca4fe236"}, + {file = "numpy-2.4.2-cp314-cp314t-win_arm64.whl", hash = "sha256:1f92f53998a17265194018d1cc321b2e96e900ca52d54c7c77837b71b9465181"}, + {file = "numpy-2.4.2-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:89f7268c009bc492f506abd6f5265defa7cb3f7487dc21d357c3d290add45082"}, + {file = "numpy-2.4.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:e6dee3bb76aa4009d5a912180bf5b2de012532998d094acee25d9cb8dee3e44a"}, + {file = "numpy-2.4.2-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:cd2bd2bbed13e213d6b55dc1d035a4f91748a7d3edc9480c13898b0353708920"}, + {file = "numpy-2.4.2-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:cf28c0c1d4c4bf00f509fa7eb02c58d7caf221b50b467bcb0d9bbf1584d5c821"}, + {file = "numpy-2.4.2-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e04ae107ac591763a47398bb45b568fc38f02dbc4aa44c063f67a131f99346cb"}, + {file = "numpy-2.4.2-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:602f65afdef699cda27ec0b9224ae5dc43e328f4c24c689deaf77133dbee74d0"}, + {file = "numpy-2.4.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:be71bf1edb48ebbbf7f6337b5bfd2f895d1902f6335a5830b20141fc126ffba0"}, + {file = "numpy-2.4.2.tar.gz", hash = "sha256:659a6107e31a83c4e33f763942275fd278b21d095094044eb35569e86a21ddae"}, +] + +[[package]] +name = "nvidia-cublas-cu12" +version = "12.8.4.1" +description = "CUBLAS native runtime libraries" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:b86f6dd8935884615a0683b663891d43781b819ac4f2ba2b0c9604676af346d0"}, + {file = "nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:8ac4e771d5a348c551b2a426eda6193c19aa630236b418086020df5ba9667142"}, + {file = "nvidia_cublas_cu12-12.8.4.1-py3-none-win_amd64.whl", hash = "sha256:47e9b82132fa8d2b4944e708049229601448aaad7e6f296f630f2d1a32de35af"}, +] + +[[package]] +name = "nvidia-cuda-cupti-cu12" +version = "12.8.90" +description = "CUDA profiling tools runtime libs." +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4412396548808ddfed3f17a467b104ba7751e6b58678a4b840675c56d21cf7ed"}, + {file = "nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea0cb07ebda26bb9b29ba82cda34849e73c166c18162d3913575b0c9db9a6182"}, + {file = "nvidia_cuda_cupti_cu12-12.8.90-py3-none-win_amd64.whl", hash = "sha256:bb479dcdf7e6d4f8b0b01b115260399bf34154a1a2e9fe11c85c517d87efd98e"}, +] + +[[package]] +name = "nvidia-cuda-nvrtc-cu12" +version = "12.8.93" +description = "NVRTC native runtime libraries" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:a7756528852ef889772a84c6cd89d41dfa74667e24cca16bb31f8f061e3e9994"}, + {file = "nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fc1fec1e1637854b4c0a65fb9a8346b51dd9ee69e61ebaccc82058441f15bce8"}, + {file = "nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-win_amd64.whl", hash = "sha256:7a4b6b2904850fe78e0bd179c4b655c404d4bb799ef03ddc60804247099ae909"}, +] + +[[package]] +name = "nvidia-cuda-runtime-cu12" +version = "12.8.90" +description = "CUDA Runtime native Libraries" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:52bf7bbee900262ffefe5e9d5a2a69a30d97e2bc5bb6cc866688caa976966e3d"}, + {file = "nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adade8dcbd0edf427b7204d480d6066d33902cab2a4707dcfc48a2d0fd44ab90"}, + {file = "nvidia_cuda_runtime_cu12-12.8.90-py3-none-win_amd64.whl", hash = "sha256:c0c6027f01505bfed6c3b21ec546f69c687689aad5f1a377554bc6ca4aa993a8"}, +] + +[[package]] +name = "nvidia-cudnn-cu12" +version = "9.10.2.21" +description = "cuDNN runtime libraries" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:c9132cc3f8958447b4910a1720036d9eff5928cc3179b0a51fb6d167c6cc87d8"}, + {file = "nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:949452be657fa16687d0930933f032835951ef0892b37d2d53824d1a84dc97a8"}, + {file = "nvidia_cudnn_cu12-9.10.2.21-py3-none-win_amd64.whl", hash = "sha256:c6288de7d63e6cf62988f0923f96dc339cea362decb1bf5b3141883392a7d65e"}, +] + +[package.dependencies] +nvidia-cublas-cu12 = "*" + +[[package]] +name = "nvidia-cufft-cu12" +version = "11.3.3.83" +description = "CUFFT native runtime libraries" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:848ef7224d6305cdb2a4df928759dca7b1201874787083b6e7550dd6765ce69a"}, + {file = "nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d2dd21ec0b88cf61b62e6b43564355e5222e4a3fb394cac0db101f2dd0d4f74"}, + {file = "nvidia_cufft_cu12-11.3.3.83-py3-none-win_amd64.whl", hash = "sha256:7a64a98ef2a7c47f905aaf8931b69a3a43f27c55530c698bb2ed7c75c0b42cb7"}, +] + +[package.dependencies] +nvidia-nvjitlink-cu12 = "*" + +[[package]] +name = "nvidia-cufile-cu12" +version = "1.13.1.3" +description = "cuFile GPUDirect libraries" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1d069003be650e131b21c932ec3d8969c1715379251f8d23a1860554b1cb24fc"}, + {file = "nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:4beb6d4cce47c1a0f1013d72e02b0994730359e17801d395bdcbf20cfb3bb00a"}, +] + +[[package]] +name = "nvidia-curand-cu12" +version = "10.3.9.90" +description = "CURAND native runtime libraries" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:dfab99248034673b779bc6decafdc3404a8a6f502462201f2f31f11354204acd"}, + {file = "nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:b32331d4f4df5d6eefa0554c565b626c7216f87a06a4f56fab27c3b68a830ec9"}, + {file = "nvidia_curand_cu12-10.3.9.90-py3-none-win_amd64.whl", hash = "sha256:f149a8ca457277da854f89cf282d6ef43176861926c7ac85b2a0fbd237c587ec"}, +] + +[[package]] +name = "nvidia-cusolver-cu12" +version = "11.7.3.90" +description = "CUDA solver native runtime libraries" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:db9ed69dbef9715071232caa9b69c52ac7de3a95773c2db65bdba85916e4e5c0"}, + {file = "nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:4376c11ad263152bd50ea295c05370360776f8c3427b30991df774f9fb26c450"}, + {file = "nvidia_cusolver_cu12-11.7.3.90-py3-none-win_amd64.whl", hash = "sha256:4a550db115fcabc4d495eb7d39ac8b58d4ab5d8e63274d3754df1c0ad6a22d34"}, +] + +[package.dependencies] +nvidia-cublas-cu12 = "*" +nvidia-cusparse-cu12 = "*" +nvidia-nvjitlink-cu12 = "*" + +[[package]] +name = "nvidia-cusparse-cu12" +version = "12.5.8.93" +description = "CUSPARSE native runtime libraries" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9b6c161cb130be1a07a27ea6923df8141f3c295852f4b260c65f18f3e0a091dc"}, + {file = "nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ec05d76bbbd8b61b06a80e1eaf8cf4959c3d4ce8e711b65ebd0443bb0ebb13b"}, + {file = "nvidia_cusparse_cu12-12.5.8.93-py3-none-win_amd64.whl", hash = "sha256:9a33604331cb2cac199f2e7f5104dfbb8a5a898c367a53dfda9ff2acb6b6b4dd"}, +] + +[package.dependencies] +nvidia-nvjitlink-cu12 = "*" + +[[package]] +name = "nvidia-cusparselt-cu12" +version = "0.7.1" +description = "NVIDIA cuSPARSELt" +optional = false +python-versions = "*" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8878dce784d0fac90131b6817b607e803c36e629ba34dc5b433471382196b6a5"}, + {file = "nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f1bb701d6b930d5a7cea44c19ceb973311500847f81b634d802b7b539dc55623"}, + {file = "nvidia_cusparselt_cu12-0.7.1-py3-none-win_amd64.whl", hash = "sha256:f67fbb5831940ec829c9117b7f33807db9f9678dc2a617fbe781cac17b4e1075"}, +] + +[[package]] +name = "nvidia-nccl-cu12" +version = "2.27.5" +description = "NVIDIA Collective Communication Library (NCCL) Runtime" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:31432ad4d1fb1004eb0c56203dc9bc2178a1ba69d1d9e02d64a6938ab5e40e7a"}, + {file = "nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ad730cf15cb5d25fe849c6e6ca9eb5b76db16a80f13f425ac68d8e2e55624457"}, +] + +[[package]] +name = "nvidia-nvjitlink-cu12" +version = "12.8.93" +description = "Nvidia JIT LTO Library" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:81ff63371a7ebd6e6451970684f916be2eab07321b73c9d244dc2b4da7f73b88"}, + {file = "nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:adccd7161ace7261e01bb91e44e88da350895c270d23f744f0820c818b7229e7"}, + {file = "nvidia_nvjitlink_cu12-12.8.93-py3-none-win_amd64.whl", hash = "sha256:bd93fbeeee850917903583587f4fc3a4eafa022e34572251368238ab5e6bd67f"}, +] + +[[package]] +name = "nvidia-nvshmem-cu12" +version = "3.4.5" +description = "NVSHMEM creates a global address space that provides efficient and scalable communication for NVIDIA GPU clusters." +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_nvshmem_cu12-3.4.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0b48363fc6964dede448029434c6abed6c5e37f823cb43c3bcde7ecfc0457e15"}, + {file = "nvidia_nvshmem_cu12-3.4.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:042f2500f24c021db8a06c5eec2539027d57460e1c1a762055a6554f72c369bd"}, +] + +[[package]] +name = "nvidia-nvtx-cu12" +version = "12.8.90" +description = "NVIDIA Tools Extension" +optional = false +python-versions = ">=3" +groups = ["main"] +markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\"" +files = [ + {file = "nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d7ad891da111ebafbf7e015d34879f7112832fc239ff0d7d776b6cb685274615"}, + {file = "nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5b17e2001cc0d751a5bc2c6ec6d26ad95913324a4adb86788c944f8ce9ba441f"}, + {file = "nvidia_nvtx_cu12-12.8.90-py3-none-win_amd64.whl", hash = "sha256:619c8304aedc69f02ea82dd244541a83c3d9d40993381b3b590f1adaed3db41e"}, +] + +[[package]] +name = "openai" +version = "2.26.0" +description = "The official Python library for the openai API" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "openai-2.26.0-py3-none-any.whl", hash = "sha256:6151bf8f83802f036117f06cc8a57b3a4da60da9926826cc96747888b57f394f"}, + {file = "openai-2.26.0.tar.gz", hash = "sha256:b41f37c140ae0034a6e92b0c509376d907f3a66109935fba2c1b471a7c05a8fb"}, +] + +[package.dependencies] +anyio = ">=3.5.0,<5" +distro = ">=1.7.0,<2" +httpx = ">=0.23.0,<1" +jiter = ">=0.10.0,<1" +pydantic = ">=1.9.0,<3" +sniffio = "*" +tqdm = ">4" +typing-extensions = ">=4.11,<5" + +[package.extras] +aiohttp = ["aiohttp", "httpx-aiohttp (>=0.1.9)"] +datalib = ["numpy (>=1)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] +realtime = ["websockets (>=13,<16)"] +voice-helpers = ["numpy (>=2.0.2)", "sounddevice (>=0.5.1)"] + +[[package]] +name = "openapi-pydantic" +version = "0.5.1" +description = "Pydantic OpenAPI schema implementation" +optional = false +python-versions = "<4.0,>=3.8" +groups = ["main"] +files = [ + {file = "openapi_pydantic-0.5.1-py3-none-any.whl", hash = "sha256:a3a09ef4586f5bd760a8df7f43028b60cafb6d9f61de2acba9574766255ab146"}, + {file = "openapi_pydantic-0.5.1.tar.gz", hash = "sha256:ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d"}, +] + +[package.dependencies] +pydantic = ">=1.8" + +[[package]] +name = "openenv-core" +version = "0.2.1" +description = "A unified framework for reinforcement learning environments" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "openenv_core-0.2.1-py3-none-any.whl", hash = "sha256:5868722833df3220b7a3288f581e6c0825c2d8fae42d932ff90d2bb60765813a"}, + {file = "openenv_core-0.2.1.tar.gz", hash = "sha256:0caa44411af7d866e451e50744d1adab57cdf9a2cf7a1b3f81042675110aebc7"}, +] + +[package.dependencies] +fastapi = ">=0.104.0" +fastmcp = ">=2.0.0" +huggingface_hub = ">=0.20.0" +openai = ">=2.7.2" +pydantic = ">=2.0.0" +pyyaml = ">=6.0" +requests = ">=2.25.0" +rich = ">=13.0.0" +tomli = ">=2.3.0" +tomli-w = ">=1.2.0" +typer = ">=0.9.0" +uvicorn = ">=0.24.0" +websockets = ">=15.0.1" + +[package.extras] +all = ["openenv-core[cli]", "openenv-core[core]"] +cli = ["huggingface_hub (>=0.20.0)", "openai (>=2.7.2)", "pyyaml (>=6.0)", "rich (>=13.0.0)", "tomli (>=2.3.0)", "tomli-w (>=1.2.0)", "typer (>=0.9.0)"] +core = ["fastapi (>=0.104.0)", "pydantic (>=2.0.0)", "requests (>=2.25.0)", "uvicorn (>=0.24.0)", "websockets (>=15.0.1)"] + +[[package]] +name = "opentelemetry-api" +version = "1.40.0" +description = "OpenTelemetry Python API" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "opentelemetry_api-1.40.0-py3-none-any.whl", hash = "sha256:82dd69331ae74b06f6a874704be0cfaa49a1650e1537d4a813b86ecef7d0ecf9"}, + {file = "opentelemetry_api-1.40.0.tar.gz", hash = "sha256:159be641c0b04d11e9ecd576906462773eb97ae1b657730f0ecf64d32071569f"}, +] + +[package.dependencies] +importlib-metadata = ">=6.0,<8.8.0" +typing-extensions = ">=4.5.0" + +[[package]] +name = "packaging" +version = "26.0" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529"}, + {file = "packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4"}, +] + +[[package]] +name = "pandas" +version = "2.3.3" +description = "Powerful data structures for data analysis, time series, and statistics" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c"}, + {file = "pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a"}, + {file = "pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1"}, + {file = "pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838"}, + {file = "pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250"}, + {file = "pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4"}, + {file = "pandas-2.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826"}, + {file = "pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523"}, + {file = "pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45"}, + {file = "pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66"}, + {file = "pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b"}, + {file = "pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791"}, + {file = "pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151"}, + {file = "pandas-2.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c"}, + {file = "pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53"}, + {file = "pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35"}, + {file = "pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908"}, + {file = "pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89"}, + {file = "pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98"}, + {file = "pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084"}, + {file = "pandas-2.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b"}, + {file = "pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713"}, + {file = "pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8"}, + {file = "pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d"}, + {file = "pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac"}, + {file = "pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c"}, + {file = "pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493"}, + {file = "pandas-2.3.3-cp313-cp313-win_amd64.whl", hash = "sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee"}, + {file = "pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5"}, + {file = "pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21"}, + {file = "pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78"}, + {file = "pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110"}, + {file = "pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86"}, + {file = "pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc"}, + {file = "pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0"}, + {file = "pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593"}, + {file = "pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c"}, + {file = "pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b"}, + {file = "pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6"}, + {file = "pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3"}, + {file = "pandas-2.3.3-cp314-cp314-win_amd64.whl", hash = "sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5"}, + {file = "pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec"}, + {file = "pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7"}, + {file = "pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450"}, + {file = "pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5"}, + {file = "pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788"}, + {file = "pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87"}, + {file = "pandas-2.3.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c503ba5216814e295f40711470446bc3fd00f0faea8a086cbc688808e26f92a2"}, + {file = "pandas-2.3.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a637c5cdfa04b6d6e2ecedcb81fc52ffb0fd78ce2ebccc9ea964df9f658de8c8"}, + {file = "pandas-2.3.3-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:854d00d556406bffe66a4c0802f334c9ad5a96b4f1f868adf036a21b11ef13ff"}, + {file = "pandas-2.3.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bf1f8a81d04ca90e32a0aceb819d34dbd378a98bf923b6398b9a3ec0bf44de29"}, + {file = "pandas-2.3.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:23ebd657a4d38268c7dfbdf089fbc31ea709d82e4923c5ffd4fbd5747133ce73"}, + {file = "pandas-2.3.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5554c929ccc317d41a5e3d1234f3be588248e61f08a74dd17c9eabb535777dc9"}, + {file = "pandas-2.3.3-cp39-cp39-win_amd64.whl", hash = "sha256:d3e28b3e83862ccf4d85ff19cf8c20b2ae7e503881711ff2d534dc8f761131aa"}, + {file = "pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b"}, +] + +[package.dependencies] +numpy = {version = ">=1.26.0", markers = "python_version >= \"3.12\""} +python-dateutil = ">=2.8.2" +pytz = ">=2020.1" +tzdata = ">=2022.7" + +[package.extras] +all = ["PyQt5 (>=5.15.9)", "SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)", "beautifulsoup4 (>=4.11.2)", "bottleneck (>=1.3.6)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=2022.12.0)", "fsspec (>=2022.11.0)", "gcsfs (>=2022.11.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.9.2)", "matplotlib (>=3.6.3)", "numba (>=0.56.4)", "numexpr (>=2.8.4)", "odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "pandas-gbq (>=0.19.0)", "psycopg2 (>=2.9.6)", "pyarrow (>=10.0.1)", "pymysql (>=1.0.2)", "pyreadstat (>=1.2.0)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "qtpy (>=2.3.0)", "s3fs (>=2022.11.0)", "scipy (>=1.10.0)", "tables (>=3.8.0)", "tabulate (>=0.9.0)", "xarray (>=2022.12.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)", "zstandard (>=0.19.0)"] +aws = ["s3fs (>=2022.11.0)"] +clipboard = ["PyQt5 (>=5.15.9)", "qtpy (>=2.3.0)"] +compression = ["zstandard (>=0.19.0)"] +computation = ["scipy (>=1.10.0)", "xarray (>=2022.12.0)"] +consortium-standard = ["dataframe-api-compat (>=0.1.7)"] +excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)"] +feather = ["pyarrow (>=10.0.1)"] +fss = ["fsspec (>=2022.11.0)"] +gcp = ["gcsfs (>=2022.11.0)", "pandas-gbq (>=0.19.0)"] +hdf5 = ["tables (>=3.8.0)"] +html = ["beautifulsoup4 (>=4.11.2)", "html5lib (>=1.1)", "lxml (>=4.9.2)"] +mysql = ["SQLAlchemy (>=2.0.0)", "pymysql (>=1.0.2)"] +output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.9.0)"] +parquet = ["pyarrow (>=10.0.1)"] +performance = ["bottleneck (>=1.3.6)", "numba (>=0.56.4)", "numexpr (>=2.8.4)"] +plot = ["matplotlib (>=3.6.3)"] +postgresql = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "psycopg2 (>=2.9.6)"] +pyarrow = ["pyarrow (>=10.0.1)"] +spss = ["pyreadstat (>=1.2.0)"] +sql-other = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)"] +test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"] +xml = ["lxml (>=4.9.2)"] + +[[package]] +name = "parso" +version = "0.8.6" +description = "A Python Parser" +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "parso-0.8.6-py2.py3-none-any.whl", hash = "sha256:2c549f800b70a5c4952197248825584cb00f033b29c692671d3bf08bf380baff"}, + {file = "parso-0.8.6.tar.gz", hash = "sha256:2b9a0332696df97d454fa67b81618fd69c35a7b90327cbe6ba5c92d2c68a7bfd"}, +] + +[package.extras] +qa = ["flake8 (==5.0.4)", "types-setuptools (==67.2.0.1)", "zuban (==0.5.1)"] +testing = ["docopt", "pytest"] + +[[package]] +name = "pathable" +version = "0.5.0" +description = "Object-oriented paths" +optional = false +python-versions = "<4.0,>=3.10" +groups = ["main"] +files = [ + {file = "pathable-0.5.0-py3-none-any.whl", hash = "sha256:646e3d09491a6351a0c82632a09c02cdf70a252e73196b36d8a15ba0a114f0a6"}, + {file = "pathable-0.5.0.tar.gz", hash = "sha256:d81938348a1cacb525e7c75166270644782c0fb9c8cecc16be033e71427e0ef1"}, +] + +[[package]] +name = "peft" +version = "0.18.1" +description = "Parameter-Efficient Fine-Tuning (PEFT)" +optional = false +python-versions = ">=3.10.0" +groups = ["main"] +files = [ + {file = "peft-0.18.1-py3-none-any.whl", hash = "sha256:0bf06847a3551e3019fc58c440cffc9a6b73e6e2962c95b52e224f77bbdb50f1"}, + {file = "peft-0.18.1.tar.gz", hash = "sha256:2dd0d6bfce936d1850e48aaddbd250941c5c02fc8ef3237cd8fd5aac35e0bae2"}, +] + +[package.dependencies] +accelerate = ">=0.21.0" +huggingface_hub = ">=0.25.0" +numpy = ">=1.17" +packaging = ">=20.0" +psutil = "*" +pyyaml = "*" +safetensors = "*" +torch = ">=1.13.0" +tqdm = "*" +transformers = "*" + +[package.extras] +dev = ["black", "black", "hf-doc-builder", "hf-doc-builder", "ruff (>=0.12.8,<0.13.0)"] +docs-specific = ["black", "hf-doc-builder"] +quality = ["black", "hf-doc-builder", "ruff (>=0.12.8,<0.13.0)"] +test = ["black", "black", "datasets", "diffusers", "hf-doc-builder", "hf-doc-builder", "parameterized", "protobuf", "pytest", "pytest-cov", "pytest-xdist", "ruff (>=0.12.8,<0.13.0)", "scipy", "sentencepiece"] + +[[package]] +name = "pexpect" +version = "4.9.0" +description = "Pexpect allows easy control of interactive console applications." +optional = false +python-versions = "*" +groups = ["main"] +markers = "sys_platform != \"win32\" and sys_platform != \"emscripten\"" +files = [ + {file = "pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523"}, + {file = "pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f"}, +] + +[package.dependencies] +ptyprocess = ">=0.5" + +[[package]] +name = "pillow" +version = "12.1.1" +description = "Python Imaging Library (fork)" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "pillow-12.1.1-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:1f1625b72740fdda5d77b4def688eb8fd6490975d06b909fd19f13f391e077e0"}, + {file = "pillow-12.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:178aa072084bd88ec759052feca8e56cbb14a60b39322b99a049e58090479713"}, + {file = "pillow-12.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b66e95d05ba806247aaa1561f080abc7975daf715c30780ff92a20e4ec546e1b"}, + {file = "pillow-12.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:89c7e895002bbe49cdc5426150377cbbc04767d7547ed145473f496dfa40408b"}, + {file = "pillow-12.1.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a5cbdcddad0af3da87cb16b60d23648bc3b51967eb07223e9fed77a82b457c4"}, + {file = "pillow-12.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9f51079765661884a486727f0729d29054242f74b46186026582b4e4769918e4"}, + {file = "pillow-12.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:99c1506ea77c11531d75e3a412832a13a71c7ebc8192ab9e4b2e355555920e3e"}, + {file = "pillow-12.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:36341d06738a9f66c8287cf8b876d24b18db9bd8740fa0672c74e259ad408cff"}, + {file = "pillow-12.1.1-cp310-cp310-win32.whl", hash = "sha256:6c52f062424c523d6c4db85518774cc3d50f5539dd6eed32b8f6229b26f24d40"}, + {file = "pillow-12.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:c6008de247150668a705a6338156efb92334113421ceecf7438a12c9a12dab23"}, + {file = "pillow-12.1.1-cp310-cp310-win_arm64.whl", hash = "sha256:1a9b0ee305220b392e1124a764ee4265bd063e54a751a6b62eff69992f457fa9"}, + {file = "pillow-12.1.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:e879bb6cd5c73848ef3b2b48b8af9ff08c5b71ecda8048b7dd22d8a33f60be32"}, + {file = "pillow-12.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:365b10bb9417dd4498c0e3b128018c4a624dc11c7b97d8cc54effe3b096f4c38"}, + {file = "pillow-12.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d4ce8e329c93845720cd2014659ca67eac35f6433fd3050393d85f3ecef0dad5"}, + {file = "pillow-12.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc354a04072b765eccf2204f588a7a532c9511e8b9c7f900e1b64e3e33487090"}, + {file = "pillow-12.1.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7e7976bf1910a8116b523b9f9f58bf410f3e8aa330cd9a2bb2953f9266ab49af"}, + {file = "pillow-12.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:597bd9c8419bc7c6af5604e55847789b69123bbe25d65cc6ad3012b4f3c98d8b"}, + {file = "pillow-12.1.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2c1fc0f2ca5f96a3c8407e41cca26a16e46b21060fe6d5b099d2cb01412222f5"}, + {file = "pillow-12.1.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:578510d88c6229d735855e1f278aa305270438d36a05031dfaae5067cc8eb04d"}, + {file = "pillow-12.1.1-cp311-cp311-win32.whl", hash = "sha256:7311c0a0dcadb89b36b7025dfd8326ecfa36964e29913074d47382706e516a7c"}, + {file = "pillow-12.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:fbfa2a7c10cc2623f412753cddf391c7f971c52ca40a3f65dc5039b2939e8563"}, + {file = "pillow-12.1.1-cp311-cp311-win_arm64.whl", hash = "sha256:b81b5e3511211631b3f672a595e3221252c90af017e399056d0faabb9538aa80"}, + {file = "pillow-12.1.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ab323b787d6e18b3d91a72fc99b1a2c28651e4358749842b8f8dfacd28ef2052"}, + {file = "pillow-12.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:adebb5bee0f0af4909c30db0d890c773d1a92ffe83da908e2e9e720f8edf3984"}, + {file = "pillow-12.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:bb66b7cc26f50977108790e2456b7921e773f23db5630261102233eb355a3b79"}, + {file = "pillow-12.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:aee2810642b2898bb187ced9b349e95d2a7272930796e022efaf12e99dccd293"}, + {file = "pillow-12.1.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a0b1cd6232e2b618adcc54d9882e4e662a089d5768cd188f7c245b4c8c44a397"}, + {file = "pillow-12.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7aac39bcf8d4770d089588a2e1dd111cbaa42df5a94be3114222057d68336bd0"}, + {file = "pillow-12.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ab174cd7d29a62dd139c44bf74b698039328f45cb03b4596c43473a46656b2f3"}, + {file = "pillow-12.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:339ffdcb7cbeaa08221cd401d517d4b1fe7a9ed5d400e4a8039719238620ca35"}, + {file = "pillow-12.1.1-cp312-cp312-win32.whl", hash = "sha256:5d1f9575a12bed9e9eedd9a4972834b08c97a352bd17955ccdebfeca5913fa0a"}, + {file = "pillow-12.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:21329ec8c96c6e979cd0dfd29406c40c1d52521a90544463057d2aaa937d66a6"}, + {file = "pillow-12.1.1-cp312-cp312-win_arm64.whl", hash = "sha256:af9a332e572978f0218686636610555ae3defd1633597be015ed50289a03c523"}, + {file = "pillow-12.1.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:d242e8ac078781f1de88bf823d70c1a9b3c7950a44cdf4b7c012e22ccbcd8e4e"}, + {file = "pillow-12.1.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:02f84dfad02693676692746df05b89cf25597560db2857363a208e393429f5e9"}, + {file = "pillow-12.1.1-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:e65498daf4b583091ccbb2556c7000abf0f3349fcd57ef7adc9a84a394ed29f6"}, + {file = "pillow-12.1.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6c6db3b84c87d48d0088943bf33440e0c42370b99b1c2a7989216f7b42eede60"}, + {file = "pillow-12.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8b7e5304e34942bf62e15184219a7b5ad4ff7f3bb5cca4d984f37df1a0e1aee2"}, + {file = "pillow-12.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:18e5bddd742a44b7e6b1e773ab5db102bd7a94c32555ba656e76d319d19c3850"}, + {file = "pillow-12.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc44ef1f3de4f45b50ccf9136999d71abb99dca7706bc75d222ed350b9fd2289"}, + {file = "pillow-12.1.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5a8eb7ed8d4198bccbd07058416eeec51686b498e784eda166395a23eb99138e"}, + {file = "pillow-12.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:47b94983da0c642de92ced1702c5b6c292a84bd3a8e1d1702ff923f183594717"}, + {file = "pillow-12.1.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:518a48c2aab7ce596d3bf79d0e275661b846e86e4d0e7dec34712c30fe07f02a"}, + {file = "pillow-12.1.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a550ae29b95c6dc13cf69e2c9dc5747f814c54eeb2e32d683e5e93af56caa029"}, + {file = "pillow-12.1.1-cp313-cp313-win32.whl", hash = "sha256:a003d7422449f6d1e3a34e3dd4110c22148336918ddbfc6a32581cd54b2e0b2b"}, + {file = "pillow-12.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:344cf1e3dab3be4b1fa08e449323d98a2a3f819ad20f4b22e77a0ede31f0faa1"}, + {file = "pillow-12.1.1-cp313-cp313-win_arm64.whl", hash = "sha256:5c0dd1636633e7e6a0afe7bf6a51a14992b7f8e60de5789018ebbdfae55b040a"}, + {file = "pillow-12.1.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0330d233c1a0ead844fc097a7d16c0abff4c12e856c0b325f231820fee1f39da"}, + {file = "pillow-12.1.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5dae5f21afb91322f2ff791895ddd8889e5e947ff59f71b46041c8ce6db790bc"}, + {file = "pillow-12.1.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:2e0c664be47252947d870ac0d327fea7e63985a08794758aa8af5b6cb6ec0c9c"}, + {file = "pillow-12.1.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:691ab2ac363b8217f7d31b3497108fb1f50faab2f75dfb03284ec2f217e87bf8"}, + {file = "pillow-12.1.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e9e8064fb1cc019296958595f6db671fba95209e3ceb0c4734c9baf97de04b20"}, + {file = "pillow-12.1.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:472a8d7ded663e6162dafdf20015c486a7009483ca671cece7a9279b512fcb13"}, + {file = "pillow-12.1.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:89b54027a766529136a06cfebeecb3a04900397a3590fd252160b888479517bf"}, + {file = "pillow-12.1.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:86172b0831b82ce4f7877f280055892b31179e1576aa00d0df3bb1bbf8c3e524"}, + {file = "pillow-12.1.1-cp313-cp313t-win32.whl", hash = "sha256:44ce27545b6efcf0fdbdceb31c9a5bdea9333e664cda58a7e674bb74608b3986"}, + {file = "pillow-12.1.1-cp313-cp313t-win_amd64.whl", hash = "sha256:a285e3eb7a5a45a2ff504e31f4a8d1b12ef62e84e5411c6804a42197c1cf586c"}, + {file = "pillow-12.1.1-cp313-cp313t-win_arm64.whl", hash = "sha256:cc7d296b5ea4d29e6570dabeaed58d31c3fea35a633a69679fb03d7664f43fb3"}, + {file = "pillow-12.1.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:417423db963cb4be8bac3fc1204fe61610f6abeed1580a7a2cbb2fbda20f12af"}, + {file = "pillow-12.1.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:b957b71c6b2387610f556a7eb0828afbe40b4a98036fc0d2acfa5a44a0c2036f"}, + {file = "pillow-12.1.1-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:097690ba1f2efdeb165a20469d59d8bb03c55fb6621eb2041a060ae8ea3e9642"}, + {file = "pillow-12.1.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:2815a87ab27848db0321fb78c7f0b2c8649dee134b7f2b80c6a45c6831d75ccd"}, + {file = "pillow-12.1.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:f7ed2c6543bad5a7d5530eb9e78c53132f93dfa44a28492db88b41cdab885202"}, + {file = "pillow-12.1.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:652a2c9ccfb556235b2b501a3a7cf3742148cd22e04b5625c5fe057ea3e3191f"}, + {file = "pillow-12.1.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d6e4571eedf43af33d0fc233a382a76e849badbccdf1ac438841308652a08e1f"}, + {file = "pillow-12.1.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b574c51cf7d5d62e9be37ba446224b59a2da26dc4c1bb2ecbe936a4fb1a7cb7f"}, + {file = "pillow-12.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a37691702ed687799de29a518d63d4682d9016932db66d4e90c345831b02fb4e"}, + {file = "pillow-12.1.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f95c00d5d6700b2b890479664a06e754974848afaae5e21beb4d83c106923fd0"}, + {file = "pillow-12.1.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:559b38da23606e68681337ad74622c4dbba02254fc9cb4488a305dd5975c7eeb"}, + {file = "pillow-12.1.1-cp314-cp314-win32.whl", hash = "sha256:03edcc34d688572014ff223c125a3f77fb08091e4607e7745002fc214070b35f"}, + {file = "pillow-12.1.1-cp314-cp314-win_amd64.whl", hash = "sha256:50480dcd74fa63b8e78235957d302d98d98d82ccbfac4c7e12108ba9ecbdba15"}, + {file = "pillow-12.1.1-cp314-cp314-win_arm64.whl", hash = "sha256:5cb1785d97b0c3d1d1a16bc1d710c4a0049daefc4935f3a8f31f827f4d3d2e7f"}, + {file = "pillow-12.1.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:1f90cff8aa76835cba5769f0b3121a22bd4eb9e6884cfe338216e557a9a548b8"}, + {file = "pillow-12.1.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1f1be78ce9466a7ee64bfda57bdba0f7cc499d9794d518b854816c41bf0aa4e9"}, + {file = "pillow-12.1.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:42fc1f4677106188ad9a55562bbade416f8b55456f522430fadab3cef7cd4e60"}, + {file = "pillow-12.1.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:98edb152429ab62a1818039744d8fbb3ccab98a7c29fc3d5fcef158f3f1f68b7"}, + {file = "pillow-12.1.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d470ab1178551dd17fdba0fef463359c41aaa613cdcd7ff8373f54be629f9f8f"}, + {file = "pillow-12.1.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6408a7b064595afcab0a49393a413732a35788f2a5092fdc6266952ed67de586"}, + {file = "pillow-12.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5d8c41325b382c07799a3682c1c258469ea2ff97103c53717b7893862d0c98ce"}, + {file = "pillow-12.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c7697918b5be27424e9ce568193efd13d925c4481dd364e43f5dff72d33e10f8"}, + {file = "pillow-12.1.1-cp314-cp314t-win32.whl", hash = "sha256:d2912fd8114fc5545aa3a4b5576512f64c55a03f3ebcca4c10194d593d43ea36"}, + {file = "pillow-12.1.1-cp314-cp314t-win_amd64.whl", hash = "sha256:4ceb838d4bd9dab43e06c363cab2eebf63846d6a4aeaea283bbdfd8f1a8ed58b"}, + {file = "pillow-12.1.1-cp314-cp314t-win_arm64.whl", hash = "sha256:7b03048319bfc6170e93bd60728a1af51d3dd7704935feb228c4d4faab35d334"}, + {file = "pillow-12.1.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:600fd103672b925fe62ed08e0d874ea34d692474df6f4bf7ebe148b30f89f39f"}, + {file = "pillow-12.1.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:665e1b916b043cef294bc54d47bf02d87e13f769bc4bc5fa225a24b3a6c5aca9"}, + {file = "pillow-12.1.1-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:495c302af3aad1ca67420ddd5c7bd480c8867ad173528767d906428057a11f0e"}, + {file = "pillow-12.1.1-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8fd420ef0c52c88b5a035a0886f367748c72147b2b8f384c9d12656678dfdfa9"}, + {file = "pillow-12.1.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f975aa7ef9684ce7e2c18a3aa8f8e2106ce1e46b94ab713d156b2898811651d3"}, + {file = "pillow-12.1.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8089c852a56c2966cf18835db62d9b34fef7ba74c726ad943928d494fa7f4735"}, + {file = "pillow-12.1.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:cb9bb857b2d057c6dfc72ac5f3b44836924ba15721882ef103cecb40d002d80e"}, + {file = "pillow-12.1.1.tar.gz", hash = "sha256:9ad8fa5937ab05218e2b6a4cff30295ad35afd2f83ac592e68c0d871bb0fdbc4"}, +] + +[package.extras] +docs = ["furo", "olefile", "sphinx (>=8.2)", "sphinx-autobuild", "sphinx-copybutton", "sphinx-inline-tabs", "sphinxext-opengraph"] +fpx = ["olefile"] +mic = ["olefile"] +test-arrow = ["arro3-compute", "arro3-core", "nanoarrow", "pyarrow"] +tests = ["check-manifest", "coverage (>=7.4.2)", "defusedxml", "markdown2", "olefile", "packaging", "pyroma (>=5)", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "trove-classifiers (>=2024.10.12)"] +xmp = ["defusedxml"] + +[[package]] +name = "platformdirs" +version = "4.9.4" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "platformdirs-4.9.4-py3-none-any.whl", hash = "sha256:68a9a4619a666ea6439f2ff250c12a853cd1cbd5158d258bd824a7df6be2f868"}, + {file = "platformdirs-4.9.4.tar.gz", hash = "sha256:1ec356301b7dc906d83f371c8f487070e99d3ccf9e501686456394622a01a934"}, +] + +[[package]] +name = "plotly" +version = "6.6.0" +description = "An open-source interactive data visualization library for Python" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "plotly-6.6.0-py3-none-any.whl", hash = "sha256:8d6daf0f87412e0c0bfe72e809d615217ab57cc715899a1e5145135a7800d1d0"}, + {file = "plotly-6.6.0.tar.gz", hash = "sha256:b897f15f3b02028d69f755f236be890ba950d0a42d7dfc619b44e2d8cea8748c"}, +] + +[package.dependencies] +narwhals = ">=1.15.1" +packaging = "*" + +[package.extras] +dev = ["plotly[dev-optional]"] +dev-build = ["build", "jupyter", "plotly[dev-core]"] +dev-core = ["pytest", "requests", "ruff (==0.11.12)"] +dev-optional = ["anywidget", "colorcet", "fiona (<=1.9.6) ; python_version <= \"3.8\"", "geopandas", "inflect", "numpy", "orjson", "pandas", "pdfrw", "pillow", "plotly-geo", "plotly[dev-build]", "plotly[kaleido]", "polars[timezone]", "pyarrow", "pyshp", "pytz", "scikit-image", "scipy", "shapely", "statsmodels", "vaex ; python_version <= \"3.9\"", "xarray"] +express = ["numpy"] +kaleido = ["kaleido (>=1.1.0)"] + +[[package]] +name = "prompt-toolkit" +version = "3.0.52" +description = "Library for building powerful interactive command lines in Python" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "prompt_toolkit-3.0.52-py3-none-any.whl", hash = "sha256:9aac639a3bbd33284347de5ad8d68ecc044b91a762dc39b7c21095fcd6a19955"}, + {file = "prompt_toolkit-3.0.52.tar.gz", hash = "sha256:28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855"}, +] + +[package.dependencies] +wcwidth = "*" + +[[package]] +name = "propcache" +version = "0.4.1" +description = "Accelerated property cache" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "propcache-0.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c2d1fa3201efaf55d730400d945b5b3ab6e672e100ba0f9a409d950ab25d7db"}, + {file = "propcache-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1eb2994229cc8ce7fe9b3db88f5465f5fd8651672840b2e426b88cdb1a30aac8"}, + {file = "propcache-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:66c1f011f45a3b33d7bcb22daed4b29c0c9e2224758b6be00686731e1b46f925"}, + {file = "propcache-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9a52009f2adffe195d0b605c25ec929d26b36ef986ba85244891dee3b294df21"}, + {file = "propcache-0.4.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5d4e2366a9c7b837555cf02fb9be2e3167d333aff716332ef1b7c3a142ec40c5"}, + {file = "propcache-0.4.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9d2b6caef873b4f09e26ea7e33d65f42b944837563a47a94719cc3544319a0db"}, + {file = "propcache-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b16ec437a8c8a965ecf95739448dd938b5c7f56e67ea009f4300d8df05f32b7"}, + {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:296f4c8ed03ca7476813fe666c9ea97869a8d7aec972618671b33a38a5182ef4"}, + {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:1f0978529a418ebd1f49dad413a2b68af33f85d5c5ca5c6ca2a3bed375a7ac60"}, + {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fd138803047fb4c062b1c1dd95462f5209456bfab55c734458f15d11da288f8f"}, + {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8c9b3cbe4584636d72ff556d9036e0c9317fa27b3ac1f0f558e7e84d1c9c5900"}, + {file = "propcache-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f93243fdc5657247533273ac4f86ae106cc6445a0efacb9a1bfe982fcfefd90c"}, + {file = "propcache-0.4.1-cp310-cp310-win32.whl", hash = "sha256:a0ee98db9c5f80785b266eb805016e36058ac72c51a064040f2bc43b61101cdb"}, + {file = "propcache-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:1cdb7988c4e5ac7f6d175a28a9aa0c94cb6f2ebe52756a3c0cda98d2809a9e37"}, + {file = "propcache-0.4.1-cp310-cp310-win_arm64.whl", hash = "sha256:d82ad62b19645419fe79dd63b3f9253e15b30e955c0170e5cebc350c1844e581"}, + {file = "propcache-0.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:60a8fda9644b7dfd5dece8c61d8a85e271cb958075bfc4e01083c148b61a7caf"}, + {file = "propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c30b53e7e6bda1d547cabb47c825f3843a0a1a42b0496087bb58d8fedf9f41b5"}, + {file = "propcache-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6918ecbd897443087a3b7cd978d56546a812517dcaaca51b49526720571fa93e"}, + {file = "propcache-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3d902a36df4e5989763425a8ab9e98cd8ad5c52c823b34ee7ef307fd50582566"}, + {file = "propcache-0.4.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a9695397f85973bb40427dedddf70d8dc4a44b22f1650dd4af9eedf443d45165"}, + {file = "propcache-0.4.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2bb07ffd7eaad486576430c89f9b215f9e4be68c4866a96e97db9e97fead85dc"}, + {file = "propcache-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd6f30fdcf9ae2a70abd34da54f18da086160e4d7d9251f81f3da0ff84fc5a48"}, + {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:fc38cba02d1acba4e2869eef1a57a43dfbd3d49a59bf90dda7444ec2be6a5570"}, + {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:67fad6162281e80e882fb3ec355398cf72864a54069d060321f6cd0ade95fe85"}, + {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f10207adf04d08bec185bae14d9606a1444715bc99180f9331c9c02093e1959e"}, + {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e9b0d8d0845bbc4cfcdcbcdbf5086886bc8157aa963c31c777ceff7846c77757"}, + {file = "propcache-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:981333cb2f4c1896a12f4ab92a9cc8f09ea664e9b7dbdc4eff74627af3a11c0f"}, + {file = "propcache-0.4.1-cp311-cp311-win32.whl", hash = "sha256:f1d2f90aeec838a52f1c1a32fe9a619fefd5e411721a9117fbf82aea638fe8a1"}, + {file = "propcache-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:364426a62660f3f699949ac8c621aad6977be7126c5807ce48c0aeb8e7333ea6"}, + {file = "propcache-0.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:e53f3a38d3510c11953f3e6a33f205c6d1b001129f972805ca9b42fc308bc239"}, + {file = "propcache-0.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e153e9cd40cc8945138822807139367f256f89c6810c2634a4f6902b52d3b4e2"}, + {file = "propcache-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cd547953428f7abb73c5ad82cbb32109566204260d98e41e5dfdc682eb7f8403"}, + {file = "propcache-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f048da1b4f243fc44f205dfd320933a951b8d89e0afd4c7cacc762a8b9165207"}, + {file = "propcache-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ec17c65562a827bba85e3872ead335f95405ea1674860d96483a02f5c698fa72"}, + {file = "propcache-0.4.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:405aac25c6394ef275dee4c709be43745d36674b223ba4eb7144bf4d691b7367"}, + {file = "propcache-0.4.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0013cb6f8dde4b2a2f66903b8ba740bdfe378c943c4377a200551ceb27f379e4"}, + {file = "propcache-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15932ab57837c3368b024473a525e25d316d8353016e7cc0e5ba9eb343fbb1cf"}, + {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:031dce78b9dc099f4c29785d9cf5577a3faf9ebf74ecbd3c856a7b92768c3df3"}, + {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ab08df6c9a035bee56e31af99be621526bd237bea9f32def431c656b29e41778"}, + {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4d7af63f9f93fe593afbf104c21b3b15868efb2c21d07d8732c0c4287e66b6a6"}, + {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:cfc27c945f422e8b5071b6e93169679e4eb5bf73bbcbf1ba3ae3a83d2f78ebd9"}, + {file = "propcache-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:35c3277624a080cc6ec6f847cbbbb5b49affa3598c4535a0a4682a697aaa5c75"}, + {file = "propcache-0.4.1-cp312-cp312-win32.whl", hash = "sha256:671538c2262dadb5ba6395e26c1731e1d52534bfe9ae56d0b5573ce539266aa8"}, + {file = "propcache-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:cb2d222e72399fcf5890d1d5cc1060857b9b236adff2792ff48ca2dfd46c81db"}, + {file = "propcache-0.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:204483131fb222bdaaeeea9f9e6c6ed0cac32731f75dfc1d4a567fc1926477c1"}, + {file = "propcache-0.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:43eedf29202c08550aac1d14e0ee619b0430aaef78f85864c1a892294fbc28cf"}, + {file = "propcache-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d62cdfcfd89ccb8de04e0eda998535c406bf5e060ffd56be6c586cbcc05b3311"}, + {file = "propcache-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cae65ad55793da34db5f54e4029b89d3b9b9490d8abe1b4c7ab5d4b8ec7ebf74"}, + {file = "propcache-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:333ddb9031d2704a301ee3e506dc46b1fe5f294ec198ed6435ad5b6a085facfe"}, + {file = "propcache-0.4.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd0858c20f078a32cf55f7e81473d96dcf3b93fd2ccdb3d40fdf54b8573df3af"}, + {file = "propcache-0.4.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:678ae89ebc632c5c204c794f8dab2837c5f159aeb59e6ed0539500400577298c"}, + {file = "propcache-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d472aeb4fbf9865e0c6d622d7f4d54a4e101a89715d8904282bb5f9a2f476c3f"}, + {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4d3df5fa7e36b3225954fba85589da77a0fe6a53e3976de39caf04a0db4c36f1"}, + {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:ee17f18d2498f2673e432faaa71698032b0127ebf23ae5974eeaf806c279df24"}, + {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:580e97762b950f993ae618e167e7be9256b8353c2dcd8b99ec100eb50f5286aa"}, + {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:501d20b891688eb8e7aa903021f0b72d5a55db40ffaab27edefd1027caaafa61"}, + {file = "propcache-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a0bd56e5b100aef69bd8562b74b46254e7c8812918d3baa700c8a8009b0af66"}, + {file = "propcache-0.4.1-cp313-cp313-win32.whl", hash = "sha256:bcc9aaa5d80322bc2fb24bb7accb4a30f81e90ab8d6ba187aec0744bc302ad81"}, + {file = "propcache-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:381914df18634f5494334d201e98245c0596067504b9372d8cf93f4bb23e025e"}, + {file = "propcache-0.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:8873eb4460fd55333ea49b7d189749ecf6e55bf85080f11b1c4530ed3034cba1"}, + {file = "propcache-0.4.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:92d1935ee1f8d7442da9c0c4fa7ac20d07e94064184811b685f5c4fada64553b"}, + {file = "propcache-0.4.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:473c61b39e1460d386479b9b2f337da492042447c9b685f28be4f74d3529e566"}, + {file = "propcache-0.4.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c0ef0aaafc66fbd87842a3fe3902fd889825646bc21149eafe47be6072725835"}, + {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95393b4d66bfae908c3ca8d169d5f79cd65636ae15b5e7a4f6e67af675adb0e"}, + {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c07fda85708bc48578467e85099645167a955ba093be0a2dcba962195676e859"}, + {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:af223b406d6d000830c6f65f1e6431783fc3f713ba3e6cc8c024d5ee96170a4b"}, + {file = "propcache-0.4.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a78372c932c90ee474559c5ddfffd718238e8673c340dc21fe45c5b8b54559a0"}, + {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:564d9f0d4d9509e1a870c920a89b2fec951b44bf5ba7d537a9e7c1ccec2c18af"}, + {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:17612831fda0138059cc5546f4d12a2aacfb9e47068c06af35c400ba58ba7393"}, + {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:41a89040cb10bd345b3c1a873b2bf36413d48da1def52f268a055f7398514874"}, + {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e35b88984e7fa64aacecea39236cee32dd9bd8c55f57ba8a75cf2399553f9bd7"}, + {file = "propcache-0.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f8b465489f927b0df505cbe26ffbeed4d6d8a2bbc61ce90eb074ff129ef0ab1"}, + {file = "propcache-0.4.1-cp313-cp313t-win32.whl", hash = "sha256:2ad890caa1d928c7c2965b48f3a3815c853180831d0e5503d35cf00c472f4717"}, + {file = "propcache-0.4.1-cp313-cp313t-win_amd64.whl", hash = "sha256:f7ee0e597f495cf415bcbd3da3caa3bd7e816b74d0d52b8145954c5e6fd3ff37"}, + {file = "propcache-0.4.1-cp313-cp313t-win_arm64.whl", hash = "sha256:929d7cbe1f01bb7baffb33dc14eb5691c95831450a26354cd210a8155170c93a"}, + {file = "propcache-0.4.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3f7124c9d820ba5548d431afb4632301acf965db49e666aa21c305cbe8c6de12"}, + {file = "propcache-0.4.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:c0d4b719b7da33599dfe3b22d3db1ef789210a0597bc650b7cee9c77c2be8c5c"}, + {file = "propcache-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9f302f4783709a78240ebc311b793f123328716a60911d667e0c036bc5dcbded"}, + {file = "propcache-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c80ee5802e3fb9ea37938e7eecc307fb984837091d5fd262bb37238b1ae97641"}, + {file = "propcache-0.4.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ed5a841e8bb29a55fb8159ed526b26adc5bdd7e8bd7bf793ce647cb08656cdf4"}, + {file = "propcache-0.4.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:55c72fd6ea2da4c318e74ffdf93c4fe4e926051133657459131a95c846d16d44"}, + {file = "propcache-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8326e144341460402713f91df60ade3c999d601e7eb5ff8f6f7862d54de0610d"}, + {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:060b16ae65bc098da7f6d25bf359f1f31f688384858204fe5d652979e0015e5b"}, + {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:89eb3fa9524f7bec9de6e83cf3faed9d79bffa560672c118a96a171a6f55831e"}, + {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:dee69d7015dc235f526fe80a9c90d65eb0039103fe565776250881731f06349f"}, + {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5558992a00dfd54ccbc64a32726a3357ec93825a418a401f5cc67df0ac5d9e49"}, + {file = "propcache-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c9b822a577f560fbd9554812526831712c1436d2c046cedee4c3796d3543b144"}, + {file = "propcache-0.4.1-cp314-cp314-win32.whl", hash = "sha256:ab4c29b49d560fe48b696cdcb127dd36e0bc2472548f3bf56cc5cb3da2b2984f"}, + {file = "propcache-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:5a103c3eb905fcea0ab98be99c3a9a5ab2de60228aa5aceedc614c0281cf6153"}, + {file = "propcache-0.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:74c1fb26515153e482e00177a1ad654721bf9207da8a494a0c05e797ad27b992"}, + {file = "propcache-0.4.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:824e908bce90fb2743bd6b59db36eb4f45cd350a39637c9f73b1c1ea66f5b75f"}, + {file = "propcache-0.4.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:c2b5e7db5328427c57c8e8831abda175421b709672f6cfc3d630c3b7e2146393"}, + {file = "propcache-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:6f6ff873ed40292cd4969ef5310179afd5db59fdf055897e282485043fc80ad0"}, + {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49a2dc67c154db2c1463013594c458881a069fcf98940e61a0569016a583020a"}, + {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:005f08e6a0529984491e37d8dbc3dd86f84bd78a8ceb5fa9a021f4c48d4984be"}, + {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5c3310452e0d31390da9035c348633b43d7e7feb2e37be252be6da45abd1abcc"}, + {file = "propcache-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c3c70630930447f9ef1caac7728c8ad1c56bc5015338b20fed0d08ea2480b3a"}, + {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8e57061305815dfc910a3634dcf584f08168a8836e6999983569f51a8544cd89"}, + {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:521a463429ef54143092c11a77e04056dd00636f72e8c45b70aaa3140d639726"}, + {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:120c964da3fdc75e3731aa392527136d4ad35868cc556fd09bb6d09172d9a367"}, + {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:d8f353eb14ee3441ee844ade4277d560cdd68288838673273b978e3d6d2c8f36"}, + {file = "propcache-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ab2943be7c652f09638800905ee1bab2c544e537edb57d527997a24c13dc1455"}, + {file = "propcache-0.4.1-cp314-cp314t-win32.whl", hash = "sha256:05674a162469f31358c30bcaa8883cb7829fa3110bf9c0991fe27d7896c42d85"}, + {file = "propcache-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:990f6b3e2a27d683cb7602ed6c86f15ee6b43b1194736f9baaeb93d0016633b1"}, + {file = "propcache-0.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ecef2343af4cc68e05131e45024ba34f6095821988a9d0a02aa7c73fcc448aa9"}, + {file = "propcache-0.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3d233076ccf9e450c8b3bc6720af226b898ef5d051a2d145f7d765e6e9f9bcff"}, + {file = "propcache-0.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:357f5bb5c377a82e105e44bd3d52ba22b616f7b9773714bff93573988ef0a5fb"}, + {file = "propcache-0.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cbc3b6dfc728105b2a57c06791eb07a94229202ea75c59db644d7d496b698cac"}, + {file = "propcache-0.4.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:182b51b421f0501952d938dc0b0eb45246a5b5153c50d42b495ad5fb7517c888"}, + {file = "propcache-0.4.1-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4b536b39c5199b96fc6245eb5fb796c497381d3942f169e44e8e392b29c9ebcc"}, + {file = "propcache-0.4.1-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:db65d2af507bbfbdcedb254a11149f894169d90488dd3e7190f7cdcb2d6cd57a"}, + {file = "propcache-0.4.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd2dbc472da1f772a4dae4fa24be938a6c544671a912e30529984dd80400cd88"}, + {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:daede9cd44e0f8bdd9e6cc9a607fc81feb80fae7a5fc6cecaff0e0bb32e42d00"}, + {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:71b749281b816793678ae7f3d0d84bd36e694953822eaad408d682efc5ca18e0"}, + {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:0002004213ee1f36cfb3f9a42b5066100c44276b9b72b4e1504cddd3d692e86e"}, + {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:fe49d0a85038f36ba9e3ffafa1103e61170b28e95b16622e11be0a0ea07c6781"}, + {file = "propcache-0.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:99d43339c83aaf4d32bda60928231848eee470c6bda8d02599cc4cebe872d183"}, + {file = "propcache-0.4.1-cp39-cp39-win32.whl", hash = "sha256:a129e76735bc792794d5177069691c3217898b9f5cee2b2661471e52ffe13f19"}, + {file = "propcache-0.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:948dab269721ae9a87fd16c514a0a2c2a1bdb23a9a61b969b0f9d9ee2968546f"}, + {file = "propcache-0.4.1-cp39-cp39-win_arm64.whl", hash = "sha256:5fd37c406dd6dc85aa743e214cef35dc54bbdd1419baac4f6ae5e5b1a2976938"}, + {file = "propcache-0.4.1-py3-none-any.whl", hash = "sha256:af2a6052aeb6cf17d3e46ee169099044fd8224cbaf75c76a2ef596e8163e2237"}, + {file = "propcache-0.4.1.tar.gz", hash = "sha256:f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d"}, +] + +[[package]] +name = "protobuf" +version = "6.33.5" +description = "" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "protobuf-6.33.5-cp310-abi3-win32.whl", hash = "sha256:d71b040839446bac0f4d162e758bea99c8251161dae9d0983a3b88dee345153b"}, + {file = "protobuf-6.33.5-cp310-abi3-win_amd64.whl", hash = "sha256:3093804752167bcab3998bec9f1048baae6e29505adaf1afd14a37bddede533c"}, + {file = "protobuf-6.33.5-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:a5cb85982d95d906df1e2210e58f8e4f1e3cdc088e52c921a041f9c9a0386de5"}, + {file = "protobuf-6.33.5-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:9b71e0281f36f179d00cbcb119cb19dec4d14a81393e5ea220f64b286173e190"}, + {file = "protobuf-6.33.5-cp39-abi3-manylinux2014_s390x.whl", hash = "sha256:8afa18e1d6d20af15b417e728e9f60f3aa108ee76f23c3b2c07a2c3b546d3afd"}, + {file = "protobuf-6.33.5-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:cbf16ba3350fb7b889fca858fb215967792dc125b35c7976ca4818bee3521cf0"}, + {file = "protobuf-6.33.5-cp39-cp39-win32.whl", hash = "sha256:a3157e62729aafb8df6da2c03aa5c0937c7266c626ce11a278b6eb7963c4e37c"}, + {file = "protobuf-6.33.5-cp39-cp39-win_amd64.whl", hash = "sha256:8f04fa32763dcdb4973d537d6b54e615cc61108c7cb38fe59310c3192d29510a"}, + {file = "protobuf-6.33.5-py3-none-any.whl", hash = "sha256:69915a973dd0f60f31a08b8318b73eab2bd6a392c79184b3612226b0a3f8ec02"}, + {file = "protobuf-6.33.5.tar.gz", hash = "sha256:6ddcac2a081f8b7b9642c09406bc6a4290128fce5f471cddd165960bb9119e5c"}, +] + +[[package]] +name = "psutil" +version = "7.2.2" +description = "Cross-platform lib for process and system monitoring." +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "psutil-7.2.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2edccc433cbfa046b980b0df0171cd25bcaeb3a68fe9022db0979e7aa74a826b"}, + {file = "psutil-7.2.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e78c8603dcd9a04c7364f1a3e670cea95d51ee865e4efb3556a3a63adef958ea"}, + {file = "psutil-7.2.2-cp313-cp313t-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1a571f2330c966c62aeda00dd24620425d4b0cc86881c89861fbc04549e5dc63"}, + {file = "psutil-7.2.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:917e891983ca3c1887b4ef36447b1e0873e70c933afc831c6b6da078ba474312"}, + {file = "psutil-7.2.2-cp313-cp313t-win_amd64.whl", hash = "sha256:ab486563df44c17f5173621c7b198955bd6b613fb87c71c161f827d3fb149a9b"}, + {file = "psutil-7.2.2-cp313-cp313t-win_arm64.whl", hash = "sha256:ae0aefdd8796a7737eccea863f80f81e468a1e4cf14d926bd9b6f5f2d5f90ca9"}, + {file = "psutil-7.2.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:eed63d3b4d62449571547b60578c5b2c4bcccc5387148db46e0c2313dad0ee00"}, + {file = "psutil-7.2.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7b6d09433a10592ce39b13d7be5a54fbac1d1228ed29abc880fb23df7cb694c9"}, + {file = "psutil-7.2.2-cp314-cp314t-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fa4ecf83bcdf6e6c8f4449aff98eefb5d0604bf88cb883d7da3d8d2d909546a"}, + {file = "psutil-7.2.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e452c464a02e7dc7822a05d25db4cde564444a67e58539a00f929c51eddda0cf"}, + {file = "psutil-7.2.2-cp314-cp314t-win_amd64.whl", hash = "sha256:c7663d4e37f13e884d13994247449e9f8f574bc4655d509c3b95e9ec9e2b9dc1"}, + {file = "psutil-7.2.2-cp314-cp314t-win_arm64.whl", hash = "sha256:11fe5a4f613759764e79c65cf11ebdf26e33d6dd34336f8a337aa2996d71c841"}, + {file = "psutil-7.2.2-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:ed0cace939114f62738d808fdcecd4c869222507e266e574799e9c0faa17d486"}, + {file = "psutil-7.2.2-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:1a7b04c10f32cc88ab39cbf606e117fd74721c831c98a27dc04578deb0c16979"}, + {file = "psutil-7.2.2-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:076a2d2f923fd4821644f5ba89f059523da90dc9014e85f8e45a5774ca5bc6f9"}, + {file = "psutil-7.2.2-cp36-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b0726cecd84f9474419d67252add4ac0cd9811b04d61123054b9fb6f57df6e9e"}, + {file = "psutil-7.2.2-cp36-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fd04ef36b4a6d599bbdb225dd1d3f51e00105f6d48a28f006da7f9822f2606d8"}, + {file = "psutil-7.2.2-cp36-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b58fabe35e80b264a4e3bb23e6b96f9e45a3df7fb7eed419ac0e5947c61e47cc"}, + {file = "psutil-7.2.2-cp37-abi3-win_amd64.whl", hash = "sha256:eb7e81434c8d223ec4a219b5fc1c47d0417b12be7ea866e24fb5ad6e84b3d988"}, + {file = "psutil-7.2.2-cp37-abi3-win_arm64.whl", hash = "sha256:8c233660f575a5a89e6d4cb65d9f938126312bca76d8fe087b947b3a1aaac9ee"}, + {file = "psutil-7.2.2.tar.gz", hash = "sha256:0746f5f8d406af344fd547f1c8daa5f5c33dbc293bb8d6a16d80b4bb88f59372"}, +] + +[package.extras] +dev = ["abi3audit", "black", "check-manifest", "colorama ; os_name == \"nt\"", "coverage", "packaging", "psleak", "pylint", "pyperf", "pypinfo", "pyreadline3 ; os_name == \"nt\"", "pytest", "pytest-cov", "pytest-instafail", "pytest-xdist", "pywin32 ; os_name == \"nt\" and implementation_name != \"pypy\"", "requests", "rstcheck", "ruff", "setuptools", "sphinx", "sphinx_rtd_theme", "toml-sort", "twine", "validate-pyproject[all]", "virtualenv", "vulture", "wheel", "wheel ; os_name == \"nt\" and implementation_name != \"pypy\"", "wmi ; os_name == \"nt\" and implementation_name != \"pypy\""] +test = ["psleak", "pytest", "pytest-instafail", "pytest-xdist", "pywin32 ; os_name == \"nt\" and implementation_name != \"pypy\"", "setuptools", "wheel ; os_name == \"nt\" and implementation_name != \"pypy\"", "wmi ; os_name == \"nt\" and implementation_name != \"pypy\""] + +[[package]] +name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +optional = false +python-versions = "*" +groups = ["main"] +markers = "sys_platform != \"win32\" and sys_platform != \"emscripten\"" +files = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] + +[[package]] +name = "pure-eval" +version = "0.2.3" +description = "Safely evaluate AST nodes without side effects" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "pure_eval-0.2.3-py3-none-any.whl", hash = "sha256:1db8e35b67b3d218d818ae653e27f06c3aa420901fa7b081ca98cbedc874e0d0"}, + {file = "pure_eval-0.2.3.tar.gz", hash = "sha256:5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42"}, +] + +[package.extras] +tests = ["pytest"] + +[[package]] +name = "py-key-value-aio" +version = "0.4.4" +description = "Async Key-Value Store - A pluggable interface for KV Stores" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "py_key_value_aio-0.4.4-py3-none-any.whl", hash = "sha256:18e17564ecae61b987f909fc2cd41ee2012c84b4b1dcb8c055cf8b4bc1bf3f5d"}, + {file = "py_key_value_aio-0.4.4.tar.gz", hash = "sha256:e3012e6243ed7cc09bb05457bd4d03b1ba5c2b1ca8700096b3927db79ffbbe55"}, +] + +[package.dependencies] +aiofile = {version = ">=3.5.0", optional = true, markers = "extra == \"filetree\""} +anyio = {version = ">=4.4.0", optional = true, markers = "extra == \"filetree\""} +beartype = ">=0.20.0" +cachetools = {version = ">=5.0.0", optional = true, markers = "extra == \"memory\""} +keyring = {version = ">=25.6.0", optional = true, markers = "extra == \"keyring\""} +typing-extensions = ">=4.15.0" + +[package.extras] +aerospike = ["aerospike (>=16.0.0)"] +disk = ["diskcache (>=5.0.0)", "pathvalidate (>=3.3.1)"] +docs = ["mkdocs (>=1.6.0)", "mkdocs-material (>=9.5.0)", "mkdocstrings-python (>=1.10.0)", "mkdocstrings[python] (>=0.30.0)"] +duckdb = ["duckdb (>=1.1.1)", "pytz (>=2025.2)"] +dynamodb = ["aioboto3 (>=13.3.0)", "types-aiobotocore-dynamodb (>=2.16.0)"] +elasticsearch = ["aiohttp (>=3.12)", "elasticsearch (>=8.0.0)"] +filetree = ["aiofile (>=3.5.0)", "anyio (>=4.4.0)"] +firestore = ["google-auth (>=2.24.0)", "google-cloud-firestore (>=2.13.0)"] +keyring = ["keyring (>=25.6.0)"] +keyring-linux = ["dbus-python (>=1.4.0)", "keyring (>=25.6.0)"] +memcached = ["aiomcache (>=0.8.0)"] +memory = ["cachetools (>=5.0.0)"] +mongodb = ["pymongo (>=4.0.0)"] +opensearch = ["opensearch-py[async] (>=2.0.0)"] +postgresql = ["asyncpg (>=0.30.0)"] +pydantic = ["pydantic (>=2.11.9)"] +redis = ["redis (>=4.3.0)"] +rocksdb = ["rocksdict (>=0.3.2) ; python_full_version < \"3.12.0\"", "rocksdict (>=0.3.24) ; python_full_version >= \"3.12.0\""] +s3 = ["aioboto3 (>=13.3.0)", "types-aiobotocore-s3 (>=2.16.0)"] +valkey = ["valkey-glide (>=2.1.0)"] +vault = ["hvac (>=2.3.0)", "types-hvac (>=2.3.0)"] +wrappers-encryption = ["cryptography (>=45.0.0)"] + +[[package]] +name = "pyarrow" +version = "23.0.1" +description = "Python library for Apache Arrow" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "pyarrow-23.0.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:3fab8f82571844eb3c460f90a75583801d14ca0cc32b1acc8c361650e006fd56"}, + {file = "pyarrow-23.0.1-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:3f91c038b95f71ddfc865f11d5876c42f343b4495535bd262c7b321b0b94507c"}, + {file = "pyarrow-23.0.1-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:d0744403adabef53c985a7f8a082b502a368510c40d184df349a0a8754533258"}, + {file = "pyarrow-23.0.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:c33b5bf406284fd0bba436ed6f6c3ebe8e311722b441d89397c54f871c6863a2"}, + {file = "pyarrow-23.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ddf743e82f69dcd6dbbcb63628895d7161e04e56794ef80550ac6f3315eeb1d5"}, + {file = "pyarrow-23.0.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e052a211c5ac9848ae15d5ec875ed0943c0221e2fcfe69eee80b604b4e703222"}, + {file = "pyarrow-23.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:5abde149bb3ce524782d838eb67ac095cd3fd6090eba051130589793f1a7f76d"}, + {file = "pyarrow-23.0.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:6f0147ee9e0386f519c952cc670eb4a8b05caa594eeffe01af0e25f699e4e9bb"}, + {file = "pyarrow-23.0.1-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:0ae6e17c828455b6265d590100c295193f93cc5675eb0af59e49dbd00d2de350"}, + {file = "pyarrow-23.0.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:fed7020203e9ef273360b9e45be52a2a47d3103caf156a30ace5247ffb51bdbd"}, + {file = "pyarrow-23.0.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:26d50dee49d741ac0e82185033488d28d35be4d763ae6f321f97d1140eb7a0e9"}, + {file = "pyarrow-23.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3c30143b17161310f151f4a2bcfe41b5ff744238c1039338779424e38579d701"}, + {file = "pyarrow-23.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db2190fa79c80a23fdd29fef4b8992893f024ae7c17d2f5f4db7171fa30c2c78"}, + {file = "pyarrow-23.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:f00f993a8179e0e1c9713bcc0baf6d6c01326a406a9c23495ec1ba9c9ebf2919"}, + {file = "pyarrow-23.0.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:f4b0dbfa124c0bb161f8b5ebb40f1a680b70279aa0c9901d44a2b5a20806039f"}, + {file = "pyarrow-23.0.1-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:7707d2b6673f7de054e2e83d59f9e805939038eebe1763fe811ee8fa5c0cd1a7"}, + {file = "pyarrow-23.0.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:86ff03fb9f1a320266e0de855dee4b17da6794c595d207f89bba40d16b5c78b9"}, + {file = "pyarrow-23.0.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:813d99f31275919c383aab17f0f455a04f5a429c261cc411b1e9a8f5e4aaaa05"}, + {file = "pyarrow-23.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:bf5842f960cddd2ef757d486041d57c96483efc295a8c4a0e20e704cbbf39c67"}, + {file = "pyarrow-23.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:564baf97c858ecc03ec01a41062e8f4698abc3e6e2acd79c01c2e97880a19730"}, + {file = "pyarrow-23.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:07deae7783782ac7250989a7b2ecde9b3c343a643f82e8a4df03d93b633006f0"}, + {file = "pyarrow-23.0.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:6b8fda694640b00e8af3c824f99f789e836720aa8c9379fb435d4c4953a756b8"}, + {file = "pyarrow-23.0.1-cp313-cp313-macosx_12_0_x86_64.whl", hash = "sha256:8ff51b1addc469b9444b7c6f3548e19dc931b172ab234e995a60aea9f6e6025f"}, + {file = "pyarrow-23.0.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:71c5be5cbf1e1cb6169d2a0980850bccb558ddc9b747b6206435313c47c37677"}, + {file = "pyarrow-23.0.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:9b6f4f17b43bc39d56fec96e53fe89d94bac3eb134137964371b45352d40d0c2"}, + {file = "pyarrow-23.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9fc13fc6c403d1337acab46a2c4346ca6c9dec5780c3c697cf8abfd5e19b6b37"}, + {file = "pyarrow-23.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5c16ed4f53247fa3ffb12a14d236de4213a4415d127fe9cebed33d51671113e2"}, + {file = "pyarrow-23.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:cecfb12ef629cf6be0b1887f9f86463b0dd3dc3195ae6224e74006be4736035a"}, + {file = "pyarrow-23.0.1-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:29f7f7419a0e30264ea261fdc0e5fe63ce5a6095003db2945d7cd78df391a7e1"}, + {file = "pyarrow-23.0.1-cp313-cp313t-macosx_12_0_x86_64.whl", hash = "sha256:33d648dc25b51fd8055c19e4261e813dfc4d2427f068bcecc8b53d01b81b0500"}, + {file = "pyarrow-23.0.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:cd395abf8f91c673dd3589cadc8cc1ee4e8674fa61b2e923c8dd215d9c7d1f41"}, + {file = "pyarrow-23.0.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:00be9576d970c31defb5c32eb72ef585bf600ef6d0a82d5eccaae96639cf9d07"}, + {file = "pyarrow-23.0.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c2139549494445609f35a5cda4eb94e2c9e4d704ce60a095b342f82460c73a83"}, + {file = "pyarrow-23.0.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:7044b442f184d84e2351e5084600f0d7343d6117aabcbc1ac78eb1ae11eb4125"}, + {file = "pyarrow-23.0.1-cp313-cp313t-win_amd64.whl", hash = "sha256:a35581e856a2fafa12f3f54fce4331862b1cfb0bef5758347a858a4aa9d6bae8"}, + {file = "pyarrow-23.0.1-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:5df1161da23636a70838099d4aaa65142777185cc0cdba4037a18cee7d8db9ca"}, + {file = "pyarrow-23.0.1-cp314-cp314-macosx_12_0_x86_64.whl", hash = "sha256:fa8e51cb04b9f8c9c5ace6bab63af9a1f88d35c0d6cbf53e8c17c098552285e1"}, + {file = "pyarrow-23.0.1-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:0b95a3994f015be13c63148fef8832e8a23938128c185ee951c98908a696e0eb"}, + {file = "pyarrow-23.0.1-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:4982d71350b1a6e5cfe1af742c53dfb759b11ce14141870d05d9e540d13bc5d1"}, + {file = "pyarrow-23.0.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c250248f1fe266db627921c89b47b7c06fee0489ad95b04d50353537d74d6886"}, + {file = "pyarrow-23.0.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5f4763b83c11c16e5f4c15601ba6dfa849e20723b46aa2617cb4bffe8768479f"}, + {file = "pyarrow-23.0.1-cp314-cp314-win_amd64.whl", hash = "sha256:3a4c85ef66c134161987c17b147d6bffdca4566f9a4c1d81a0a01cdf08414ea5"}, + {file = "pyarrow-23.0.1-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:17cd28e906c18af486a499422740298c52d7c6795344ea5002a7720b4eadf16d"}, + {file = "pyarrow-23.0.1-cp314-cp314t-macosx_12_0_x86_64.whl", hash = "sha256:76e823d0e86b4fb5e1cf4a58d293036e678b5a4b03539be933d3b31f9406859f"}, + {file = "pyarrow-23.0.1-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:a62e1899e3078bf65943078b3ad2a6ddcacf2373bc06379aac61b1e548a75814"}, + {file = "pyarrow-23.0.1-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:df088e8f640c9fae3b1f495b3c64755c4e719091caf250f3a74d095ddf3c836d"}, + {file = "pyarrow-23.0.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:46718a220d64677c93bc243af1d44b55998255427588e400677d7192671845c7"}, + {file = "pyarrow-23.0.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a09f3876e87f48bc2f13583ab551f0379e5dfb83210391e68ace404181a20690"}, + {file = "pyarrow-23.0.1-cp314-cp314t-win_amd64.whl", hash = "sha256:527e8d899f14bd15b740cd5a54ad56b7f98044955373a17179d5956ddb93d9ce"}, + {file = "pyarrow-23.0.1.tar.gz", hash = "sha256:b8c5873e33440b2bc2f4a79d2b47017a89c5a24116c055625e6f2ee50523f019"}, +] + +[[package]] +name = "pycparser" +version = "3.0" +description = "C parser in Python" +optional = false +python-versions = ">=3.10" +groups = ["main"] +markers = "platform_python_implementation != \"PyPy\" and implementation_name != \"PyPy\" or implementation_name == \"pypy\"" +files = [ + {file = "pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992"}, + {file = "pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29"}, +] + +[[package]] +name = "pydantic" +version = "2.12.5" +description = "Data validation using Python type hints" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d"}, + {file = "pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49"}, +] + +[package.dependencies] +annotated-types = ">=0.6.0" +email-validator = {version = ">=2.0.0", optional = true, markers = "extra == \"email\""} +pydantic-core = "2.41.5" +typing-extensions = ">=4.14.1" +typing-inspection = ">=0.4.2" + +[package.extras] +email = ["email-validator (>=2.0.0)"] +timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows\""] + +[[package]] +name = "pydantic-core" +version = "2.41.5" +description = "Core functionality for Pydantic validation and serialization" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "pydantic_core-2.41.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146"}, + {file = "pydantic_core-2.41.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a"}, + {file = "pydantic_core-2.41.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c"}, + {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2"}, + {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556"}, + {file = "pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49"}, + {file = "pydantic_core-2.41.5-cp310-cp310-win32.whl", hash = "sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba"}, + {file = "pydantic_core-2.41.5-cp310-cp310-win_amd64.whl", hash = "sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9"}, + {file = "pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6"}, + {file = "pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284"}, + {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594"}, + {file = "pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e"}, + {file = "pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b"}, + {file = "pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe"}, + {file = "pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f"}, + {file = "pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7"}, + {file = "pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c"}, + {file = "pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5"}, + {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c"}, + {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294"}, + {file = "pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1"}, + {file = "pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d"}, + {file = "pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815"}, + {file = "pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3"}, + {file = "pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9"}, + {file = "pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586"}, + {file = "pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d"}, + {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740"}, + {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e"}, + {file = "pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858"}, + {file = "pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36"}, + {file = "pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11"}, + {file = "pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd"}, + {file = "pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a"}, + {file = "pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375"}, + {file = "pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553"}, + {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90"}, + {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07"}, + {file = "pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb"}, + {file = "pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23"}, + {file = "pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf"}, + {file = "pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c"}, + {file = "pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008"}, + {file = "pydantic_core-2.41.5-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:8bfeaf8735be79f225f3fefab7f941c712aaca36f1128c9d7e2352ee1aa87bdf"}, + {file = "pydantic_core-2.41.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:346285d28e4c8017da95144c7f3acd42740d637ff41946af5ce6e5e420502dd5"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a75dafbf87d6276ddc5b2bf6fae5254e3d0876b626eb24969a574fff9149ee5d"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7b93a4d08587e2b7e7882de461e82b6ed76d9026ce91ca7915e740ecc7855f60"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8465ab91a4bd96d36dde3263f06caa6a8a6019e4113f24dc753d79a8b3a3f82"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:299e0a22e7ae2b85c1a57f104538b2656e8ab1873511fd718a1c1c6f149b77b5"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:707625ef0983fcfb461acfaf14de2067c5942c6bb0f3b4c99158bed6fedd3cf3"}, + {file = "pydantic_core-2.41.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f41eb9797986d6ebac5e8edff36d5cef9de40def462311b3eb3eeded1431e425"}, + {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0384e2e1021894b1ff5a786dbf94771e2986ebe2869533874d7e43bc79c6f504"}, + {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:f0cd744688278965817fd0839c4a4116add48d23890d468bc436f78beb28abf5"}, + {file = "pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:753e230374206729bf0a807954bcc6c150d3743928a73faffee51ac6557a03c3"}, + {file = "pydantic_core-2.41.5-cp39-cp39-win32.whl", hash = "sha256:873e0d5b4fb9b89ef7c2d2a963ea7d02879d9da0da8d9d4933dee8ee86a8b460"}, + {file = "pydantic_core-2.41.5-cp39-cp39-win_amd64.whl", hash = "sha256:e4f4a984405e91527a0d62649ee21138f8e3d0ef103be488c1dc11a80d7f184b"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2"}, + {file = "pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56"}, + {file = "pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963"}, + {file = "pydantic_core-2.41.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f"}, + {file = "pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51"}, + {file = "pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e"}, +] + +[package.dependencies] +typing-extensions = ">=4.14.1" + +[[package]] +name = "pydantic-settings" +version = "2.13.1" +description = "Settings management using Pydantic" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "pydantic_settings-2.13.1-py3-none-any.whl", hash = "sha256:d56fd801823dbeae7f0975e1f8c8e25c258eb75d278ea7abb5d9cebb01b56237"}, + {file = "pydantic_settings-2.13.1.tar.gz", hash = "sha256:b4c11847b15237fb0171e1462bf540e294affb9b86db4d9aa5c01730bdbe4025"}, +] + +[package.dependencies] +pydantic = ">=2.7.0" +python-dotenv = ">=0.21.0" +typing-inspection = ">=0.4.0" + +[package.extras] +aws-secrets-manager = ["boto3 (>=1.35.0)", "boto3-stubs[secretsmanager]"] +azure-key-vault = ["azure-identity (>=1.16.0)", "azure-keyvault-secrets (>=4.8.0)"] +gcp-secret-manager = ["google-cloud-secret-manager (>=2.23.1)"] +toml = ["tomli (>=2.0.1)"] +yaml = ["pyyaml (>=6.0.1)"] + +[[package]] +name = "pydeck" +version = "0.9.1" +description = "Widget for deck.gl maps" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "pydeck-0.9.1-py2.py3-none-any.whl", hash = "sha256:b3f75ba0d273fc917094fa61224f3f6076ca8752b93d46faf3bcfd9f9d59b038"}, + {file = "pydeck-0.9.1.tar.gz", hash = "sha256:f74475ae637951d63f2ee58326757f8d4f9cd9f2a457cf42950715003e2cb605"}, +] + +[package.dependencies] +jinja2 = ">=2.10.1" +numpy = ">=1.16.4" + +[package.extras] +carto = ["pydeck-carto"] +jupyter = ["ipykernel (>=5.1.2) ; python_version >= \"3.4\"", "ipython (>=5.8.0) ; python_version < \"3.4\"", "ipywidgets (>=7,<8)", "traitlets (>=4.3.2)"] + +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + +[[package]] +name = "pyjwt" +version = "2.11.0" +description = "JSON Web Token implementation in Python" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "pyjwt-2.11.0-py3-none-any.whl", hash = "sha256:94a6bde30eb5c8e04fee991062b534071fd1439ef58d2adc9ccb823e7bcd0469"}, + {file = "pyjwt-2.11.0.tar.gz", hash = "sha256:35f95c1f0fbe5d5ba6e43f00271c275f7a1a4db1dab27bf708073b75318ea623"}, +] + +[package.dependencies] +cryptography = {version = ">=3.4.0", optional = true, markers = "extra == \"crypto\""} + +[package.extras] +crypto = ["cryptography (>=3.4.0)"] +dev = ["coverage[toml] (==7.10.7)", "cryptography (>=3.4.0)", "pre-commit", "pytest (>=8.4.2,<9.0.0)", "sphinx", "sphinx-rtd-theme", "zope.interface"] +docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"] +tests = ["coverage[toml] (==7.10.7)", "pytest (>=8.4.2,<9.0.0)"] + +[[package]] +name = "pyparsing" +version = "3.3.2" +description = "pyparsing - Classes and methods to define and execute parsing grammars" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "pyparsing-3.3.2-py3-none-any.whl", hash = "sha256:850ba148bd908d7e2411587e247a1e4f0327839c40e2e5e6d05a007ecc69911d"}, + {file = "pyparsing-3.3.2.tar.gz", hash = "sha256:c777f4d763f140633dcb6d8a3eda953bf7a214dc4eff598413c070bcdc117cbc"}, +] + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] + +[[package]] +name = "pyperclip" +version = "1.11.0" +description = "A cross-platform clipboard module for Python. (Only handles plain text for now.)" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "pyperclip-1.11.0-py3-none-any.whl", hash = "sha256:299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273"}, + {file = "pyperclip-1.11.0.tar.gz", hash = "sha256:244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6"}, +] + +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +description = "Extensions to the standard Python datetime module" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["main"] +files = [ + {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, + {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, +] + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "python-dotenv" +version = "1.2.2" +description = "Read key-value pairs from a .env file and set them as environment variables" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "python_dotenv-1.2.2-py3-none-any.whl", hash = "sha256:1d8214789a24de455a8b8bd8ae6fe3c6b69a5e3d64aa8a8e5d68e694bbcb285a"}, + {file = "python_dotenv-1.2.2.tar.gz", hash = "sha256:2c371a91fbd7ba082c2c1dc1f8bf89ca22564a087c2c287cd9b662adde799cf3"}, +] + +[package.extras] +cli = ["click (>=5.0)"] + +[[package]] +name = "python-multipart" +version = "0.0.22" +description = "A streaming multipart parser for Python" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "python_multipart-0.0.22-py3-none-any.whl", hash = "sha256:2b2cd894c83d21bf49d702499531c7bafd057d730c201782048f7945d82de155"}, + {file = "python_multipart-0.0.22.tar.gz", hash = "sha256:7340bef99a7e0032613f56dc36027b959fd3b30a787ed62d310e951f7c3a3a58"}, +] + +[[package]] +name = "pytz" +version = "2026.1.post1" +description = "World timezone definitions, modern and historical" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "pytz-2026.1.post1-py2.py3-none-any.whl", hash = "sha256:f2fd16142fda348286a75e1a524be810bb05d444e5a081f37f7affc635035f7a"}, + {file = "pytz-2026.1.post1.tar.gz", hash = "sha256:3378dde6a0c3d26719182142c56e60c7f9af7e968076f31aae569d72a0358ee1"}, +] + +[[package]] +name = "pywin32" +version = "311" +description = "Python for Window Extensions" +optional = false +python-versions = "*" +groups = ["main"] +markers = "sys_platform == \"win32\"" +files = [ + {file = "pywin32-311-cp310-cp310-win32.whl", hash = "sha256:d03ff496d2a0cd4a5893504789d4a15399133fe82517455e78bad62efbb7f0a3"}, + {file = "pywin32-311-cp310-cp310-win_amd64.whl", hash = "sha256:797c2772017851984b97180b0bebe4b620bb86328e8a884bb626156295a63b3b"}, + {file = "pywin32-311-cp310-cp310-win_arm64.whl", hash = "sha256:0502d1facf1fed4839a9a51ccbcc63d952cf318f78ffc00a7e78528ac27d7a2b"}, + {file = "pywin32-311-cp311-cp311-win32.whl", hash = "sha256:184eb5e436dea364dcd3d2316d577d625c0351bf237c4e9a5fabbcfa5a58b151"}, + {file = "pywin32-311-cp311-cp311-win_amd64.whl", hash = "sha256:3ce80b34b22b17ccbd937a6e78e7225d80c52f5ab9940fe0506a1a16f3dab503"}, + {file = "pywin32-311-cp311-cp311-win_arm64.whl", hash = "sha256:a733f1388e1a842abb67ffa8e7aad0e70ac519e09b0f6a784e65a136ec7cefd2"}, + {file = "pywin32-311-cp312-cp312-win32.whl", hash = "sha256:750ec6e621af2b948540032557b10a2d43b0cee2ae9758c54154d711cc852d31"}, + {file = "pywin32-311-cp312-cp312-win_amd64.whl", hash = "sha256:b8c095edad5c211ff31c05223658e71bf7116daa0ecf3ad85f3201ea3190d067"}, + {file = "pywin32-311-cp312-cp312-win_arm64.whl", hash = "sha256:e286f46a9a39c4a18b319c28f59b61de793654af2f395c102b4f819e584b5852"}, + {file = "pywin32-311-cp313-cp313-win32.whl", hash = "sha256:f95ba5a847cba10dd8c4d8fefa9f2a6cf283b8b88ed6178fa8a6c1ab16054d0d"}, + {file = "pywin32-311-cp313-cp313-win_amd64.whl", hash = "sha256:718a38f7e5b058e76aee1c56ddd06908116d35147e133427e59a3983f703a20d"}, + {file = "pywin32-311-cp313-cp313-win_arm64.whl", hash = "sha256:7b4075d959648406202d92a2310cb990fea19b535c7f4a78d3f5e10b926eeb8a"}, + {file = "pywin32-311-cp314-cp314-win32.whl", hash = "sha256:b7a2c10b93f8986666d0c803ee19b5990885872a7de910fc460f9b0c2fbf92ee"}, + {file = "pywin32-311-cp314-cp314-win_amd64.whl", hash = "sha256:3aca44c046bd2ed8c90de9cb8427f581c479e594e99b5c0bb19b29c10fd6cb87"}, + {file = "pywin32-311-cp314-cp314-win_arm64.whl", hash = "sha256:a508e2d9025764a8270f93111a970e1d0fbfc33f4153b388bb649b7eec4f9b42"}, + {file = "pywin32-311-cp38-cp38-win32.whl", hash = "sha256:6c6f2969607b5023b0d9ce2541f8d2cbb01c4f46bc87456017cf63b73f1e2d8c"}, + {file = "pywin32-311-cp38-cp38-win_amd64.whl", hash = "sha256:c8015b09fb9a5e188f83b7b04de91ddca4658cee2ae6f3bc483f0b21a77ef6cd"}, + {file = "pywin32-311-cp39-cp39-win32.whl", hash = "sha256:aba8f82d551a942cb20d4a83413ccbac30790b50efb89a75e4f586ac0bb8056b"}, + {file = "pywin32-311-cp39-cp39-win_amd64.whl", hash = "sha256:e0c4cfb0621281fe40387df582097fd796e80430597cb9944f0ae70447bacd91"}, + {file = "pywin32-311-cp39-cp39-win_arm64.whl", hash = "sha256:62ea666235135fee79bb154e695f3ff67370afefd71bd7fea7512fc70ef31e3d"}, +] + +[[package]] +name = "pywin32-ctypes" +version = "0.2.3" +description = "A (partial) reimplementation of pywin32 using ctypes/cffi" +optional = false +python-versions = ">=3.6" +groups = ["main"] +markers = "sys_platform == \"win32\"" +files = [ + {file = "pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755"}, + {file = "pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8"}, +] + +[[package]] +name = "pyyaml" +version = "6.0.3" +description = "YAML parser and emitter for Python" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "PyYAML-6.0.3-cp38-cp38-macosx_10_13_x86_64.whl", hash = "sha256:c2514fceb77bc5e7a2f7adfaa1feb2fb311607c9cb518dbc378688ec73d8292f"}, + {file = "PyYAML-6.0.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c57bb8c96f6d1808c030b1687b9b5fb476abaa47f0db9c0101f5e9f394e97f4"}, + {file = "PyYAML-6.0.3-cp38-cp38-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:efd7b85f94a6f21e4932043973a7ba2613b059c4a000551892ac9f1d11f5baf3"}, + {file = "PyYAML-6.0.3-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22ba7cfcad58ef3ecddc7ed1db3409af68d023b7f940da23c6c2a1890976eda6"}, + {file = "PyYAML-6.0.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:6344df0d5755a2c9a276d4473ae6b90647e216ab4757f8426893b5dd2ac3f369"}, + {file = "PyYAML-6.0.3-cp38-cp38-win32.whl", hash = "sha256:3ff07ec89bae51176c0549bc4c63aa6202991da2d9a6129d7aef7f1407d3f295"}, + {file = "PyYAML-6.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:5cf4e27da7e3fbed4d6c3d8e797387aaad68102272f8f9752883bc32d61cb87b"}, + {file = "pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b"}, + {file = "pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956"}, + {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8"}, + {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198"}, + {file = "pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b"}, + {file = "pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0"}, + {file = "pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69"}, + {file = "pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e"}, + {file = "pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c"}, + {file = "pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e"}, + {file = "pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824"}, + {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c"}, + {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00"}, + {file = "pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d"}, + {file = "pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a"}, + {file = "pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4"}, + {file = "pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b"}, + {file = "pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf"}, + {file = "pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196"}, + {file = "pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0"}, + {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28"}, + {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c"}, + {file = "pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc"}, + {file = "pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e"}, + {file = "pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea"}, + {file = "pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5"}, + {file = "pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b"}, + {file = "pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd"}, + {file = "pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8"}, + {file = "pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1"}, + {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c"}, + {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5"}, + {file = "pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6"}, + {file = "pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6"}, + {file = "pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be"}, + {file = "pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26"}, + {file = "pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c"}, + {file = "pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb"}, + {file = "pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac"}, + {file = "pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310"}, + {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7"}, + {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788"}, + {file = "pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5"}, + {file = "pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764"}, + {file = "pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35"}, + {file = "pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac"}, + {file = "pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3"}, + {file = "pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3"}, + {file = "pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba"}, + {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c"}, + {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702"}, + {file = "pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c"}, + {file = "pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065"}, + {file = "pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65"}, + {file = "pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9"}, + {file = "pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b"}, + {file = "pyyaml-6.0.3-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:b865addae83924361678b652338317d1bd7e79b1f4596f96b96c77a5a34b34da"}, + {file = "pyyaml-6.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c3355370a2c156cffb25e876646f149d5d68f5e0a3ce86a5084dd0b64a994917"}, + {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3c5677e12444c15717b902a5798264fa7909e41153cdf9ef7ad571b704a63dd9"}, + {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5ed875a24292240029e4483f9d4a4b8a1ae08843b9c54f43fcc11e404532a8a5"}, + {file = "pyyaml-6.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a"}, + {file = "pyyaml-6.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926"}, + {file = "pyyaml-6.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:27c0abcb4a5dac13684a37f76e701e054692a9b2d3064b70f5e4eb54810553d7"}, + {file = "pyyaml-6.0.3-cp39-cp39-win32.whl", hash = "sha256:1ebe39cb5fc479422b83de611d14e2c0d3bb2a18bbcb01f229ab3cfbd8fee7a0"}, + {file = "pyyaml-6.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:2e71d11abed7344e42a8849600193d15b6def118602c4c176f748e4583246007"}, + {file = "pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f"}, +] + +[[package]] +name = "pyzmq" +version = "27.1.0" +description = "Python bindings for 0MQ" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "pyzmq-27.1.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:508e23ec9bc44c0005c4946ea013d9317ae00ac67778bd47519fdf5a0e930ff4"}, + {file = "pyzmq-27.1.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:507b6f430bdcf0ee48c0d30e734ea89ce5567fd7b8a0f0044a369c176aa44556"}, + {file = "pyzmq-27.1.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bf7b38f9fd7b81cb6d9391b2946382c8237fd814075c6aa9c3b746d53076023b"}, + {file = "pyzmq-27.1.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:03ff0b279b40d687691a6217c12242ee71f0fba28bf8626ff50e3ef0f4410e1e"}, + {file = "pyzmq-27.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:677e744fee605753eac48198b15a2124016c009a11056f93807000ab11ce6526"}, + {file = "pyzmq-27.1.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:dd2fec2b13137416a1c5648b7009499bcc8fea78154cd888855fa32514f3dad1"}, + {file = "pyzmq-27.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:08e90bb4b57603b84eab1d0ca05b3bbb10f60c1839dc471fc1c9e1507bef3386"}, + {file = "pyzmq-27.1.0-cp310-cp310-win32.whl", hash = "sha256:a5b42d7a0658b515319148875fcb782bbf118dd41c671b62dae33666c2213bda"}, + {file = "pyzmq-27.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:c0bb87227430ee3aefcc0ade2088100e528d5d3298a0a715a64f3d04c60ba02f"}, + {file = "pyzmq-27.1.0-cp310-cp310-win_arm64.whl", hash = "sha256:9a916f76c2ab8d045b19f2286851a38e9ac94ea91faf65bd64735924522a8b32"}, + {file = "pyzmq-27.1.0-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:226b091818d461a3bef763805e75685e478ac17e9008f49fce2d3e52b3d58b86"}, + {file = "pyzmq-27.1.0-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:0790a0161c281ca9723f804871b4027f2e8b5a528d357c8952d08cd1a9c15581"}, + {file = "pyzmq-27.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c895a6f35476b0c3a54e3eb6ccf41bf3018de937016e6e18748317f25d4e925f"}, + {file = "pyzmq-27.1.0-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bbf8d3630bf96550b3be8e1fc0fea5cbdc8d5466c1192887bd94869da17a63e"}, + {file = "pyzmq-27.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:15c8bd0fe0dabf808e2d7a681398c4e5ded70a551ab47482067a572c054c8e2e"}, + {file = "pyzmq-27.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:bafcb3dd171b4ae9f19ee6380dfc71ce0390fefaf26b504c0e5f628d7c8c54f2"}, + {file = "pyzmq-27.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:e829529fcaa09937189178115c49c504e69289abd39967cd8a4c215761373394"}, + {file = "pyzmq-27.1.0-cp311-cp311-win32.whl", hash = "sha256:6df079c47d5902af6db298ec92151db82ecb557af663098b92f2508c398bb54f"}, + {file = "pyzmq-27.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:190cbf120fbc0fc4957b56866830def56628934a9d112aec0e2507aa6a032b97"}, + {file = "pyzmq-27.1.0-cp311-cp311-win_arm64.whl", hash = "sha256:eca6b47df11a132d1745eb3b5b5e557a7dae2c303277aa0e69c6ba91b8736e07"}, + {file = "pyzmq-27.1.0-cp312-abi3-macosx_10_15_universal2.whl", hash = "sha256:452631b640340c928fa343801b0d07eb0c3789a5ffa843f6e1a9cee0ba4eb4fc"}, + {file = "pyzmq-27.1.0-cp312-abi3-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:1c179799b118e554b66da67d88ed66cd37a169f1f23b5d9f0a231b4e8d44a113"}, + {file = "pyzmq-27.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3837439b7f99e60312f0c926a6ad437b067356dc2bc2ec96eb395fd0fe804233"}, + {file = "pyzmq-27.1.0-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:43ad9a73e3da1fab5b0e7e13402f0b2fb934ae1c876c51d0afff0e7c052eca31"}, + {file = "pyzmq-27.1.0-cp312-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:0de3028d69d4cdc475bfe47a6128eb38d8bc0e8f4d69646adfbcd840facbac28"}, + {file = "pyzmq-27.1.0-cp312-abi3-musllinux_1_2_i686.whl", hash = "sha256:cf44a7763aea9298c0aa7dbf859f87ed7012de8bda0f3977b6fb1d96745df856"}, + {file = "pyzmq-27.1.0-cp312-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f30f395a9e6fbca195400ce833c731e7b64c3919aa481af4d88c3759e0cb7496"}, + {file = "pyzmq-27.1.0-cp312-abi3-win32.whl", hash = "sha256:250e5436a4ba13885494412b3da5d518cd0d3a278a1ae640e113c073a5f88edd"}, + {file = "pyzmq-27.1.0-cp312-abi3-win_amd64.whl", hash = "sha256:9ce490cf1d2ca2ad84733aa1d69ce6855372cb5ce9223802450c9b2a7cba0ccf"}, + {file = "pyzmq-27.1.0-cp312-abi3-win_arm64.whl", hash = "sha256:75a2f36223f0d535a0c919e23615fc85a1e23b71f40c7eb43d7b1dedb4d8f15f"}, + {file = "pyzmq-27.1.0-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:93ad4b0855a664229559e45c8d23797ceac03183c7b6f5b4428152a6b06684a5"}, + {file = "pyzmq-27.1.0-cp313-cp313-android_24_x86_64.whl", hash = "sha256:fbb4f2400bfda24f12f009cba62ad5734148569ff4949b1b6ec3b519444342e6"}, + {file = "pyzmq-27.1.0-cp313-cp313t-macosx_10_15_universal2.whl", hash = "sha256:e343d067f7b151cfe4eb3bb796a7752c9d369eed007b91231e817071d2c2fec7"}, + {file = "pyzmq-27.1.0-cp313-cp313t-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:08363b2011dec81c354d694bdecaef4770e0ae96b9afea70b3f47b973655cc05"}, + {file = "pyzmq-27.1.0-cp313-cp313t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d54530c8c8b5b8ddb3318f481297441af102517602b569146185fa10b63f4fa9"}, + {file = "pyzmq-27.1.0-cp313-cp313t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6f3afa12c392f0a44a2414056d730eebc33ec0926aae92b5ad5cf26ebb6cc128"}, + {file = "pyzmq-27.1.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c65047adafe573ff023b3187bb93faa583151627bc9c51fc4fb2c561ed689d39"}, + {file = "pyzmq-27.1.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:90e6e9441c946a8b0a667356f7078d96411391a3b8f80980315455574177ec97"}, + {file = "pyzmq-27.1.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:add071b2d25f84e8189aaf0882d39a285b42fa3853016ebab234a5e78c7a43db"}, + {file = "pyzmq-27.1.0-cp313-cp313t-win32.whl", hash = "sha256:7ccc0700cfdf7bd487bea8d850ec38f204478681ea02a582a8da8171b7f90a1c"}, + {file = "pyzmq-27.1.0-cp313-cp313t-win_amd64.whl", hash = "sha256:8085a9fba668216b9b4323be338ee5437a235fe275b9d1610e422ccc279733e2"}, + {file = "pyzmq-27.1.0-cp313-cp313t-win_arm64.whl", hash = "sha256:6bb54ca21bcfe361e445256c15eedf083f153811c37be87e0514934d6913061e"}, + {file = "pyzmq-27.1.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:ce980af330231615756acd5154f29813d553ea555485ae712c491cd483df6b7a"}, + {file = "pyzmq-27.1.0-cp314-cp314t-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:1779be8c549e54a1c38f805e56d2a2e5c009d26de10921d7d51cfd1c8d4632ea"}, + {file = "pyzmq-27.1.0-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7200bb0f03345515df50d99d3db206a0a6bee1955fbb8c453c76f5bf0e08fb96"}, + {file = "pyzmq-27.1.0-cp314-cp314t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01c0e07d558b06a60773744ea6251f769cd79a41a97d11b8bf4ab8f034b0424d"}, + {file = "pyzmq-27.1.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:80d834abee71f65253c91540445d37c4c561e293ba6e741b992f20a105d69146"}, + {file = "pyzmq-27.1.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:544b4e3b7198dde4a62b8ff6685e9802a9a1ebf47e77478a5eb88eca2a82f2fd"}, + {file = "pyzmq-27.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cedc4c68178e59a4046f97eca31b148ddcf51e88677de1ef4e78cf06c5376c9a"}, + {file = "pyzmq-27.1.0-cp314-cp314t-win32.whl", hash = "sha256:1f0b2a577fd770aa6f053211a55d1c47901f4d537389a034c690291485e5fe92"}, + {file = "pyzmq-27.1.0-cp314-cp314t-win_amd64.whl", hash = "sha256:19c9468ae0437f8074af379e986c5d3d7d7bfe033506af442e8c879732bedbe0"}, + {file = "pyzmq-27.1.0-cp314-cp314t-win_arm64.whl", hash = "sha256:dc5dbf68a7857b59473f7df42650c621d7e8923fb03fa74a526890f4d33cc4d7"}, + {file = "pyzmq-27.1.0-cp38-cp38-macosx_10_15_universal2.whl", hash = "sha256:18339186c0ed0ce5835f2656cdfb32203125917711af64da64dbaa3d949e5a1b"}, + {file = "pyzmq-27.1.0-cp38-cp38-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:753d56fba8f70962cd8295fb3edb40b9b16deaa882dd2b5a3a2039f9ff7625aa"}, + {file = "pyzmq-27.1.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b721c05d932e5ad9ff9344f708c96b9e1a485418c6618d765fca95d4daacfbef"}, + {file = "pyzmq-27.1.0-cp38-cp38-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7be883ff3d722e6085ee3f4afc057a50f7f2e0c72d289fd54df5706b4e3d3a50"}, + {file = "pyzmq-27.1.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:b2e592db3a93128daf567de9650a2f3859017b3f7a66bc4ed6e4779d6034976f"}, + {file = "pyzmq-27.1.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ad68808a61cbfbbae7ba26d6233f2a4aa3b221de379ce9ee468aa7a83b9c36b0"}, + {file = "pyzmq-27.1.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:e2687c2d230e8d8584fbea433c24382edfeda0c60627aca3446aa5e58d5d1831"}, + {file = "pyzmq-27.1.0-cp38-cp38-win32.whl", hash = "sha256:a1aa0ee920fb3825d6c825ae3f6c508403b905b698b6460408ebd5bb04bbb312"}, + {file = "pyzmq-27.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:df7cd397ece96cf20a76fae705d40efbab217d217897a5053267cd88a700c266"}, + {file = "pyzmq-27.1.0-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:96c71c32fff75957db6ae33cd961439f386505c6e6b377370af9b24a1ef9eafb"}, + {file = "pyzmq-27.1.0-cp39-cp39-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:49d3980544447f6bd2968b6ac913ab963a49dcaa2d4a2990041f16057b04c429"}, + {file = "pyzmq-27.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:849ca054d81aa1c175c49484afaaa5db0622092b5eccb2055f9f3bb8f703782d"}, + {file = "pyzmq-27.1.0-cp39-cp39-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3970778e74cb7f85934d2b926b9900e92bfe597e62267d7499acc39c9c28e345"}, + {file = "pyzmq-27.1.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:da96ecdcf7d3919c3be2de91a8c513c186f6762aa6cf7c01087ed74fad7f0968"}, + {file = "pyzmq-27.1.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:9541c444cfe1b1c0156c5c86ece2bb926c7079a18e7b47b0b1b3b1b875e5d098"}, + {file = "pyzmq-27.1.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:e30a74a39b93e2e1591b58eb1acef4902be27c957a8720b0e368f579b82dc22f"}, + {file = "pyzmq-27.1.0-cp39-cp39-win32.whl", hash = "sha256:b1267823d72d1e40701dcba7edc45fd17f71be1285557b7fe668887150a14b78"}, + {file = "pyzmq-27.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:0c996ded912812a2fcd7ab6574f4ad3edc27cb6510349431e4930d4196ade7db"}, + {file = "pyzmq-27.1.0-cp39-cp39-win_arm64.whl", hash = "sha256:346e9ba4198177a07e7706050f35d733e08c1c1f8ceacd5eb6389d653579ffbc"}, + {file = "pyzmq-27.1.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:c17e03cbc9312bee223864f1a2b13a99522e0dc9f7c5df0177cd45210ac286e6"}, + {file = "pyzmq-27.1.0-pp310-pypy310_pp73-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:f328d01128373cb6763823b2b4e7f73bdf767834268c565151eacb3b7a392f90"}, + {file = "pyzmq-27.1.0-pp310-pypy310_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c1790386614232e1b3a40a958454bdd42c6d1811837b15ddbb052a032a43f62"}, + {file = "pyzmq-27.1.0-pp310-pypy310_pp73-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:448f9cb54eb0cee4732b46584f2710c8bc178b0e5371d9e4fc8125201e413a74"}, + {file = "pyzmq-27.1.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:05b12f2d32112bf8c95ef2e74ec4f1d4beb01f8b5e703b38537f8849f92cb9ba"}, + {file = "pyzmq-27.1.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:18770c8d3563715387139060d37859c02ce40718d1faf299abddcdcc6a649066"}, + {file = "pyzmq-27.1.0-pp311-pypy311_pp73-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:ac25465d42f92e990f8d8b0546b01c391ad431c3bf447683fdc40565941d0604"}, + {file = "pyzmq-27.1.0-pp311-pypy311_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:53b40f8ae006f2734ee7608d59ed661419f087521edbfc2149c3932e9c14808c"}, + {file = "pyzmq-27.1.0-pp311-pypy311_pp73-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f605d884e7c8be8fe1aa94e0a783bf3f591b84c24e4bc4f3e7564c82ac25e271"}, + {file = "pyzmq-27.1.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:c9f7f6e13dff2e44a6afeaf2cf54cee5929ad64afaf4d40b50f93c58fc687355"}, + {file = "pyzmq-27.1.0-pp38-pypy38_pp73-macosx_10_15_x86_64.whl", hash = "sha256:50081a4e98472ba9f5a02850014b4c9b629da6710f8f14f3b15897c666a28f1b"}, + {file = "pyzmq-27.1.0-pp38-pypy38_pp73-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:510869f9df36ab97f89f4cff9d002a89ac554c7ac9cadd87d444aa4cf66abd27"}, + {file = "pyzmq-27.1.0-pp38-pypy38_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1f8426a01b1c4098a750973c37131cf585f61c7911d735f729935a0c701b68d3"}, + {file = "pyzmq-27.1.0-pp38-pypy38_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:726b6a502f2e34c6d2ada5e702929586d3ac948a4dbbb7fed9854ec8c0466027"}, + {file = "pyzmq-27.1.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:bd67e7c8f4654bef471c0b1ca6614af0b5202a790723a58b79d9584dc8022a78"}, + {file = "pyzmq-27.1.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:722ea791aa233ac0a819fc2c475e1292c76930b31f1d828cb61073e2fe5e208f"}, + {file = "pyzmq-27.1.0-pp39-pypy39_pp73-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:01f9437501886d3a1dd4b02ef59fb8cc384fa718ce066d52f175ee49dd5b7ed8"}, + {file = "pyzmq-27.1.0-pp39-pypy39_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4a19387a3dddcc762bfd2f570d14e2395b2c9701329b266f83dd87a2b3cbd381"}, + {file = "pyzmq-27.1.0-pp39-pypy39_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4c618fbcd069e3a29dcd221739cacde52edcc681f041907867e0f5cc7e85f172"}, + {file = "pyzmq-27.1.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:ff8d114d14ac671d88c89b9224c63d6c4e5a613fe8acd5594ce53d752a3aafe9"}, + {file = "pyzmq-27.1.0.tar.gz", hash = "sha256:ac0765e3d44455adb6ddbf4417dcce460fc40a05978c08efdf2948072f6db540"}, +] + +[package.dependencies] +cffi = {version = "*", markers = "implementation_name == \"pypy\""} + +[[package]] +name = "referencing" +version = "0.37.0" +description = "JSON Referencing + Python" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231"}, + {file = "referencing-0.37.0.tar.gz", hash = "sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8"}, +] + +[package.dependencies] +attrs = ">=22.2.0" +rpds-py = ">=0.7.0" +typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.13\""} + +[[package]] +name = "regex" +version = "2026.2.28" +description = "Alternative regular expression module, to replace re." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "regex-2026.2.28-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fc48c500838be6882b32748f60a15229d2dea96e59ef341eaa96ec83538f498d"}, + {file = "regex-2026.2.28-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2afa673660928d0b63d84353c6c08a8a476ddfc4a47e11742949d182e6863ce8"}, + {file = "regex-2026.2.28-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7ab218076eb0944549e7fe74cf0e2b83a82edb27e81cc87411f76240865e04d5"}, + {file = "regex-2026.2.28-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:94d63db12e45a9b9f064bfe4800cefefc7e5f182052e4c1b774d46a40ab1d9bb"}, + {file = "regex-2026.2.28-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:195237dc327858a7721bf8b0bbbef797554bc13563c3591e91cd0767bacbe359"}, + {file = "regex-2026.2.28-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b387a0d092dac157fb026d737dde35ff3e49ef27f285343e7c6401851239df27"}, + {file = "regex-2026.2.28-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3935174fa4d9f70525a4367aaff3cb8bc0548129d114260c29d9dfa4a5b41692"}, + {file = "regex-2026.2.28-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2b2b23587b26496ff5fd40df4278becdf386813ec00dc3533fa43a4cf0e2ad3c"}, + {file = "regex-2026.2.28-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3b24bd7e9d85dc7c6a8bd2aa14ecd234274a0248335a02adeb25448aecdd420d"}, + {file = "regex-2026.2.28-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:bd477d5f79920338107f04aa645f094032d9e3030cc55be581df3d1ef61aa318"}, + {file = "regex-2026.2.28-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:b49eb78048c6354f49e91e4b77da21257fecb92256b6d599ae44403cab30b05b"}, + {file = "regex-2026.2.28-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:a25c7701e4f7a70021db9aaf4a4a0a67033c6318752146e03d1b94d32006217e"}, + {file = "regex-2026.2.28-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:9dd450db6458387167e033cfa80887a34c99c81d26da1bf8b0b41bf8c9cac88e"}, + {file = "regex-2026.2.28-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:2954379dd20752e82d22accf3ff465311cbb2bac6c1f92c4afd400e1757f7451"}, + {file = "regex-2026.2.28-cp310-cp310-win32.whl", hash = "sha256:1f8b17be5c27a684ea6759983c13506bd77bfc7c0347dff41b18ce5ddd2ee09a"}, + {file = "regex-2026.2.28-cp310-cp310-win_amd64.whl", hash = "sha256:dd8847c4978bc3c7e6c826fb745f5570e518b8459ac2892151ce6627c7bc00d5"}, + {file = "regex-2026.2.28-cp310-cp310-win_arm64.whl", hash = "sha256:73cdcdbba8028167ea81490c7f45280113e41db2c7afb65a276f4711fa3bcbff"}, + {file = "regex-2026.2.28-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e621fb7c8dc147419b28e1702f58a0177ff8308a76fa295c71f3e7827849f5d9"}, + {file = "regex-2026.2.28-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0d5bef2031cbf38757a0b0bc4298bb4824b6332d28edc16b39247228fbdbad97"}, + {file = "regex-2026.2.28-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bcb399ed84eabf4282587ba151f2732ad8168e66f1d3f85b1d038868fe547703"}, + {file = "regex-2026.2.28-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7c1b34dfa72f826f535b20712afa9bb3ba580020e834f3c69866c5bddbf10098"}, + {file = "regex-2026.2.28-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:851fa70df44325e1e4cdb79c5e676e91a78147b1b543db2aec8734d2add30ec2"}, + {file = "regex-2026.2.28-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:516604edd17b1c2c3e579cf4e9b25a53bf8fa6e7cedddf1127804d3e0140ca64"}, + {file = "regex-2026.2.28-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e7ce83654d1ab701cb619285a18a8e5a889c1216d746ddc710c914ca5fd71022"}, + {file = "regex-2026.2.28-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f2791948f7c70bb9335a9102df45e93d428f4b8128020d85920223925d73b9e1"}, + {file = "regex-2026.2.28-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:03a83cc26aa2acda6b8b9dfe748cf9e84cbd390c424a1de34fdcef58961a297a"}, + {file = "regex-2026.2.28-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ec6f5674c5dc836994f50f1186dd1fafde4be0666aae201ae2fcc3d29d8adf27"}, + {file = "regex-2026.2.28-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:50c2fc924749543e0eacc93ada6aeeb3ea5f6715825624baa0dccaec771668ae"}, + {file = "regex-2026.2.28-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ba55c50f408fb5c346a3a02d2ce0ebc839784e24f7c9684fde328ff063c3cdea"}, + {file = "regex-2026.2.28-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:edb1b1b3a5576c56f08ac46f108c40333f222ebfd5cf63afdfa3aab0791ebe5b"}, + {file = "regex-2026.2.28-cp311-cp311-win32.whl", hash = "sha256:948c12ef30ecedb128903c2c2678b339746eb7c689c5c21957c4a23950c96d15"}, + {file = "regex-2026.2.28-cp311-cp311-win_amd64.whl", hash = "sha256:fd63453f10d29097cc3dc62d070746523973fb5aa1c66d25f8558bebd47fed61"}, + {file = "regex-2026.2.28-cp311-cp311-win_arm64.whl", hash = "sha256:00f2b8d9615aa165fdff0a13f1a92049bfad555ee91e20d246a51aa0b556c60a"}, + {file = "regex-2026.2.28-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:fcf26c3c6d0da98fada8ae4ef0aa1c3405a431c0a77eb17306d38a89b02adcd7"}, + {file = "regex-2026.2.28-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:02473c954af35dd2defeb07e44182f5705b30ea3f351a7cbffa9177beb14da5d"}, + {file = "regex-2026.2.28-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9b65d33a17101569f86d9c5966a8b1d7fbf8afdda5a8aa219301b0a80f58cf7d"}, + {file = "regex-2026.2.28-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e71dcecaa113eebcc96622c17692672c2d104b1d71ddf7adeda90da7ddeb26fc"}, + {file = "regex-2026.2.28-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:481df4623fa4969c8b11f3433ed7d5e3dc9cec0f008356c3212b3933fb77e3d8"}, + {file = "regex-2026.2.28-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:64e7c6ad614573e0640f271e811a408d79a9e1fe62a46adb602f598df42a818d"}, + {file = "regex-2026.2.28-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6b08a06976ff4fb0d83077022fde3eca06c55432bb997d8c0495b9a4e9872f4"}, + {file = "regex-2026.2.28-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:864cdd1a2ef5716b0ab468af40139e62ede1b3a53386b375ec0786bb6783fc05"}, + {file = "regex-2026.2.28-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:511f7419f7afab475fd4d639d4aedfc54205bcb0800066753ef68a59f0f330b5"}, + {file = "regex-2026.2.28-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:b42f7466e32bf15a961cf09f35fa6323cc72e64d3d2c990b10de1274a5da0a59"}, + {file = "regex-2026.2.28-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:8710d61737b0c0ce6836b1da7109f20d495e49b3809f30e27e9560be67a257bf"}, + {file = "regex-2026.2.28-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4390c365fd2d45278f45afd4673cb90f7285f5701607e3ad4274df08e36140ae"}, + {file = "regex-2026.2.28-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cb3b1db8ff6c7b8bf838ab05583ea15230cb2f678e569ab0e3a24d1e8320940b"}, + {file = "regex-2026.2.28-cp312-cp312-win32.whl", hash = "sha256:f8ed9a5d4612df9d4de15878f0bc6aa7a268afbe5af21a3fdd97fa19516e978c"}, + {file = "regex-2026.2.28-cp312-cp312-win_amd64.whl", hash = "sha256:01d65fd24206c8e1e97e2e31b286c59009636c022eb5d003f52760b0f42155d4"}, + {file = "regex-2026.2.28-cp312-cp312-win_arm64.whl", hash = "sha256:c0b5ccbb8ffb433939d248707d4a8b31993cb76ab1a0187ca886bf50e96df952"}, + {file = "regex-2026.2.28-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6d63a07e5ec8ce7184452cb00c41c37b49e67dc4f73b2955b5b8e782ea970784"}, + {file = "regex-2026.2.28-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e59bc8f30414d283ae8ee1617b13d8112e7135cb92830f0ec3688cb29152585a"}, + {file = "regex-2026.2.28-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:de0cf053139f96219ccfabb4a8dd2d217c8c82cb206c91d9f109f3f552d6b43d"}, + {file = "regex-2026.2.28-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fb4db2f17e6484904f986c5a657cec85574c76b5c5e61c7aae9ffa1bc6224f95"}, + {file = "regex-2026.2.28-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:52b017b35ac2214d0db5f4f90e303634dc44e4aba4bd6235a27f97ecbe5b0472"}, + {file = "regex-2026.2.28-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:69fc560ccbf08a09dc9b52ab69cacfae51e0ed80dc5693078bdc97db2f91ae96"}, + {file = "regex-2026.2.28-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e61eea47230eba62a31f3e8a0e3164d0f37ef9f40529fb2c79361bc6b53d2a92"}, + {file = "regex-2026.2.28-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4f5c0b182ad4269e7381b7c27fdb0408399881f7a92a4624fd5487f2971dfc11"}, + {file = "regex-2026.2.28-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:96f6269a2882fbb0ee76967116b83679dc628e68eaea44e90884b8d53d833881"}, + {file = "regex-2026.2.28-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b5acd4b6a95f37c3c3828e5d053a7d4edaedb85de551db0153754924cb7c83e3"}, + {file = "regex-2026.2.28-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:2234059cfe33d9813a3677ef7667999caea9eeaa83fef98eb6ce15c6cf9e0215"}, + {file = "regex-2026.2.28-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:c15af43c72a7fb0c97cbc66fa36a43546eddc5c06a662b64a0cbf30d6ac40944"}, + {file = "regex-2026.2.28-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9185cc63359862a6e80fe97f696e04b0ad9a11c4ac0a4a927f979f611bfe3768"}, + {file = "regex-2026.2.28-cp313-cp313-win32.whl", hash = "sha256:fb66e5245db9652abd7196ace599b04d9c0e4aa7c8f0e2803938377835780081"}, + {file = "regex-2026.2.28-cp313-cp313-win_amd64.whl", hash = "sha256:71a911098be38c859ceb3f9a9ce43f4ed9f4c6720ad8684a066ea246b76ad9ff"}, + {file = "regex-2026.2.28-cp313-cp313-win_arm64.whl", hash = "sha256:39bb5727650b9a0275c6a6690f9bb3fe693a7e6cc5c3155b1240aedf8926423e"}, + {file = "regex-2026.2.28-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:97054c55db06ab020342cc0d35d6f62a465fa7662871190175f1ad6c655c028f"}, + {file = "regex-2026.2.28-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0d25a10811de831c2baa6aef3c0be91622f44dd8d31dd12e69f6398efb15e48b"}, + {file = "regex-2026.2.28-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:d6cfe798d8da41bb1862ed6e0cba14003d387c3c0c4a5d45591076ae9f0ce2f8"}, + {file = "regex-2026.2.28-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fd0ce43e71d825b7c0661f9c54d4d74bd97c56c3fd102a8985bcfea48236bacb"}, + {file = "regex-2026.2.28-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:00945d007fd74a9084d2ab79b695b595c6b7ba3698972fadd43e23230c6979c1"}, + {file = "regex-2026.2.28-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bec23c11cbbf09a4df32fe50d57cbdd777bc442269b6e39a1775654f1c95dee2"}, + {file = "regex-2026.2.28-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5cdcc17d935c8f9d3f4db5c2ebe2640c332e3822ad5d23c2f8e0228e6947943a"}, + {file = "regex-2026.2.28-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a448af01e3d8031c89c5d902040b124a5e921a25c4e5e07a861ca591ce429341"}, + {file = "regex-2026.2.28-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:10d28e19bd4888e4abf43bd3925f3c134c52fdf7259219003588a42e24c2aa25"}, + {file = "regex-2026.2.28-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:99985a2c277dcb9ccb63f937451af5d65177af1efdeb8173ac55b61095a0a05c"}, + {file = "regex-2026.2.28-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:e1e7b24cb3ae9953a560c563045d1ba56ee4749fbd05cf21ba571069bd7be81b"}, + {file = "regex-2026.2.28-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:d8511a01d0e4ee1992eb3ba19e09bc1866fe03f05129c3aec3fdc4cbc77aad3f"}, + {file = "regex-2026.2.28-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:aaffaecffcd2479ce87aa1e74076c221700b7c804e48e98e62500ee748f0f550"}, + {file = "regex-2026.2.28-cp313-cp313t-win32.whl", hash = "sha256:ef77bdde9c9eba3f7fa5b58084b29bbcc74bcf55fdbeaa67c102a35b5bd7e7cc"}, + {file = "regex-2026.2.28-cp313-cp313t-win_amd64.whl", hash = "sha256:98adf340100cbe6fbaf8e6dc75e28f2c191b1be50ffefe292fb0e6f6eefdb0d8"}, + {file = "regex-2026.2.28-cp313-cp313t-win_arm64.whl", hash = "sha256:2fb950ac1d88e6b6a9414381f403797b236f9fa17e1eee07683af72b1634207b"}, + {file = "regex-2026.2.28-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:78454178c7df31372ea737996fb7f36b3c2c92cccc641d251e072478afb4babc"}, + {file = "regex-2026.2.28-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:5d10303dd18cedfd4d095543998404df656088240bcfd3cd20a8f95b861f74bd"}, + {file = "regex-2026.2.28-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:19a9c9e0a8f24f39d575a6a854d516b48ffe4cbdcb9de55cb0570a032556ecff"}, + {file = "regex-2026.2.28-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:09500be324f49b470d907b3ef8af9afe857f5cca486f853853f7945ddbf75911"}, + {file = "regex-2026.2.28-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fb1c4ff62277d87a7335f2c1ea4e0387b8f2b3ad88a64efd9943906aafad4f33"}, + {file = "regex-2026.2.28-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b8b3f1be1738feadc69f62daa250c933e85c6f34fa378f54a7ff43807c1b9117"}, + {file = "regex-2026.2.28-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dc8ed8c3f41c27acb83f7b6a9eb727a73fc6663441890c5cb3426a5f6a91ce7d"}, + {file = "regex-2026.2.28-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fa539be029844c0ce1114762d2952ab6cfdd7c7c9bd72e0db26b94c3c36dcc5a"}, + {file = "regex-2026.2.28-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7900157786428a79615a8264dac1f12c9b02957c473c8110c6b1f972dcecaddf"}, + {file = "regex-2026.2.28-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:0b1d2b07614d95fa2bf8a63fd1e98bd8fa2b4848dc91b1efbc8ba219fdd73952"}, + {file = "regex-2026.2.28-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:b389c61aa28a79c2e0527ac36da579869c2e235a5b208a12c5b5318cda2501d8"}, + {file = "regex-2026.2.28-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:f467cb602f03fbd1ab1908f68b53c649ce393fde056628dc8c7e634dab6bfc07"}, + {file = "regex-2026.2.28-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:e8c8cb2deba42f5ec1ede46374e990f8adc5e6456a57ac1a261b19be6f28e4e6"}, + {file = "regex-2026.2.28-cp314-cp314-win32.whl", hash = "sha256:9036b400b20e4858d56d117108d7813ed07bb7803e3eed766675862131135ca6"}, + {file = "regex-2026.2.28-cp314-cp314-win_amd64.whl", hash = "sha256:1d367257cd86c1cbb97ea94e77b373a0bbc2224976e247f173d19e8f18b4afa7"}, + {file = "regex-2026.2.28-cp314-cp314-win_arm64.whl", hash = "sha256:5e68192bb3a1d6fb2836da24aa494e413ea65853a21505e142e5b1064a595f3d"}, + {file = "regex-2026.2.28-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:a5dac14d0872eeb35260a8e30bac07ddf22adc1e3a0635b52b02e180d17c9c7e"}, + {file = "regex-2026.2.28-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:ec0c608b7a7465ffadb344ed7c987ff2f11ee03f6a130b569aa74d8a70e8333c"}, + {file = "regex-2026.2.28-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c7815afb0ca45456613fdaf60ea9c993715511c8d53a83bc468305cbc0ee23c7"}, + {file = "regex-2026.2.28-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b059e71ec363968671693a78c5053bd9cb2fe410f9b8e4657e88377ebd603a2e"}, + {file = "regex-2026.2.28-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b8cf76f1a29f0e99dcfd7aef1551a9827588aae5a737fe31442021165f1920dc"}, + {file = "regex-2026.2.28-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:180e08a435a0319e6a4821c3468da18dc7001987e1c17ae1335488dfe7518dd8"}, + {file = "regex-2026.2.28-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1e496956106fd59ba6322a8ea17141a27c5040e5ee8f9433ae92d4e5204462a0"}, + {file = "regex-2026.2.28-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bba2b18d70eeb7b79950f12f633beeecd923f7c9ad6f6bae28e59b4cb3ab046b"}, + {file = "regex-2026.2.28-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:6db7bfae0f8a2793ff1f7021468ea55e2699d0790eb58ee6ab36ae43aa00bc5b"}, + {file = "regex-2026.2.28-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:d0b02e8b7e5874b48ae0f077ecca61c1a6a9f9895e9c6dfb191b55b242862033"}, + {file = "regex-2026.2.28-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:25b6eb660c5cf4b8c3407a1ed462abba26a926cc9965e164268a3267bcc06a43"}, + {file = "regex-2026.2.28-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:5a932ea8ad5d0430351ff9c76c8db34db0d9f53c1d78f06022a21f4e290c5c18"}, + {file = "regex-2026.2.28-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:1c2c95e1a2b0f89d01e821ff4de1be4b5d73d1f4b0bf679fa27c1ad8d2327f1a"}, + {file = "regex-2026.2.28-cp314-cp314t-win32.whl", hash = "sha256:bbb882061f742eb5d46f2f1bd5304055be0a66b783576de3d7eef1bed4778a6e"}, + {file = "regex-2026.2.28-cp314-cp314t-win_amd64.whl", hash = "sha256:6591f281cb44dc13de9585b552cec6fc6cf47fb2fe7a48892295ee9bc4a612f9"}, + {file = "regex-2026.2.28-cp314-cp314t-win_arm64.whl", hash = "sha256:dee50f1be42222f89767b64b283283ef963189da0dda4a515aa54a5563c62dec"}, + {file = "regex-2026.2.28.tar.gz", hash = "sha256:a729e47d418ea11d03469f321aaf67cdee8954cde3ff2cf8403ab87951ad10f2"}, +] + +[[package]] +name = "requests" +version = "2.32.5" +description = "Python HTTP for Humans." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6"}, + {file = "requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset_normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "rich" +version = "14.3.3" +description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +optional = false +python-versions = ">=3.8.0" +groups = ["main"] +files = [ + {file = "rich-14.3.3-py3-none-any.whl", hash = "sha256:793431c1f8619afa7d3b52b2cdec859562b950ea0d4b6b505397612db8d5362d"}, + {file = "rich-14.3.3.tar.gz", hash = "sha256:b8daa0b9e4eef54dd8cf7c86c03713f53241884e814f4e2f5fb342fe520f639b"}, +] + +[package.dependencies] +markdown-it-py = ">=2.2.0" +pygments = ">=2.13.0,<3.0.0" + +[package.extras] +jupyter = ["ipywidgets (>=7.5.1,<9)"] + +[[package]] +name = "rich-rst" +version = "1.3.2" +description = "A beautiful reStructuredText renderer for rich" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "rich_rst-1.3.2-py3-none-any.whl", hash = "sha256:a99b4907cbe118cf9d18b0b44de272efa61f15117c61e39ebdc431baf5df722a"}, + {file = "rich_rst-1.3.2.tar.gz", hash = "sha256:a1196fdddf1e364b02ec68a05e8ff8f6914fee10fbca2e6b6735f166bb0da8d4"}, +] + +[package.dependencies] +docutils = "*" +rich = ">=12.0.0" + +[package.extras] +docs = ["sphinx"] + +[[package]] +name = "rpds-py" +version = "0.30.0" +description = "Python bindings to Rust's persistent data structures (rpds)" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "rpds_py-0.30.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:679ae98e00c0e8d68a7fda324e16b90fd5260945b45d3b824c892cec9eea3288"}, + {file = "rpds_py-0.30.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4cc2206b76b4f576934f0ed374b10d7ca5f457858b157ca52064bdfc26b9fc00"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:389a2d49eded1896c3d48b0136ead37c48e221b391c052fba3f4055c367f60a6"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:32c8528634e1bf7121f3de08fa85b138f4e0dc47657866630611b03967f041d7"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f207f69853edd6f6700b86efb84999651baf3789e78a466431df1331608e5324"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:67b02ec25ba7a9e8fa74c63b6ca44cf5707f2fbfadae3ee8e7494297d56aa9df"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0e95f6819a19965ff420f65578bacb0b00f251fefe2c8b23347c37174271f3"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:a452763cc5198f2f98898eb98f7569649fe5da666c2dc6b5ddb10fde5a574221"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e0b65193a413ccc930671c55153a03ee57cecb49e6227204b04fae512eb657a7"}, + {file = "rpds_py-0.30.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:858738e9c32147f78b3ac24dc0edb6610000e56dc0f700fd5f651d0a0f0eb9ff"}, + {file = "rpds_py-0.30.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:da279aa314f00acbb803da1e76fa18666778e8a8f83484fba94526da5de2cba7"}, + {file = "rpds_py-0.30.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7c64d38fb49b6cdeda16ab49e35fe0da2e1e9b34bc38bd78386530f218b37139"}, + {file = "rpds_py-0.30.0-cp310-cp310-win32.whl", hash = "sha256:6de2a32a1665b93233cde140ff8b3467bdb9e2af2b91079f0333a0974d12d464"}, + {file = "rpds_py-0.30.0-cp310-cp310-win_amd64.whl", hash = "sha256:1726859cd0de969f88dc8673bdd954185b9104e05806be64bcd87badbe313169"}, + {file = "rpds_py-0.30.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a2bffea6a4ca9f01b3f8e548302470306689684e61602aa3d141e34da06cf425"}, + {file = "rpds_py-0.30.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc4f992dfe1e2bc3ebc7444f6c7051b4bc13cd8e33e43511e8ffd13bf407010d"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:422c3cb9856d80b09d30d2eb255d0754b23e090034e1deb4083f8004bd0761e4"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:07ae8a593e1c3c6b82ca3292efbe73c30b61332fd612e05abee07c79359f292f"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12f90dd7557b6bd57f40abe7747e81e0c0b119bef015ea7726e69fe550e394a4"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:99b47d6ad9a6da00bec6aabe5a6279ecd3c06a329d4aa4771034a21e335c3a97"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33f559f3104504506a44bb666b93a33f5d33133765b0c216a5bf2f1e1503af89"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:946fe926af6e44f3697abbc305ea168c2c31d3e3ef1058cf68f379bf0335a78d"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:495aeca4b93d465efde585977365187149e75383ad2684f81519f504f5c13038"}, + {file = "rpds_py-0.30.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9a0ca5da0386dee0655b4ccdf46119df60e0f10da268d04fe7cc87886872ba7"}, + {file = "rpds_py-0.30.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8d6d1cc13664ec13c1b84241204ff3b12f9bb82464b8ad6e7a5d3486975c2eed"}, + {file = "rpds_py-0.30.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3896fa1be39912cf0757753826bc8bdc8ca331a28a7c4ae46b7a21280b06bb85"}, + {file = "rpds_py-0.30.0-cp311-cp311-win32.whl", hash = "sha256:55f66022632205940f1827effeff17c4fa7ae1953d2b74a8581baaefb7d16f8c"}, + {file = "rpds_py-0.30.0-cp311-cp311-win_amd64.whl", hash = "sha256:a51033ff701fca756439d641c0ad09a41d9242fa69121c7d8769604a0a629825"}, + {file = "rpds_py-0.30.0-cp311-cp311-win_arm64.whl", hash = "sha256:47b0ef6231c58f506ef0b74d44e330405caa8428e770fec25329ed2cb971a229"}, + {file = "rpds_py-0.30.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a161f20d9a43006833cd7068375a94d035714d73a172b681d8881820600abfad"}, + {file = "rpds_py-0.30.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6abc8880d9d036ecaafe709079969f56e876fcf107f7a8e9920ba6d5a3878d05"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca28829ae5f5d569bb62a79512c842a03a12576375d5ece7d2cadf8abe96ec28"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1010ed9524c73b94d15919ca4d41d8780980e1765babf85f9a2f90d247153dd"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8d1736cfb49381ba528cd5baa46f82fdc65c06e843dab24dd70b63d09121b3f"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d948b135c4693daff7bc2dcfc4ec57237a29bd37e60c2fabf5aff2bbacf3e2f1"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47f236970bccb2233267d89173d3ad2703cd36a0e2a6e92d0560d333871a3d23"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:2e6ecb5a5bcacf59c3f912155044479af1d0b6681280048b338b28e364aca1f6"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a8fa71a2e078c527c3e9dc9fc5a98c9db40bcc8a92b4e8858e36d329f8684b51"}, + {file = "rpds_py-0.30.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:73c67f2db7bc334e518d097c6d1e6fed021bbc9b7d678d6cc433478365d1d5f5"}, + {file = "rpds_py-0.30.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5ba103fb455be00f3b1c2076c9d4264bfcb037c976167a6047ed82f23153f02e"}, + {file = "rpds_py-0.30.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7cee9c752c0364588353e627da8a7e808a66873672bcb5f52890c33fd965b394"}, + {file = "rpds_py-0.30.0-cp312-cp312-win32.whl", hash = "sha256:1ab5b83dbcf55acc8b08fc62b796ef672c457b17dbd7820a11d6c52c06839bdf"}, + {file = "rpds_py-0.30.0-cp312-cp312-win_amd64.whl", hash = "sha256:a090322ca841abd453d43456ac34db46e8b05fd9b3b4ac0c78bcde8b089f959b"}, + {file = "rpds_py-0.30.0-cp312-cp312-win_arm64.whl", hash = "sha256:669b1805bd639dd2989b281be2cfd951c6121b65e729d9b843e9639ef1fd555e"}, + {file = "rpds_py-0.30.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f83424d738204d9770830d35290ff3273fbb02b41f919870479fab14b9d303b2"}, + {file = "rpds_py-0.30.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e7536cd91353c5273434b4e003cbda89034d67e7710eab8761fd918ec6c69cf8"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2771c6c15973347f50fece41fc447c054b7ac2ae0502388ce3b6738cd366e3d4"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0a59119fc6e3f460315fe9d08149f8102aa322299deaa5cab5b40092345c2136"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:76fec018282b4ead0364022e3c54b60bf368b9d926877957a8624b58419169b7"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:692bef75a5525db97318e8cd061542b5a79812d711ea03dbc1f6f8dbb0c5f0d2"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9027da1ce107104c50c81383cae773ef5c24d296dd11c99e2629dbd7967a20c6"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:9cf69cdda1f5968a30a359aba2f7f9aa648a9ce4b580d6826437f2b291cfc86e"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a4796a717bf12b9da9d3ad002519a86063dcac8988b030e405704ef7d74d2d9d"}, + {file = "rpds_py-0.30.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5d4c2aa7c50ad4728a094ebd5eb46c452e9cb7edbfdb18f9e1221f597a73e1e7"}, + {file = "rpds_py-0.30.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ba81a9203d07805435eb06f536d95a266c21e5b2dfbf6517748ca40c98d19e31"}, + {file = "rpds_py-0.30.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:945dccface01af02675628334f7cf49c2af4c1c904748efc5cf7bbdf0b579f95"}, + {file = "rpds_py-0.30.0-cp313-cp313-win32.whl", hash = "sha256:b40fb160a2db369a194cb27943582b38f79fc4887291417685f3ad693c5a1d5d"}, + {file = "rpds_py-0.30.0-cp313-cp313-win_amd64.whl", hash = "sha256:806f36b1b605e2d6a72716f321f20036b9489d29c51c91f4dd29a3e3afb73b15"}, + {file = "rpds_py-0.30.0-cp313-cp313-win_arm64.whl", hash = "sha256:d96c2086587c7c30d44f31f42eae4eac89b60dabbac18c7669be3700f13c3ce1"}, + {file = "rpds_py-0.30.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:eb0b93f2e5c2189ee831ee43f156ed34e2a89a78a66b98cadad955972548be5a"}, + {file = "rpds_py-0.30.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:922e10f31f303c7c920da8981051ff6d8c1a56207dbdf330d9047f6d30b70e5e"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdc62c8286ba9bf7f47befdcea13ea0e26bf294bda99758fd90535cbaf408000"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:47f9a91efc418b54fb8190a6b4aa7813a23fb79c51f4bb84e418f5476c38b8db"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1f3587eb9b17f3789ad50824084fa6f81921bbf9a795826570bda82cb3ed91f2"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:39c02563fc592411c2c61d26b6c5fe1e51eaa44a75aa2c8735ca88b0d9599daa"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51a1234d8febafdfd33a42d97da7a43f5dcb120c1060e352a3fbc0c6d36e2083"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_31_riscv64.whl", hash = "sha256:eb2c4071ab598733724c08221091e8d80e89064cd472819285a9ab0f24bcedb9"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6bdfdb946967d816e6adf9a3d8201bfad269c67efe6cefd7093ef959683c8de0"}, + {file = "rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c77afbd5f5250bf27bf516c7c4a016813eb2d3e116139aed0096940c5982da94"}, + {file = "rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:61046904275472a76c8c90c9ccee9013d70a6d0f73eecefd38c1ae7c39045a08"}, + {file = "rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4c5f36a861bc4b7da6516dbdf302c55313afa09b81931e8280361a4f6c9a2d27"}, + {file = "rpds_py-0.30.0-cp313-cp313t-win32.whl", hash = "sha256:3d4a69de7a3e50ffc214ae16d79d8fbb0922972da0356dcf4d0fdca2878559c6"}, + {file = "rpds_py-0.30.0-cp313-cp313t-win_amd64.whl", hash = "sha256:f14fc5df50a716f7ece6a80b6c78bb35ea2ca47c499e422aa4463455dd96d56d"}, + {file = "rpds_py-0.30.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:68f19c879420aa08f61203801423f6cd5ac5f0ac4ac82a2368a9fcd6a9a075e0"}, + {file = "rpds_py-0.30.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ec7c4490c672c1a0389d319b3a9cfcd098dcdc4783991553c332a15acf7249be"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f251c812357a3fed308d684a5079ddfb9d933860fc6de89f2b7ab00da481e65f"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac98b175585ecf4c0348fd7b29c3864bda53b805c773cbf7bfdaffc8070c976f"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3e62880792319dbeb7eb866547f2e35973289e7d5696c6e295476448f5b63c87"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4e7fc54e0900ab35d041b0601431b0a0eb495f0851a0639b6ef90f7741b39a18"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47e77dc9822d3ad616c3d5759ea5631a75e5809d5a28707744ef79d7a1bcfcad"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:b4dc1a6ff022ff85ecafef7979a2c6eb423430e05f1165d6688234e62ba99a07"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4559c972db3a360808309e06a74628b95eaccbf961c335c8fe0d590cf587456f"}, + {file = "rpds_py-0.30.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0ed177ed9bded28f8deb6ab40c183cd1192aa0de40c12f38be4d59cd33cb5c65"}, + {file = "rpds_py-0.30.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ad1fa8db769b76ea911cb4e10f049d80bf518c104f15b3edb2371cc65375c46f"}, + {file = "rpds_py-0.30.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:46e83c697b1f1c72b50e5ee5adb4353eef7406fb3f2043d64c33f20ad1c2fc53"}, + {file = "rpds_py-0.30.0-cp314-cp314-win32.whl", hash = "sha256:ee454b2a007d57363c2dfd5b6ca4a5d7e2c518938f8ed3b706e37e5d470801ed"}, + {file = "rpds_py-0.30.0-cp314-cp314-win_amd64.whl", hash = "sha256:95f0802447ac2d10bcc69f6dc28fe95fdf17940367b21d34e34c737870758950"}, + {file = "rpds_py-0.30.0-cp314-cp314-win_arm64.whl", hash = "sha256:613aa4771c99f03346e54c3f038e4cc574ac09a3ddfb0e8878487335e96dead6"}, + {file = "rpds_py-0.30.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:7e6ecfcb62edfd632e56983964e6884851786443739dbfe3582947e87274f7cb"}, + {file = "rpds_py-0.30.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a1d0bc22a7cdc173fedebb73ef81e07faef93692b8c1ad3733b67e31e1b6e1b8"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d08f00679177226c4cb8c5265012eea897c8ca3b93f429e546600c971bcbae7"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5965af57d5848192c13534f90f9dd16464f3c37aaf166cc1da1cae1fd5a34898"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a4e86e34e9ab6b667c27f3211ca48f73dba7cd3d90f8d5b11be56e5dbc3fb4e"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5d3e6b26f2c785d65cc25ef1e5267ccbe1b069c5c21b8cc724efee290554419"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:626a7433c34566535b6e56a1b39a7b17ba961e97ce3b80ec62e6f1312c025551"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:acd7eb3f4471577b9b5a41baf02a978e8bdeb08b4b355273994f8b87032000a8"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fe5fa731a1fa8a0a56b0977413f8cacac1768dad38d16b3a296712709476fbd5"}, + {file = "rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:74a3243a411126362712ee1524dfc90c650a503502f135d54d1b352bd01f2404"}, + {file = "rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:3e8eeb0544f2eb0d2581774be4c3410356eba189529a6b3e36bbbf9696175856"}, + {file = "rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:dbd936cde57abfee19ab3213cf9c26be06d60750e60a8e4dd85d1ab12c8b1f40"}, + {file = "rpds_py-0.30.0-cp314-cp314t-win32.whl", hash = "sha256:dc824125c72246d924f7f796b4f63c1e9dc810c7d9e2355864b3c3a73d59ade0"}, + {file = "rpds_py-0.30.0-cp314-cp314t-win_amd64.whl", hash = "sha256:27f4b0e92de5bfbc6f86e43959e6edd1425c33b5e69aab0984a72047f2bcf1e3"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c2262bdba0ad4fc6fb5545660673925c2d2a5d9e2e0fb603aad545427be0fc58"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:ee6af14263f25eedc3bb918a3c04245106a42dfd4f5c2285ea6f997b1fc3f89a"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3adbb8179ce342d235c31ab8ec511e66c73faa27a47e076ccc92421add53e2bb"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:250fa00e9543ac9b97ac258bd37367ff5256666122c2d0f2bc97577c60a1818c"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9854cf4f488b3d57b9aaeb105f06d78e5529d3145b1e4a41750167e8c213c6d3"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:993914b8e560023bc0a8bf742c5f303551992dcb85e247b1e5c7f4a7d145bda5"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58edca431fb9b29950807e301826586e5bbf24163677732429770a697ffe6738"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:dea5b552272a944763b34394d04577cf0f9bd013207bc32323b5a89a53cf9c2f"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ba3af48635eb83d03f6c9735dfb21785303e73d22ad03d489e88adae6eab8877"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:dff13836529b921e22f15cb099751209a60009731a68519630a24d61f0b1b30a"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:1b151685b23929ab7beec71080a8889d4d6d9fa9a983d213f07121205d48e2c4"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:ac37f9f516c51e5753f27dfdef11a88330f04de2d564be3991384b2f3535d02e"}, + {file = "rpds_py-0.30.0.tar.gz", hash = "sha256:dd8ff7cf90014af0c0f787eea34794ebf6415242ee1d6fa91eaba725cc441e84"}, +] + +[[package]] +name = "safetensors" +version = "0.7.0" +description = "" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "safetensors-0.7.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c82f4d474cf725255d9e6acf17252991c3c8aac038d6ef363a4bf8be2f6db517"}, + {file = "safetensors-0.7.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:94fd4858284736bb67a897a41608b5b0c2496c9bdb3bf2af1fa3409127f20d57"}, + {file = "safetensors-0.7.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e07d91d0c92a31200f25351f4acb2bc6aff7f48094e13ebb1d0fb995b54b6542"}, + {file = "safetensors-0.7.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8469155f4cb518bafb4acf4865e8bb9d6804110d2d9bdcaa78564b9fd841e104"}, + {file = "safetensors-0.7.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:54bef08bf00a2bff599982f6b08e8770e09cc012d7bba00783fc7ea38f1fb37d"}, + {file = "safetensors-0.7.0-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:42cb091236206bb2016d245c377ed383aa7f78691748f3bb6ee1bfa51ae2ce6a"}, + {file = "safetensors-0.7.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac7252938f0696ddea46f5e855dd3138444e82236e3be475f54929f0c510d48"}, + {file = "safetensors-0.7.0-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1d060c70284127fa805085d8f10fbd0962792aed71879d00864acda69dbab981"}, + {file = "safetensors-0.7.0-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:cdab83a366799fa730f90a4ebb563e494f28e9e92c4819e556152ad55e43591b"}, + {file = "safetensors-0.7.0-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:672132907fcad9f2aedcb705b2d7b3b93354a2aec1b2f706c4db852abe338f85"}, + {file = "safetensors-0.7.0-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:5d72abdb8a4d56d4020713724ba81dac065fedb7f3667151c4a637f1d3fb26c0"}, + {file = "safetensors-0.7.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b0f6d66c1c538d5a94a73aa9ddca8ccc4227e6c9ff555322ea40bdd142391dd4"}, + {file = "safetensors-0.7.0-cp38-abi3-win32.whl", hash = "sha256:c74af94bf3ac15ac4d0f2a7c7b4663a15f8c2ab15ed0fc7531ca61d0835eccba"}, + {file = "safetensors-0.7.0-cp38-abi3-win_amd64.whl", hash = "sha256:d1239932053f56f3456f32eb9625590cc7582e905021f94636202a864d470755"}, + {file = "safetensors-0.7.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4729811a6640d019a4b7ba8638ee2fd21fa5ca8c7e7bdf0fed62068fcaac737"}, + {file = "safetensors-0.7.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:12f49080303fa6bb424b362149a12949dfbbf1e06811a88f2307276b0c131afd"}, + {file = "safetensors-0.7.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0071bffba4150c2f46cae1432d31995d77acfd9f8db598b5d1a2ce67e8440ad2"}, + {file = "safetensors-0.7.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:473b32699f4200e69801bf5abf93f1a4ecd432a70984df164fc22ccf39c4a6f3"}, + {file = "safetensors-0.7.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b95a3fa7b3abb9b5b0e07668e808364d0d40f6bbbf9ae0faa8b5b210c97b140"}, + {file = "safetensors-0.7.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cfdead2f57330d76aa7234051dadfa7d4eedc0e5a27fd08e6f96714a92b00f09"}, + {file = "safetensors-0.7.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc92bc2db7b45bda4510e4f51c59b00fe80b2d6be88928346e4294ce1c2abe7c"}, + {file = "safetensors-0.7.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6999421eb8ba9df4450a16d9184fcb7bef26240b9f98e95401f17af6c2210b71"}, + {file = "safetensors-0.7.0.tar.gz", hash = "sha256:07663963b67e8bd9f0b8ad15bb9163606cd27cc5a1b96235a50d8369803b96b0"}, +] + +[package.extras] +all = ["safetensors[jax]", "safetensors[numpy]", "safetensors[paddlepaddle]", "safetensors[pinned-tf]", "safetensors[quality]", "safetensors[testing]", "safetensors[torch]"] +dev = ["safetensors[all]"] +jax = ["flax (>=0.6.3)", "jax (>=0.3.25)", "jaxlib (>=0.3.25)", "safetensors[numpy]"] +mlx = ["mlx (>=0.0.9)"] +numpy = ["numpy (>=1.21.6)"] +paddlepaddle = ["paddlepaddle (>=2.4.1)", "safetensors[numpy]"] +pinned-tf = ["safetensors[numpy]", "tensorflow (==2.18.0)"] +quality = ["ruff"] +tensorflow = ["safetensors[numpy]", "tensorflow (>=2.11.0)"] +testing = ["h5py (>=3.7.0)", "huggingface-hub (>=0.12.1)", "hypothesis (>=6.70.2)", "pytest (>=7.2.0)", "pytest-benchmark (>=4.0.0)", "safetensors[numpy]", "setuptools-rust (>=1.5.2)"] +testingfree = ["huggingface-hub (>=0.12.1)", "hypothesis (>=6.70.2)", "pytest (>=7.2.0)", "pytest-benchmark (>=4.0.0)", "safetensors[numpy]", "setuptools-rust (>=1.5.2)"] +torch = ["packaging", "safetensors[numpy]", "torch (>=1.10)"] + +[[package]] +name = "scipy" +version = "1.17.1" +description = "Fundamental algorithms for scientific computing in Python" +optional = false +python-versions = ">=3.11" +groups = ["main"] +files = [ + {file = "scipy-1.17.1-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:1f95b894f13729334fb990162e911c9e5dc1ab390c58aa6cbecb389c5b5e28ec"}, + {file = "scipy-1.17.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:e18f12c6b0bc5a592ed23d3f7b891f68fd7f8241d69b7883769eb5d5dfb52696"}, + {file = "scipy-1.17.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:a3472cfbca0a54177d0faa68f697d8ba4c80bbdc19908c3465556d9f7efce9ee"}, + {file = "scipy-1.17.1-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:766e0dc5a616d026a3a1cffa379af959671729083882f50307e18175797b3dfd"}, + {file = "scipy-1.17.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:744b2bf3640d907b79f3fd7874efe432d1cf171ee721243e350f55234b4cec4c"}, + {file = "scipy-1.17.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:43af8d1f3bea642559019edfe64e9b11192a8978efbd1539d7bc2aaa23d92de4"}, + {file = "scipy-1.17.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:cd96a1898c0a47be4520327e01f874acfd61fb48a9420f8aa9f6483412ffa444"}, + {file = "scipy-1.17.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4eb6c25dd62ee8d5edf68a8e1c171dd71c292fdae95d8aeb3dd7d7de4c364082"}, + {file = "scipy-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:d30e57c72013c2a4fe441c2fcb8e77b14e152ad48b5464858e07e2ad9fbfceff"}, + {file = "scipy-1.17.1-cp311-cp311-win_arm64.whl", hash = "sha256:9ecb4efb1cd6e8c4afea0daa91a87fbddbce1b99d2895d151596716c0b2e859d"}, + {file = "scipy-1.17.1-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:35c3a56d2ef83efc372eaec584314bd0ef2e2f0d2adb21c55e6ad5b344c0dcb8"}, + {file = "scipy-1.17.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:fcb310ddb270a06114bb64bbe53c94926b943f5b7f0842194d585c65eb4edd76"}, + {file = "scipy-1.17.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:cc90d2e9c7e5c7f1a482c9875007c095c3194b1cfedca3c2f3291cdc2bc7c086"}, + {file = "scipy-1.17.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:c80be5ede8f3f8eded4eff73cc99a25c388ce98e555b17d31da05287015ffa5b"}, + {file = "scipy-1.17.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e19ebea31758fac5893a2ac360fedd00116cbb7628e650842a6691ba7ca28a21"}, + {file = "scipy-1.17.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:02ae3b274fde71c5e92ac4d54bc06c42d80e399fec704383dcd99b301df37458"}, + {file = "scipy-1.17.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8a604bae87c6195d8b1045eddece0514d041604b14f2727bbc2b3020172045eb"}, + {file = "scipy-1.17.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f590cd684941912d10becc07325a3eeb77886fe981415660d9265c4c418d0bea"}, + {file = "scipy-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:41b71f4a3a4cab9d366cd9065b288efc4d4f3c0b37a91a8e0947fb5bd7f31d87"}, + {file = "scipy-1.17.1-cp312-cp312-win_arm64.whl", hash = "sha256:f4115102802df98b2b0db3cce5cb9b92572633a1197c77b7553e5203f284a5b3"}, + {file = "scipy-1.17.1-cp313-cp313-macosx_10_14_x86_64.whl", hash = "sha256:5e3c5c011904115f88a39308379c17f91546f77c1667cea98739fe0fccea804c"}, + {file = "scipy-1.17.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:6fac755ca3d2c3edcb22f479fceaa241704111414831ddd3bc6056e18516892f"}, + {file = "scipy-1.17.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:7ff200bf9d24f2e4d5dc6ee8c3ac64d739d3a89e2326ba68aaf6c4a2b838fd7d"}, + {file = "scipy-1.17.1-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:4b400bdc6f79fa02a4d86640310dde87a21fba0c979efff5248908c6f15fad1b"}, + {file = "scipy-1.17.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2b64ca7d4aee0102a97f3ba22124052b4bd2152522355073580bf4845e2550b6"}, + {file = "scipy-1.17.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:581b2264fc0aa555f3f435a5944da7504ea3a065d7029ad60e7c3d1ae09c5464"}, + {file = "scipy-1.17.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:beeda3d4ae615106d7094f7e7cef6218392e4465cc95d25f900bebabfded0950"}, + {file = "scipy-1.17.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6609bc224e9568f65064cfa72edc0f24ee6655b47575954ec6339534b2798369"}, + {file = "scipy-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:37425bc9175607b0268f493d79a292c39f9d001a357bebb6b88fdfaff13f6448"}, + {file = "scipy-1.17.1-cp313-cp313-win_arm64.whl", hash = "sha256:5cf36e801231b6a2059bf354720274b7558746f3b1a4efb43fcf557ccd484a87"}, + {file = "scipy-1.17.1-cp313-cp313t-macosx_10_14_x86_64.whl", hash = "sha256:d59c30000a16d8edc7e64152e30220bfbd724c9bbb08368c054e24c651314f0a"}, + {file = "scipy-1.17.1-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:010f4333c96c9bb1a4516269e33cb5917b08ef2166d5556ca2fd9f082a9e6ea0"}, + {file = "scipy-1.17.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:2ceb2d3e01c5f1d83c4189737a42d9cb2fc38a6eeed225e7515eef71ad301dce"}, + {file = "scipy-1.17.1-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:844e165636711ef41f80b4103ed234181646b98a53c8f05da12ca5ca289134f6"}, + {file = "scipy-1.17.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:158dd96d2207e21c966063e1635b1063cd7787b627b6f07305315dd73d9c679e"}, + {file = "scipy-1.17.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:74cbb80d93260fe2ffa334efa24cb8f2f0f622a9b9febf8b483c0b865bfb3475"}, + {file = "scipy-1.17.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:dbc12c9f3d185f5c737d801da555fb74b3dcfa1a50b66a1a93e09190f41fab50"}, + {file = "scipy-1.17.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:94055a11dfebe37c656e70317e1996dc197e1a15bbcc351bcdd4610e128fe1ca"}, + {file = "scipy-1.17.1-cp313-cp313t-win_amd64.whl", hash = "sha256:e30bdeaa5deed6bc27b4cc490823cd0347d7dae09119b8803ae576ea0ce52e4c"}, + {file = "scipy-1.17.1-cp313-cp313t-win_arm64.whl", hash = "sha256:a720477885a9d2411f94a93d16f9d89bad0f28ca23c3f8daa521e2dcc3f44d49"}, + {file = "scipy-1.17.1-cp314-cp314-macosx_10_14_x86_64.whl", hash = "sha256:a48a72c77a310327f6a3a920092fa2b8fd03d7deaa60f093038f22d98e096717"}, + {file = "scipy-1.17.1-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:45abad819184f07240d8a696117a7aacd39787af9e0b719d00285549ed19a1e9"}, + {file = "scipy-1.17.1-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:3fd1fcdab3ea951b610dc4cef356d416d5802991e7e32b5254828d342f7b7e0b"}, + {file = "scipy-1.17.1-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:7bdf2da170b67fdf10bca777614b1c7d96ae3ca5794fd9587dce41eb2966e866"}, + {file = "scipy-1.17.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:adb2642e060a6549c343603a3851ba76ef0b74cc8c079a9a58121c7ec9fe2350"}, + {file = "scipy-1.17.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:eee2cfda04c00a857206a4330f0c5e3e56535494e30ca445eb19ec624ae75118"}, + {file = "scipy-1.17.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:d2650c1fb97e184d12d8ba010493ee7b322864f7d3d00d3f9bb97d9c21de4068"}, + {file = "scipy-1.17.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:08b900519463543aa604a06bec02461558a6e1cef8fdbb8098f77a48a83c8118"}, + {file = "scipy-1.17.1-cp314-cp314-win_amd64.whl", hash = "sha256:3877ac408e14da24a6196de0ddcace62092bfc12a83823e92e49e40747e52c19"}, + {file = "scipy-1.17.1-cp314-cp314-win_arm64.whl", hash = "sha256:f8885db0bc2bffa59d5c1b72fad7a6a92d3e80e7257f967dd81abb553a90d293"}, + {file = "scipy-1.17.1-cp314-cp314t-macosx_10_14_x86_64.whl", hash = "sha256:1cc682cea2ae55524432f3cdff9e9a3be743d52a7443d0cba9017c23c87ae2f6"}, + {file = "scipy-1.17.1-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:2040ad4d1795a0ae89bfc7e8429677f365d45aa9fd5e4587cf1ea737f927b4a1"}, + {file = "scipy-1.17.1-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:131f5aaea57602008f9822e2115029b55d4b5f7c070287699fe45c661d051e39"}, + {file = "scipy-1.17.1-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:9cdc1a2fcfd5c52cfb3045feb399f7b3ce822abdde3a193a6b9a60b3cb5854ca"}, + {file = "scipy-1.17.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6e3dcd57ab780c741fde8dc68619de988b966db759a3c3152e8e9142c26295ad"}, + {file = "scipy-1.17.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a9956e4d4f4a301ebf6cde39850333a6b6110799d470dbbb1e25326ac447f52a"}, + {file = "scipy-1.17.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:a4328d245944d09fd639771de275701ccadf5f781ba0ff092ad141e017eccda4"}, + {file = "scipy-1.17.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a77cbd07b940d326d39a1d1b37817e2ee4d79cb30e7338f3d0cddffae70fcaa2"}, + {file = "scipy-1.17.1-cp314-cp314t-win_amd64.whl", hash = "sha256:eb092099205ef62cd1782b006658db09e2fed75bffcae7cc0d44052d8aa0f484"}, + {file = "scipy-1.17.1-cp314-cp314t-win_arm64.whl", hash = "sha256:200e1050faffacc162be6a486a984a0497866ec54149a01270adc8a59b7c7d21"}, + {file = "scipy-1.17.1.tar.gz", hash = "sha256:95d8e012d8cb8816c226aef832200b1d45109ed4464303e997c5b13122b297c0"}, +] + +[package.dependencies] +numpy = ">=1.26.4,<2.7" + +[package.extras] +dev = ["click (<8.3.0)", "cython-lint (>=0.12.2)", "mypy (==1.10.0)", "pycodestyle", "ruff (>=0.12.0)", "spin", "types-psutil", "typing_extensions"] +doc = ["intersphinx_registry", "jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.19.1)", "jupytext", "linkify-it-py", "matplotlib (>=3.5)", "myst-nb (>=1.2.0)", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0,<8.2.0)", "sphinx-copybutton", "sphinx-design (>=0.4.0)", "tabulate"] +test = ["Cython", "array-api-strict (>=2.3.1)", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja ; sys_platform != \"emscripten\"", "pooch", "pytest (>=8.0.0)", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] + +[[package]] +name = "secretstorage" +version = "3.5.0" +description = "Python bindings to FreeDesktop.org Secret Service API" +optional = false +python-versions = ">=3.10" +groups = ["main"] +markers = "sys_platform == \"linux\"" +files = [ + {file = "secretstorage-3.5.0-py3-none-any.whl", hash = "sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137"}, + {file = "secretstorage-3.5.0.tar.gz", hash = "sha256:f04b8e4689cbce351744d5537bf6b1329c6fc68f91fa666f60a380edddcd11be"}, +] + +[package.dependencies] +cryptography = ">=2.0" +jeepney = ">=0.6" + +[[package]] +name = "sentencepiece" +version = "0.2.1" +description = "Unsupervised text tokenizer and detokenizer." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "sentencepiece-0.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e10fa50bdbaa5e2445dbd387979980d391760faf0ec99a09bd7780ff37eaec44"}, + {file = "sentencepiece-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f27ae6deea72efdb6f361750c92f6c21fd0ad087445082770cc34015213c526"}, + {file = "sentencepiece-0.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:60937c959e6f44159fdd9f56fbdd302501f96114a5ba436829496d5f32d8de3f"}, + {file = "sentencepiece-0.2.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d8b1d91545578852f128650b8cce4ec20f93d39b378ff554ebe66290f2dabb92"}, + {file = "sentencepiece-0.2.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:27e38eee653abc3d387862e67bc5c8b6f428cd604e688b85d29170b7e725c26c"}, + {file = "sentencepiece-0.2.1-cp310-cp310-win32.whl", hash = "sha256:251874d720ac7f28024a168501f3c7bb15d1802245f6e66de565f18bbb9b5eaa"}, + {file = "sentencepiece-0.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:e52144670738b4b477fade6c2a9b6af71a8d0094514c9853ac9f6fc1fcfabae7"}, + {file = "sentencepiece-0.2.1-cp310-cp310-win_arm64.whl", hash = "sha256:9076430ac25dfa7147d9d05751dbc66a04bc1aaac371c07f84952979ea59f0d0"}, + {file = "sentencepiece-0.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6356d0986b8b8dc351b943150fcd81a1c6e6e4d439772e8584c64230e58ca987"}, + {file = "sentencepiece-0.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8f8ba89a3acb3dc1ae90f65ec1894b0b9596fdb98ab003ff38e058f898b39bc7"}, + {file = "sentencepiece-0.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:02593eca45440ef39247cee8c47322a34bdcc1d8ae83ad28ba5a899a2cf8d79a"}, + {file = "sentencepiece-0.2.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0a0d15781a171d188b661ae4bde1d998c303f6bd8621498c50c671bd45a4798e"}, + {file = "sentencepiece-0.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f5a3e0d9f445ed9d66c0fec47d4b23d12cfc858b407a03c194c1b26c2ac2a63"}, + {file = "sentencepiece-0.2.1-cp311-cp311-win32.whl", hash = "sha256:6d297a1748d429ba8534eebe5535448d78b8acc32d00a29b49acf28102eeb094"}, + {file = "sentencepiece-0.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:82d9ead6591015f009cb1be1cb1c015d5e6f04046dbb8c9588b931e869a29728"}, + {file = "sentencepiece-0.2.1-cp311-cp311-win_arm64.whl", hash = "sha256:39f8651bd10974eafb9834ce30d9bcf5b73e1fc798a7f7d2528f9820ca86e119"}, + {file = "sentencepiece-0.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:57cae326c8727de58c85977b175af132a7138d84c764635d7e71bbee7e774133"}, + {file = "sentencepiece-0.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:56dd39a3c4d6493db3cdca7e8cc68c6b633f0d4195495cbadfcf5af8a22d05a6"}, + {file = "sentencepiece-0.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d9381351182ff9888cc80e41c632e7e274b106f450de33d67a9e8f6043da6f76"}, + {file = "sentencepiece-0.2.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:99f955df238021bf11f0fc37cdb54fd5e5b5f7fd30ecc3d93fb48b6815437167"}, + {file = "sentencepiece-0.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0cdfecef430d985f1c2bcbfff3defd1d95dae876fbd0173376012d2d7d24044b"}, + {file = "sentencepiece-0.2.1-cp312-cp312-win32.whl", hash = "sha256:a483fd29a34c3e34c39ac5556b0a90942bec253d260235729e50976f5dba1068"}, + {file = "sentencepiece-0.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:4cdc7c36234fda305e85c32949c5211faaf8dd886096c7cea289ddc12a2d02de"}, + {file = "sentencepiece-0.2.1-cp312-cp312-win_arm64.whl", hash = "sha256:daeb5e9e9fcad012324807856113708614d534f596d5008638eb9b40112cd9e4"}, + {file = "sentencepiece-0.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dcd8161eee7b41aae57ded06272905dbd680a0a04b91edd0f64790c796b2f706"}, + {file = "sentencepiece-0.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c6c8f42949f419ff8c7e9960dbadcfbc982d7b5efc2f6748210d3dd53a7de062"}, + {file = "sentencepiece-0.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:097f3394e99456e9e4efba1737c3749d7e23563dd1588ce71a3d007f25475fff"}, + {file = "sentencepiece-0.2.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d7b670879c370d350557edabadbad1f6561a9e6968126e6debca4029e5547820"}, + {file = "sentencepiece-0.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c7f0fd2f2693309e6628aeeb2e2faf6edd221134dfccac3308ca0de01f8dab47"}, + {file = "sentencepiece-0.2.1-cp313-cp313-win32.whl", hash = "sha256:92b3816aa2339355fda2c8c4e021a5de92180b00aaccaf5e2808972e77a4b22f"}, + {file = "sentencepiece-0.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:10ed3dab2044c47f7a2e7b4969b0c430420cdd45735d78c8f853191fa0e3148b"}, + {file = "sentencepiece-0.2.1-cp313-cp313-win_arm64.whl", hash = "sha256:ac650534e2251083c5f75dde4ff28896ce7c8904133dc8fef42780f4d5588fcd"}, + {file = "sentencepiece-0.2.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:8dd4b477a7b069648d19363aad0cab9bad2f4e83b2d179be668efa672500dc94"}, + {file = "sentencepiece-0.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0c0f672da370cc490e4c59d89e12289778310a0e71d176c541e4834759e1ae07"}, + {file = "sentencepiece-0.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:ad8493bea8432dae8d6830365352350f3b4144415a1d09c4c8cb8d30cf3b6c3c"}, + {file = "sentencepiece-0.2.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b81a24733726e3678d2db63619acc5a8dccd074f7aa7a54ecd5ca33ca6d2d596"}, + {file = "sentencepiece-0.2.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0a81799d0a68d618e89063fb423c3001a034c893069135ffe51fee439ae474d6"}, + {file = "sentencepiece-0.2.1-cp313-cp313t-win32.whl", hash = "sha256:89a3ea015517c42c0341d0d962f3e6aaf2cf10d71b1932d475c44ba48d00aa2b"}, + {file = "sentencepiece-0.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:33f068c9382dc2e7c228eedfd8163b52baa86bb92f50d0488bf2b7da7032e484"}, + {file = "sentencepiece-0.2.1-cp313-cp313t-win_arm64.whl", hash = "sha256:b3616ad246f360e52c85781e47682d31abfb6554c779e42b65333d4b5f44ecc0"}, + {file = "sentencepiece-0.2.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:5d0350b686c320068702116276cfb26c066dc7e65cfef173980b11bb4d606719"}, + {file = "sentencepiece-0.2.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:c7f54a31cde6fa5cb030370566f68152a742f433f8d2be458463d06c208aef33"}, + {file = "sentencepiece-0.2.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c83b85ab2d6576607f31df77ff86f28182be4a8de6d175d2c33ca609925f5da1"}, + {file = "sentencepiece-0.2.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1855f57db07b51fb51ed6c9c452f570624d2b169b36f0f79ef71a6e6c618cd8b"}, + {file = "sentencepiece-0.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01e6912125cb45d3792f530a4d38f8e21bf884d6b4d4ade1b2de5cf7a8d2a52b"}, + {file = "sentencepiece-0.2.1-cp314-cp314-win32.whl", hash = "sha256:c415c9de1447e0a74ae3fdb2e52f967cb544113a3a5ce3a194df185cbc1f962f"}, + {file = "sentencepiece-0.2.1-cp314-cp314-win_amd64.whl", hash = "sha256:881b2e44b14fc19feade3cbed314be37de639fc415375cefaa5bc81a4be137fd"}, + {file = "sentencepiece-0.2.1-cp314-cp314-win_arm64.whl", hash = "sha256:2005242a16d2dc3ac5fe18aa7667549134d37854823df4c4db244752453b78a8"}, + {file = "sentencepiece-0.2.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:a19adcec27c524cb7069a1c741060add95f942d1cbf7ad0d104dffa0a7d28a2b"}, + {file = "sentencepiece-0.2.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:e37e4b4c4a11662b5db521def4e44d4d30ae69a1743241412a93ae40fdcab4bb"}, + {file = "sentencepiece-0.2.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:477c81505db072b3ab627e7eab972ea1025331bd3a92bacbf798df2b75ea86ec"}, + {file = "sentencepiece-0.2.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:010f025a544ef770bb395091d57cb94deb9652d8972e0d09f71d85d5a0816c8c"}, + {file = "sentencepiece-0.2.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:733e59ff1794d26db706cd41fc2d7ca5f6c64a820709cb801dc0ea31780d64ab"}, + {file = "sentencepiece-0.2.1-cp314-cp314t-win32.whl", hash = "sha256:d3233770f78e637dc8b1fda2cd7c3b99ec77e7505041934188a4e7fe751de3b0"}, + {file = "sentencepiece-0.2.1-cp314-cp314t-win_amd64.whl", hash = "sha256:5e4366c97b68218fd30ea72d70c525e6e78a6c0a88650f57ac4c43c63b234a9d"}, + {file = "sentencepiece-0.2.1-cp314-cp314t-win_arm64.whl", hash = "sha256:105e36e75cbac1292642045458e8da677b2342dcd33df503e640f0b457cb6751"}, + {file = "sentencepiece-0.2.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:afefe50a0cdcb4f2fd9733cb52001a2c164181ee2d82c32d38f5b1b326a8528c"}, + {file = "sentencepiece-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:891ade6503dd93d418c03993f7d6a8aa20260c422cefff5096b9068185e67642"}, + {file = "sentencepiece-0.2.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:814978ac05130dd5812b4b03215c766bc6abaef13e7bd72bc534e4d1e12e9a4c"}, + {file = "sentencepiece-0.2.1-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:017f97b274d4b0baa84b2dc743bf4517be81156f413bb24f12aacacde378e5ab"}, + {file = "sentencepiece-0.2.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22c4ebcb3c6ab1496ab1c37c79ef7bb563b8726f29548c30773b7a4cb152df1a"}, + {file = "sentencepiece-0.2.1-cp39-cp39-win32.whl", hash = "sha256:caa4e560c72c151da80036aecc2159e51a7fd8ae9efebefd96860460ce6bd025"}, + {file = "sentencepiece-0.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:2af5a1fb05013332ad94343b8b5f3973e006a2dde2dfba55a819549e054e2f0f"}, + {file = "sentencepiece-0.2.1-cp39-cp39-win_arm64.whl", hash = "sha256:3d165fbb9bf8fba35f1946ba2617c3f9995679f07438325f07c026d53f33e746"}, + {file = "sentencepiece-0.2.1.tar.gz", hash = "sha256:8138cec27c2f2282f4a34d9a016e3374cd40e5c6e9cb335063db66a0a3b71fad"}, +] + +[package.extras] +test = ["pytest"] +testpaths = ["test"] + +[[package]] +name = "setuptools" +version = "81.0.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "setuptools-81.0.0-py3-none-any.whl", hash = "sha256:fdd925d5c5d9f62e4b74b30d6dd7828ce236fd6ed998a08d81de62ce5a6310d6"}, + {file = "setuptools-81.0.0.tar.gz", hash = "sha256:487b53915f52501f0a79ccfd0c02c165ffe06631443a886740b91af4b7a5845a"}, +] + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\"", "ruff (>=0.13.0) ; sys_platform != \"cygwin\""] +core = ["importlib_metadata (>=6) ; python_version < \"3.10\"", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21) ; python_version >= \"3.9\" and sys_platform != \"cygwin\"", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf ; sys_platform != \"cygwin\"", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] +type = ["importlib_metadata (>=7.0.2) ; python_version < \"3.10\"", "jaraco.develop (>=7.21) ; sys_platform != \"cygwin\"", "mypy (==1.18.*)", "pytest-mypy"] + +[[package]] +name = "shellingham" +version = "1.5.4" +description = "Tool to Detect Surrounding Shell" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"}, + {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, +] + +[[package]] +name = "six" +version = "1.17.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["main"] +files = [ + {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, + {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, +] + +[[package]] +name = "smmap" +version = "5.0.2" +description = "A pure Python implementation of a sliding window memory map manager" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "smmap-5.0.2-py3-none-any.whl", hash = "sha256:b30115f0def7d7531d22a0fb6502488d879e75b260a9db4d0819cfb25403af5e"}, + {file = "smmap-5.0.2.tar.gz", hash = "sha256:26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5"}, +] + +[[package]] +name = "sniffio" +version = "1.3.1" +description = "Sniff out which async library your code is running under" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, + {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, +] + +[[package]] +name = "sse-starlette" +version = "3.3.2" +description = "SSE plugin for Starlette" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "sse_starlette-3.3.2-py3-none-any.whl", hash = "sha256:5c3ea3dad425c601236726af2f27689b74494643f57017cafcb6f8c9acfbb862"}, + {file = "sse_starlette-3.3.2.tar.gz", hash = "sha256:678fca55a1945c734d8472a6cad186a55ab02840b4f6786f5ee8770970579dcd"}, +] + +[package.dependencies] +anyio = ">=4.7.0" +starlette = ">=0.49.1" + +[package.extras] +daphne = ["daphne (>=4.2.0)"] +examples = ["aiosqlite (>=0.21.0)", "fastapi (>=0.115.12)", "sqlalchemy[asyncio] (>=2.0.41)", "uvicorn (>=0.34.0)"] +granian = ["granian (>=2.3.1)"] +uvicorn = ["uvicorn (>=0.34.0)"] + +[[package]] +name = "stack-data" +version = "0.6.3" +description = "Extract data from python stack frames and tracebacks for informative displays" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695"}, + {file = "stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9"}, +] + +[package.dependencies] +asttokens = ">=2.1.0" +executing = ">=1.2.0" +pure-eval = "*" + +[package.extras] +tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] + +[[package]] +name = "starlette" +version = "0.52.1" +description = "The little ASGI library that shines." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "starlette-0.52.1-py3-none-any.whl", hash = "sha256:0029d43eb3d273bc4f83a08720b4912ea4b071087a3b48db01b7c839f7954d74"}, + {file = "starlette-0.52.1.tar.gz", hash = "sha256:834edd1b0a23167694292e94f597773bc3f89f362be6effee198165a35d62933"}, +] + +[package.dependencies] +anyio = ">=3.6.2,<5" +typing-extensions = {version = ">=4.10.0", markers = "python_version < \"3.13\""} + +[package.extras] +full = ["httpx (>=0.27.0,<0.29.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.18)", "pyyaml"] + +[[package]] +name = "streamlit" +version = "1.55.0" +description = "A faster way to build and share data apps" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "streamlit-1.55.0-py3-none-any.whl", hash = "sha256:1e4a16449c6131696180f4ddb40ea8c51834e89c2a43e1b0362bc9b1cfd9b415"}, + {file = "streamlit-1.55.0.tar.gz", hash = "sha256:015e512bbd02d000f4047e51118dc086b70e7d9c46b4a11a33c2509731379626"}, +] + +[package.dependencies] +altair = ">=4.0,<5.4.0 || >5.4.0,<5.4.1 || >5.4.1,<7" +blinker = ">=1.5.0,<2" +cachetools = ">=5.5,<8" +click = ">=7.0,<9" +gitpython = ">=3.0.7,<3.1.19 || >3.1.19,<4" +numpy = ">=1.23,<3" +packaging = ">=20" +pandas = ">=1.4.0,<3" +pillow = ">=7.1.0,<13" +protobuf = ">=3.20,<7" +pyarrow = ">=7.0" +pydeck = ">=0.8.0b4,<1" +requests = ">=2.27,<3" +tenacity = ">=8.1.0,<10" +toml = ">=0.10.1,<2" +tornado = ">=6.0.3,<6.5.0 || >6.5.0,<7" +typing-extensions = ">=4.10.0,<5" +watchdog = {version = ">=2.1.5,<7", markers = "platform_system != \"Darwin\""} + +[package.extras] +all = ["rich (>=11.0.0)", "streamlit[auth,charts,pdf,performance,snowflake,sql]"] +auth = ["Authlib (>=1.3.2)"] +charts = ["graphviz (>=0.19.0)", "matplotlib (>=3.0.0)", "orjson (>=3.5.0)", "plotly (>=4.0.0)"] +pdf = ["streamlit-pdf (>=1.0.0)"] +performance = ["httptools (>=0.6.3)", "orjson (>=3.5.0)", "uvloop (>=0.15.2) ; sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\""] +snowflake = ["snowflake-connector-python (>=3.3.0) ; python_version < \"3.12\"", "snowflake-snowpark-python[modin] (>=1.17.0) ; python_version < \"3.12\""] +sql = ["SQLAlchemy (>=2.0.0)"] +starlette = ["anyio (>=4.0.0)", "itsdangerous (>=2.1.2)", "python-multipart (>=0.0.10)", "starlette (>=0.40.0)", "uvicorn (>=0.30.0)", "websockets (>=12.0.0)"] + +[[package]] +name = "sympy" +version = "1.14.0" +description = "Computer algebra system (CAS) in Python" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5"}, + {file = "sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517"}, +] + +[package.dependencies] +mpmath = ">=1.1.0,<1.4" + +[package.extras] +dev = ["hypothesis (>=6.70.0)", "pytest (>=7.1.0)"] + +[[package]] +name = "tenacity" +version = "9.1.4" +description = "Retry code until it succeeds" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "tenacity-9.1.4-py3-none-any.whl", hash = "sha256:6095a360c919085f28c6527de529e76a06ad89b23659fa881ae0649b867a9d55"}, + {file = "tenacity-9.1.4.tar.gz", hash = "sha256:adb31d4c263f2bd041081ab33b498309a57c77f9acf2db65aadf0898179cf93a"}, +] + +[package.extras] +doc = ["reno", "sphinx"] +test = ["pytest", "tornado (>=4.5)", "typeguard"] + +[[package]] +name = "tensorboard" +version = "2.20.0" +description = "TensorBoard lets you watch Tensors Flow" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "tensorboard-2.20.0-py3-none-any.whl", hash = "sha256:9dc9f978cb84c0723acf9a345d96c184f0293d18f166bb8d59ee098e6cfaaba6"}, +] + +[package.dependencies] +absl-py = ">=0.4" +grpcio = ">=1.48.2" +markdown = ">=2.6.8" +numpy = ">=1.12.0" +packaging = "*" +pillow = "*" +protobuf = ">=3.19.6,<4.24.0 || >4.24.0" +setuptools = ">=41.0.0" +tensorboard-data-server = ">=0.7.0,<0.8.0" +werkzeug = ">=1.0.1" + +[[package]] +name = "tensorboard-data-server" +version = "0.7.2" +description = "Fast data loading for TensorBoard" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "tensorboard_data_server-0.7.2-py3-none-any.whl", hash = "sha256:7e0610d205889588983836ec05dc098e80f97b7e7bbff7e994ebb78f578d0ddb"}, + {file = "tensorboard_data_server-0.7.2-py3-none-macosx_10_9_x86_64.whl", hash = "sha256:9fe5d24221b29625dbc7328b0436ca7fc1c23de4acf4d272f1180856e32f9f60"}, + {file = "tensorboard_data_server-0.7.2-py3-none-manylinux_2_31_x86_64.whl", hash = "sha256:ef687163c24185ae9754ed5650eb5bc4d84ff257aabdc33f0cc6f74d8ba54530"}, +] + +[[package]] +name = "tokenizers" +version = "0.22.2" +description = "" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "tokenizers-0.22.2-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:544dd704ae7238755d790de45ba8da072e9af3eea688f698b137915ae959281c"}, + {file = "tokenizers-0.22.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:1e418a55456beedca4621dbab65a318981467a2b188e982a23e117f115ce5001"}, + {file = "tokenizers-0.22.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2249487018adec45d6e3554c71d46eb39fa8ea67156c640f7513eb26f318cec7"}, + {file = "tokenizers-0.22.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25b85325d0815e86e0bac263506dd114578953b7b53d7de09a6485e4a160a7dd"}, + {file = "tokenizers-0.22.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfb88f22a209ff7b40a576d5324bf8286b519d7358663db21d6246fb17eea2d5"}, + {file = "tokenizers-0.22.2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c774b1276f71e1ef716e5486f21e76333464f47bece56bbd554485982a9e03e"}, + {file = "tokenizers-0.22.2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:df6c4265b289083bf710dff49bc51ef252f9d5be33a45ee2bed151114a56207b"}, + {file = "tokenizers-0.22.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:369cc9fc8cc10cb24143873a0d95438bb8ee257bb80c71989e3ee290e8d72c67"}, + {file = "tokenizers-0.22.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:29c30b83d8dcd061078b05ae0cb94d3c710555fbb44861139f9f83dcca3dc3e4"}, + {file = "tokenizers-0.22.2-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:37ae80a28c1d3265bb1f22464c856bd23c02a05bb211e56d0c5301a435be6c1a"}, + {file = "tokenizers-0.22.2-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:791135ee325f2336f498590eb2f11dc5c295232f288e75c99a36c5dbce63088a"}, + {file = "tokenizers-0.22.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:38337540fbbddff8e999d59970f3c6f35a82de10053206a7562f1ea02d046fa5"}, + {file = "tokenizers-0.22.2-cp39-abi3-win32.whl", hash = "sha256:a6bf3f88c554a2b653af81f3204491c818ae2ac6fbc09e76ef4773351292bc92"}, + {file = "tokenizers-0.22.2-cp39-abi3-win_amd64.whl", hash = "sha256:c9ea31edff2968b44a88f97d784c2f16dc0729b8b143ed004699ebca91f05c48"}, + {file = "tokenizers-0.22.2-cp39-abi3-win_arm64.whl", hash = "sha256:9ce725d22864a1e965217204946f830c37876eee3b2ba6fc6255e8e903d5fcbc"}, + {file = "tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:753d47ebd4542742ef9261d9da92cd545b2cacbb48349a1225466745bb866ec4"}, + {file = "tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e10bf9113d209be7cd046d40fbabbaf3278ff6d18eb4da4c500443185dc1896c"}, + {file = "tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64d94e84f6660764e64e7e0b22baa72f6cd942279fdbb21d46abd70d179f0195"}, + {file = "tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f01a9c019878532f98927d2bacb79bbb404b43d3437455522a00a30718cdedb5"}, + {file = "tokenizers-0.22.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:319f659ee992222f04e58f84cbf407cfa66a65fe3a8de44e8ad2bc53e7d99012"}, + {file = "tokenizers-0.22.2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1e50f8554d504f617d9e9d6e4c2c2884a12b388a97c5c77f0bc6cf4cd032feee"}, + {file = "tokenizers-0.22.2-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a62ba2c5faa2dd175aaeed7b15abf18d20266189fb3406c5d0550dd34dd5f37"}, + {file = "tokenizers-0.22.2-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:143b999bdc46d10febb15cbffb4207ddd1f410e2c755857b5a0797961bbdc113"}, + {file = "tokenizers-0.22.2.tar.gz", hash = "sha256:473b83b915e547aa366d1eee11806deaf419e17be16310ac0a14077f1e28f917"}, +] + +[package.dependencies] +huggingface-hub = ">=0.16.4,<2.0" + +[package.extras] +dev = ["tokenizers[testing]"] +docs = ["setuptools-rust", "sphinx", "sphinx-rtd-theme"] +testing = ["datasets", "numpy", "pytest", "pytest-asyncio", "requests", "ruff", "ty"] + +[[package]] +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +groups = ["main"] +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] + +[[package]] +name = "tomli" +version = "2.4.0" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "tomli-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b5ef256a3fd497d4973c11bf142e9ed78b150d36f5773f1ca6088c230ffc5867"}, + {file = "tomli-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5572e41282d5268eb09a697c89a7bee84fae66511f87533a6f88bd2f7b652da9"}, + {file = "tomli-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:551e321c6ba03b55676970b47cb1b73f14a0a4dce6a3e1a9458fd6d921d72e95"}, + {file = "tomli-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e3f639a7a8f10069d0e15408c0b96a2a828cfdec6fca05296ebcdcc28ca7c76"}, + {file = "tomli-2.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b168f2731796b045128c45982d3a4874057626da0e2ef1fdd722848b741361d"}, + {file = "tomli-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:133e93646ec4300d651839d382d63edff11d8978be23da4cc106f5a18b7d0576"}, + {file = "tomli-2.4.0-cp311-cp311-win32.whl", hash = "sha256:b6c78bdf37764092d369722d9946cb65b8767bfa4110f902a1b2542d8d173c8a"}, + {file = "tomli-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:d3d1654e11d724760cdb37a3d7691f0be9db5fbdaef59c9f532aabf87006dbaa"}, + {file = "tomli-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:cae9c19ed12d4e8f3ebf46d1a75090e4c0dc16271c5bce1c833ac168f08fb614"}, + {file = "tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1"}, + {file = "tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8"}, + {file = "tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a"}, + {file = "tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1"}, + {file = "tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b"}, + {file = "tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51"}, + {file = "tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729"}, + {file = "tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da"}, + {file = "tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3"}, + {file = "tomli-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84d081fbc252d1b6a982e1870660e7330fb8f90f676f6e78b052ad4e64714bf0"}, + {file = "tomli-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9a08144fa4cba33db5255f9b74f0b89888622109bd2776148f2597447f92a94e"}, + {file = "tomli-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c73add4bb52a206fd0c0723432db123c0c75c280cbd67174dd9d2db228ebb1b4"}, + {file = "tomli-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb2945cbe303b1419e2706e711b7113da57b7db31ee378d08712d678a34e51e"}, + {file = "tomli-2.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbb1b10aa643d973366dc2cb1ad94f99c1726a02343d43cbc011edbfac579e7c"}, + {file = "tomli-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4cbcb367d44a1f0c2be408758b43e1ffb5308abe0ea222897d6bfc8e8281ef2f"}, + {file = "tomli-2.4.0-cp313-cp313-win32.whl", hash = "sha256:7d49c66a7d5e56ac959cb6fc583aff0651094ec071ba9ad43df785abc2320d86"}, + {file = "tomli-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:3cf226acb51d8f1c394c1b310e0e0e61fecdd7adcb78d01e294ac297dd2e7f87"}, + {file = "tomli-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:d20b797a5c1ad80c516e41bc1fb0443ddb5006e9aaa7bda2d71978346aeb9132"}, + {file = "tomli-2.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:26ab906a1eb794cd4e103691daa23d95c6919cc2fa9160000ac02370cc9dd3f6"}, + {file = "tomli-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:20cedb4ee43278bc4f2fee6cb50daec836959aadaf948db5172e776dd3d993fc"}, + {file = "tomli-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39b0b5d1b6dd03684b3fb276407ebed7090bbec989fa55838c98560c01113b66"}, + {file = "tomli-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a26d7ff68dfdb9f87a016ecfd1e1c2bacbe3108f4e0f8bcd2228ef9a766c787d"}, + {file = "tomli-2.4.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:20ffd184fb1df76a66e34bd1b36b4a4641bd2b82954befa32fe8163e79f1a702"}, + {file = "tomli-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75c2f8bbddf170e8effc98f5e9084a8751f8174ea6ccf4fca5398436e0320bc8"}, + {file = "tomli-2.4.0-cp314-cp314-win32.whl", hash = "sha256:31d556d079d72db7c584c0627ff3a24c5d3fb4f730221d3444f3efb1b2514776"}, + {file = "tomli-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:43e685b9b2341681907759cf3a04e14d7104b3580f808cfde1dfdb60ada85475"}, + {file = "tomli-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:3d895d56bd3f82ddd6faaff993c275efc2ff38e52322ea264122d72729dca2b2"}, + {file = "tomli-2.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5b5807f3999fb66776dbce568cc9a828544244a8eb84b84b9bafc080c99597b9"}, + {file = "tomli-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c084ad935abe686bd9c898e62a02a19abfc9760b5a79bc29644463eaf2840cb0"}, + {file = "tomli-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f2e3955efea4d1cfbcb87bc321e00dc08d2bcb737fd1d5e398af111d86db5df"}, + {file = "tomli-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e0fe8a0b8312acf3a88077a0802565cb09ee34107813bba1c7cd591fa6cfc8d"}, + {file = "tomli-2.4.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:413540dce94673591859c4c6f794dfeaa845e98bf35d72ed59636f869ef9f86f"}, + {file = "tomli-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0dc56fef0e2c1c470aeac5b6ca8cc7b640bb93e92d9803ddaf9ea03e198f5b0b"}, + {file = "tomli-2.4.0-cp314-cp314t-win32.whl", hash = "sha256:d878f2a6707cc9d53a1be1414bbb419e629c3d6e67f69230217bb663e76b5087"}, + {file = "tomli-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2add28aacc7425117ff6364fe9e06a183bb0251b03f986df0e78e974047571fd"}, + {file = "tomli-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2b1e3b80e1d5e52e40e9b924ec43d81570f0e7d09d11081b797bc4692765a3d4"}, + {file = "tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a"}, + {file = "tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c"}, +] + +[[package]] +name = "tomli-w" +version = "1.2.0" +description = "A lil' TOML writer" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "tomli_w-1.2.0-py3-none-any.whl", hash = "sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90"}, + {file = "tomli_w-1.2.0.tar.gz", hash = "sha256:2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021"}, +] + +[[package]] +name = "torch" +version = "2.10.0" +description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "torch-2.10.0-2-cp310-none-macosx_11_0_arm64.whl", hash = "sha256:2b980edd8d7c0a68c4e951ee1856334a43193f98730d97408fbd148c1a933313"}, + {file = "torch-2.10.0-2-cp311-none-macosx_11_0_arm64.whl", hash = "sha256:418997cb02d0a0f1497cf6a09f63166f9f5df9f3e16c8a716ab76a72127c714f"}, + {file = "torch-2.10.0-2-cp312-none-macosx_11_0_arm64.whl", hash = "sha256:13ec4add8c3faaed8d13e0574f5cd4a323c11655546f91fbe6afa77b57423574"}, + {file = "torch-2.10.0-2-cp313-none-macosx_11_0_arm64.whl", hash = "sha256:e521c9f030a3774ed770a9c011751fb47c4d12029a3d6522116e48431f2ff89e"}, + {file = "torch-2.10.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:5276fa790a666ee8becaffff8acb711922252521b28fbce5db7db5cf9cb2026d"}, + {file = "torch-2.10.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:aaf663927bcd490ae971469a624c322202a2a1e68936eb952535ca4cd3b90444"}, + {file = "torch-2.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:a4be6a2a190b32ff5c8002a0977a25ea60e64f7ba46b1be37093c141d9c49aeb"}, + {file = "torch-2.10.0-cp310-none-macosx_11_0_arm64.whl", hash = "sha256:35e407430795c8d3edb07a1d711c41cc1f9eaddc8b2f1cc0a165a6767a8fb73d"}, + {file = "torch-2.10.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:3282d9febd1e4e476630a099692b44fdc214ee9bf8ee5377732d9d9dfe5712e4"}, + {file = "torch-2.10.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a2f9edd8dbc99f62bc4dfb78af7bf89499bca3d753423ac1b4e06592e467b763"}, + {file = "torch-2.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:29b7009dba4b7a1c960260fc8ac85022c784250af43af9fb0ebafc9883782ebd"}, + {file = "torch-2.10.0-cp311-none-macosx_11_0_arm64.whl", hash = "sha256:b7bd80f3477b830dd166c707c5b0b82a898e7b16f59a7d9d42778dd058272e8b"}, + {file = "torch-2.10.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:5fd4117d89ffd47e3dcc71e71a22efac24828ad781c7e46aaaf56bf7f2796acf"}, + {file = "torch-2.10.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:787124e7db3b379d4f1ed54dd12ae7c741c16a4d29b49c0226a89bea50923ffb"}, + {file = "torch-2.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:2c66c61f44c5f903046cc696d088e21062644cbe541c7f1c4eaae88b2ad23547"}, + {file = "torch-2.10.0-cp312-none-macosx_11_0_arm64.whl", hash = "sha256:6d3707a61863d1c4d6ebba7be4ca320f42b869ee657e9b2c21c736bf17000294"}, + {file = "torch-2.10.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:5c4d217b14741e40776dd7074d9006fd28b8a97ef5654db959d8635b2fe5f29b"}, + {file = "torch-2.10.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:6b71486353fce0f9714ca0c9ef1c850a2ae766b409808acd58e9678a3edb7738"}, + {file = "torch-2.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:c2ee399c644dc92ef7bc0d4f7e74b5360c37cdbe7c5ba11318dda49ffac2bc57"}, + {file = "torch-2.10.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:3202429f58309b9fa96a614885eace4b7995729f44beb54d3e4a47773649d382"}, + {file = "torch-2.10.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:aae1b29cd68e50a9397f5ee897b9c24742e9e306f88a807a27d617f07adb3bd8"}, + {file = "torch-2.10.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:6021db85958db2f07ec94e1bc77212721ba4920c12a18dc552d2ae36a3eb163f"}, + {file = "torch-2.10.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ff43db38af76fda183156153983c9a096fc4c78d0cd1e07b14a2314c7f01c2c8"}, + {file = "torch-2.10.0-cp313-none-macosx_11_0_arm64.whl", hash = "sha256:cdf2a523d699b70d613243211ecaac14fe9c5df8a0b0a9c02add60fb2a413e0f"}, + {file = "torch-2.10.0-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:bf0d9ff448b0218e0433aeb198805192346c4fd659c852370d5cc245f602a06a"}, + {file = "torch-2.10.0-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:233aed0659a2503b831d8a67e9da66a62c996204c0bba4f4c442ccc0c68a3f60"}, + {file = "torch-2.10.0-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:682497e16bdfa6efeec8cde66531bc8d1fbbbb4d8788ec6173c089ed3cc2bfe5"}, + {file = "torch-2.10.0-cp314-cp314-win_amd64.whl", hash = "sha256:6528f13d2a8593a1a412ea07a99812495bec07e9224c28b2a25c0a30c7da025c"}, + {file = "torch-2.10.0-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:f5ab4ba32383061be0fb74bda772d470140a12c1c3b58a0cfbf3dae94d164c28"}, + {file = "torch-2.10.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:716b01a176c2a5659c98f6b01bf868244abdd896526f1c692712ab36dbaf9b63"}, + {file = "torch-2.10.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:d8f5912ba938233f86361e891789595ff35ca4b4e2ac8fe3670895e5976731d6"}, + {file = "torch-2.10.0-cp314-cp314t-win_amd64.whl", hash = "sha256:71283a373f0ee2c89e0f0d5f446039bdabe8dbc3c9ccf35f0f784908b0acd185"}, +] + +[package.dependencies] +cuda-bindings = {version = "12.9.4", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +filelock = "*" +fsspec = ">=0.8.5" +jinja2 = "*" +networkx = ">=2.5.1" +nvidia-cublas-cu12 = {version = "12.8.4.1", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-cuda-cupti-cu12 = {version = "12.8.90", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-cuda-nvrtc-cu12 = {version = "12.8.93", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-cuda-runtime-cu12 = {version = "12.8.90", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-cudnn-cu12 = {version = "9.10.2.21", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-cufft-cu12 = {version = "11.3.3.83", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-cufile-cu12 = {version = "1.13.1.3", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-curand-cu12 = {version = "10.3.9.90", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-cusolver-cu12 = {version = "11.7.3.90", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-cusparse-cu12 = {version = "12.5.8.93", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-cusparselt-cu12 = {version = "0.7.1", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-nccl-cu12 = {version = "2.27.5", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-nvjitlink-cu12 = {version = "12.8.93", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-nvshmem-cu12 = {version = "3.4.5", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +nvidia-nvtx-cu12 = {version = "12.8.90", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +setuptools = {version = "*", markers = "python_version >= \"3.12\""} +sympy = ">=1.13.3" +triton = {version = "3.6.0", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""} +typing-extensions = ">=4.10.0" + +[package.extras] +opt-einsum = ["opt-einsum (>=3.3)"] +optree = ["optree (>=0.13.0)"] +pyyaml = ["pyyaml"] + +[[package]] +name = "torchao" +version = "0.16.0" +description = "Package for applying ao techniques to GPU models" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "torchao-0.16.0-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2d6293a0c57c9dd505efb025a7189459d154965fbed000efd638cf299f9362dd"}, + {file = "torchao-0.16.0-py3-none-any.whl", hash = "sha256:d0a8d773351fd17b95fee81dfbcbf98577b567dcdbec47d221b0ee258432101d"}, +] + +[package.extras] +dev = ["bitsandbytes", "blobfile", "cmake (>=3.19.0,<4.0.0)", "diskcache", "expecttest", "fire", "hypothesis", "importlib_metadata", "lm_eval", "matplotlib", "ninja", "packaging", "pandas", "parameterized", "pre-commit", "pycocotools", "pytest (==8.4.2)", "pyyaml", "ruff (==0.11.6)", "sentencepiece", "tabulate", "tiktoken", "tqdm", "transformers", "unittest-xml-reporting"] + +[[package]] +name = "torchvision" +version = "0.25.0" +description = "image and video datasets and models for torch deep learning" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "torchvision-0.25.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a95c47abb817d4e90ea1a8e57bd0d728e3e6b533b3495ae77d84d883c4d11f56"}, + {file = "torchvision-0.25.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:acc339aba4a858192998c2b91f635827e40d9c469d9cf1455bafdda6e4c28ea4"}, + {file = "torchvision-0.25.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:0d9a3f925a081dd2ebb0b791249b687c2ef2c2717d027946654607494b9b64b6"}, + {file = "torchvision-0.25.0-cp310-cp310-win_amd64.whl", hash = "sha256:b57430fbe9e9b697418a395041bb615124d9c007710a2712fda6e35fb310f264"}, + {file = "torchvision-0.25.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:db74a551946b75d19f9996c419a799ffdf6a223ecf17c656f90da011f1d75b20"}, + {file = "torchvision-0.25.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:f49964f96644dbac2506dffe1a0a7ec0f2bf8cf7a588c3319fed26e6329ffdf3"}, + {file = "torchvision-0.25.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:153c0d2cbc34b7cf2da19d73450f24ba36d2b75ec9211b9962b5022fb9e4ecee"}, + {file = "torchvision-0.25.0-cp311-cp311-win_amd64.whl", hash = "sha256:ea580ffd6094cc01914ad32f8c8118174f18974629af905cea08cb6d5d48c7b7"}, + {file = "torchvision-0.25.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c2abe430c90b1d5e552680037d68da4eb80a5852ebb1c811b2b89d299b10573b"}, + {file = "torchvision-0.25.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:b75deafa2dfea3e2c2a525559b04783515e3463f6e830cb71de0fb7ea36fe233"}, + {file = "torchvision-0.25.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:f25aa9e380865b11ea6e9d99d84df86b9cc959f1a007cd966fc6f1ab2ed0e248"}, + {file = "torchvision-0.25.0-cp312-cp312-win_amd64.whl", hash = "sha256:f9c55ae8d673ab493325d1267cbd285bb94d56f99626c00ac4644de32a59ede3"}, + {file = "torchvision-0.25.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:24e11199e4d84ba9c5ee7825ebdf1cd37ce8deec225117f10243cae984ced3ec"}, + {file = "torchvision-0.25.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:5f271136d2d2c0b7a24c5671795c6e4fd8da4e0ea98aeb1041f62bc04c4370ef"}, + {file = "torchvision-0.25.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:855c0dc6d37f462482da7531c6788518baedca1e0847f3df42a911713acdfe52"}, + {file = "torchvision-0.25.0-cp313-cp313-win_amd64.whl", hash = "sha256:cef0196be31be421f6f462d1e9da1101be7332d91984caa6f8022e6c78a5877f"}, + {file = "torchvision-0.25.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a8f8061284395ce31bcd460f2169013382ccf411148ceb2ee38e718e9860f5a7"}, + {file = "torchvision-0.25.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:146d02c9876858420adf41f3189fe90e3d6a409cbfa65454c09f25fb33bf7266"}, + {file = "torchvision-0.25.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:c4d395cb2c4a2712f6eb93a34476cdf7aae74bb6ea2ea1917f858e96344b00aa"}, + {file = "torchvision-0.25.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5e6b449e9fa7d642142c0e27c41e5a43b508d57ed8e79b7c0a0c28652da8678c"}, + {file = "torchvision-0.25.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:620a236288d594dcec7634c754484542dc0a5c1b0e0b83a34bda5e91e9b7c3a1"}, + {file = "torchvision-0.25.0-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:0b5e7f50002a8145a98c5694a018e738c50e2972608310c7e88e1bd4c058f6ce"}, + {file = "torchvision-0.25.0-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:632db02300e83793812eee4f61ae6a2686dab10b4cfd628b620dc47747aa9d03"}, + {file = "torchvision-0.25.0-cp314-cp314-win_amd64.whl", hash = "sha256:d1abd5ed030c708f5dbf4812ad5f6fbe9384b63c40d6bd79f8df41a4a759a917"}, + {file = "torchvision-0.25.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ad9a8a5877782944d99186e4502a614770fe906626d76e9cd32446a0ac3075f2"}, + {file = "torchvision-0.25.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:40a122c3cf4d14b651f095e0f672b688dde78632783fc5cd3d4d5e4f6a828563"}, + {file = "torchvision-0.25.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:846890161b825b38aa85fc37fb3ba5eea74e7091ff28bab378287111483b6443"}, + {file = "torchvision-0.25.0-cp314-cp314t-win_amd64.whl", hash = "sha256:f07f01d27375ad89d72aa2b3f2180f07da95dd9d2e4c758e015c0acb2da72977"}, +] + +[package.dependencies] +numpy = "*" +pillow = ">=5.3.0,<8.3.dev0 || >=8.4.dev0" +torch = "2.10.0" + +[package.extras] +gdown = ["gdown (>=4.7.3)"] +scipy = ["scipy"] + +[[package]] +name = "tornado" +version = "6.5.4" +description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "tornado-6.5.4-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:d6241c1a16b1c9e4cc28148b1cda97dd1c6cb4fb7068ac1bedc610768dff0ba9"}, + {file = "tornado-6.5.4-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:2d50f63dda1d2cac3ae1fa23d254e16b5e38153758470e9956cbc3d813d40843"}, + {file = "tornado-6.5.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1cf66105dc6acb5af613c054955b8137e34a03698aa53272dbda4afe252be17"}, + {file = "tornado-6.5.4-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50ff0a58b0dc97939d29da29cd624da010e7f804746621c78d14b80238669335"}, + {file = "tornado-6.5.4-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5fb5e04efa54cf0baabdd10061eb4148e0be137166146fff835745f59ab9f7f"}, + {file = "tornado-6.5.4-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9c86b1643b33a4cd415f8d0fe53045f913bf07b4a3ef646b735a6a86047dda84"}, + {file = "tornado-6.5.4-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:6eb82872335a53dd063a4f10917b3efd28270b56a33db69009606a0312660a6f"}, + {file = "tornado-6.5.4-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6076d5dda368c9328ff41ab5d9dd3608e695e8225d1cd0fd1e006f05da3635a8"}, + {file = "tornado-6.5.4-cp39-abi3-win32.whl", hash = "sha256:1768110f2411d5cd281bac0a090f707223ce77fd110424361092859e089b38d1"}, + {file = "tornado-6.5.4-cp39-abi3-win_amd64.whl", hash = "sha256:fa07d31e0cd85c60713f2b995da613588aa03e1303d75705dca6af8babc18ddc"}, + {file = "tornado-6.5.4-cp39-abi3-win_arm64.whl", hash = "sha256:053e6e16701eb6cbe641f308f4c1a9541f91b6261991160391bfc342e8a551a1"}, + {file = "tornado-6.5.4.tar.gz", hash = "sha256:a22fa9047405d03260b483980635f0b041989d8bcc9a313f8fe18b411d84b1d7"}, +] + +[[package]] +name = "tqdm" +version = "4.67.3" +description = "Fast, Extensible Progress Meter" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "tqdm-4.67.3-py3-none-any.whl", hash = "sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf"}, + {file = "tqdm-4.67.3.tar.gz", hash = "sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[package.extras] +dev = ["nbval", "pytest (>=6)", "pytest-asyncio (>=0.24)", "pytest-cov", "pytest-timeout"] +discord = ["requests"] +notebook = ["ipywidgets (>=6)"] +slack = ["slack-sdk"] +telegram = ["requests"] + +[[package]] +name = "traitlets" +version = "5.14.3" +description = "Traitlets Python configuration system" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "traitlets-5.14.3-py3-none-any.whl", hash = "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f"}, + {file = "traitlets-5.14.3.tar.gz", hash = "sha256:9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7"}, +] + +[package.extras] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] +test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<8.2)", "pytest-mock", "pytest-mypy-testing"] + +[[package]] +name = "transformers" +version = "5.2.0" +description = "Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training." +optional = false +python-versions = ">=3.10.0" +groups = ["main"] +files = [ + {file = "transformers-5.2.0-py3-none-any.whl", hash = "sha256:9ecaf243dc45bee11a7d93f8caf03746accc0cb069181bbf4ad8566c53e854b4"}, + {file = "transformers-5.2.0.tar.gz", hash = "sha256:0088b8b46ccc9eff1a1dca72b5d618a5ee3b1befc3e418c9512b35dea9f9a650"}, +] + +[package.dependencies] +huggingface-hub = ">=1.3.0,<2.0" +numpy = ">=1.17" +packaging = ">=20.0" +pyyaml = ">=5.1" +regex = "!=2019.12.17" +safetensors = ">=0.4.3" +tokenizers = ">=0.22.0,<=0.23.0" +tqdm = ">=4.27" +typer-slim = "*" + +[package.extras] +accelerate = ["accelerate (>=1.1.0)"] +all = ["Pillow (>=10.0.1,<=15.0)", "accelerate (>=1.1.0)", "av", "blobfile", "jinja2 (>=3.1.0)", "jmespath (>=1.0.1)", "kernels (>=0.10.2,<0.11)", "librosa", "mistral-common[image] (>=1.8.8)", "num2words", "phonemizer", "protobuf", "pyctcdecode (>=0.4.0)", "sentencepiece (>=0.1.91,!=0.1.92)", "tiktoken", "timm (>=1.0.23)", "torch (>=2.4)", "torchaudio", "torchvision"] +audio = ["librosa", "phonemizer", "pyctcdecode (>=0.4.0)", "torchaudio"] +benchmark = ["optimum-benchmark (>=0.3.0)"] +chat-template = ["jinja2 (>=3.1.0)", "jmespath (>=1.0.1)"] +codecarbon = ["codecarbon (>=2.8.1)"] +deepspeed = ["accelerate (>=1.1.0)", "deepspeed (>=0.9.3)"] +deepspeed-testing = ["GitPython (<3.1.19)", "accelerate (>=1.1.0)", "accelerate (>=1.1.0)", "beautifulsoup4", "datasets (>=2.15.0)", "datasets (>=2.15.0)", "deepspeed (>=0.9.3)", "dill (<0.3.5)", "evaluate (>=0.4.6)", "faiss-cpu", "fastapi", "filelock", "libcst", "mistral-common[image] (>=1.8.8)", "nltk (<=3.8.1)", "openai (>=1.98.0)", "optuna", "parameterized (>=0.9)", "protobuf", "protobuf", "psutil", "pydantic (>=2)", "pytest (>=7.2.0,<9.0.0)", "pytest-asyncio (>=1.2.0)", "pytest-env", "pytest-order", "pytest-random-order", "pytest-rerunfailures (<16.0)", "pytest-rich", "pytest-timeout", "pytest-xdist", "rich", "rich", "rjieba", "rouge-score (!=0.0.7,!=0.0.8,!=0.1,!=0.1.1)", "ruff (==0.14.10)", "sacrebleu (>=1.4.12,<2.0.0)", "sacremoses", "sentencepiece (>=0.1.91,!=0.1.92)", "sentencepiece (>=0.1.91,!=0.1.92)", "starlette", "tensorboard", "timeout-decorator", "torch (>=2.4)", "urllib3 (<2.0.0)", "uvicorn"] +dev = ["GitPython (<3.1.19)", "Pillow (>=10.0.1,<=15.0)", "accelerate (>=1.1.0)", "accelerate (>=1.1.0)", "av", "beautifulsoup4", "blobfile", "datasets (>=2.15.0)", "datasets (>=2.15.0)", "dill (<0.3.5)", "evaluate (>=0.4.6)", "faiss-cpu", "fastapi", "filelock", "fugashi (>=1.0)", "ipadic (>=1.0.0,<2.0)", "jinja2 (>=3.1.0)", "jmespath (>=1.0.1)", "kernels (>=0.10.2,<0.11)", "libcst", "librosa", "mistral-common[image] (>=1.8.8)", "mistral-common[image] (>=1.8.8)", "nltk (<=3.8.1)", "num2words", "openai (>=1.98.0)", "parameterized (>=0.9)", "phonemizer", "protobuf", "protobuf", "psutil", "pyctcdecode (>=0.4.0)", "pydantic (>=2)", "pytest (>=7.2.0,<9.0.0)", "pytest-asyncio (>=1.2.0)", "pytest-env", "pytest-order", "pytest-random-order", "pytest-rerunfailures (<16.0)", "pytest-rich", "pytest-timeout", "pytest-xdist", "rhoknp (>=1.1.0,<1.3.1)", "rich", "rich", "rjieba", "rouge-score (!=0.0.7,!=0.0.8,!=0.1,!=0.1.1)", "ruff (==0.14.10)", "sacrebleu (>=1.4.12,<2.0.0)", "sacremoses", "scikit-learn", "sentencepiece (>=0.1.91,!=0.1.92)", "sentencepiece (>=0.1.91,!=0.1.92)", "starlette", "sudachidict_core (>=20220729)", "sudachipy (>=0.6.6)", "tensorboard", "tiktoken", "timeout-decorator", "timm (>=1.0.23)", "torch (>=2.4)", "torch (>=2.4)", "torchaudio", "torchvision", "unidic (>=1.0.2)", "unidic_lite (>=1.0.7)", "urllib3 (<2.0.0)", "uvicorn"] +integrations = ["codecarbon (>=2.8.1)", "kernels (>=0.10.2,<0.11)", "optuna", "ray[tune] (>=2.7.0)"] +ja = ["fugashi (>=1.0)", "ipadic (>=1.0.0,<2.0)", "rhoknp (>=1.1.0,<1.3.1)", "sudachidict_core (>=20220729)", "sudachipy (>=0.6.6)", "unidic (>=1.0.2)", "unidic_lite (>=1.0.7)"] +kernels = ["kernels (>=0.10.2,<0.11)"] +mistral-common = ["mistral-common[image] (>=1.8.8)"] +num2words = ["num2words"] +open-telemetry = ["opentelemetry-api", "opentelemetry-exporter-otlp", "opentelemetry-sdk"] +optuna = ["optuna"] +quality = ["GitPython (<3.1.19)", "datasets (>=2.15.0)", "libcst", "rich", "ruff (==0.14.10)", "urllib3 (<2.0.0)"] +ray = ["ray[tune] (>=2.7.0)"] +retrieval = ["datasets (>=2.15.0)", "faiss-cpu"] +sagemaker = ["sagemaker (>=2.31.0)"] +sentencepiece = ["protobuf", "sentencepiece (>=0.1.91,!=0.1.92)"] +serving = ["accelerate (>=1.1.0)", "fastapi", "openai (>=1.98.0)", "pydantic (>=2)", "rich", "starlette", "torch (>=2.4)", "uvicorn"] +sklearn = ["scikit-learn"] +testing = ["GitPython (<3.1.19)", "accelerate (>=1.1.0)", "beautifulsoup4", "datasets (>=2.15.0)", "datasets (>=2.15.0)", "dill (<0.3.5)", "evaluate (>=0.4.6)", "faiss-cpu", "fastapi", "filelock", "libcst", "mistral-common[image] (>=1.8.8)", "nltk (<=3.8.1)", "openai (>=1.98.0)", "parameterized (>=0.9)", "protobuf", "psutil", "pydantic (>=2)", "pytest (>=7.2.0,<9.0.0)", "pytest-asyncio (>=1.2.0)", "pytest-env", "pytest-order", "pytest-random-order", "pytest-rerunfailures (<16.0)", "pytest-rich", "pytest-timeout", "pytest-xdist", "rich", "rich", "rjieba", "rouge-score (!=0.0.7,!=0.0.8,!=0.1,!=0.1.1)", "ruff (==0.14.10)", "sacrebleu (>=1.4.12,<2.0.0)", "sacremoses", "sentencepiece (>=0.1.91,!=0.1.92)", "starlette", "tensorboard", "timeout-decorator", "torch (>=2.4)", "urllib3 (<2.0.0)", "uvicorn"] +tiktoken = ["blobfile", "tiktoken"] +timm = ["timm (>=1.0.23)"] +torch = ["accelerate (>=1.1.0)", "torch (>=2.4)"] +video = ["av"] +vision = ["Pillow (>=10.0.1,<=15.0)", "torchvision"] + +[[package]] +name = "triton" +version = "3.6.0" +description = "A language and compiler for custom Deep Learning operations" +optional = false +python-versions = "<3.15,>=3.10" +groups = ["main"] +files = [ + {file = "triton-3.6.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6c723cfb12f6842a0ae94ac307dba7e7a44741d720a40cf0e270ed4a4e3be781"}, + {file = "triton-3.6.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a6550fae429e0667e397e5de64b332d1e5695b73650ee75a6146e2e902770bea"}, + {file = "triton-3.6.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49df5ef37379c0c2b5c0012286f80174fcf0e073e5ade1ca9a86c36814553651"}, + {file = "triton-3.6.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e8e323d608e3a9bfcc2d9efcc90ceefb764a82b99dea12a86d643c72539ad5d3"}, + {file = "triton-3.6.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:374f52c11a711fd062b4bfbb201fd9ac0a5febd28a96fb41b4a0f51dde3157f4"}, + {file = "triton-3.6.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:74caf5e34b66d9f3a429af689c1c7128daba1d8208df60e81106b115c00d6fca"}, + {file = "triton-3.6.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:448e02fe6dc898e9e5aa89cf0ee5c371e99df5aa5e8ad976a80b93334f3494fd"}, + {file = "triton-3.6.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10c7f76c6e72d2ef08df639e3d0d30729112f47a56b0c81672edc05ee5116ac9"}, + {file = "triton-3.6.0-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1722e172d34e32abc3eb7711d0025bb69d7959ebea84e3b7f7a341cd7ed694d6"}, + {file = "triton-3.6.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d002e07d7180fd65e622134fbd980c9a3d4211fb85224b56a0a0efbd422ab72f"}, + {file = "triton-3.6.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ef5523241e7d1abca00f1d240949eebdd7c673b005edbbce0aca95b8191f1d43"}, + {file = "triton-3.6.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a17a5d5985f0ac494ed8a8e54568f092f7057ef60e1b0fa09d3fd1512064e803"}, + {file = "triton-3.6.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0b3a97e8ed304dfa9bd23bb41ca04cdf6b2e617d5e782a8653d616037a5d537d"}, + {file = "triton-3.6.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:46bd1c1af4b6704e554cad2eeb3b0a6513a980d470ccfa63189737340c7746a7"}, +] + +[package.extras] +build = ["cmake (>=3.20,<4.0)", "lit"] +tests = ["autopep8", "isort", "llnl-hatchet", "numpy", "pytest", "pytest-forked", "pytest-xdist", "scipy (>=1.7.1)"] +tutorials = ["matplotlib", "pandas", "tabulate"] + +[[package]] +name = "triton-windows" +version = "3.6.0.post25" +description = "A language and compiler for custom Deep Learning operations" +optional = false +python-versions = "<3.15,>=3.10" +groups = ["main"] +markers = "sys_platform == \"win32\" and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")" +files = [ + {file = "triton_windows-3.6.0.post25-cp310-cp310-win_amd64.whl", hash = "sha256:8c45b7f83eecb71c3aeded1da7914af0050bddda710f47a2cfae936d55fae0ca"}, + {file = "triton_windows-3.6.0.post25-cp311-cp311-win_amd64.whl", hash = "sha256:5dabf103499825379c9ba877da46a4c34296466a628b539249482ab6d970708e"}, + {file = "triton_windows-3.6.0.post25-cp312-cp312-win_amd64.whl", hash = "sha256:8361375ee4b5e0a4fe7a3c7fc2fde368ce74237396d8ff95c2e26983dd32e342"}, + {file = "triton_windows-3.6.0.post25-cp313-cp313-win_amd64.whl", hash = "sha256:d22e5f6f4896b43037d811910e2fcc5ff5f057b78f6094ab28999e4a21997b76"}, + {file = "triton_windows-3.6.0.post25-cp314-cp314-win_amd64.whl", hash = "sha256:6f4c4775b22cfb18e9c60aead83deb7b9b970624ae3c13cd26b9be80b5cb8cd8"}, +] + +[package.extras] +build = ["cmake (>=3.20,<4.0)", "lit"] +tests = ["autopep8", "isort", "llnl-hatchet", "numpy", "pytest", "pytest-forked", "pytest-xdist", "scipy (>=1.7.1)"] +tutorials = ["matplotlib", "pandas", "tabulate"] + +[[package]] +name = "trl" +version = "0.24.0" +description = "Train transformer language models with reinforcement learning." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "trl-0.24.0-py3-none-any.whl", hash = "sha256:a9145b7d4a4a33778de117bda48530f0cf5b2ac25acc07db80ad04836f490dfc"}, + {file = "trl-0.24.0.tar.gz", hash = "sha256:eee495223725d3da0596be2607581969db89ba0f7c00b075802addc31e61eac9"}, +] + +[package.dependencies] +accelerate = ">=1.4.0" +datasets = ">=3.0.0" +transformers = ">=4.56.1" + +[package.extras] +bco = ["joblib", "scikit-learn"] +deepspeed = ["deepspeed (>=0.14.4)"] +dev = ["Pillow", "bitsandbytes", "deepspeed (>=0.14.4)", "hf-doc-builder", "joblib", "liger-kernel (>=0.6.2)", "llm-blender (>=0.0.2)", "num2words (==0.5.14)", "openai (>=1.23.2)", "parameterized", "peft (>=0.8.0)", "pre-commit", "pytest", "pytest-cov", "pytest-rerunfailures (==15.1)", "pytest-xdist", "scikit-learn", "torchvision"] +judges = ["llm-blender (>=0.0.2)", "openai (>=1.23.2)"] +liger = ["liger-kernel (>=0.6.2)"] +math-verify = ["math-verify (>=0.5.2)"] +peft = ["peft (>=0.8.0)"] +quality = ["hf-doc-builder", "pre-commit"] +quantization = ["bitsandbytes"] +scikit = ["scikit-learn"] +test = ["parameterized", "pytest", "pytest-cov", "pytest-rerunfailures (==15.1)", "pytest-xdist"] +vllm = ["fastapi", "pydantic", "requests", "uvicorn", "vllm (==0.10.2)"] +vlm = ["Pillow", "num2words (==0.5.14)", "torchvision"] + +[[package]] +name = "typeguard" +version = "4.5.1" +description = "Run-time type checker for Python" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "typeguard-4.5.1-py3-none-any.whl", hash = "sha256:44d2bf329d49a244110a090b55f5f91aa82d9a9834ebfd30bcc73651e4a8cc40"}, + {file = "typeguard-4.5.1.tar.gz", hash = "sha256:f6f8ecbbc819c9bc749983cc67c02391e16a9b43b8b27f15dc70ed7c4a007274"}, +] + +[package.dependencies] +typing_extensions = ">=4.14.0" + +[[package]] +name = "typer" +version = "0.24.1" +description = "Typer, build great CLIs. Easy to code. Based on Python type hints." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "typer-0.24.1-py3-none-any.whl", hash = "sha256:112c1f0ce578bfb4cab9ffdabc68f031416ebcc216536611ba21f04e9aa84c9e"}, + {file = "typer-0.24.1.tar.gz", hash = "sha256:e39b4732d65fbdcde189ae76cf7cd48aeae72919dea1fdfc16593be016256b45"}, +] + +[package.dependencies] +annotated-doc = ">=0.0.2" +click = ">=8.2.1" +rich = ">=12.3.0" +shellingham = ">=1.3.0" + +[[package]] +name = "typer-slim" +version = "0.24.0" +description = "Typer, build great CLIs. Easy to code. Based on Python type hints." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "typer_slim-0.24.0-py3-none-any.whl", hash = "sha256:d5d7ee1ee2834d5020c7c616ed5e0d0f29b9a4b1dd283bdebae198ec09778d0e"}, + {file = "typer_slim-0.24.0.tar.gz", hash = "sha256:f0ed36127183f52ae6ced2ecb2521789995992c521a46083bfcdbb652d22ad34"}, +] + +[package.dependencies] +typer = ">=0.24.0" + +[[package]] +name = "typing-extensions" +version = "4.15.0" +description = "Backported and Experimental Type Hints for Python 3.9+" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548"}, + {file = "typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466"}, +] + +[[package]] +name = "typing-inspection" +version = "0.4.2" +description = "Runtime typing introspection tools" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7"}, + {file = "typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464"}, +] + +[package.dependencies] +typing-extensions = ">=4.12.0" + +[[package]] +name = "tyro" +version = "1.0.8" +description = "CLI interfaces & config objects, from types" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "tyro-1.0.8-py3-none-any.whl", hash = "sha256:abb6a4054f20616d9ca5181ba0c6ae0e35cf8f35ae0c78d3d4dbd1f678e0643d"}, + {file = "tyro-1.0.8.tar.gz", hash = "sha256:c22bf238ce029b8cc262759129fccfd968300c3761f00ce186570af3891e14bb"}, +] + +[package.dependencies] +docstring-parser = ">=0.15" +typeguard = ">=4.0.0" +typing-extensions = ">=4.13.0" + +[package.extras] +dev = ["attrs (>=21.4.0)", "coverage[toml] (>=6.5.0)", "eval-type-backport (>=0.1.3)", "ml-collections (>=0.1.0)", "msgspec (>=0.18.6)", "mypy (>=1.4.1)", "omegaconf (>=2.2.2)", "pydantic (>=2.5.2,!=2.10.0)", "pyright (>=1.1.349,!=1.1.379)", "pytest (>=7.1.2)", "pytest-cov (>=3.0.0)", "pytest-xdist (>=3.5.0)", "pyyaml (>=6.0)", "shtab (>=1.5.6)", "universal-pathlib (>=0.2.0)"] +dev-nn = ["attrs (>=21.4.0)", "coverage[toml] (>=6.5.0)", "eval-type-backport (>=0.1.3)", "flax (>=0.6.9) ; python_version >= \"3.10\" and python_version <= \"3.13\"", "ml-collections (>=0.1.0)", "msgspec (>=0.18.6)", "mypy (>=1.4.1)", "numpy (>=1.20.0)", "omegaconf (>=2.2.2)", "pydantic (>=2.5.2,!=2.10.0)", "pyright (>=1.1.349,!=1.1.379)", "pytest (>=7.1.2)", "pytest-cov (>=3.0.0)", "pytest-xdist (>=3.5.0)", "pyyaml (>=6.0)", "shtab (>=1.5.6)", "torch (>=1.10.0) ; python_version >= \"3.9\" and python_version <= \"3.13\"", "universal-pathlib (>=0.2.0)"] + +[[package]] +name = "tzdata" +version = "2025.3" +description = "Provider of IANA time zone data" +optional = false +python-versions = ">=2" +groups = ["main"] +files = [ + {file = "tzdata-2025.3-py2.py3-none-any.whl", hash = "sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1"}, + {file = "tzdata-2025.3.tar.gz", hash = "sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7"}, +] + +[[package]] +name = "uncalled-for" +version = "0.2.0" +description = "Async dependency injection for Python functions" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "uncalled_for-0.2.0-py3-none-any.whl", hash = "sha256:2c0bd338faff5f930918f79e7eb9ff48290df2cb05fcc0b40a7f334e55d4d85f"}, + {file = "uncalled_for-0.2.0.tar.gz", hash = "sha256:b4f8fdbcec328c5a113807d653e041c5094473dd4afa7c34599ace69ccb7e69f"}, +] + +[[package]] +name = "unsloth" +version = "2026.3.3" +description = "2-5X faster training, reinforcement learning & finetuning" +optional = false +python-versions = "<3.14,>=3.9" +groups = ["main"] +files = [ + {file = "unsloth-2026.3.3-py3-none-any.whl", hash = "sha256:9378fec4e9132bd0ff50822903eff52e346b19f01c86dbb26dd60a31a3dafb4c"}, + {file = "unsloth-2026.3.3.tar.gz", hash = "sha256:80cb3dd56381117175888cc7caa662ff160704a5cc39b44eee54f8d15ad8522a"}, +] + +[package.dependencies] +accelerate = ">=0.34.1" +bitsandbytes = ">=0.45.5,<0.46.0 || >0.46.0,<0.48.0 || >0.48.0" +datasets = ">=3.4.1,<4.0.dev0 || >4.1.0,<4.4.0" +diffusers = "*" +hf_transfer = "*" +huggingface_hub = ">=0.34.0" +numpy = "*" +packaging = "*" +peft = ">=0.18.0" +protobuf = "*" +psutil = "*" +sentencepiece = ">=0.2.0" +torch = ">=2.4.0" +torchvision = "*" +tqdm = "*" +transformers = ">=4.51.3,<4.52.0 || >4.52.0,<4.52.1 || >4.52.1,<4.52.2 || >4.52.2,<4.52.3 || >4.52.3,<4.53.0 || >4.53.0,<4.54.0 || >4.54.0,<4.55.0 || >4.55.0,<4.55.1 || >4.55.1,<4.57.0 || >4.57.0,<4.57.4 || >4.57.4,<4.57.5 || >4.57.5,<5.0.0 || >5.0.0,<5.1.0 || >5.1.0,<=5.2.0" +triton = {version = ">=3.0.0", markers = "\"linux\" in sys_platform"} +triton-windows = {version = "*", markers = "sys_platform == \"win32\" and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"} +trl = ">=0.18.2,<0.19.0 || >0.19.0,<=0.24.0" +tyro = "*" +unsloth_zoo = ">=2026.3.1" +wheel = ">=0.42.0" +xformers = {version = ">=0.0.27.post2", markers = "(\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"} + +[package.extras] +base = ["unsloth[huggingface]"] +colab = ["unsloth[cu121]"] +colab-ampere = ["unsloth[colab-ampere-torch220]", "unsloth[flashattention]"] +colab-ampere-torch211 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch211]", "unsloth[flashattention]", "unsloth[huggingface]"] +colab-ampere-torch220 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch220]", "unsloth[flashattention]", "unsloth[huggingface]"] +colab-new = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "datasets (>=3.4.1,<4.0.dev0 || >4.1.0,<4.4.0)", "hf_transfer", "huggingface_hub (>=0.34.0)", "numpy", "packaging", "protobuf", "psutil", "sentencepiece (>=0.2.0)", "tqdm", "transformers (>=4.51.3,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0,!=4.54.0,!=4.55.0,!=4.55.1,!=4.57.0,!=4.57.4,!=4.57.5,!=5.0.0,!=5.1.0,<=5.2.0)", "tyro", "unsloth[triton]", "unsloth_zoo (>=2026.3.1)", "wheel (>=0.42.0)"] +colab-no-deps = ["accelerate (>=0.34.1)", "bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "peft (>=0.18.0)", "protobuf", "trl (>=0.18.2,!=0.19.0,<=0.24.0)", "xformers (<0.0.27)"] +colab-torch211 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch211]", "unsloth[huggingface]"] +colab-torch220 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch220]", "unsloth[huggingface]"] +conda = ["unsloth[huggingface]"] +cu118 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118only]", "unsloth[huggingface]"] +cu118-ampere = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118only]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-ampere-torch211 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch211]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-ampere-torch220 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch220]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-ampere-torch230 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch230]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-ampere-torch240 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch240]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-ampere-torch250 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch250]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-ampere-torch251 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch251]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-ampere-torch260 = ["bitsandbytes (>=0.45.1)", "unsloth[cu118onlytorch260]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-ampere-torch270 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch270]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-ampere-torch271 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch271]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-ampere-torch280 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch280]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu118-torch211 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch211]", "unsloth[huggingface]"] +cu118-torch212 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch212]", "unsloth[huggingface]"] +cu118-torch220 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch220]", "unsloth[huggingface]"] +cu118-torch230 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch230]", "unsloth[huggingface]"] +cu118-torch240 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch240]", "unsloth[huggingface]"] +cu118-torch250 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch250]", "unsloth[huggingface]"] +cu118-torch251 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch251]", "unsloth[huggingface]"] +cu118-torch260 = ["bitsandbytes (>=0.45.1)", "unsloth[cu118onlytorch260]", "unsloth[huggingface]"] +cu118-torch270 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch270]", "unsloth[huggingface]"] +cu118-torch271 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch271]", "unsloth[huggingface]"] +cu118-torch280 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu118onlytorch280]", "unsloth[huggingface]"] +cu118only = ["xformers (==0.0.22.post7) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch211 = ["xformers (==0.0.23) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch212 = ["xformers (==0.0.23.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch220 = ["xformers (==0.0.24) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch230 = ["xformers (==0.0.27) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch240 = ["xformers (==0.0.27.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch250 = ["xformers (==0.0.28.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch251 = ["xformers (==0.0.29.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch260 = ["xformers (==0.0.29.post3) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch270 = ["xformers (==0.0.30) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch271 = ["xformers (==0.0.31.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu118onlytorch280 = ["xformers (==0.0.32.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu121 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121only]", "unsloth[huggingface]"] +cu121-ampere = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121only]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu121-ampere-torch211 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch211]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu121-ampere-torch220 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch220]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu121-ampere-torch230 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch230]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu121-ampere-torch240 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch240]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu121-ampere-torch250 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch250]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu121-ampere-torch251 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch251]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu121-torch211 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch211]", "unsloth[huggingface]"] +cu121-torch212 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch212]", "unsloth[huggingface]"] +cu121-torch220 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch220]", "unsloth[huggingface]"] +cu121-torch230 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch230]", "unsloth[huggingface]"] +cu121-torch240 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch240]", "unsloth[huggingface]"] +cu121-torch250 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch250]", "unsloth[huggingface]"] +cu121-torch251 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu121onlytorch251]", "unsloth[huggingface]"] +cu121only = ["xformers (==0.0.22.post7) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu121onlytorch211 = ["xformers (==0.0.23) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu121onlytorch212 = ["xformers (==0.0.23.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu121onlytorch220 = ["xformers (==0.0.24) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu121onlytorch230 = ["xformers (==0.0.27) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu121onlytorch240 = ["xformers (==0.0.27.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu121onlytorch250 = ["xformers (==0.0.28.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu121onlytorch251 = ["xformers (==0.0.29.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu124-ampere-torch240 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu124onlytorch240]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu124-ampere-torch250 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu124onlytorch250]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu124-ampere-torch251 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu124onlytorch251]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu124-ampere-torch260 = ["bitsandbytes (>=0.45.1)", "unsloth[cu124onlytorch260]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu124-torch240 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu124onlytorch240]", "unsloth[huggingface]"] +cu124-torch250 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu124onlytorch250]", "unsloth[huggingface]"] +cu124-torch251 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu124onlytorch251]", "unsloth[huggingface]"] +cu124-torch260 = ["bitsandbytes (>=0.45.1)", "unsloth[cu124onlytorch260]", "unsloth[huggingface]"] +cu124onlytorch250 = ["xformers (==0.0.28.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu124onlytorch251 = ["xformers (==0.0.29.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu124onlytorch260 = ["xformers (==0.0.29.post3) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu126-ampere-torch2100 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch2100]", "unsloth[huggingface]"] +cu126-ampere-torch260 = ["bitsandbytes (>=0.45.1)", "unsloth[cu126onlytorch260]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu126-ampere-torch270 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch270]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu126-ampere-torch271 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch271]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu126-ampere-torch280 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch280]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu126-ampere-torch290 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch290]", "unsloth[huggingface]"] +cu126-ampere-torch291 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch291]", "unsloth[huggingface]"] +cu126-torch2100 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch2100]", "unsloth[huggingface]"] +cu126-torch260 = ["bitsandbytes (>=0.45.1)", "unsloth[cu126onlytorch260]", "unsloth[huggingface]"] +cu126-torch270 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch270]", "unsloth[huggingface]"] +cu126-torch271 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch271]", "unsloth[huggingface]"] +cu126-torch280 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch280]", "unsloth[huggingface]"] +cu126-torch290 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch290]", "unsloth[huggingface]"] +cu126-torch291 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu126onlytorch291]", "unsloth[huggingface]"] +cu126onlytorch2100 = ["xformers (==0.0.34) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu126onlytorch260 = ["xformers (==0.0.29.post3) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu126onlytorch270 = ["xformers (==0.0.30) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu126onlytorch271 = ["xformers (==0.0.31.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu126onlytorch280 = ["xformers (==0.0.32.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu126onlytorch290 = ["xformers (==0.0.33.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu126onlytorch291 = ["xformers (==0.0.33.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu128-ampere-torch2100 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch2100]", "unsloth[huggingface]"] +cu128-ampere-torch270 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch270]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu128-ampere-torch271 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch271]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu128-ampere-torch280 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch280]", "unsloth[flashattention]", "unsloth[huggingface]"] +cu128-ampere-torch290 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch290]", "unsloth[huggingface]"] +cu128-ampere-torch291 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch291]", "unsloth[huggingface]"] +cu128-torch2100 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch2100]", "unsloth[huggingface]"] +cu128-torch270 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch270]", "unsloth[huggingface]"] +cu128-torch271 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch271]", "unsloth[huggingface]"] +cu128-torch280 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch280]", "unsloth[huggingface]"] +cu128-torch290 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch290]", "unsloth[huggingface]"] +cu128-torch291 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu128onlytorch291]", "unsloth[huggingface]"] +cu128onlytorch2100 = ["xformers (==0.0.34) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu128onlytorch270 = ["xformers (==0.0.30) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu128onlytorch271 = ["xformers (==0.0.31.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu128onlytorch280 = ["xformers (==0.0.32.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu128onlytorch290 = ["xformers (==0.0.33.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu128onlytorch291 = ["xformers (==0.0.33.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu130-ampere-torch2100 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu130onlytorch2100]", "unsloth[huggingface]"] +cu130-ampere-torch280 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu130onlytorch280]", "unsloth[huggingface]"] +cu130-ampere-torch290 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu130onlytorch290]", "unsloth[huggingface]"] +cu130-ampere-torch291 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu130onlytorch291]", "unsloth[huggingface]"] +cu130-torch2100 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu130onlytorch2100]", "unsloth[huggingface]"] +cu130-torch280 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu130onlytorch280]", "unsloth[huggingface]"] +cu130-torch290 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu130onlytorch290]", "unsloth[huggingface]"] +cu130-torch291 = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[cu130onlytorch291]", "unsloth[huggingface]"] +cu130onlytorch2100 = ["xformers (==0.0.34) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu130onlytorch290 = ["xformers (==0.0.33.post1) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +cu130onlytorch291 = ["xformers (==0.0.33.post2) ; (\"linux\" in sys_platform or sys_platform == \"win32\") and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")"] +flashattention = ["flash-attn (>=2.6.3) ; \"linux\" in sys_platform", "ninja ; \"linux\" in sys_platform", "packaging ; \"linux\" in sys_platform"] +huggingface = ["accelerate (>=0.34.1)", "datasets (>=3.4.1,<4.0.dev0 || >4.1.0,<4.4.0)", "diffusers", "hf_transfer", "huggingface_hub (>=0.34.0)", "numpy", "packaging", "peft (>=0.18.0)", "protobuf", "psutil", "sentencepiece (>=0.2.0)", "torchvision", "tqdm", "transformers (>=4.51.3,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0,!=4.54.0,!=4.55.0,!=4.55.1,!=4.57.0,!=4.57.4,!=4.57.5,!=5.0.0,!=5.1.0,<=5.2.0)", "trl (>=0.18.2,!=0.19.0,<=0.24.0)", "tyro", "unsloth_zoo (>=2026.3.1)", "wheel (>=0.42.0)"] +kaggle = ["unsloth[huggingface]"] +kaggle-new = ["bitsandbytes (>=0.45.5,!=0.46.0,!=0.48.0)", "unsloth[huggingface]"] + +[[package]] +name = "unsloth-zoo" +version = "2026.3.1" +description = "Utils for Unsloth" +optional = false +python-versions = "<3.15,>=3.9" +groups = ["main"] +files = [ + {file = "unsloth_zoo-2026.3.1-py3-none-any.whl", hash = "sha256:e41e4cefad55307025f72e79a9b961d8e82cc495b4a71780ee70997d88f42190"}, + {file = "unsloth_zoo-2026.3.1.tar.gz", hash = "sha256:3f1cdc21e06daf9f6be522dcfa2a125f4a76f12f0a760e0a40a27cc43800b165"}, +] + +[package.dependencies] +accelerate = ">=0.34.1" +cut_cross_entropy = {version = "*", markers = "python_version >= \"3.10\""} +datasets = ">=3.4.1,<4.0.dev0 || >4.1.0,<4.4.0" +filelock = "*" +hf_transfer = "*" +huggingface_hub = ">=0.34.0" +msgspec = "*" +numpy = "*" +packaging = ">=24.1" +peft = ">=0.18.0" +pillow = "*" +protobuf = "*" +psutil = "*" +regex = "*" +sentencepiece = ">=0.2.0" +torch = ">=2.4.0" +torchao = ">=0.13.0" +tqdm = "*" +transformers = ">=4.51.3,<4.52.0 || >4.52.0,<4.52.1 || >4.52.1,<4.52.2 || >4.52.2,<4.52.3 || >4.52.3,<4.53.0 || >4.53.0,<4.54.0 || >4.54.0,<4.55.0 || >4.55.0,<4.55.1 || >4.55.1,<4.57.4 || >4.57.4,<4.57.5 || >4.57.5,<5.0.0 || >5.0.0,<5.1.0 || >5.1.0,<=5.2.0" +triton = {version = ">=3.0.0", markers = "\"linux\" in sys_platform"} +trl = ">=0.18.2,<0.19.0 || >0.19.0,<=0.24.0" +typing_extensions = "*" +tyro = "*" +wheel = ">=0.42.0" + +[package.extras] +base = ["unsloth_zoo[huggingface]"] +core = ["accelerate (>=0.34.1)", "cut_cross_entropy ; python_version >= \"3.10\"", "datasets (>=3.4.1,<4.0.dev0 || >4.1.0,<4.4.0)", "filelock", "hf_transfer", "huggingface_hub (>=0.34.0)", "msgspec", "numpy", "packaging (>=24.1)", "peft (>=0.18.0)", "pillow", "protobuf", "psutil", "regex", "sentencepiece (>=0.2.0)", "tqdm", "transformers (>=4.51.3,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0,!=4.54.0,!=4.55.0,!=4.55.1,!=4.57.4,!=4.57.5,!=5.0.0,!=5.1.0,<=5.2.0)", "trl (>=0.18.2,!=0.19.0,<=0.24.0)", "typing_extensions", "tyro", "wheel (>=0.42.0)"] +huggingface = ["triton-windows ; sys_platform == \"win32\" and (platform_machine == \"AMD64\" or platform_machine == \"x86_64\")", "unsloth_zoo[core]"] +intelgpu = ["torch (>=2.4.0)", "triton (>=3.0.0) ; \"linux\" in sys_platform", "unsloth_zoo[core]"] + +[[package]] +name = "urllib3" +version = "2.6.3" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4"}, + {file = "urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed"}, +] + +[package.extras] +brotli = ["brotli (>=1.2.0) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=1.2.0.0) ; platform_python_implementation != \"CPython\""] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""] + +[[package]] +name = "uvicorn" +version = "0.41.0" +description = "The lightning-fast ASGI server." +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "uvicorn-0.41.0-py3-none-any.whl", hash = "sha256:29e35b1d2c36a04b9e180d4007ede3bcb32a85fbdfd6c6aeb3f26839de088187"}, + {file = "uvicorn-0.41.0.tar.gz", hash = "sha256:09d11cf7008da33113824ee5a1c6422d89fbc2ff476540d69a34c87fab8b571a"}, +] + +[package.dependencies] +click = ">=7.0" +h11 = ">=0.8" + +[package.extras] +standard = ["colorama (>=0.4) ; sys_platform == \"win32\"", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.15.1) ; sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\"", "watchfiles (>=0.20)", "websockets (>=10.4)"] + +[[package]] +name = "watchdog" +version = "6.0.0" +description = "Filesystem events monitoring" +optional = false +python-versions = ">=3.9" +groups = ["main"] +markers = "platform_system != \"Darwin\"" +files = [ + {file = "watchdog-6.0.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d1cdb490583ebd691c012b3d6dae011000fe42edb7a82ece80965b42abd61f26"}, + {file = "watchdog-6.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bc64ab3bdb6a04d69d4023b29422170b74681784ffb9463ed4870cf2f3e66112"}, + {file = "watchdog-6.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c897ac1b55c5a1461e16dae288d22bb2e412ba9807df8397a635d88f671d36c3"}, + {file = "watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c"}, + {file = "watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2"}, + {file = "watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c"}, + {file = "watchdog-6.0.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948"}, + {file = "watchdog-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860"}, + {file = "watchdog-6.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0"}, + {file = "watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c"}, + {file = "watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134"}, + {file = "watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b"}, + {file = "watchdog-6.0.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e6f0e77c9417e7cd62af82529b10563db3423625c5fce018430b249bf977f9e8"}, + {file = "watchdog-6.0.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:90c8e78f3b94014f7aaae121e6b909674df5b46ec24d6bebc45c44c56729af2a"}, + {file = "watchdog-6.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e7631a77ffb1f7d2eefa4445ebbee491c720a5661ddf6df3498ebecae5ed375c"}, + {file = "watchdog-6.0.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:c7ac31a19f4545dd92fc25d200694098f42c9a8e391bc00bdd362c5736dbf881"}, + {file = "watchdog-6.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:9513f27a1a582d9808cf21a07dae516f0fab1cf2d7683a742c498b93eedabb11"}, + {file = "watchdog-6.0.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7a0e56874cfbc4b9b05c60c8a1926fedf56324bb08cfbc188969777940aef3aa"}, + {file = "watchdog-6.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:e6439e374fc012255b4ec786ae3c4bc838cd7309a540e5fe0952d03687d8804e"}, + {file = "watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13"}, + {file = "watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379"}, + {file = "watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e"}, + {file = "watchdog-6.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f"}, + {file = "watchdog-6.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26"}, + {file = "watchdog-6.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c"}, + {file = "watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2"}, + {file = "watchdog-6.0.0-py3-none-win32.whl", hash = "sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a"}, + {file = "watchdog-6.0.0-py3-none-win_amd64.whl", hash = "sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680"}, + {file = "watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f"}, + {file = "watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282"}, +] + +[package.extras] +watchmedo = ["PyYAML (>=3.10)"] + +[[package]] +name = "watchfiles" +version = "1.1.1" +description = "Simple, modern and high performance file watching and code reload in python." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "watchfiles-1.1.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:eef58232d32daf2ac67f42dea51a2c80f0d03379075d44a587051e63cc2e368c"}, + {file = "watchfiles-1.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:03fa0f5237118a0c5e496185cafa92878568b652a2e9a9382a5151b1a0380a43"}, + {file = "watchfiles-1.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8ca65483439f9c791897f7db49202301deb6e15fe9f8fe2fed555bf986d10c31"}, + {file = "watchfiles-1.1.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f0ab1c1af0cb38e3f598244c17919fb1a84d1629cc08355b0074b6d7f53138ac"}, + {file = "watchfiles-1.1.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3bc570d6c01c206c46deb6e935a260be44f186a2f05179f52f7fcd2be086a94d"}, + {file = "watchfiles-1.1.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e84087b432b6ac94778de547e08611266f1f8ffad28c0ee4c82e028b0fc5966d"}, + {file = "watchfiles-1.1.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:620bae625f4cb18427b1bb1a2d9426dc0dd5a5ba74c7c2cdb9de405f7b129863"}, + {file = "watchfiles-1.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:544364b2b51a9b0c7000a4b4b02f90e9423d97fbbf7e06689236443ebcad81ab"}, + {file = "watchfiles-1.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:bbe1ef33d45bc71cf21364df962af171f96ecaeca06bd9e3d0b583efb12aec82"}, + {file = "watchfiles-1.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1a0bb430adb19ef49389e1ad368450193a90038b5b752f4ac089ec6942c4dff4"}, + {file = "watchfiles-1.1.1-cp310-cp310-win32.whl", hash = "sha256:3f6d37644155fb5beca5378feb8c1708d5783145f2a0f1c4d5a061a210254844"}, + {file = "watchfiles-1.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:a36d8efe0f290835fd0f33da35042a1bb5dc0e83cbc092dcf69bce442579e88e"}, + {file = "watchfiles-1.1.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:f57b396167a2565a4e8b5e56a5a1c537571733992b226f4f1197d79e94cf0ae5"}, + {file = "watchfiles-1.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:421e29339983e1bebc281fab40d812742268ad057db4aee8c4d2bce0af43b741"}, + {file = "watchfiles-1.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e43d39a741e972bab5d8100b5cdacf69db64e34eb19b6e9af162bccf63c5cc6"}, + {file = "watchfiles-1.1.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f537afb3276d12814082a2e9b242bdcf416c2e8fd9f799a737990a1dbe906e5b"}, + {file = "watchfiles-1.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2cd9e04277e756a2e2d2543d65d1e2166d6fd4c9b183f8808634fda23f17b14"}, + {file = "watchfiles-1.1.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5f3f58818dc0b07f7d9aa7fe9eb1037aecb9700e63e1f6acfed13e9fef648f5d"}, + {file = "watchfiles-1.1.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bb9f66367023ae783551042d31b1d7fd422e8289eedd91f26754a66f44d5cff"}, + {file = "watchfiles-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aebfd0861a83e6c3d1110b78ad54704486555246e542be3e2bb94195eabb2606"}, + {file = "watchfiles-1.1.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:5fac835b4ab3c6487b5dbad78c4b3724e26bcc468e886f8ba8cc4306f68f6701"}, + {file = "watchfiles-1.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:399600947b170270e80134ac854e21b3ccdefa11a9529a3decc1327088180f10"}, + {file = "watchfiles-1.1.1-cp311-cp311-win32.whl", hash = "sha256:de6da501c883f58ad50db3a32ad397b09ad29865b5f26f64c24d3e3281685849"}, + {file = "watchfiles-1.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:35c53bd62a0b885bf653ebf6b700d1bf05debb78ad9292cf2a942b23513dc4c4"}, + {file = "watchfiles-1.1.1-cp311-cp311-win_arm64.whl", hash = "sha256:57ca5281a8b5e27593cb7d82c2ac927ad88a96ed406aa446f6344e4328208e9e"}, + {file = "watchfiles-1.1.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:8c89f9f2f740a6b7dcc753140dd5e1ab9215966f7a3530d0c0705c83b401bd7d"}, + {file = "watchfiles-1.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bd404be08018c37350f0d6e34676bd1e2889990117a2b90070b3007f172d0610"}, + {file = "watchfiles-1.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8526e8f916bb5b9a0a777c8317c23ce65de259422bba5b31325a6fa6029d33af"}, + {file = "watchfiles-1.1.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2edc3553362b1c38d9f06242416a5d8e9fe235c204a4072e988ce2e5bb1f69f6"}, + {file = "watchfiles-1.1.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30f7da3fb3f2844259cba4720c3fc7138eb0f7b659c38f3bfa65084c7fc7abce"}, + {file = "watchfiles-1.1.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8979280bdafff686ba5e4d8f97840f929a87ed9cdf133cbbd42f7766774d2aa"}, + {file = "watchfiles-1.1.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dcc5c24523771db3a294c77d94771abcfcb82a0e0ee8efd910c37c59ec1b31bb"}, + {file = "watchfiles-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db5d7ae38ff20153d542460752ff397fcf5c96090c1230803713cf3147a6803"}, + {file = "watchfiles-1.1.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:28475ddbde92df1874b6c5c8aaeb24ad5be47a11f87cde5a28ef3835932e3e94"}, + {file = "watchfiles-1.1.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:36193ed342f5b9842edd3532729a2ad55c4160ffcfa3700e0d54be496b70dd43"}, + {file = "watchfiles-1.1.1-cp312-cp312-win32.whl", hash = "sha256:859e43a1951717cc8de7f4c77674a6d389b106361585951d9e69572823f311d9"}, + {file = "watchfiles-1.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:91d4c9a823a8c987cce8fa2690923b069966dabb196dd8d137ea2cede885fde9"}, + {file = "watchfiles-1.1.1-cp312-cp312-win_arm64.whl", hash = "sha256:a625815d4a2bdca61953dbba5a39d60164451ef34c88d751f6c368c3ea73d404"}, + {file = "watchfiles-1.1.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:130e4876309e8686a5e37dba7d5e9bc77e6ed908266996ca26572437a5271e18"}, + {file = "watchfiles-1.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5f3bde70f157f84ece3765b42b4a52c6ac1a50334903c6eaf765362f6ccca88a"}, + {file = "watchfiles-1.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14e0b1fe858430fc0251737ef3824c54027bedb8c37c38114488b8e131cf8219"}, + {file = "watchfiles-1.1.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f27db948078f3823a6bb3b465180db8ebecf26dd5dae6f6180bd87383b6b4428"}, + {file = "watchfiles-1.1.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:059098c3a429f62fc98e8ec62b982230ef2c8df68c79e826e37b895bc359a9c0"}, + {file = "watchfiles-1.1.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bfb5862016acc9b869bb57284e6cb35fdf8e22fe59f7548858e2f971d045f150"}, + {file = "watchfiles-1.1.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:319b27255aacd9923b8a276bb14d21a5f7ff82564c744235fc5eae58d95422ae"}, + {file = "watchfiles-1.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c755367e51db90e75b19454b680903631d41f9e3607fbd941d296a020c2d752d"}, + {file = "watchfiles-1.1.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c22c776292a23bfc7237a98f791b9ad3144b02116ff10d820829ce62dff46d0b"}, + {file = "watchfiles-1.1.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:3a476189be23c3686bc2f4321dd501cb329c0a0469e77b7b534ee10129ae6374"}, + {file = "watchfiles-1.1.1-cp313-cp313-win32.whl", hash = "sha256:bf0a91bfb5574a2f7fc223cf95eeea79abfefa404bf1ea5e339c0c1560ae99a0"}, + {file = "watchfiles-1.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:52e06553899e11e8074503c8e716d574adeeb7e68913115c4b3653c53f9bae42"}, + {file = "watchfiles-1.1.1-cp313-cp313-win_arm64.whl", hash = "sha256:ac3cc5759570cd02662b15fbcd9d917f7ecd47efe0d6b40474eafd246f91ea18"}, + {file = "watchfiles-1.1.1-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:563b116874a9a7ce6f96f87cd0b94f7faf92d08d0021e837796f0a14318ef8da"}, + {file = "watchfiles-1.1.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3ad9fe1dae4ab4212d8c91e80b832425e24f421703b5a42ef2e4a1e215aff051"}, + {file = "watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce70f96a46b894b36eba678f153f052967a0d06d5b5a19b336ab0dbbd029f73e"}, + {file = "watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cb467c999c2eff23a6417e58d75e5828716f42ed8289fe6b77a7e5a91036ca70"}, + {file = "watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:836398932192dae4146c8f6f737d74baeac8b70ce14831a239bdb1ca882fc261"}, + {file = "watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:743185e7372b7bc7c389e1badcc606931a827112fbbd37f14c537320fca08620"}, + {file = "watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:afaeff7696e0ad9f02cbb8f56365ff4686ab205fcf9c4c5b6fdfaaa16549dd04"}, + {file = "watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f7eb7da0eb23aa2ba036d4f616d46906013a68caf61b7fdbe42fc8b25132e77"}, + {file = "watchfiles-1.1.1-cp313-cp313t-musllinux_1_1_aarch64.whl", hash = "sha256:831a62658609f0e5c64178211c942ace999517f5770fe9436be4c2faeba0c0ef"}, + {file = "watchfiles-1.1.1-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:f9a2ae5c91cecc9edd47e041a930490c31c3afb1f5e6d71de3dc671bfaca02bf"}, + {file = "watchfiles-1.1.1-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:d1715143123baeeaeadec0528bb7441103979a1d5f6fd0e1f915383fea7ea6d5"}, + {file = "watchfiles-1.1.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:39574d6370c4579d7f5d0ad940ce5b20db0e4117444e39b6d8f99db5676c52fd"}, + {file = "watchfiles-1.1.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7365b92c2e69ee952902e8f70f3ba6360d0d596d9299d55d7d386df84b6941fb"}, + {file = "watchfiles-1.1.1-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bfff9740c69c0e4ed32416f013f3c45e2ae42ccedd1167ef2d805c000b6c71a5"}, + {file = "watchfiles-1.1.1-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b27cf2eb1dda37b2089e3907d8ea92922b673c0c427886d4edc6b94d8dfe5db3"}, + {file = "watchfiles-1.1.1-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:526e86aced14a65a5b0ec50827c745597c782ff46b571dbfe46192ab9e0b3c33"}, + {file = "watchfiles-1.1.1-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:04e78dd0b6352db95507fd8cb46f39d185cf8c74e4cf1e4fbad1d3df96faf510"}, + {file = "watchfiles-1.1.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c85794a4cfa094714fb9c08d4a218375b2b95b8ed1666e8677c349906246c05"}, + {file = "watchfiles-1.1.1-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:74d5012b7630714b66be7b7b7a78855ef7ad58e8650c73afc4c076a1f480a8d6"}, + {file = "watchfiles-1.1.1-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:8fbe85cb3201c7d380d3d0b90e63d520f15d6afe217165d7f98c9c649654db81"}, + {file = "watchfiles-1.1.1-cp314-cp314-win32.whl", hash = "sha256:3fa0b59c92278b5a7800d3ee7733da9d096d4aabcfabb9a928918bd276ef9b9b"}, + {file = "watchfiles-1.1.1-cp314-cp314-win_amd64.whl", hash = "sha256:c2047d0b6cea13b3316bdbafbfa0c4228ae593d995030fda39089d36e64fc03a"}, + {file = "watchfiles-1.1.1-cp314-cp314-win_arm64.whl", hash = "sha256:842178b126593addc05acf6fce960d28bc5fae7afbaa2c6c1b3a7b9460e5be02"}, + {file = "watchfiles-1.1.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:88863fbbc1a7312972f1c511f202eb30866370ebb8493aef2812b9ff28156a21"}, + {file = "watchfiles-1.1.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:55c7475190662e202c08c6c0f4d9e345a29367438cf8e8037f3155e10a88d5a5"}, + {file = "watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f53fa183d53a1d7a8852277c92b967ae99c2d4dcee2bfacff8868e6e30b15f7"}, + {file = "watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6aae418a8b323732fa89721d86f39ec8f092fc2af67f4217a2b07fd3e93c6101"}, + {file = "watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f096076119da54a6080e8920cbdaac3dbee667eb91dcc5e5b78840b87415bd44"}, + {file = "watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00485f441d183717038ed2e887a7c868154f216877653121068107b227a2f64c"}, + {file = "watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a55f3e9e493158d7bfdb60a1165035f1cf7d320914e7b7ea83fe22c6023b58fc"}, + {file = "watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c91ed27800188c2ae96d16e3149f199d62f86c7af5f5f4d2c61a3ed8cd3666c"}, + {file = "watchfiles-1.1.1-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:311ff15a0bae3714ffb603e6ba6dbfba4065ab60865d15a6ec544133bdb21099"}, + {file = "watchfiles-1.1.1-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:a916a2932da8f8ab582f242c065f5c81bed3462849ca79ee357dd9551b0e9b01"}, + {file = "watchfiles-1.1.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c882d69f6903ef6092bedfb7be973d9319940d56b8427ab9187d1ecd73438a70"}, + {file = "watchfiles-1.1.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d6ff426a7cb54f310d51bfe83fe9f2bbe40d540c741dc974ebc30e6aa238f52e"}, + {file = "watchfiles-1.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79ff6c6eadf2e3fc0d7786331362e6ef1e51125892c75f1004bd6b52155fb956"}, + {file = "watchfiles-1.1.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c1f5210f1b8fc91ead1283c6fd89f70e76fb07283ec738056cf34d51e9c1d62c"}, + {file = "watchfiles-1.1.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b9c4702f29ca48e023ffd9b7ff6b822acdf47cb1ff44cb490a3f1d5ec8987e9c"}, + {file = "watchfiles-1.1.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:acb08650863767cbc58bca4813b92df4d6c648459dcaa3d4155681962b2aa2d3"}, + {file = "watchfiles-1.1.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:08af70fd77eee58549cd69c25055dc344f918d992ff626068242259f98d598a2"}, + {file = "watchfiles-1.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c3631058c37e4a0ec440bf583bc53cdbd13e5661bb6f465bc1d88ee9a0a4d02"}, + {file = "watchfiles-1.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:cf57a27fb986c6243d2ee78392c503826056ffe0287e8794503b10fb51b881be"}, + {file = "watchfiles-1.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d7e7067c98040d646982daa1f37a33d3544138ea155536c2e0e63e07ff8a7e0f"}, + {file = "watchfiles-1.1.1-cp39-cp39-win32.whl", hash = "sha256:6c9c9262f454d1c4d8aaa7050121eb4f3aea197360553699520767daebf2180b"}, + {file = "watchfiles-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:74472234c8370669850e1c312490f6026d132ca2d396abfad8830b4f1c096957"}, + {file = "watchfiles-1.1.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:17ef139237dfced9da49fb7f2232c86ca9421f666d78c264c7ffca6601d154c3"}, + {file = "watchfiles-1.1.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:672b8adf25b1a0d35c96b5888b7b18699d27d4194bac8beeae75be4b7a3fc9b2"}, + {file = "watchfiles-1.1.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77a13aea58bc2b90173bc69f2a90de8e282648939a00a602e1dc4ee23e26b66d"}, + {file = "watchfiles-1.1.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b495de0bb386df6a12b18335a0285dda90260f51bdb505503c02bcd1ce27a8b"}, + {file = "watchfiles-1.1.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:db476ab59b6765134de1d4fe96a1a9c96ddf091683599be0f26147ea1b2e4b88"}, + {file = "watchfiles-1.1.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:89eef07eee5e9d1fda06e38822ad167a044153457e6fd997f8a858ab7564a336"}, + {file = "watchfiles-1.1.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce19e06cbda693e9e7686358af9cd6f5d61312ab8b00488bc36f5aabbaf77e24"}, + {file = "watchfiles-1.1.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e6f39af2eab0118338902798b5aa6664f46ff66bc0280de76fca67a7f262a49"}, + {file = "watchfiles-1.1.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:cdab464fee731e0884c35ae3588514a9bcf718d0e2c82169c1c4a85cc19c3c7f"}, + {file = "watchfiles-1.1.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:3dbd8cbadd46984f802f6d479b7e3afa86c42d13e8f0f322d669d79722c8ec34"}, + {file = "watchfiles-1.1.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5524298e3827105b61951a29c3512deb9578586abf3a7c5da4a8069df247cccc"}, + {file = "watchfiles-1.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b943d3668d61cfa528eb949577479d3b077fd25fb83c641235437bc0b5bc60e"}, + {file = "watchfiles-1.1.1.tar.gz", hash = "sha256:a173cb5c16c4f40ab19cecf48a534c409f7ea983ab8fed0741304a1c0a31b3f2"}, +] + +[package.dependencies] +anyio = ">=3.0.0" + +[[package]] +name = "wcwidth" +version = "0.6.0" +description = "Measures the displayed width of unicode strings in a terminal" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "wcwidth-0.6.0-py3-none-any.whl", hash = "sha256:1a3a1e510b553315f8e146c54764f4fb6264ffad731b3d78088cdb1478ffbdad"}, + {file = "wcwidth-0.6.0.tar.gz", hash = "sha256:cdc4e4262d6ef9a1a57e018384cbeb1208d8abbc64176027e2c2455c81313159"}, +] + +[[package]] +name = "websockets" +version = "16.0" +description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "websockets-16.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:04cdd5d2d1dacbad0a7bf36ccbcd3ccd5a30ee188f2560b7a62a30d14107b31a"}, + {file = "websockets-16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8ff32bb86522a9e5e31439a58addbb0166f0204d64066fb955265c4e214160f0"}, + {file = "websockets-16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:583b7c42688636f930688d712885cf1531326ee05effd982028212ccc13e5957"}, + {file = "websockets-16.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7d837379b647c0c4c2355c2499723f82f1635fd2c26510e1f587d89bc2199e72"}, + {file = "websockets-16.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:df57afc692e517a85e65b72e165356ed1df12386ecb879ad5693be08fac65dde"}, + {file = "websockets-16.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2b9f1e0d69bc60a4a87349d50c09a037a2607918746f07de04df9e43252c77a3"}, + {file = "websockets-16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:335c23addf3d5e6a8633f9f8eda77efad001671e80b95c491dd0924587ece0b3"}, + {file = "websockets-16.0-cp310-cp310-win32.whl", hash = "sha256:37b31c1623c6605e4c00d466c9d633f9b812ea430c11c8a278774a1fde1acfa9"}, + {file = "websockets-16.0-cp310-cp310-win_amd64.whl", hash = "sha256:8e1dab317b6e77424356e11e99a432b7cb2f3ec8c5ab4dabbcee6add48f72b35"}, + {file = "websockets-16.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:31a52addea25187bde0797a97d6fc3d2f92b6f72a9370792d65a6e84615ac8a8"}, + {file = "websockets-16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:417b28978cdccab24f46400586d128366313e8a96312e4b9362a4af504f3bbad"}, + {file = "websockets-16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:af80d74d4edfa3cb9ed973a0a5ba2b2a549371f8a741e0800cb07becdd20f23d"}, + {file = "websockets-16.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:08d7af67b64d29823fed316505a89b86705f2b7981c07848fb5e3ea3020c1abe"}, + {file = "websockets-16.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7be95cfb0a4dae143eaed2bcba8ac23f4892d8971311f1b06f3c6b78952ee70b"}, + {file = "websockets-16.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d6297ce39ce5c2e6feb13c1a996a2ded3b6832155fcfc920265c76f24c7cceb5"}, + {file = "websockets-16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1c1b30e4f497b0b354057f3467f56244c603a79c0d1dafce1d16c283c25f6e64"}, + {file = "websockets-16.0-cp311-cp311-win32.whl", hash = "sha256:5f451484aeb5cafee1ccf789b1b66f535409d038c56966d6101740c1614b86c6"}, + {file = "websockets-16.0-cp311-cp311-win_amd64.whl", hash = "sha256:8d7f0659570eefb578dacde98e24fb60af35350193e4f56e11190787bee77dac"}, + {file = "websockets-16.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:71c989cbf3254fbd5e84d3bff31e4da39c43f884e64f2551d14bb3c186230f00"}, + {file = "websockets-16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8b6e209ffee39ff1b6d0fa7bfef6de950c60dfb91b8fcead17da4ee539121a79"}, + {file = "websockets-16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:86890e837d61574c92a97496d590968b23c2ef0aeb8a9bc9421d174cd378ae39"}, + {file = "websockets-16.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9b5aca38b67492ef518a8ab76851862488a478602229112c4b0d58d63a7a4d5c"}, + {file = "websockets-16.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e0334872c0a37b606418ac52f6ab9cfd17317ac26365f7f65e203e2d0d0d359f"}, + {file = "websockets-16.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a0b31e0b424cc6b5a04b8838bbaec1688834b2383256688cf47eb97412531da1"}, + {file = "websockets-16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:485c49116d0af10ac698623c513c1cc01c9446c058a4e61e3bf6c19dff7335a2"}, + {file = "websockets-16.0-cp312-cp312-win32.whl", hash = "sha256:eaded469f5e5b7294e2bdca0ab06becb6756ea86894a47806456089298813c89"}, + {file = "websockets-16.0-cp312-cp312-win_amd64.whl", hash = "sha256:5569417dc80977fc8c2d43a86f78e0a5a22fee17565d78621b6bb264a115d4ea"}, + {file = "websockets-16.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:878b336ac47938b474c8f982ac2f7266a540adc3fa4ad74ae96fea9823a02cc9"}, + {file = "websockets-16.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:52a0fec0e6c8d9a784c2c78276a48a2bdf099e4ccc2a4cad53b27718dbfd0230"}, + {file = "websockets-16.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e6578ed5b6981005df1860a56e3617f14a6c307e6a71b4fff8c48fdc50f3ed2c"}, + {file = "websockets-16.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:95724e638f0f9c350bb1c2b0a7ad0e83d9cc0c9259f3ea94e40d7b02a2179ae5"}, + {file = "websockets-16.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c0204dc62a89dc9d50d682412c10b3542d748260d743500a85c13cd1ee4bde82"}, + {file = "websockets-16.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:52ac480f44d32970d66763115edea932f1c5b1312de36df06d6b219f6741eed8"}, + {file = "websockets-16.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6e5a82b677f8f6f59e8dfc34ec06ca6b5b48bc4fcda346acd093694cc2c24d8f"}, + {file = "websockets-16.0-cp313-cp313-win32.whl", hash = "sha256:abf050a199613f64c886ea10f38b47770a65154dc37181bfaff70c160f45315a"}, + {file = "websockets-16.0-cp313-cp313-win_amd64.whl", hash = "sha256:3425ac5cf448801335d6fdc7ae1eb22072055417a96cc6b31b3861f455fbc156"}, + {file = "websockets-16.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8cc451a50f2aee53042ac52d2d053d08bf89bcb31ae799cb4487587661c038a0"}, + {file = "websockets-16.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:daa3b6ff70a9241cf6c7fc9e949d41232d9d7d26fd3522b1ad2b4d62487e9904"}, + {file = "websockets-16.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:fd3cb4adb94a2a6e2b7c0d8d05cb94e6f1c81a0cf9dc2694fb65c7e8d94c42e4"}, + {file = "websockets-16.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:781caf5e8eee67f663126490c2f96f40906594cb86b408a703630f95550a8c3e"}, + {file = "websockets-16.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:caab51a72c51973ca21fa8a18bd8165e1a0183f1ac7066a182ff27107b71e1a4"}, + {file = "websockets-16.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:19c4dc84098e523fd63711e563077d39e90ec6702aff4b5d9e344a60cb3c0cb1"}, + {file = "websockets-16.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:a5e18a238a2b2249c9a9235466b90e96ae4795672598a58772dd806edc7ac6d3"}, + {file = "websockets-16.0-cp314-cp314-win32.whl", hash = "sha256:a069d734c4a043182729edd3e9f247c3b2a4035415a9172fd0f1b71658a320a8"}, + {file = "websockets-16.0-cp314-cp314-win_amd64.whl", hash = "sha256:c0ee0e63f23914732c6d7e0cce24915c48f3f1512ec1d079ed01fc629dab269d"}, + {file = "websockets-16.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:a35539cacc3febb22b8f4d4a99cc79b104226a756aa7400adc722e83b0d03244"}, + {file = "websockets-16.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:b784ca5de850f4ce93ec85d3269d24d4c82f22b7212023c974c401d4980ebc5e"}, + {file = "websockets-16.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:569d01a4e7fba956c5ae4fc988f0d4e187900f5497ce46339c996dbf24f17641"}, + {file = "websockets-16.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:50f23cdd8343b984957e4077839841146f67a3d31ab0d00e6b824e74c5b2f6e8"}, + {file = "websockets-16.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:152284a83a00c59b759697b7f9e9cddf4e3c7861dd0d964b472b70f78f89e80e"}, + {file = "websockets-16.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:bc59589ab64b0022385f429b94697348a6a234e8ce22544e3681b2e9331b5944"}, + {file = "websockets-16.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:32da954ffa2814258030e5a57bc73a3635463238e797c7375dc8091327434206"}, + {file = "websockets-16.0-cp314-cp314t-win32.whl", hash = "sha256:5a4b4cc550cb665dd8a47f868c8d04c8230f857363ad3c9caf7a0c3bf8c61ca6"}, + {file = "websockets-16.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b14dc141ed6d2dde437cddb216004bcac6a1df0935d79656387bd41632ba0bbd"}, + {file = "websockets-16.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:349f83cd6c9a415428ee1005cadb5c2c56f4389bc06a9af16103c3bc3dcc8b7d"}, + {file = "websockets-16.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:4a1aba3340a8dca8db6eb5a7986157f52eb9e436b74813764241981ca4888f03"}, + {file = "websockets-16.0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f4a32d1bd841d4bcbffdcb3d2ce50c09c3909fbead375ab28d0181af89fd04da"}, + {file = "websockets-16.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0298d07ee155e2e9fda5be8a9042200dd2e3bb0b8a38482156576f863a9d457c"}, + {file = "websockets-16.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:a653aea902e0324b52f1613332ddf50b00c06fdaf7e92624fbf8c77c78fa5767"}, + {file = "websockets-16.0-py3-none-any.whl", hash = "sha256:1637db62fad1dc833276dded54215f2c7fa46912301a24bd94d45d46a011ceec"}, + {file = "websockets-16.0.tar.gz", hash = "sha256:5f6261a5e56e8d5c42a4497b364ea24d94d9563e8fbd44e78ac40879c60179b5"}, +] + +[[package]] +name = "werkzeug" +version = "3.1.6" +description = "The comprehensive WSGI web application library." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "werkzeug-3.1.6-py3-none-any.whl", hash = "sha256:7ddf3357bb9564e407607f988f683d72038551200c704012bb9a4c523d42f131"}, + {file = "werkzeug-3.1.6.tar.gz", hash = "sha256:210c6bede5a420a913956b4791a7f4d6843a43b6fcee4dfa08a65e93007d0d25"}, +] + +[package.dependencies] +markupsafe = ">=2.1.1" + +[package.extras] +watchdog = ["watchdog (>=2.3)"] + +[[package]] +name = "wheel" +version = "0.46.3" +description = "Command line tool for manipulating wheel files" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "wheel-0.46.3-py3-none-any.whl", hash = "sha256:4b399d56c9d9338230118d705d9737a2a468ccca63d5e813e2a4fc7815d8bc4d"}, + {file = "wheel-0.46.3.tar.gz", hash = "sha256:e3e79874b07d776c40bd6033f8ddf76a7dad46a7b8aa1b2787a83083519a1803"}, +] + +[package.dependencies] +packaging = ">=24.0" + +[package.extras] +test = ["pytest (>=6.0.0)", "setuptools (>=77)"] + +[[package]] +name = "xformers" +version = "0.0.35" +description = "XFormers: A collection of composable Transformer building blocks." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "xformers-0.0.35-py39-none-manylinux_2_28_x86_64.whl", hash = "sha256:ccc73c7db9890224ab05f5fb60e2034f9e6c8672a10be0cf00e95cbbae3eda7c"}, + {file = "xformers-0.0.35-py39-none-win_amd64.whl", hash = "sha256:57381ce3cbb79b593e6b62cb20a937885345fad2796de2aa6fbb66c033601179"}, + {file = "xformers-0.0.35.tar.gz", hash = "sha256:f7fc183a58e4bf0e2ae339a18fb1b1d4a37854c0f2545b4f360fef001646ab76"}, +] + +[package.dependencies] +numpy = "*" +torch = ">=2.10" + +[[package]] +name = "xxhash" +version = "3.6.0" +description = "Python binding for xxHash" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "xxhash-3.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:87ff03d7e35c61435976554477a7f4cd1704c3596a89a8300d5ce7fc83874a71"}, + {file = "xxhash-3.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f572dfd3d0e2eb1a57511831cf6341242f5a9f8298a45862d085f5b93394a27d"}, + {file = "xxhash-3.6.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:89952ea539566b9fed2bbd94e589672794b4286f342254fad28b149f9615fef8"}, + {file = "xxhash-3.6.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:48e6f2ffb07a50b52465a1032c3cf1f4a5683f944acaca8a134a2f23674c2058"}, + {file = "xxhash-3.6.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b5b848ad6c16d308c3ac7ad4ba6bede80ed5df2ba8ed382f8932df63158dd4b2"}, + {file = "xxhash-3.6.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a034590a727b44dd8ac5914236a7b8504144447a9682586c3327e935f33ec8cc"}, + {file = "xxhash-3.6.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a8f1972e75ebdd161d7896743122834fe87378160c20e97f8b09166213bf8cc"}, + {file = "xxhash-3.6.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ee34327b187f002a596d7b167ebc59a1b729e963ce645964bbc050d2f1b73d07"}, + {file = "xxhash-3.6.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:339f518c3c7a850dd033ab416ea25a692759dc7478a71131fe8869010d2b75e4"}, + {file = "xxhash-3.6.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:bf48889c9630542d4709192578aebbd836177c9f7a4a2778a7d6340107c65f06"}, + {file = "xxhash-3.6.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:5576b002a56207f640636056b4160a378fe36a58db73ae5c27a7ec8db35f71d4"}, + {file = "xxhash-3.6.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:af1f3278bd02814d6dedc5dec397993b549d6f16c19379721e5a1d31e132c49b"}, + {file = "xxhash-3.6.0-cp310-cp310-win32.whl", hash = "sha256:aed058764db109dc9052720da65fafe84873b05eb8b07e5e653597951af57c3b"}, + {file = "xxhash-3.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:e82da5670f2d0d98950317f82a0e4a0197150ff19a6df2ba40399c2a3b9ae5fb"}, + {file = "xxhash-3.6.0-cp310-cp310-win_arm64.whl", hash = "sha256:4a082ffff8c6ac07707fb6b671caf7c6e020c75226c561830b73d862060f281d"}, + {file = "xxhash-3.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b47bbd8cf2d72797f3c2772eaaac0ded3d3af26481a26d7d7d41dc2d3c46b04a"}, + {file = "xxhash-3.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2b6821e94346f96db75abaa6e255706fb06ebd530899ed76d32cd99f20dc52fa"}, + {file = "xxhash-3.6.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:d0a9751f71a1a65ce3584e9cae4467651c7e70c9d31017fa57574583a4540248"}, + {file = "xxhash-3.6.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b29ee68625ab37b04c0b40c3fafdf24d2f75ccd778333cfb698f65f6c463f62"}, + {file = "xxhash-3.6.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6812c25fe0d6c36a46ccb002f40f27ac903bf18af9f6dd8f9669cb4d176ab18f"}, + {file = "xxhash-3.6.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4ccbff013972390b51a18ef1255ef5ac125c92dc9143b2d1909f59abc765540e"}, + {file = "xxhash-3.6.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:297b7fbf86c82c550e12e8fb71968b3f033d27b874276ba3624ea868c11165a8"}, + {file = "xxhash-3.6.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:dea26ae1eb293db089798d3973a5fc928a18fdd97cc8801226fae705b02b14b0"}, + {file = "xxhash-3.6.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7a0b169aafb98f4284f73635a8e93f0735f9cbde17bd5ec332480484241aaa77"}, + {file = "xxhash-3.6.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:08d45aef063a4531b785cd72de4887766d01dc8f362a515693df349fdb825e0c"}, + {file = "xxhash-3.6.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:929142361a48ee07f09121fe9e96a84950e8d4df3bb298ca5d88061969f34d7b"}, + {file = "xxhash-3.6.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:51312c768403d8540487dbbfb557454cfc55589bbde6424456951f7fcd4facb3"}, + {file = "xxhash-3.6.0-cp311-cp311-win32.whl", hash = "sha256:d1927a69feddc24c987b337ce81ac15c4720955b667fe9b588e02254b80446fd"}, + {file = "xxhash-3.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:26734cdc2d4ffe449b41d186bbeac416f704a482ed835d375a5c0cb02bc63fef"}, + {file = "xxhash-3.6.0-cp311-cp311-win_arm64.whl", hash = "sha256:d72f67ef8bf36e05f5b6c65e8524f265bd61071471cd4cf1d36743ebeeeb06b7"}, + {file = "xxhash-3.6.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:01362c4331775398e7bb34e3ab403bc9ee9f7c497bc7dee6272114055277dd3c"}, + {file = "xxhash-3.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b7b2df81a23f8cb99656378e72501b2cb41b1827c0f5a86f87d6b06b69f9f204"}, + {file = "xxhash-3.6.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:dc94790144e66b14f67b10ac8ed75b39ca47536bf8800eb7c24b50271ea0c490"}, + {file = "xxhash-3.6.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:93f107c673bccf0d592cdba077dedaf52fe7f42dcd7676eba1f6d6f0c3efffd2"}, + {file = "xxhash-3.6.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2aa5ee3444c25b69813663c9f8067dcfaa2e126dc55e8dddf40f4d1c25d7effa"}, + {file = "xxhash-3.6.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f7f99123f0e1194fa59cc69ad46dbae2e07becec5df50a0509a808f90a0f03f0"}, + {file = "xxhash-3.6.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:49e03e6fe2cac4a1bc64952dd250cf0dbc5ef4ebb7b8d96bce82e2de163c82a2"}, + {file = "xxhash-3.6.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:bd17fede52a17a4f9a7bc4472a5867cb0b160deeb431795c0e4abe158bc784e9"}, + {file = "xxhash-3.6.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:6fb5f5476bef678f69db04f2bd1efbed3030d2aba305b0fc1773645f187d6a4e"}, + {file = "xxhash-3.6.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:843b52f6d88071f87eba1631b684fcb4b2068cd2180a0224122fe4ef011a9374"}, + {file = "xxhash-3.6.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:7d14a6cfaf03b1b6f5f9790f76880601ccc7896aff7ab9cd8978a939c1eb7e0d"}, + {file = "xxhash-3.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:418daf3db71e1413cfe211c2f9a528456936645c17f46b5204705581a45390ae"}, + {file = "xxhash-3.6.0-cp312-cp312-win32.whl", hash = "sha256:50fc255f39428a27299c20e280d6193d8b63b8ef8028995323bf834a026b4fbb"}, + {file = "xxhash-3.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:c0f2ab8c715630565ab8991b536ecded9416d615538be8ecddce43ccf26cbc7c"}, + {file = "xxhash-3.6.0-cp312-cp312-win_arm64.whl", hash = "sha256:eae5c13f3bc455a3bbb68bdc513912dc7356de7e2280363ea235f71f54064829"}, + {file = "xxhash-3.6.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:599e64ba7f67472481ceb6ee80fa3bd828fd61ba59fb11475572cc5ee52b89ec"}, + {file = "xxhash-3.6.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7d8b8aaa30fca4f16f0c84a5c8d7ddee0e25250ec2796c973775373257dde8f1"}, + {file = "xxhash-3.6.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:d597acf8506d6e7101a4a44a5e428977a51c0fadbbfd3c39650cca9253f6e5a6"}, + {file = "xxhash-3.6.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:858dc935963a33bc33490128edc1c12b0c14d9c7ebaa4e387a7869ecc4f3e263"}, + {file = "xxhash-3.6.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ba284920194615cb8edf73bf52236ce2e1664ccd4a38fdb543506413529cc546"}, + {file = "xxhash-3.6.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4b54219177f6c6674d5378bd862c6aedf64725f70dd29c472eaae154df1a2e89"}, + {file = "xxhash-3.6.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:42c36dd7dbad2f5238950c377fcbf6811b1cdb1c444fab447960030cea60504d"}, + {file = "xxhash-3.6.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f22927652cba98c44639ffdc7aaf35828dccf679b10b31c4ad72a5b530a18eb7"}, + {file = "xxhash-3.6.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b45fad44d9c5c119e9c6fbf2e1c656a46dc68e280275007bbfd3d572b21426db"}, + {file = "xxhash-3.6.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:6f2580ffab1a8b68ef2b901cde7e55fa8da5e4be0977c68f78fc80f3c143de42"}, + {file = "xxhash-3.6.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:40c391dd3cd041ebc3ffe6f2c862f402e306eb571422e0aa918d8070ba31da11"}, + {file = "xxhash-3.6.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f205badabde7aafd1a31e8ca2a3e5a763107a71c397c4481d6a804eb5063d8bd"}, + {file = "xxhash-3.6.0-cp313-cp313-win32.whl", hash = "sha256:2577b276e060b73b73a53042ea5bd5203d3e6347ce0d09f98500f418a9fcf799"}, + {file = "xxhash-3.6.0-cp313-cp313-win_amd64.whl", hash = "sha256:757320d45d2fbcce8f30c42a6b2f47862967aea7bf458b9625b4bbe7ee390392"}, + {file = "xxhash-3.6.0-cp313-cp313-win_arm64.whl", hash = "sha256:457b8f85dec5825eed7b69c11ae86834a018b8e3df5e77783c999663da2f96d6"}, + {file = "xxhash-3.6.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a42e633d75cdad6d625434e3468126c73f13f7584545a9cf34e883aa1710e702"}, + {file = "xxhash-3.6.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:568a6d743219e717b07b4e03b0a828ce593833e498c3b64752e0f5df6bfe84db"}, + {file = "xxhash-3.6.0-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:bec91b562d8012dae276af8025a55811b875baace6af510412a5e58e3121bc54"}, + {file = "xxhash-3.6.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:78e7f2f4c521c30ad5e786fdd6bae89d47a32672a80195467b5de0480aa97b1f"}, + {file = "xxhash-3.6.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3ed0df1b11a79856df5ffcab572cbd6b9627034c1c748c5566fa79df9048a7c5"}, + {file = "xxhash-3.6.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0e4edbfc7d420925b0dd5e792478ed393d6e75ff8fc219a6546fb446b6a417b1"}, + {file = "xxhash-3.6.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fba27a198363a7ef87f8c0f6b171ec36b674fe9053742c58dd7e3201c1ab30ee"}, + {file = "xxhash-3.6.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:794fe9145fe60191c6532fa95063765529770edcdd67b3d537793e8004cabbfd"}, + {file = "xxhash-3.6.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:6105ef7e62b5ac73a837778efc331a591d8442f8ef5c7e102376506cb4ae2729"}, + {file = "xxhash-3.6.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:f01375c0e55395b814a679b3eea205db7919ac2af213f4a6682e01220e5fe292"}, + {file = "xxhash-3.6.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:d706dca2d24d834a4661619dcacf51a75c16d65985718d6a7d73c1eeeb903ddf"}, + {file = "xxhash-3.6.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5f059d9faeacd49c0215d66f4056e1326c80503f51a1532ca336a385edadd033"}, + {file = "xxhash-3.6.0-cp313-cp313t-win32.whl", hash = "sha256:1244460adc3a9be84731d72b8e80625788e5815b68da3da8b83f78115a40a7ec"}, + {file = "xxhash-3.6.0-cp313-cp313t-win_amd64.whl", hash = "sha256:b1e420ef35c503869c4064f4a2f2b08ad6431ab7b229a05cce39d74268bca6b8"}, + {file = "xxhash-3.6.0-cp313-cp313t-win_arm64.whl", hash = "sha256:ec44b73a4220623235f67a996c862049f375df3b1052d9899f40a6382c32d746"}, + {file = "xxhash-3.6.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:a40a3d35b204b7cc7643cbcf8c9976d818cb47befcfac8bbefec8038ac363f3e"}, + {file = "xxhash-3.6.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a54844be970d3fc22630b32d515e79a90d0a3ddb2644d8d7402e3c4c8da61405"}, + {file = "xxhash-3.6.0-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:016e9190af8f0a4e3741343777710e3d5717427f175adfdc3e72508f59e2a7f3"}, + {file = "xxhash-3.6.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4f6f72232f849eb9d0141e2ebe2677ece15adfd0fa599bc058aad83c714bb2c6"}, + {file = "xxhash-3.6.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:63275a8aba7865e44b1813d2177e0f5ea7eadad3dd063a21f7cf9afdc7054063"}, + {file = "xxhash-3.6.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3cd01fa2aa00d8b017c97eb46b9a794fbdca53fc14f845f5a328c71254b0abb7"}, + {file = "xxhash-3.6.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0226aa89035b62b6a86d3c68df4d7c1f47a342b8683da2b60cedcddb46c4d95b"}, + {file = "xxhash-3.6.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c6e193e9f56e4ca4923c61238cdaced324f0feac782544eb4c6d55ad5cc99ddd"}, + {file = "xxhash-3.6.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:9176dcaddf4ca963d4deb93866d739a343c01c969231dbe21680e13a5d1a5bf0"}, + {file = "xxhash-3.6.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:c1ce4009c97a752e682b897aa99aef84191077a9433eb237774689f14f8ec152"}, + {file = "xxhash-3.6.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:8cb2f4f679b01513b7adbb9b1b2f0f9cdc31b70007eaf9d59d0878809f385b11"}, + {file = "xxhash-3.6.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:653a91d7c2ab54a92c19ccf43508b6a555440b9be1bc8be553376778be7f20b5"}, + {file = "xxhash-3.6.0-cp314-cp314-win32.whl", hash = "sha256:a756fe893389483ee8c394d06b5ab765d96e68fbbfe6fde7aa17e11f5720559f"}, + {file = "xxhash-3.6.0-cp314-cp314-win_amd64.whl", hash = "sha256:39be8e4e142550ef69629c9cd71b88c90e9a5db703fecbcf265546d9536ca4ad"}, + {file = "xxhash-3.6.0-cp314-cp314-win_arm64.whl", hash = "sha256:25915e6000338999236f1eb68a02a32c3275ac338628a7eaa5a269c401995679"}, + {file = "xxhash-3.6.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:c5294f596a9017ca5a3e3f8884c00b91ab2ad2933cf288f4923c3fd4346cf3d4"}, + {file = "xxhash-3.6.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1cf9dcc4ab9cff01dfbba78544297a3a01dafd60f3bde4e2bfd016cf7e4ddc67"}, + {file = "xxhash-3.6.0-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:01262da8798422d0685f7cef03b2bd3f4f46511b02830861df548d7def4402ad"}, + {file = "xxhash-3.6.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:51a73fb7cb3a3ead9f7a8b583ffd9b8038e277cdb8cb87cf890e88b3456afa0b"}, + {file = "xxhash-3.6.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b9c6df83594f7df8f7f708ce5ebeacfc69f72c9fbaaababf6cf4758eaada0c9b"}, + {file = "xxhash-3.6.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:627f0af069b0ea56f312fd5189001c24578868643203bca1abbc2c52d3a6f3ca"}, + {file = "xxhash-3.6.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:aa912c62f842dfd013c5f21a642c9c10cd9f4c4e943e0af83618b4a404d9091a"}, + {file = "xxhash-3.6.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:b465afd7909db30168ab62afe40b2fcf79eedc0b89a6c0ab3123515dc0df8b99"}, + {file = "xxhash-3.6.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:a881851cf38b0a70e7c4d3ce81fc7afd86fbc2a024f4cfb2a97cf49ce04b75d3"}, + {file = "xxhash-3.6.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:9b3222c686a919a0f3253cfc12bb118b8b103506612253b5baeaac10d8027cf6"}, + {file = "xxhash-3.6.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:c5aa639bc113e9286137cec8fadc20e9cd732b2cc385c0b7fa673b84fc1f2a93"}, + {file = "xxhash-3.6.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5c1343d49ac102799905e115aee590183c3921d475356cb24b4de29a4bc56518"}, + {file = "xxhash-3.6.0-cp314-cp314t-win32.whl", hash = "sha256:5851f033c3030dd95c086b4a36a2683c2ff4a799b23af60977188b057e467119"}, + {file = "xxhash-3.6.0-cp314-cp314t-win_amd64.whl", hash = "sha256:0444e7967dac37569052d2409b00a8860c2135cff05502df4da80267d384849f"}, + {file = "xxhash-3.6.0-cp314-cp314t-win_arm64.whl", hash = "sha256:bb79b1e63f6fd84ec778a4b1916dfe0a7c3fdb986c06addd5db3a0d413819d95"}, + {file = "xxhash-3.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7dac94fad14a3d1c92affb661021e1d5cbcf3876be5f5b4d90730775ccb7ac41"}, + {file = "xxhash-3.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6965e0e90f1f0e6cb78da568c13d4a348eeb7f40acfd6d43690a666a459458b8"}, + {file = "xxhash-3.6.0-cp38-cp38-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:2ab89a6b80f22214b43d98693c30da66af910c04f9858dd39c8e570749593d7e"}, + {file = "xxhash-3.6.0-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4903530e866b7a9c1eadfd3fa2fbe1b97d3aed4739a80abf506eb9318561c850"}, + {file = "xxhash-3.6.0-cp38-cp38-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4da8168ae52c01ac64c511d6f4a709479da8b7a4a1d7621ed51652f93747dffa"}, + {file = "xxhash-3.6.0-cp38-cp38-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:97460eec202017f719e839a0d3551fbc0b2fcc9c6c6ffaa5af85bbd5de432788"}, + {file = "xxhash-3.6.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:45aae0c9df92e7fa46fbb738737324a563c727990755ec1965a6a339ea10a1df"}, + {file = "xxhash-3.6.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:0d50101e57aad86f4344ca9b32d091a2135a9d0a4396f19133426c88025b09f1"}, + {file = "xxhash-3.6.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9085e798c163ce310d91f8aa6b325dda3c2944c93c6ce1edb314030d4167cc65"}, + {file = "xxhash-3.6.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:a87f271a33fad0e5bf3be282be55d78df3a45ae457950deb5241998790326f87"}, + {file = "xxhash-3.6.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:9e040d3e762f84500961791fa3709ffa4784d4dcd7690afc655c095e02fff05f"}, + {file = "xxhash-3.6.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:b0359391c3dad6de872fefb0cf5b69d55b0655c55ee78b1bb7a568979b2ce96b"}, + {file = "xxhash-3.6.0-cp38-cp38-win32.whl", hash = "sha256:e4ff728a2894e7f436b9e94c667b0f426b9c74b71f900cf37d5468c6b5da0536"}, + {file = "xxhash-3.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:01be0c5b500c5362871fc9cfdf58c69b3e5c4f531a82229ddb9eb1eb14138004"}, + {file = "xxhash-3.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cc604dc06027dbeb8281aeac5899c35fcfe7c77b25212833709f0bff4ce74d2a"}, + {file = "xxhash-3.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:277175a73900ad43a8caeb8b99b9604f21fe8d7c842f2f9061a364a7e220ddb7"}, + {file = "xxhash-3.6.0-cp39-cp39-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cfbc5b91397c8c2972fdac13fb3e4ed2f7f8ccac85cd2c644887557780a9b6e2"}, + {file = "xxhash-3.6.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2762bfff264c4e73c0e507274b40634ff465e025f0eaf050897e88ec8367575d"}, + {file = "xxhash-3.6.0-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2f171a900d59d51511209f7476933c34a0c2c711078d3c80e74e0fe4f38680ec"}, + {file = "xxhash-3.6.0-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:780b90c313348f030b811efc37b0fa1431163cb8db8064cf88a7936b6ce5f222"}, + {file = "xxhash-3.6.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18b242455eccdfcd1fa4134c431a30737d2b4f045770f8fe84356b3469d4b919"}, + {file = "xxhash-3.6.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:a75ffc1bd5def584129774c158e108e5d768e10b75813f2b32650bb041066ed6"}, + {file = "xxhash-3.6.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:1fc1ed882d1e8df932a66e2999429ba6cc4d5172914c904ab193381fba825360"}, + {file = "xxhash-3.6.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:44e342e8cc11b4e79dae5c57f2fb6360c3c20cc57d32049af8f567f5b4bcb5f4"}, + {file = "xxhash-3.6.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c2f9ccd5c4be370939a2e17602fbc49995299203da72a3429db013d44d590e86"}, + {file = "xxhash-3.6.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:02ea4cb627c76f48cd9fb37cf7ab22bd51e57e1b519807234b473faebe526796"}, + {file = "xxhash-3.6.0-cp39-cp39-win32.whl", hash = "sha256:6551880383f0e6971dc23e512c9ccc986147ce7bfa1cd2e4b520b876c53e9f3d"}, + {file = "xxhash-3.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:7c35c4cdc65f2a29f34425c446f2f5cdcd0e3c34158931e1cc927ece925ab802"}, + {file = "xxhash-3.6.0-cp39-cp39-win_arm64.whl", hash = "sha256:ffc578717a347baf25be8397cb10d2528802d24f94cfc005c0e44fef44b5cdd6"}, + {file = "xxhash-3.6.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0f7b7e2ec26c1666ad5fc9dbfa426a6a3367ceaf79db5dd76264659d509d73b0"}, + {file = "xxhash-3.6.0-pp311-pypy311_pp73-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5dc1e14d14fa0f5789ec29a7062004b5933964bb9b02aae6622b8f530dc40296"}, + {file = "xxhash-3.6.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:881b47fc47e051b37d94d13e7455131054b56749b91b508b0907eb07900d1c13"}, + {file = "xxhash-3.6.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c6dc31591899f5e5666f04cc2e529e69b4072827085c1ef15294d91a004bc1bd"}, + {file = "xxhash-3.6.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:15e0dac10eb9309508bfc41f7f9deaa7755c69e35af835db9cb10751adebc35d"}, + {file = "xxhash-3.6.0.tar.gz", hash = "sha256:f0162a78b13a0d7617b2845b90c763339d1f1d82bb04a4b07f4ab535cc5e05d6"}, +] + +[[package]] +name = "yarl" +version = "1.23.0" +description = "Yet another URL library" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "yarl-1.23.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cff6d44cb13d39db2663a22b22305d10855efa0fa8015ddeacc40bc59b9d8107"}, + {file = "yarl-1.23.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e4c53f8347cd4200f0d70a48ad059cabaf24f5adc6ba08622a23423bc7efa10d"}, + {file = "yarl-1.23.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a6940a074fb3c48356ed0158a3ca5699c955ee4185b4d7d619be3c327143e05"}, + {file = "yarl-1.23.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ed5f69ce7be7902e5c70ea19eb72d20abf7d725ab5d49777d696e32d4fc1811d"}, + {file = "yarl-1.23.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:389871e65468400d6283c0308e791a640b5ab5c83bcee02a2f51295f95e09748"}, + {file = "yarl-1.23.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:dda608c88cf709b1d406bdfcd84d8d63cff7c9e577a403c6108ce8ce9dcc8764"}, + {file = "yarl-1.23.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8c4fe09e0780c6c3bf2b7d4af02ee2394439d11a523bbcf095cf4747c2932007"}, + {file = "yarl-1.23.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:31c9921eb8bd12633b41ad27686bbb0b1a2a9b8452bfdf221e34f311e9942ed4"}, + {file = "yarl-1.23.0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5f10fd85e4b75967468af655228fbfd212bdf66db1c0d135065ce288982eda26"}, + {file = "yarl-1.23.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:dbf507e9ef5688bada447a24d68b4b58dd389ba93b7afc065a2ba892bea54769"}, + {file = "yarl-1.23.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:85e9beda1f591bc73e77ea1c51965c68e98dafd0fec72cdd745f77d727466716"}, + {file = "yarl-1.23.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:0e1fdaa14ef51366d7757b45bde294e95f6c8c049194e793eedb8387c86d5993"}, + {file = "yarl-1.23.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:75e3026ab649bf48f9a10c0134512638725b521340293f202a69b567518d94e0"}, + {file = "yarl-1.23.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:80e6d33a3d42a7549b409f199857b4fb54e2103fc44fb87605b6663b7a7ff750"}, + {file = "yarl-1.23.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5ec2f42d41ccbd5df0270d7df31618a8ee267bfa50997f5d720ddba86c4a83a6"}, + {file = "yarl-1.23.0-cp310-cp310-win32.whl", hash = "sha256:debe9c4f41c32990771be5c22b56f810659f9ddf3d63f67abfdcaa2c6c9c5c1d"}, + {file = "yarl-1.23.0-cp310-cp310-win_amd64.whl", hash = "sha256:ab5f043cb8a2d71c981c09c510da013bc79fd661f5c60139f00dd3c3cc4f2ffb"}, + {file = "yarl-1.23.0-cp310-cp310-win_arm64.whl", hash = "sha256:263cd4f47159c09b8b685890af949195b51d1aa82ba451c5847ca9bc6413c220"}, + {file = "yarl-1.23.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b35d13d549077713e4414f927cdc388d62e543987c572baee613bf82f11a4b99"}, + {file = "yarl-1.23.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cbb0fef01f0c6b38cb0f39b1f78fc90b807e0e3c86a7ff3ce74ad77ce5c7880c"}, + {file = "yarl-1.23.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc52310451fc7c629e13c4e061cbe2dd01684d91f2f8ee2821b083c58bd72432"}, + {file = "yarl-1.23.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b2c6b50c7b0464165472b56b42d4c76a7b864597007d9c085e8b63e185cf4a7a"}, + {file = "yarl-1.23.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:aafe5dcfda86c8af00386d7781d4c2181b5011b7be3f2add5e99899ea925df05"}, + {file = "yarl-1.23.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9ee33b875f0b390564c1fb7bc528abf18c8ee6073b201c6ae8524aca778e2d83"}, + {file = "yarl-1.23.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4c41e021bc6d7affb3364dc1e1e5fa9582b470f283748784bd6ea0558f87f42c"}, + {file = "yarl-1.23.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:99c8a9ed30f4164bc4c14b37a90208836cbf50d4ce2a57c71d0f52c7fb4f7598"}, + {file = "yarl-1.23.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f2af5c81a1f124609d5f33507082fc3f739959d4719b56877ab1ee7e7b3d602b"}, + {file = "yarl-1.23.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6b41389c19b07c760c7e427a3462e8ab83c4bb087d127f0e854c706ce1b9215c"}, + {file = "yarl-1.23.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:1dc702e42d0684f42d6519c8d581e49c96cefaaab16691f03566d30658ee8788"}, + {file = "yarl-1.23.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:0e40111274f340d32ebcc0a5668d54d2b552a6cca84c9475859d364b380e3222"}, + {file = "yarl-1.23.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:4764a6a7588561a9aef92f65bda2c4fb58fe7c675c0883862e6df97559de0bfb"}, + {file = "yarl-1.23.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:03214408cfa590df47728b84c679ae4ef00be2428e11630277be0727eba2d7cc"}, + {file = "yarl-1.23.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:170e26584b060879e29fac213e4228ef063f39128723807a312e5c7fec28eff2"}, + {file = "yarl-1.23.0-cp311-cp311-win32.whl", hash = "sha256:51430653db848d258336cfa0244427b17d12db63d42603a55f0d4546f50f25b5"}, + {file = "yarl-1.23.0-cp311-cp311-win_amd64.whl", hash = "sha256:bf49a3ae946a87083ef3a34c8f677ae4243f5b824bfc4c69672e72b3d6719d46"}, + {file = "yarl-1.23.0-cp311-cp311-win_arm64.whl", hash = "sha256:b39cb32a6582750b6cc77bfb3c49c0f8760dc18dc96ec9fb55fbb0f04e08b928"}, + {file = "yarl-1.23.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1932b6b8bba8d0160a9d1078aae5838a66039e8832d41d2992daa9a3a08f7860"}, + {file = "yarl-1.23.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:411225bae281f114067578891bc75534cfb3d92a3b4dfef7a6ca78ba354e6069"}, + {file = "yarl-1.23.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:13a563739ae600a631c36ce096615fe307f131344588b0bc0daec108cdb47b25"}, + {file = "yarl-1.23.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9cbf44c5cb4a7633d078788e1b56387e3d3cf2b8139a3be38040b22d6c3221c8"}, + {file = "yarl-1.23.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:53ad387048f6f09a8969631e4de3f1bf70c50e93545d64af4f751b2498755072"}, + {file = "yarl-1.23.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4a59ba56f340334766f3a4442e0efd0af895fae9e2b204741ef885c446b3a1a8"}, + {file = "yarl-1.23.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:803a3c3ce4acc62eaf01eaca1208dcf0783025ef27572c3336502b9c232005e7"}, + {file = "yarl-1.23.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a3d2bff8f37f8d0f96c7ec554d16945050d54462d6e95414babaa18bfafc7f51"}, + {file = "yarl-1.23.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c75eb09e8d55bceb4367e83496ff8ef2bc7ea6960efb38e978e8073ea59ecb67"}, + {file = "yarl-1.23.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877b0738624280e34c55680d6054a307aa94f7d52fa0e3034a9cc6e790871da7"}, + {file = "yarl-1.23.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:b5405bb8f0e783a988172993cfc627e4d9d00432d6bbac65a923041edacf997d"}, + {file = "yarl-1.23.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:1c3a3598a832590c5a3ce56ab5576361b5688c12cb1d39429cf5dba30b510760"}, + {file = "yarl-1.23.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:8419ebd326430d1cbb7efb5292330a2cf39114e82df5cc3d83c9a0d5ebeaf2f2"}, + {file = "yarl-1.23.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:be61f6fff406ca40e3b1d84716fde398fc08bc63dd96d15f3a14230a0973ed86"}, + {file = "yarl-1.23.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3ceb13c5c858d01321b5d9bb65e4cf37a92169ea470b70fec6f236b2c9dd7e34"}, + {file = "yarl-1.23.0-cp312-cp312-win32.whl", hash = "sha256:fffc45637bcd6538de8b85f51e3df3223e4ad89bccbfca0481c08c7fc8b7ed7d"}, + {file = "yarl-1.23.0-cp312-cp312-win_amd64.whl", hash = "sha256:f69f57305656a4852f2a7203efc661d8c042e6cc67f7acd97d8667fb448a426e"}, + {file = "yarl-1.23.0-cp312-cp312-win_arm64.whl", hash = "sha256:6e87a6e8735b44816e7db0b2fbc9686932df473c826b0d9743148432e10bb9b9"}, + {file = "yarl-1.23.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:16c6994ac35c3e74fb0ae93323bf8b9c2a9088d55946109489667c510a7d010e"}, + {file = "yarl-1.23.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4a42e651629dafb64fd5b0286a3580613702b5809ad3f24934ea87595804f2c5"}, + {file = "yarl-1.23.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7c6b9461a2a8b47c65eef63bb1c76a4f1c119618ffa99ea79bc5bb1e46c5821b"}, + {file = "yarl-1.23.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2569b67d616eab450d262ca7cb9f9e19d2f718c70a8b88712859359d0ab17035"}, + {file = "yarl-1.23.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e9d9a4d06d3481eab79803beb4d9bd6f6a8e781ec078ac70d7ef2dcc29d1bea5"}, + {file = "yarl-1.23.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f514f6474e04179d3d33175ed3f3e31434d3130d42ec153540d5b157deefd735"}, + {file = "yarl-1.23.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fda207c815b253e34f7e1909840fd14299567b1c0eb4908f8c2ce01a41265401"}, + {file = "yarl-1.23.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:34b6cf500e61c90f305094911f9acc9c86da1a05a7a3f5be9f68817043f486e4"}, + {file = "yarl-1.23.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d7504f2b476d21653e4d143f44a175f7f751cd41233525312696c76aa3dbb23f"}, + {file = "yarl-1.23.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:578110dd426f0d209d1509244e6d4a3f1a3e9077655d98c5f22583d63252a08a"}, + {file = "yarl-1.23.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:609d3614d78d74ebe35f54953c5bbd2ac647a7ddb9c30a5d877580f5e86b22f2"}, + {file = "yarl-1.23.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4966242ec68afc74c122f8459abd597afd7d8a60dc93d695c1334c5fd25f762f"}, + {file = "yarl-1.23.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:e0fd068364a6759bc794459f0a735ab151d11304346332489c7972bacbe9e72b"}, + {file = "yarl-1.23.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:39004f0ad156da43e86aa71f44e033de68a44e5a31fc53507b36dd253970054a"}, + {file = "yarl-1.23.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e5723c01a56c5028c807c701aa66722916d2747ad737a046853f6c46f4875543"}, + {file = "yarl-1.23.0-cp313-cp313-win32.whl", hash = "sha256:1b6b572edd95b4fa8df75de10b04bc81acc87c1c7d16bcdd2035b09d30acc957"}, + {file = "yarl-1.23.0-cp313-cp313-win_amd64.whl", hash = "sha256:baaf55442359053c7d62f6f8413a62adba3205119bcb6f49594894d8be47e5e3"}, + {file = "yarl-1.23.0-cp313-cp313-win_arm64.whl", hash = "sha256:fb4948814a2a98e3912505f09c9e7493b1506226afb1f881825368d6fb776ee3"}, + {file = "yarl-1.23.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:aecfed0b41aa72b7881712c65cf764e39ce2ec352324f5e0837c7048d9e6daaa"}, + {file = "yarl-1.23.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a41bcf68efd19073376eb8cf948b8d9be0af26256403e512bb18f3966f1f9120"}, + {file = "yarl-1.23.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:cde9a2ecd91668bcb7f077c4966d8ceddb60af01b52e6e3e2680e4cf00ad1a59"}, + {file = "yarl-1.23.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5023346c4ee7992febc0068e7593de5fa2bf611848c08404b35ebbb76b1b0512"}, + {file = "yarl-1.23.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d1009abedb49ae95b136a8904a3f71b342f849ffeced2d3747bf29caeda218c4"}, + {file = "yarl-1.23.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a8d00f29b42f534cc8aa3931cfe773b13b23e561e10d2b26f27a8d309b0e82a1"}, + {file = "yarl-1.23.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:95451e6ce06c3e104556d73b559f5da6c34a069b6b62946d3ad66afcd51642ea"}, + {file = "yarl-1.23.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:531ef597132086b6cf96faa7c6c1dcd0361dd5f1694e5cc30375907b9b7d3ea9"}, + {file = "yarl-1.23.0-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:88f9fb0116fbfcefcab70f85cf4b74a2b6ce5d199c41345296f49d974ddb4123"}, + {file = "yarl-1.23.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e7b0460976dc75cb87ad9cc1f9899a4b97751e7d4e77ab840fc9b6d377b8fd24"}, + {file = "yarl-1.23.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:115136c4a426f9da976187d238e84139ff6b51a20839aa6e3720cd1026d768de"}, + {file = "yarl-1.23.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:ead11956716a940c1abc816b7df3fa2b84d06eaed8832ca32f5c5e058c65506b"}, + {file = "yarl-1.23.0-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:fe8f8f5e70e6dbdfca9882cd9deaac058729bcf323cf7a58660901e55c9c94f6"}, + {file = "yarl-1.23.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:a0e317df055958a0c1e79e5d2aa5a5eaa4a6d05a20d4b0c9c3f48918139c9fc6"}, + {file = "yarl-1.23.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f0fd84de0c957b2d280143522c4f91a73aada1923caee763e24a2b3fda9f8a5"}, + {file = "yarl-1.23.0-cp313-cp313t-win32.whl", hash = "sha256:93a784271881035ab4406a172edb0faecb6e7d00f4b53dc2f55919d6c9688595"}, + {file = "yarl-1.23.0-cp313-cp313t-win_amd64.whl", hash = "sha256:dd00607bffbf30250fe108065f07453ec124dbf223420f57f5e749b04295e090"}, + {file = "yarl-1.23.0-cp313-cp313t-win_arm64.whl", hash = "sha256:ac09d42f48f80c9ee1635b2fcaa819496a44502737660d3c0f2ade7526d29144"}, + {file = "yarl-1.23.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:21d1b7305a71a15b4794b5ff22e8eef96ff4a6d7f9657155e5aa419444b28912"}, + {file = "yarl-1.23.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:85610b4f27f69984932a7abbe52703688de3724d9f72bceb1cca667deff27474"}, + {file = "yarl-1.23.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:23f371bd662cf44a7630d4d113101eafc0cfa7518a2760d20760b26021454719"}, + {file = "yarl-1.23.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4a80f77dc1acaaa61f0934176fccca7096d9b1ff08c8ba9cddf5ae034a24319"}, + {file = "yarl-1.23.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:bd654fad46d8d9e823afbb4f87c79160b5a374ed1ff5bde24e542e6ba8f41434"}, + {file = "yarl-1.23.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:682bae25f0a0dd23a056739f23a134db9f52a63e2afd6bfb37ddc76292bbd723"}, + {file = "yarl-1.23.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a82836cab5f197a0514235aaf7ffccdc886ccdaa2324bc0aafdd4ae898103039"}, + {file = "yarl-1.23.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c57676bdedc94cd3bc37724cf6f8cd2779f02f6aba48de45feca073e714fe52"}, + {file = "yarl-1.23.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c7f8dc16c498ff06497c015642333219871effba93e4a2e8604a06264aca5c5c"}, + {file = "yarl-1.23.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:5ee586fb17ff8f90c91cf73c6108a434b02d69925f44f5f8e0d7f2f260607eae"}, + {file = "yarl-1.23.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:17235362f580149742739cc3828b80e24029d08cbb9c4bda0242c7b5bc610a8e"}, + {file = "yarl-1.23.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:0793e2bd0cf14234983bbb371591e6bea9e876ddf6896cdcc93450996b0b5c85"}, + {file = "yarl-1.23.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:3650dc2480f94f7116c364096bc84b1d602f44224ef7d5c7208425915c0475dd"}, + {file = "yarl-1.23.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:f40e782d49630ad384db66d4d8b73ff4f1b8955dc12e26b09a3e3af064b3b9d6"}, + {file = "yarl-1.23.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:94f8575fbdf81749008d980c17796097e645574a3b8c28ee313931068dad14fe"}, + {file = "yarl-1.23.0-cp314-cp314-win32.whl", hash = "sha256:c8aa34a5c864db1087d911a0b902d60d203ea3607d91f615acd3f3108ac32169"}, + {file = "yarl-1.23.0-cp314-cp314-win_amd64.whl", hash = "sha256:63e92247f383c85ab00dd0091e8c3fa331a96e865459f5ee80353c70a4a42d70"}, + {file = "yarl-1.23.0-cp314-cp314-win_arm64.whl", hash = "sha256:70efd20be968c76ece7baa8dafe04c5be06abc57f754d6f36f3741f7aa7a208e"}, + {file = "yarl-1.23.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:9a18d6f9359e45722c064c97464ec883eb0e0366d33eda61cb19a244bf222679"}, + {file = "yarl-1.23.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:2803ed8b21ca47a43da80a6fd1ed3019d30061f7061daa35ac54f63933409412"}, + {file = "yarl-1.23.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:394906945aa8b19fc14a61cf69743a868bb8c465efe85eee687109cc540b98f4"}, + {file = "yarl-1.23.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:71d006bee8397a4a89f469b8deb22469fe7508132d3c17fa6ed871e79832691c"}, + {file = "yarl-1.23.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:62694e275c93d54f7ccedcfef57d42761b2aad5234b6be1f3e3026cae4001cd4"}, + {file = "yarl-1.23.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a31de1613658308efdb21ada98cbc86a97c181aa050ba22a808120bb5be3ab94"}, + {file = "yarl-1.23.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fb1e8b8d66c278b21d13b0a7ca22c41dd757a7c209c6b12c313e445c31dd3b28"}, + {file = "yarl-1.23.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50f9d8d531dfb767c565f348f33dd5139a6c43f5cbdf3f67da40d54241df93f6"}, + {file = "yarl-1.23.0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:575aa4405a656e61a540f4a80eaa5260f2a38fff7bfdc4b5f611840d76e9e277"}, + {file = "yarl-1.23.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:041b1a4cefacf65840b4e295c6985f334ba83c30607441ae3cf206a0eed1a2e4"}, + {file = "yarl-1.23.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:d38c1e8231722c4ce40d7593f28d92b5fc72f3e9774fe73d7e800ec32299f63a"}, + {file = "yarl-1.23.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:d53834e23c015ee83a99377db6e5e37d8484f333edb03bd15b4bc312cc7254fb"}, + {file = "yarl-1.23.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:2e27c8841126e017dd2a054a95771569e6070b9ee1b133366d8b31beb5018a41"}, + {file = "yarl-1.23.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:76855800ac56f878847a09ce6dba727c93ca2d89c9e9d63002d26b916810b0a2"}, + {file = "yarl-1.23.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:e09fd068c2e169a7070d83d3bde728a4d48de0549f975290be3c108c02e499b4"}, + {file = "yarl-1.23.0-cp314-cp314t-win32.whl", hash = "sha256:73309162a6a571d4cbd3b6a1dcc703c7311843ae0d1578df6f09be4e98df38d4"}, + {file = "yarl-1.23.0-cp314-cp314t-win_amd64.whl", hash = "sha256:4503053d296bc6e4cbd1fad61cf3b6e33b939886c4f249ba7c78b602214fabe2"}, + {file = "yarl-1.23.0-cp314-cp314t-win_arm64.whl", hash = "sha256:44bb7bef4ea409384e3f8bc36c063d77ea1b8d4a5b2706956c0d6695f07dcc25"}, + {file = "yarl-1.23.0-py3-none-any.whl", hash = "sha256:a2df6afe50dea8ae15fa34c9f824a3ee958d785fd5d089063d960bae1daa0a3f"}, + {file = "yarl-1.23.0.tar.gz", hash = "sha256:53b1ea6ca88ebd4420379c330aea57e258408dd0df9af0992e5de2078dc9f5d5"}, +] + +[package.dependencies] +idna = ">=2.0" +multidict = ">=4.0" +propcache = ">=0.2.1" + +[[package]] +name = "zipp" +version = "3.23.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e"}, + {file = "zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166"}, +] + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more_itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +type = ["pytest-mypy"] + +[metadata] +lock-version = "2.1" +python-versions = ">=3.12,<3.14" +content-hash = "5949d079d31ae307d389d572c82bea2969b66c292419ba0dac3351e8d13e97aa" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..66b75025ceb3729cf9b9b0f53455c0a374788e49 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,42 @@ +[project] +name = "traffic-llm" +version = "0.1.0" +description = "Using RL and LLMs to control traffic" +authors = [ + {name = "Aditya Mangalampalli",email = "aditya.mangalampalli@gmail.com"} +] +requires-python = ">=3.12,<3.14" +dependencies = [ + "numpy (>=2.4.2,<3.0.0)", + "scipy (>=1.17.1,<2.0.0)", + "pyyaml (>=6.0.3,<7.0.0)", + "tqdm (>=4.67.3,<5.0.0)", + "accelerate (>=1.13.0,<2.0.0)", + "fastapi (>=0.135.1,<0.136.0)", + "uvicorn (>=0.41.0,<0.42.0)", + "pydantic (>=2.12.5,<3.0.0)", + "requests (>=2.32.5,<3.0.0)", + "httpx (>=0.28.1,<0.29.0)", + "torch (>=2.10.0,<3.0.0)", + "openenv-core (==0.2.1)", + "streamlit (>=1.55.0,<2.0.0)", + "pandas (>=2.3,<3.0)", + "matplotlib (>=3.10.8,<4.0.0)", + "plotly (>=6.6.0,<7.0.0)", + "tensorboard (>=2.20.0,<3.0.0)", + "setuptools (==81.0)", + "ipython (>=9.11.0,<10.0.0)", + "ipykernel (>=7.2.0,<8.0.0)", + "peft (>=0.18.1,<0.19.0)", + "sentencepiece (>=0.2.1,<0.3.0)", + "bitsandbytes (>=0.49.2,<0.50.0)", + "xformers (>=0.0.35,<0.0.36)", + "triton (>=3.6.0,<4.0.0)", + "unsloth (>=2026.3.3,<2027.0.0)", + "transformers (>=5.2,<6.0)" +] + + +[build-system] +requires = ["poetry-core>=2.0.0,<3.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/results/anova/anova_report.txt b/results/anova/anova_report.txt new file mode 100644 index 0000000000000000000000000000000000000000..b03436fd572d539f76503d98ed0ca8f23966e36b --- /dev/null +++ b/results/anova/anova_report.txt @@ -0,0 +1,61 @@ + +============================================================================== +ANOVA RESULTS: Learned DQN vs FixedCycle vs Random +============================================================================== + +------------------------------------------------------------------------------ + Metric : Episode Return + Test : ANOVA (F=0.0686, p=0.9337 ns, eta2=0.0010) + n : {'learned': 45, 'fixed': 45, 'random': 45} + Means : + learned -0.0932 +/- 0.0192 (higher=better) + fixed -0.0941 +/- 0.0189 + random -0.0947 +/- 0.0192 + Tukey HSD pairwise: + learned vs fixed delta=+0.0009 p=0.9707 ns not significant [RL wins] + learned vs random delta=+0.0015 p=0.9288 ns not significant [RL wins] + fixed vs random delta=+0.0005 p=0.9902 ns not significant + +------------------------------------------------------------------------------ + Metric : Mean Waiting Vehicles + Test : ANOVA (F=0.0036, p=0.9964 ns, eta2=0.0001) + n : {'learned': 45, 'fixed': 45, 'random': 45} + Means : + learned 87.1643 +/- 15.4577 (lower=better) + fixed 87.3930 +/- 15.1609 + random 87.4153 +/- 15.2720 + Tukey HSD pairwise: + learned vs fixed delta=-0.2287 p=0.9973 ns not significant [RL wins] + learned vs random delta=-0.2510 p=0.9967 ns not significant [RL wins] + fixed vs random delta=-0.0223 p=1.0000 ns not significant + +------------------------------------------------------------------------------ + Metric : Average Travel Time (s) + Test : ANOVA (F=0.2142, p=0.8074 ns, eta2=0.0032) + n : {'learned': 45, 'fixed': 45, 'random': 45} + Means : + learned 1228.5484 +/- 163.6671 (lower=better) + fixed 1239.8208 +/- 159.8277 + random 1251.0375 +/- 159.9236 + Tukey HSD pairwise: + learned vs fixed delta=-11.2724 p=0.9424 ns not significant [RL wins] + learned vs random delta=-22.4890 p=0.7901 ns not significant [RL wins] + fixed vs random delta=-11.2166 p=0.9430 ns not significant + +------------------------------------------------------------------------------ + Metric : Throughput (vehicles) + Test : Kruskal-Wallis (H=0.3527, p=0.8383 ns, eta2=0.0022) + n : {'learned': 45, 'fixed': 45, 'random': 45} + Means : + learned 7728.3778 +/- 2747.5912 (higher=better) + fixed 7581.1333 +/- 2639.3891 + random 7418.6444 +/- 2630.5805 + Tukey HSD pairwise: + learned vs fixed delta=+147.2444 p=0.9639 ns not significant [RL wins] + learned vs random delta=+309.7333 p=0.8500 ns not significant [RL wins] + fixed vs random delta=+162.4889 p=0.9562 ns not significant + [!] Normality violated for at least one group -- Kruskal-Wallis preferred. + +============================================================================== +Significance: *** p<0.001 ** p<0.01 * p<0.05 ns = not significant +============================================================================== diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000000000000000000000000000000000000..674ac3e9229fdf2ee3a54322f4b9ace6808e7af7 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,16 @@ +# scripts + +Prototype and demo scripts from earlier iterations. + +## Files + +- [smoke_test_env.py](/Users/aditya/Developer/traffic-llm/scripts/smoke_test_env.py) +- [run_demo.py](/Users/aditya/Developer/traffic-llm/scripts/run_demo.py) +- [evaluate.py](/Users/aditya/Developer/traffic-llm/scripts/evaluate.py) + +## Status + +These are not the primary entry points for the current local-policy trainer. Prefer: + +- [test.py](/Users/aditya/Developer/traffic-llm/test.py) +- [training/train_local_policy.py](/Users/aditya/Developer/traffic-llm/training/train_local_policy.py) diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/scripts/anova_test.py b/scripts/anova_test.py new file mode 100644 index 0000000000000000000000000000000000000000..7137be8583dde9d7aebbcc1f51b599ca37f38d56 --- /dev/null +++ b/scripts/anova_test.py @@ -0,0 +1,424 @@ +""" +One-way ANOVA comparing the learned DQN policy against FixedCycle and Random +baselines across the same set of evaluation scenarios. + +Output is always saved to --output-dir (default: results/anova/): + - anova_report.txt : human-readable results table + - anova_results.json : raw per-episode data + full statistical results + +Usage: + python scripts/anova_test.py --checkpoint artifacts/dqn_shared/best_validation.pt + python scripts/anova_test.py --checkpoint artifacts/dqn_shared/best_validation.pt \ + --split test --scenarios-per-city 3 --output-dir results/anova +""" +from __future__ import annotations + +import argparse +import json +import sys +from pathlib import Path + +import numpy as np +import torch +from scipy import stats +from tqdm.auto import tqdm + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +from agents.local_policy import FixedCyclePolicy, RandomPhasePolicy +from training.dataset import CityFlowDataset +from training.device import configure_torch_runtime, resolve_torch_device +from training.models import RunningNormalizer, TrafficControlQNetwork +from training.rollout import evaluate_policy +from training.train_local_policy import build_env, build_env_config, load_env_config + +# Metrics to run ANOVA on: (result_key, display_label, lower_is_better) +ANOVA_METRICS = [ + ("episode_return", "Episode Return", False), + ("mean_waiting_vehicles", "Mean Waiting Vehicles", True), + ("average_travel_time", "Average Travel Time (s)", True), + ("throughput", "Throughput (vehicles)", False), +] + +POLICY_NAMES = ("learned", "fixed", "random") + + +def parse_args() -> argparse.Namespace: + p = argparse.ArgumentParser(description="ANOVA test: RL vs baselines.") + p.add_argument( + "--checkpoint", + default="artifacts/dqn_shared/best_validation.pt", + help="Path to the trained DQN checkpoint.", + ) + p.add_argument( + "--split", + default="test", + choices=("train", "val", "test"), + help="Dataset split to evaluate on.", + ) + p.add_argument("--scenarios-per-city", type=int, default=1) + p.add_argument("--max-cities", type=int, default=None) + p.add_argument("--generated-root", default="data/generated") + p.add_argument("--splits-root", default="data/splits") + p.add_argument("--device", default=None) + p.add_argument("--fixed-green-time", type=int, default=20) + p.add_argument("--random-seed", type=int, default=7) + p.add_argument( + "--output-dir", + default="results/anova", + help="Directory where the text report and JSON results are saved (created if missing).", + ) + p.add_argument("--disable-tqdm", action="store_true") + # Env config args — defaults match training defaults + p.add_argument("--decision-interval", type=int, default=5) + p.add_argument("--simulator-interval", type=int, default=1) + p.add_argument("--min-green-time", type=int, default=10) + p.add_argument("--thread-num", type=int, default=1) + p.add_argument("--max-episode-seconds", type=int, default=None) + p.add_argument("--max-incoming-lanes", type=int, default=16) + p.add_argument("--count-scale", type=float, default=20.0) + p.add_argument("--elapsed-time-scale", type=float, default=60.0) + p.add_argument("--disable-district-context", action="store_true") + p.add_argument("--disable-outgoing-congestion", action="store_true") + p.add_argument("--reward-variant", default="wait_queue_throughput") + p.add_argument("--waiting-weight", type=float, default=1.0) + p.add_argument("--vehicle-weight", type=float, default=0.1) + p.add_argument("--pressure-weight", type=float, default=0.0) + p.add_argument("--reward-scale", type=float, default=0.1) + p.add_argument("--disable-lane-reward-normalization", action="store_true") + p.add_argument("--reward-clip", type=float, default=5.0) + p.add_argument("--queue-delta-weight", type=float, default=2.0) + p.add_argument("--wait-delta-weight", type=float, default=4.0) + p.add_argument("--queue-level-weight", type=float, default=0.5) + p.add_argument("--wait-level-weight", type=float, default=1.0) + p.add_argument("--throughput-weight", type=float, default=0.1) + p.add_argument("--imbalance-weight", type=float, default=0.1) + p.add_argument("--reward-delta-clip", type=float, default=2.0) + p.add_argument("--reward-level-normalizer", type=float, default=10.0) + p.add_argument("--throughput-normalizer", type=float, default=2.0) + p.add_argument("--policy-arch", default="single_head_with_district_feature") + return p.parse_args() + + +# --------------------------------------------------------------------------- +# Data collection +# --------------------------------------------------------------------------- + +def collect_episode_metrics( + policies: dict, + scenario_specs: list, + disable_tqdm: bool, +) -> dict[str, list[dict]]: + """Run each policy over all scenarios and return raw per-episode metric dicts.""" + all_metrics: dict[str, list[dict]] = {name: [] for name in policies} + + for name, (actor, device, normalizer, env_factory_fn) in policies.items(): + print(f"\n[collect] policy={name} n_scenarios={len(scenario_specs)}") + iterator = enumerate(scenario_specs, start=1) + if not disable_tqdm: + iterator = tqdm( + iterator, + total=len(scenario_specs), + desc=f"anova:{name}", + dynamic_ncols=True, + leave=False, + ) + for _idx, spec in iterator: + m = evaluate_policy( + env_factory=lambda s=spec, ef=env_factory_fn: ef(s), + actor=actor, + device=device, + obs_normalizer=normalizer, + deterministic=True, + ) + all_metrics[name].append(m) + if not disable_tqdm: + iterator.set_postfix( + city=spec.city_id, + ret=f"{m['episode_return']:.3f}", + ) + return all_metrics + + +# --------------------------------------------------------------------------- +# Statistical tests +# --------------------------------------------------------------------------- + +def extract_metric(episode_list: list[dict], key: str) -> np.ndarray: + return np.array([ep[key] for ep in episode_list if key in ep], dtype=float) + + +def run_anova(groups: dict[str, np.ndarray]) -> dict: + """One-way ANOVA with normality/variance checks, Kruskal-Wallis fallback, and Tukey HSD.""" + arrays = list(groups.values()) + names = list(groups.keys()) + + # Shapiro-Wilk normality test per group + normality: dict[str, dict] = {} + all_normal = True + for name, arr in zip(names, arrays): + if len(arr) >= 3: + stat, pval = stats.shapiro(arr) + normality[name] = {"statistic": float(stat), "p_value": float(pval)} + if pval < 0.05: + all_normal = False + else: + normality[name] = {"statistic": None, "p_value": None} + + # Levene's test for homogeneity of variance + levene_stat, levene_p = stats.levene(*arrays) + equal_variance = levene_p >= 0.05 + + # One-way ANOVA + f_stat, anova_p = stats.f_oneway(*arrays) + + # Effect size: eta-squared (SS_between / SS_total) + grand_mean = np.concatenate(arrays).mean() + ss_between = sum(len(a) * (a.mean() - grand_mean) ** 2 for a in arrays) + ss_total = sum(((a - grand_mean) ** 2).sum() for a in arrays) + eta_squared = float(ss_between / ss_total) if ss_total > 0 else 0.0 + + # Kruskal-Wallis (non-parametric; always computed for reference) + kw_stat, kw_p = stats.kruskal(*arrays) + + # Tukey HSD pairwise (scipy >= 1.8) + tukey_result = stats.tukey_hsd(*arrays) + pairs = [] + for i in range(len(names)): + for j in range(i + 1, len(names)): + pval = tukey_result.pvalue[i, j] + pairs.append({ + "group_a": names[i], + "group_b": names[j], + "mean_a": float(arrays[i].mean()), + "mean_b": float(arrays[j].mean()), + "difference": float(arrays[i].mean() - arrays[j].mean()), + "p_value": float(pval), + "significant": bool(pval < 0.05), + }) + + return { + "n_per_group": {n: int(len(a)) for n, a in zip(names, arrays)}, + "means": {n: float(a.mean()) for n, a in zip(names, arrays)}, + "stds": {n: float(a.std()) for n, a in zip(names, arrays)}, + "normality": normality, + "all_normal": all_normal, + "levene": {"statistic": float(levene_stat), "p_value": float(levene_p)}, + "equal_variance": equal_variance, + "anova": {"f_statistic": float(f_stat), "p_value": float(anova_p)}, + "kruskal_wallis": {"h_statistic": float(kw_stat), "p_value": float(kw_p)}, + "eta_squared": eta_squared, + "tukey_hsd": pairs, + "recommended_test": "ANOVA" if all_normal and equal_variance else "Kruskal-Wallis", + } + + +# --------------------------------------------------------------------------- +# Reporting +# --------------------------------------------------------------------------- + +def sig_stars(p: float) -> str: + if p < 0.001: + return "***" + if p < 0.01: + return "**" + if p < 0.05: + return "*" + return "ns" + + +def format_results(results: dict[str, dict]) -> str: + lines: list[str] = [] + sep = "=" * 78 + thin = "-" * 78 + + lines.append("") + lines.append(sep) + lines.append("ANOVA RESULTS: Learned DQN vs FixedCycle vs Random") + lines.append(sep) + + for metric_key, label, lower_is_better in ANOVA_METRICS: + if metric_key not in results: + continue + r = results[metric_key] + test = r["recommended_test"] + if test == "ANOVA": + stat_val = r["anova"]["f_statistic"] + p_val = r["anova"]["p_value"] + stat_label = "F" + else: + stat_val = r["kruskal_wallis"]["h_statistic"] + p_val = r["kruskal_wallis"]["p_value"] + stat_label = "H" + + lines.append("") + lines.append(thin) + lines.append(f" Metric : {label}") + lines.append( + f" Test : {test} " + f"({stat_label}={stat_val:.4f}, p={p_val:.4f} {sig_stars(p_val)}, " + f"eta2={r['eta_squared']:.4f})" + ) + lines.append(f" n : {r['n_per_group']}") + lines.append(" Means :") + for name in POLICY_NAMES: + if name not in r["means"]: + continue + direction = "(higher=better)" if not lower_is_better else "(lower=better)" + suffix = f" {direction}" if name == "learned" else "" + lines.append( + f" {name:10s} {r['means'][name]:10.4f} +/- {r['stds'][name]:.4f}{suffix}" + ) + + lines.append(" Tukey HSD pairwise:") + for pair in r["tukey_hsd"]: + sig_label = "SIGNIFICANT" if pair["significant"] else "not significant" + rl_note = "" + if "learned" in (pair["group_a"], pair["group_b"]): + ga, gb = pair["group_a"], pair["group_b"] + diff = pair["difference"] + learned_better = ( + (ga == "learned" and not lower_is_better and diff > 0) + or (ga == "learned" and lower_is_better and diff < 0) + or (gb == "learned" and not lower_is_better and diff < 0) + or (gb == "learned" and lower_is_better and diff > 0) + ) + rl_note = " [RL wins]" if learned_better else " [RL loses]" + lines.append( + f" {pair['group_a']:10s} vs {pair['group_b']:10s} " + f"delta={pair['difference']:+.4f} " + f"p={pair['p_value']:.4f} {sig_stars(pair['p_value'])} " + f"{sig_label}{rl_note}" + ) + + if not r["all_normal"]: + lines.append(" [!] Normality violated for at least one group -- Kruskal-Wallis preferred.") + if not r["equal_variance"]: + lines.append(" [!] Levene's test failed (unequal variances).") + + lines.append("") + lines.append(sep) + lines.append("Significance: *** p<0.001 ** p<0.01 * p<0.05 ns = not significant") + lines.append(sep) + lines.append("") + return "\n".join(lines) + + +# --------------------------------------------------------------------------- +# Main +# --------------------------------------------------------------------------- + +def main() -> None: + args = parse_args() + + output_dir = Path(args.output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + report_path = output_dir / "anova_report.txt" + json_path = output_dir / "anova_results.json" + + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + scenario_specs = dataset.iter_scenarios( + split_name=args.split, + scenarios_per_city=args.scenarios_per_city, + max_cities=args.max_cities, + diversify_single_scenario=True, + ) + print(f"[setup] split={args.split} n_scenarios={len(scenario_specs)}") + print(f"[setup] output_dir={output_dir.resolve()}") + + if len(scenario_specs) < 3: + print( + f"WARNING: Only {len(scenario_specs)} scenario(s) found. ANOVA requires independent " + "observations per group. Use --scenarios-per-city or a larger split for reliable results." + ) + + device = resolve_torch_device(args.device) + configure_torch_runtime(device) + print(f"[setup] torch_device={device.type}") + + checkpoint_path = Path(args.checkpoint) + checkpoint = torch.load(checkpoint_path, map_location=device, weights_only=False) + + env_config = build_env_config(args) + if checkpoint.get("env_config"): + env_config = load_env_config(checkpoint["env_config"]) + print("[setup] env_config loaded from checkpoint") + + network_architecture = checkpoint.get("network_architecture") or checkpoint.get( + "policy_architecture", {} + ) + trainer_config = checkpoint.get("dqn_config", {}) + policy_arch = network_architecture.get( + "policy_arch", trainer_config.get("policy_arch", args.policy_arch) + ) + + dqn = TrafficControlQNetwork( + observation_dim=int(network_architecture["observation_dim"]), + action_dim=int(network_architecture.get("action_dim", 2)), + hidden_dim=int(trainer_config.get("hidden_dim", 256)), + num_layers=int(trainer_config.get("hidden_layers", 2)), + district_types=tuple(network_architecture.get("district_types", ())), + policy_arch=policy_arch, + dueling=bool(network_architecture.get("dueling", True)), + ).to(device) + dqn.load_state_dict( + checkpoint.get("q_network_state_dict") or checkpoint["policy_state_dict"] + ) + dqn.eval() + + obs_normalizer = None + if checkpoint.get("obs_normalizer"): + obs_normalizer = RunningNormalizer() + obs_normalizer.load_state_dict(checkpoint["obs_normalizer"]) + + print(f"[setup] checkpoint={checkpoint_path.name} policy_arch={policy_arch}") + + def env_factory(spec): + return build_env(env_config, spec) + + policies = { + "learned": (dqn, device, obs_normalizer, env_factory), + "fixed": (FixedCyclePolicy(green_time=args.fixed_green_time), None, None, env_factory), + "random": (RandomPhasePolicy(seed=args.random_seed), None, None, env_factory), + } + + # --- Collect per-episode raw data --- + raw_data = collect_episode_metrics(policies, scenario_specs, args.disable_tqdm) + + # --- Run ANOVA for each metric --- + anova_results: dict[str, dict] = {} + for metric_key, _label, _lower in ANOVA_METRICS: + groups = { + name: extract_metric(episodes, metric_key) + for name, episodes in raw_data.items() + } + if any(len(arr) == 0 for arr in groups.values()): + print(f"[anova] skipping {metric_key} -- not present in all policy outputs") + continue + anova_results[metric_key] = run_anova(groups) + + # --- Format and save report --- + report_text = format_results(anova_results) + print(report_text) + report_path.write_text(report_text, encoding="utf-8") + print(f"[output] report saved to {report_path}") + + # --- Save JSON --- + payload = { + "split": args.split, + "checkpoint": str(checkpoint_path), + "n_scenarios": len(scenario_specs), + "raw_episode_data": raw_data, + "anova_results": anova_results, + } + json_path.write_text(json.dumps(payload, indent=2), encoding="utf-8") + print(f"[output] JSON saved to {json_path}") + + +if __name__ == "__main__": + main() diff --git a/scripts/compare_local_policies.py b/scripts/compare_local_policies.py new file mode 100644 index 0000000000000000000000000000000000000000..832a94ffe74e0e00f7a2e6a1809f1a7ea6805202 --- /dev/null +++ b/scripts/compare_local_policies.py @@ -0,0 +1,251 @@ +from __future__ import annotations + +import argparse +import json +from pathlib import Path +import sys + +import torch +from tqdm.auto import tqdm + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +from agents.local_policy import FixedCyclePolicy, RandomPhasePolicy +from training.cityflow_dataset import CityFlowDataset +from training.device import configure_torch_runtime, resolve_torch_device +from training.models import RunningNormalizer, TrafficControlQNetwork +from training.rollout import evaluate_policy +from training.train_local_policy import build_env, build_env_config, load_env_config +from training.trainer import aggregate_metrics, aggregate_metrics_by_scenario + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description=( + "Compare a learned local policy checkpoint against fixed and random " + "baselines under the same reward config." + ) + ) + parser.add_argument("--checkpoint", required=True) + parser.add_argument("--city-id", default=None) + parser.add_argument("--scenario-name", default=None) + parser.add_argument("--split", default="val", choices=("train", "val", "test")) + parser.add_argument("--max-val-cities", type=int, default=None) + parser.add_argument("--scenarios-per-city", type=int, default=1) + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument("--device", default=None) + + parser.add_argument("--decision-interval", type=int, default=5) + parser.add_argument("--simulator-interval", type=int, default=1) + parser.add_argument("--min-green-time", type=int, default=10) + parser.add_argument("--thread-num", type=int, default=1) + parser.add_argument("--max-episode-seconds", type=int, default=None) + parser.add_argument("--max-incoming-lanes", type=int, default=16) + parser.add_argument("--count-scale", type=float, default=20.0) + parser.add_argument("--elapsed-time-scale", type=float, default=60.0) + parser.add_argument("--disable-district-context", action="store_true") + parser.add_argument("--disable-outgoing-congestion", action="store_true") + parser.add_argument("--reward-variant", default="wait_queue_throughput") + parser.add_argument("--waiting-weight", type=float, default=1.0) + parser.add_argument("--vehicle-weight", type=float, default=0.1) + parser.add_argument("--pressure-weight", type=float, default=0.0) + parser.add_argument("--reward-scale", type=float, default=0.1) + parser.add_argument("--disable-lane-reward-normalization", action="store_true") + parser.add_argument("--reward-clip", type=float, default=5.0) + parser.add_argument("--queue-delta-weight", type=float, default=2.0) + parser.add_argument("--wait-delta-weight", type=float, default=4.0) + parser.add_argument("--queue-level-weight", type=float, default=0.5) + parser.add_argument("--wait-level-weight", type=float, default=1.0) + parser.add_argument("--throughput-weight", type=float, default=0.1) + parser.add_argument("--imbalance-weight", type=float, default=0.1) + parser.add_argument("--reward-delta-clip", type=float, default=2.0) + parser.add_argument("--reward-level-normalizer", type=float, default=10.0) + parser.add_argument("--throughput-normalizer", type=float, default=2.0) + parser.add_argument("--policy-arch", default="single_head_with_district_feature") + parser.add_argument("--fixed-green-time", type=int, default=20) + parser.add_argument("--random-seed", type=int, default=7) + parser.add_argument("--disable-tqdm", action="store_true") + parser.add_argument("--verbose-progress", action="store_true") + return parser.parse_args() + + +def main() -> None: + args = parse_args() + if (args.city_id is None) != (args.scenario_name is None): + raise ValueError("--city-id and --scenario-name must be provided together.") + + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + scenario_specs = build_scenario_specs(dataset, args) + + device = resolve_torch_device(args.device) + configure_torch_runtime(device) + print(f"[setup] torch_device={device.type}") + + env_config = build_env_config(args) + checkpoint = torch.load( + args.checkpoint, + map_location=device, + weights_only=False, + ) + if checkpoint.get("env_config"): + env_config = load_env_config(checkpoint["env_config"]) + + network_architecture = checkpoint.get("network_architecture") or checkpoint.get( + "policy_architecture", {} + ) + trainer_config = checkpoint.get("dqn_config", {}) + checkpoint_policy_arch = network_architecture.get( + "policy_arch", + trainer_config.get("policy_arch", args.policy_arch), + ) + + actor = TrafficControlQNetwork( + observation_dim=int(network_architecture["observation_dim"]), + action_dim=int(network_architecture.get("action_dim", 2)), + hidden_dim=int(trainer_config.get("hidden_dim", 256)), + num_layers=int(trainer_config.get("hidden_layers", 2)), + district_types=tuple(network_architecture.get("district_types", ())), + policy_arch=checkpoint_policy_arch, + dueling=bool(network_architecture.get("dueling", True)), + ).to(device) + actor.load_state_dict( + checkpoint.get("q_network_state_dict") or checkpoint["policy_state_dict"] + ) + actor.eval() + + obs_normalizer = None + if checkpoint.get("obs_normalizer"): + obs_normalizer = RunningNormalizer() + obs_normalizer.load_state_dict(checkpoint["obs_normalizer"]) + + policies = { + "learned": (actor, device, obs_normalizer), + "fixed": (FixedCyclePolicy(green_time=args.fixed_green_time), None, None), + "random": (RandomPhasePolicy(seed=args.random_seed), None, None), + } + scope = build_scope_summary(args, scenario_specs) + print( + "[compare] " + f"num_cities={scope['num_cities']} " + f"num_scenarios={scope['num_scenarios']} " + f"reward_variant={env_config.reward.variant}" + ) + + aggregate_results: dict[str, dict[str, float]] = {} + scenario_breakdowns: dict[str, dict[str, float]] = {} + for name, (policy, policy_device, normalizer) in policies.items(): + print(f"[compare] starting policy={name}") + episode_metrics = [] + iterator = enumerate(scenario_specs, start=1) + if not args.disable_tqdm: + iterator = tqdm( + iterator, + total=len(scenario_specs), + desc=f"compare:{name}", + dynamic_ncols=True, + leave=False, + ) + for index, spec in iterator: + if args.verbose_progress: + message = ( + f"[compare] policy={name} city={spec.city_id} " + f"scenario={spec.scenario_name} i={index}/{len(scenario_specs)}" + ) + if args.disable_tqdm: + print(message) + else: + tqdm.write(message) + metrics = evaluate_policy( + env_factory=lambda spec=spec, config=env_config: build_env(config, spec), + actor=policy, + device=policy_device, + obs_normalizer=normalizer, + deterministic=True, + ) + episode_metrics.append(metrics) + if not args.disable_tqdm: + iterator.set_postfix( + city=spec.city_id, + scenario=spec.scenario_name, + ret=f"{metrics['episode_return']:.3f}", + ) + aggregate_results[name] = aggregate_metrics(episode_metrics) + scenario_breakdowns[name] = aggregate_metrics_by_scenario(episode_metrics) + mean_return = aggregate_results[name].get("mean_episode_return", float("nan")) + mean_wait = aggregate_results[name].get("mean_mean_waiting_vehicles", float("nan")) + mean_throughput = aggregate_results[name].get("mean_throughput", float("nan")) + message = ( + f"[compare] finished policy={name} " + f"mean_return={mean_return:.3f} " + f"wait={mean_wait:.3f} " + f"throughput={mean_throughput:.1f}" + ) + if args.disable_tqdm: + print(message) + else: + tqdm.write(message) + + learned = aggregate_results["learned"] + fixed = aggregate_results["fixed"] + random = aggregate_results["random"] + summary = { + "comparison_scope": build_scope_summary(args, scenario_specs), + "reward_variant": env_config.reward.variant, + "checkpoint": args.checkpoint, + "results": aggregate_results, + "scenario_breakdowns": scenario_breakdowns, + "deltas": { + "learned_minus_fixed_return": float(learned["mean_episode_return"]) + - float(fixed["mean_episode_return"]), + "learned_minus_random_return": float(learned["mean_episode_return"]) + - float(random["mean_episode_return"]), + "learned_minus_fixed_wait": float(learned["mean_mean_waiting_vehicles"]) + - float(fixed["mean_mean_waiting_vehicles"]), + "learned_minus_random_wait": float(learned["mean_mean_waiting_vehicles"]) + - float(random["mean_mean_waiting_vehicles"]), + "learned_minus_fixed_travel_time": float(learned["mean_average_travel_time"]) + - float(fixed["mean_average_travel_time"]), + "learned_minus_random_travel_time": float(learned["mean_average_travel_time"]) + - float(random["mean_average_travel_time"]), + "learned_minus_fixed_throughput": float(learned["mean_throughput"]) + - float(fixed["mean_throughput"]), + "learned_minus_random_throughput": float(learned["mean_throughput"]) + - float(random["mean_throughput"]), + }, + } + print(json.dumps(summary, indent=2)) + + +def build_scenario_specs(dataset: CityFlowDataset, args: argparse.Namespace) -> list: + if args.city_id and args.scenario_name: + return [dataset.build_scenario_spec(args.city_id, args.scenario_name)] + return dataset.iter_scenarios( + split_name=args.split, + scenarios_per_city=args.scenarios_per_city, + max_cities=args.max_val_cities, + diversify_single_scenario=True, + ) + + +def build_scope_summary(args: argparse.Namespace, scenario_specs: list) -> dict[str, object]: + city_ids = sorted({spec.city_id for spec in scenario_specs}) + scenario_names = sorted({spec.scenario_name for spec in scenario_specs}) + return { + "split": args.split if not args.city_id else None, + "city_id": args.city_id, + "scenario_name": args.scenario_name, + "num_cities": len(city_ids), + "num_scenarios": len(scenario_specs), + "city_ids": city_ids, + "scenario_names": scenario_names, + } + + +if __name__ == "__main__": + main() diff --git a/scripts/diagnose_llm_runtime.py b/scripts/diagnose_llm_runtime.py new file mode 100644 index 0000000000000000000000000000000000000000..d91c22ede4e300cb7e5f2049a654054e33e9e8eb --- /dev/null +++ b/scripts/diagnose_llm_runtime.py @@ -0,0 +1,1132 @@ +from __future__ import annotations + +import argparse +from collections import Counter +from dataclasses import asdict +from datetime import datetime, timezone +import difflib +import json +from pathlib import Path +from statistics import mean, median +import sys +from typing import Any + +import numpy as np + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +from district_llm.eval import load_rows +from district_llm.inference import DistrictLLMInference +from district_llm.prompting import ( + build_chat_messages, + build_system_prompt, + build_user_prompt, + format_district_prompt, + format_district_prompt_from_user_content, + render_chat_prompt, +) +from district_llm.repair import ( + RepairConfig, + parse_candidate_intersections_from_text, +) +from district_llm.rl_guidance_wrapper import FixedRLPolicyAdapter +from district_llm.schema import ( + DISTRICT_STRATEGIES, + PHASE_BIASES, + PRIORITY_CORRIDORS, + CandidateIntersection, + CongestedIntersection, + DistrictAction, + DistrictStateSummary, +) +from district_llm.summary_builder import DistrictStateSummaryBuilder +from env.observation_builder import ObservationConfig +from env.reward import RewardConfig +from env.traffic_env import EnvConfig +from training.cityflow_dataset import CityFlowDataset, ScenarioSpec +from training.train_local_policy import build_env + + +REQUIRED_ACTION_KEYS = { + "strategy", + "priority_corridor", + "target_intersections", + "phase_bias", + "duration_steps", +} +SUMMARY_SCALAR_ORDER = [ + "city_id", + "district_id", + "district_type", + "scenario", + "scenario_type", + "decision_step", + "sim_time", + "intersection_count", + "avg_queue", + "max_queue", + "total_queue", + "avg_wait", + "max_wait", + "total_wait", + "avg_outgoing_load", + "max_outgoing_load", + "total_outgoing_load", + "recent_throughput", + "queue_change", + "wait_change", + "throughput_change", + "ns_queue", + "ew_queue", + "ns_wait", + "ew_wait", + "dominant_flow", + "boundary_queue_total", + "boundary_wait_total", + "spillback_risk", + "incident_flag", + "construction_flag", + "overload_flag", + "event_flag", +] + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description=( + "Diagnose why district-LLM runtime guidance fails even when offline validation looks strong." + ) + ) + parser.add_argument("--model-path", required=True) + parser.add_argument("--rl-checkpoint", required=True) + parser.add_argument("--val-jsonl", default="data/district_llm_dataset_v3/val.jsonl") + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument("--split", default="val", choices=("train", "val", "test")) + parser.add_argument("--cities", nargs="+", default=None) + parser.add_argument("--scenarios", nargs="+", default=None) + parser.add_argument("--max-diagnostic-calls", type=int, default=20) + parser.add_argument("--max-offline-examples", type=int, default=20) + parser.add_argument("--max-episode-seconds", type=int, default=300) + parser.add_argument("--max-new-tokens", type=int, default=128) + parser.add_argument("--device", default=None) + parser.add_argument("--output-dir", default="artifacts/llm_runtime_diagnosis") + parser.add_argument( + "--allow-only-visible-candidates", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument("--max-target-intersections", type=int, default=3) + parser.add_argument( + "--fallback-on-empty-targets", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument( + "--fallback-mode", + choices=("heuristic", "hold", "none"), + default="heuristic", + ) + return parser.parse_args() + + +def main() -> None: + args = parse_args() + output_dir = Path(args.output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + + repair_config = RepairConfig( + allow_only_visible_candidates=args.allow_only_visible_candidates, + max_target_intersections=args.max_target_intersections, + fallback_on_empty_targets=args.fallback_on_empty_targets, + fallback_mode=args.fallback_mode, + ) + inference = DistrictLLMInference( + model_name_or_path=args.model_path, + device=args.device, + repair_config=repair_config, + ) + + runtime_rows = collect_runtime_rows(args=args, inference=inference) + offline_rows = collect_offline_rows(args=args, inference=inference) + all_rows = runtime_rows + offline_rows + + failure_examples = [ + flatten_failure_example(row, prompt_style_key) + for row in all_rows + for prompt_style_key in ("runtime_flat", "training_chat") + if row[prompt_style_key]["wrapper_would_fallback"] + ] + summary_report = build_summary_report( + args=args, + inference=inference, + runtime_rows=runtime_rows, + offline_rows=offline_rows, + ) + prompt_comparison = render_prompt_comparison( + runtime_rows=runtime_rows, + offline_rows=offline_rows, + summary_report=summary_report, + ) + + write_jsonl(output_dir / "diagnostic_rows.jsonl", all_rows) + write_json(output_dir / "summary_report.json", summary_report) + write_text(output_dir / "prompt_comparison.md", prompt_comparison) + write_jsonl(output_dir / "validator_failure_examples.jsonl", failure_examples) + + print(json.dumps(summary_report, indent=2, sort_keys=True)) + + +def collect_runtime_rows( + args: argparse.Namespace, + inference: DistrictLLMInference, +) -> list[dict[str, Any]]: + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + dataset.generate_default_splits() + scenario_specs = resolve_scenario_specs(dataset=dataset, args=args) + + policy = FixedRLPolicyAdapter( + checkpoint_path=args.rl_checkpoint, + device=args.device, + ) + env_config = policy.env_config or default_env_config() + env_config = EnvConfig( + simulator_interval=env_config.simulator_interval, + decision_interval=env_config.decision_interval, + min_green_time=env_config.min_green_time, + thread_num=env_config.thread_num, + max_episode_seconds=int(args.max_episode_seconds), + observation=env_config.observation, + reward=env_config.reward, + ) + + summary_builder = DistrictStateSummaryBuilder( + top_k=3, + candidate_limit=max(6, args.max_target_intersections), + ) + rows: list[dict[str, Any]] = [] + + for scenario_spec in scenario_specs: + if len(rows) >= args.max_diagnostic_calls: + break + env = build_env(env_config, scenario_spec) + observation_batch = env.reset() + summary_builder.reset() + done = False + while not done and len(rows) < args.max_diagnostic_calls: + summaries = summary_builder.build_all(env, observation_batch) + for district_id in sorted(summaries): + if len(rows) >= args.max_diagnostic_calls: + break + summary = summaries[district_id] + rows.append( + diagnose_summary_call( + inference=inference, + summary=summary, + source="runtime_live", + city_id=scenario_spec.city_id, + scenario=scenario_spec.scenario_name, + district_id=district_id, + decision_step=int(summary.decision_step), + wrapper_mode="diagnose_llm_runtime", + max_new_tokens=args.max_new_tokens, + ) + ) + if len(rows) >= args.max_diagnostic_calls: + break + actions = policy.decide(observation_batch).actions + observation_batch, _, done, _ = env.step(actions) + return rows + + +def collect_offline_rows( + args: argparse.Namespace, + inference: DistrictLLMInference, +) -> list[dict[str, Any]]: + raw_rows = load_rows(args.val_jsonl, max_examples=args.max_offline_examples) + rows: list[dict[str, Any]] = [] + for index, row in enumerate(raw_rows): + training_messages = row["messages"][:2] + summary_text = row["messages"][1]["content"] + summary, summary_parse = parse_summary_text(summary_text) + rows.append( + diagnose_summary_call( + inference=inference, + summary=summary, + source="offline_validation_runtime_codepath", + city_id=str(row.get("city_id", summary.city_id)), + scenario=str(row.get("scenario", summary.scenario_name)), + district_id=str(row.get("district_id", summary.district_id)), + decision_step=int(summary.decision_step), + wrapper_mode="diagnose_llm_runtime", + max_new_tokens=args.max_new_tokens, + training_messages=training_messages, + ground_truth_payload=json.loads(row["messages"][2]["content"]), + original_user_prompt=summary_text, + summary_parse=summary_parse, + example_index=index, + ) + ) + return rows + + +def diagnose_summary_call( + inference: DistrictLLMInference, + summary: DistrictStateSummary, + source: str, + city_id: str, + scenario: str, + district_id: str, + decision_step: int, + wrapper_mode: str, + max_new_tokens: int, + training_messages: list[dict[str, str]] | None = None, + ground_truth_payload: dict[str, Any] | None = None, + original_user_prompt: str | None = None, + summary_parse: dict[str, Any] | None = None, + example_index: int | None = None, +) -> dict[str, Any]: + training_messages = training_messages or build_chat_messages( + summary, + max_target_intersections=inference.repair_config.max_target_intersections, + allow_only_visible_candidates=inference.repair_config.allow_only_visible_candidates, + ) + runtime_user_prompt = original_user_prompt or build_user_prompt(summary) + runtime_flat_prompt = format_district_prompt( + summary, + max_target_intersections=inference.repair_config.max_target_intersections, + allow_only_visible_candidates=inference.repair_config.allow_only_visible_candidates, + ) + training_chat_prompt = render_chat_prompt( + training_messages, + tokenizer=inference.tokenizer, + add_generation_prompt=True, + ) + runtime_flat_from_user_prompt = format_district_prompt_from_user_content( + runtime_user_prompt, + max_target_intersections=inference.repair_config.max_target_intersections, + allow_only_visible_candidates=inference.repair_config.allow_only_visible_candidates, + ) + + runtime_flat = run_prompt_diagnostic( + inference=inference, + prompt_text=runtime_flat_prompt, + summary=summary, + max_new_tokens=max_new_tokens, + prompt_style="runtime_flat", + ) + training_chat = run_prompt_diagnostic( + inference=inference, + prompt_text=training_chat_prompt, + summary=summary, + max_new_tokens=max_new_tokens, + prompt_style="training_chat", + ) + + training_system_prompt = training_messages[0]["content"] if training_messages else build_system_prompt( + max_target_intersections=inference.repair_config.max_target_intersections, + allow_only_visible_candidates=inference.repair_config.allow_only_visible_candidates, + ) + training_user_prompt = training_messages[1]["content"] if len(training_messages) > 1 else runtime_user_prompt + + prompt_compare = compare_prompt_shapes( + training_system_prompt=training_system_prompt, + training_user_prompt=training_user_prompt, + runtime_flat_prompt=runtime_flat_prompt, + runtime_flat_from_user_prompt=runtime_flat_from_user_prompt, + training_chat_prompt=training_chat_prompt, + ) + + row = { + "source": source, + "example_index": example_index, + "city_id": city_id, + "scenario": scenario, + "district_id": district_id, + "decision_step": int(decision_step), + "wrapper_mode": wrapper_mode, + "training_system_prompt": training_system_prompt, + "training_user_prompt": training_user_prompt, + "runtime_flat_prompt": runtime_flat_prompt, + "runtime_flat_prompt_from_user_prompt": runtime_flat_from_user_prompt, + "training_chat_prompt": training_chat_prompt, + "prompt_comparison": prompt_compare, + "summary_features": summary_features(runtime_user_prompt, summary_parse=summary_parse), + "summary_state": summary.to_dict(), + "runtime_flat": runtime_flat, + "training_chat": training_chat, + "ground_truth_payload": ground_truth_payload, + } + return row + + +def run_prompt_diagnostic( + inference: DistrictLLMInference, + prompt_text: str, + summary: DistrictStateSummary, + max_new_tokens: int, + prompt_style: str, +) -> dict[str, Any]: + raw_text = inference.generate_raw(prompt=prompt_text, max_new_tokens=max_new_tokens) + action, repair_report, parsed_payload, json_valid, schema_valid_before_repair = inference.parse_action( + raw_text, + summary=summary, + ) + prompt_token_length = token_length(inference, prompt_text) + output_token_length = token_length(inference, raw_text) + diagnostics = analyze_generation_result( + raw_text=raw_text, + parsed_payload=parsed_payload, + summary=summary, + repair_report=repair_report, + max_new_tokens=max_new_tokens, + output_token_length=output_token_length, + json_valid=json_valid, + schema_valid_before_repair=schema_valid_before_repair, + ) + return { + "prompt_style": prompt_style, + "prompt_token_length": prompt_token_length, + "output_token_length": output_token_length, + "prompt_near_model_limit": prompt_near_model_limit(inference, prompt_token_length), + "raw_text": raw_text, + "extracted_json_text": diagnostics["extracted_json_text"], + "parsed_payload_before_repair": parsed_payload, + "action_after_repair": action.to_dict(), + "repair_report": repair_report.to_dict(), + "json_valid": bool(json_valid), + "schema_valid_before_repair": bool(schema_valid_before_repair), + "wrapper_would_fallback": bool(diagnostics["wrapper_would_fallback"]), + "failure_reasons": diagnostics["failure_reasons"], + "candidate_diagnostics": diagnostics["candidate_diagnostics"], + "possible_truncation": bool(diagnostics["possible_truncation"]), + } + + +def analyze_generation_result( + raw_text: str, + parsed_payload: dict[str, Any] | None, + summary: DistrictStateSummary, + repair_report, + max_new_tokens: int, + output_token_length: int | None, + json_valid: bool, + schema_valid_before_repair: bool, +) -> dict[str, Any]: + failure_reasons: list[str] = [] + extracted_json_text, prefix_text, suffix_text = extract_json_details(raw_text) + if "```" in raw_text: + failure_reasons.append("markdown_code_fence_present") + if prefix_text.strip(): + failure_reasons.append("extra_prefix_text") + if suffix_text.strip(): + failure_reasons.append("extra_suffix_text") + if extracted_json_text is None: + failure_reasons.append("no_json_object_found") + if not json_valid: + failure_reasons.append("json_parse_error") + + raw_targets = [] + if parsed_payload is None: + parsed_payload = None + else: + missing_keys = sorted(REQUIRED_ACTION_KEYS - set(parsed_payload)) + extra_keys = sorted(set(parsed_payload) - REQUIRED_ACTION_KEYS) + if missing_keys: + failure_reasons.append("missing_required_field") + if extra_keys: + failure_reasons.append("extra_field_present") + strategy = parsed_payload.get("strategy") + if strategy not in DISTRICT_STRATEGIES: + failure_reasons.append("unknown_strategy") + priority_corridor = parsed_payload.get("priority_corridor") + if priority_corridor is not None and priority_corridor not in PRIORITY_CORRIDORS: + failure_reasons.append("unknown_priority_corridor") + phase_bias = parsed_payload.get("phase_bias") + if phase_bias not in PHASE_BIASES: + failure_reasons.append("unknown_phase_bias") + duration_steps = parsed_payload.get("duration_steps") + if not isinstance(duration_steps, int): + failure_reasons.append("invalid_duration_type") + elif not 1 <= duration_steps <= 20: + failure_reasons.append("invalid_duration_range") + + raw_target_payload = parsed_payload.get("target_intersections", []) + if isinstance(raw_target_payload, list): + raw_targets = [str(item) for item in raw_target_payload] + elif isinstance(raw_target_payload, str): + failure_reasons.append("target_intersections_not_json_array") + raw_targets = [raw_target_payload] + else: + failure_reasons.append("target_intersections_wrong_type") + + if not schema_valid_before_repair: + failure_reasons.append("schema_validation_failed") + if raw_text.strip() and not raw_text.rstrip().endswith("}"): + failure_reasons.append("output_does_not_end_with_json") + if output_token_length is not None and output_token_length >= max_new_tokens: + failure_reasons.append("possible_generation_truncation") + + candidate_ids = set(summary.candidate_ids()) + candidate_diagnostics = [] + for target in raw_targets: + visible = target in candidate_ids + candidate_diagnostics.append( + { + "target_intersection": target, + "visible_candidate": visible, + "valid_id_format": target.startswith("i_"), + } + ) + if not target.startswith("i_"): + failure_reasons.append("invalid_target_id_format") + if candidate_ids and not visible: + failure_reasons.append("candidate_intersections_constraint_violation") + + if raw_targets == []: + failure_reasons.append("empty_target_intersections") + if repair_report.invalid_ids_removed: + failure_reasons.append("repair_removed_invalid_ids") + if repair_report.non_visible_ids_removed: + failure_reasons.append("repair_removed_non_visible_ids") + if repair_report.empty_after_filtering: + failure_reasons.append("repair_emptied_targets") + if repair_report.fallback_used: + failure_reasons.append(f"repair_used_fallback:{repair_report.fallback_mode}") + + wrapper_would_fallback = ( + not json_valid + or not schema_valid_before_repair + or bool(repair_report.fallback_used) + or bool(repair_report.empty_after_filtering) + ) + return { + "extracted_json_text": extracted_json_text, + "failure_reasons": sorted(set(failure_reasons)), + "candidate_diagnostics": candidate_diagnostics, + "possible_truncation": bool(output_token_length is not None and output_token_length >= max_new_tokens), + "wrapper_would_fallback": wrapper_would_fallback, + } + + +def extract_json_details(raw_text: str) -> tuple[str | None, str, str]: + start = raw_text.find("{") + end = raw_text.rfind("}") + if start == -1 or end == -1 or end <= start: + return None, raw_text, "" + return raw_text[start : end + 1], raw_text[:start], raw_text[end + 1 :] + + +def parse_summary_text(summary_text: str) -> tuple[DistrictStateSummary, dict[str, Any]]: + text = summary_text.strip() + if text.startswith("### DISTRICT STATE"): + text = text.split("\n", 1)[1] if "\n" in text else "" + lines = [line.rstrip() for line in text.splitlines() if line.strip()] + + payload: dict[str, Any] = {} + top_lines: list[str] = [] + candidate_lines: list[str] = [] + observed_order: list[str] = [] + section = "scalars" + for line in lines: + if line == "top_congested_intersections:": + section = "top" + continue + if line == "candidate_intersections:": + section = "candidate" + continue + if line.startswith("- "): + if section == "top": + top_lines.append(line) + elif section == "candidate": + candidate_lines.append(line) + continue + if section != "scalars" or ": " not in line: + continue + key, value = line.split(": ", 1) + observed_order.append(key) + payload[key] = parse_summary_scalar(key, value) + + payload["scenario_name"] = payload.pop("scenario", payload.get("scenario_name", "")) + payload["top_congested_intersections"] = [parse_top_congested_line(line) for line in top_lines if line != "- none"] + candidate_text = "candidate_intersections:\n" + "\n".join(candidate_lines or ["- none"]) + payload["candidate_intersections"] = parse_candidate_intersections_from_text(candidate_text) + summary = DistrictStateSummary.from_dict(payload) + return summary, { + "observed_field_order": observed_order, + "missing_scalar_fields": [key for key in SUMMARY_SCALAR_ORDER if key not in observed_order], + "extra_scalar_fields": [key for key in observed_order if key not in SUMMARY_SCALAR_ORDER], + "top_congested_count": len(payload["top_congested_intersections"]), + "candidate_intersections_count": len(payload["candidate_intersections"]), + "summary_text_length": len(summary_text), + "line_count": len(lines), + } + + +def parse_summary_scalar(key: str, value: str) -> Any: + if key in { + "decision_step", + "sim_time", + "intersection_count", + }: + return int(value) + if key in { + "spillback_risk", + "incident_flag", + "construction_flag", + "overload_flag", + "event_flag", + }: + return bool(int(value)) + if key in { + "city_id", + "district_id", + "district_type", + "scenario", + "scenario_type", + "dominant_flow", + }: + return value + return float(value) + + +def parse_top_congested_line(line: str) -> dict[str, Any]: + tokens = line[2:].split() + payload: dict[str, Any] = { + "intersection_id": tokens[0], + "queue_total": 0.0, + "wait_total": 0.0, + "outgoing_load": 0.0, + "current_phase": 0, + "is_boundary": False, + } + for token in tokens[1:]: + if "=" not in token: + continue + key, value = token.split("=", 1) + if key == "q": + payload["queue_total"] = float(value) + elif key == "w": + payload["wait_total"] = float(value) + elif key == "out": + payload["outgoing_load"] = float(value) + elif key == "phase": + payload["current_phase"] = int(value) + elif key == "boundary": + payload["is_boundary"] = value == "1" + CongestedIntersection(**payload) + return payload + + +def summary_features(summary_text: str, summary_parse: dict[str, Any] | None = None) -> dict[str, Any]: + summary_parse = summary_parse or {} + lines = [line.rstrip() for line in summary_text.splitlines() if line.strip()] + field_order = [] + for line in lines: + if ": " in line and not line.startswith("- "): + field_order.append(line.split(": ", 1)[0]) + elif line.endswith(":") and not line.startswith("- "): + field_order.append(line[:-1]) + return { + "summary_length_chars": len(summary_text), + "summary_line_count": len(lines), + "field_order": field_order, + "field_count": len(field_order), + "has_candidate_intersections": "candidate_intersections:" in summary_text, + "has_top_congested_intersections": "top_congested_intersections:" in summary_text, + **summary_parse, + } + + +def compare_prompt_shapes( + training_system_prompt: str, + training_user_prompt: str, + runtime_flat_prompt: str, + runtime_flat_from_user_prompt: str, + training_chat_prompt: str, +) -> dict[str, Any]: + differences = [] + if training_system_prompt and "You are a district traffic coordinator" in training_system_prompt: + differences.append("training uses an explicit system prompt with JSON rules") + if runtime_flat_prompt.startswith("### DISTRICT ACTION SCHEMA"): + differences.append("runtime flat prompt injects schema text into the single prompt body") + if training_user_prompt.startswith("### DISTRICT STATE"): + differences.append("training user message contains only district state") + if "### DECISION" in runtime_flat_prompt: + differences.append("runtime flat prompt appends an explicit decision header") + if "### DISTRICT ACTION SCHEMA" not in training_user_prompt: + differences.append("training user message omits the schema header entirely") + if runtime_flat_prompt != runtime_flat_from_user_prompt: + differences.append("runtime flat prompt reconstructed from summary object differs from user prompt reconstruction") + return { + "differences": differences, + "runtime_has_system_role": False, + "training_has_system_role": True, + "runtime_has_schema_header": "### DISTRICT ACTION SCHEMA" in runtime_flat_prompt, + "training_user_has_schema_header": "### DISTRICT ACTION SCHEMA" in training_user_prompt, + "runtime_has_decision_header": "### DECISION" in runtime_flat_prompt, + "training_chat_prompt_startswith_system": training_chat_prompt.startswith("system:") or training_chat_prompt.startswith("<"), + } + + +def aggregate_prompt_results(rows: list[dict[str, Any]], prompt_style_key: str) -> dict[str, Any]: + if not rows: + return {} + prompt_rows = [row[prompt_style_key] for row in rows] + failure_counter = Counter( + reason + for row in prompt_rows + for reason in row["failure_reasons"] + ) + candidate_rows = [row["candidate_diagnostics"] for row in prompt_rows] + target_records = [record for records in candidate_rows for record in records] + repair_reports = [row["repair_report"] for row in prompt_rows] + return { + "num_examples": len(prompt_rows), + "json_valid_rate": safe_ratio(sum(int(row["json_valid"]) for row in prompt_rows), len(prompt_rows)), + "schema_valid_before_repair_rate": safe_ratio( + sum(int(row["schema_valid_before_repair"]) for row in prompt_rows), + len(prompt_rows), + ), + "wrapper_would_fallback_rate": safe_ratio( + sum(int(row["wrapper_would_fallback"]) for row in prompt_rows), + len(prompt_rows), + ), + "repair_fallback_rate": safe_ratio( + sum(int(report["fallback_used"]) for report in repair_reports), + len(repair_reports), + ), + "repair_changed_target_list_rate": safe_ratio( + sum( + int(report["raw_targets"] != report["repaired_targets"]) + for report in repair_reports + ), + len(repair_reports), + ), + "repair_emptied_targets_rate": safe_ratio( + sum(int(report["empty_after_filtering"]) for report in repair_reports), + len(repair_reports), + ), + "mean_prompt_token_length": average([row["prompt_token_length"] for row in prompt_rows]), + "mean_output_token_length": average([row["output_token_length"] for row in prompt_rows]), + "possible_truncation_rate": safe_ratio( + sum(int(row["possible_truncation"]) for row in prompt_rows), + len(prompt_rows), + ), + "top_failure_reasons": dict(failure_counter.most_common(20)), + "targets_outside_visible_candidate_rate": safe_ratio( + sum(int(not record["visible_candidate"]) for record in target_records), + len(target_records), + ), + "invalid_target_id_format_rate": safe_ratio( + sum(int(not record["valid_id_format"]) for record in target_records), + len(target_records), + ), + } + + +def aggregate_summary_features(rows: list[dict[str, Any]]) -> dict[str, Any]: + if not rows: + return {} + features = [row["summary_features"] for row in rows] + field_order_signatures = Counter(tuple(item["field_order"]) for item in features) + return { + "num_examples": len(features), + "mean_summary_length_chars": average([item["summary_length_chars"] for item in features]), + "median_summary_length_chars": median_or_zero([item["summary_length_chars"] for item in features]), + "mean_candidate_intersections_count": average( + [item.get("candidate_intersections_count", 0) for item in features] + ), + "mean_top_congested_count": average( + [item.get("top_congested_count", 0) for item in features] + ), + "field_order_signatures": { + "most_common": [ + { + "count": count, + "field_order": list(signature), + } + for signature, count in field_order_signatures.most_common(5) + ] + }, + } + + +def build_summary_report( + args: argparse.Namespace, + inference: DistrictLLMInference, + runtime_rows: list[dict[str, Any]], + offline_rows: list[dict[str, Any]], +) -> dict[str, Any]: + runtime_flat_runtime = aggregate_prompt_results(runtime_rows, "runtime_flat") + training_chat_runtime = aggregate_prompt_results(runtime_rows, "training_chat") + runtime_flat_offline = aggregate_prompt_results(offline_rows, "runtime_flat") + training_chat_offline = aggregate_prompt_results(offline_rows, "training_chat") + + root_causes = rank_root_causes( + runtime_flat_runtime=runtime_flat_runtime, + training_chat_runtime=training_chat_runtime, + runtime_flat_offline=runtime_flat_offline, + training_chat_offline=training_chat_offline, + ) + return { + "generated_at": datetime.now(timezone.utc).isoformat(), + "model_path": args.model_path, + "rl_checkpoint": args.rl_checkpoint, + "repair_config": asdict(inference.repair_config), + "generation_settings": { + "runtime_inference": { + "max_new_tokens": int(args.max_new_tokens), + "do_sample": False, + "prompt_style": "flat single prompt from format_district_prompt", + }, + "offline_eval_style": { + "max_new_tokens": int(args.max_new_tokens), + "do_sample": False, + "prompt_style": "chat messages rendered via build_generation_prompt", + }, + }, + "runtime_live": { + "summary_distribution": aggregate_summary_features(runtime_rows), + "runtime_flat": runtime_flat_runtime, + "training_chat": training_chat_runtime, + }, + "offline_validation_runtime_codepath": { + "summary_distribution": aggregate_summary_features(offline_rows), + "runtime_flat": runtime_flat_offline, + "training_chat": training_chat_offline, + }, + "key_answers": build_key_answers( + runtime_flat_runtime=runtime_flat_runtime, + training_chat_runtime=training_chat_runtime, + runtime_flat_offline=runtime_flat_offline, + training_chat_offline=training_chat_offline, + ), + "likely_root_causes_ranked": root_causes, + } + + +def build_key_answers( + runtime_flat_runtime: dict[str, Any], + training_chat_runtime: dict[str, Any], + runtime_flat_offline: dict[str, Any], + training_chat_offline: dict[str, Any], +) -> dict[str, Any]: + return { + "runtime_prompt_vs_training_prompt": ( + "different" + if runtime_flat_offline.get("wrapper_would_fallback_rate", 0.0) + != training_chat_offline.get("wrapper_would_fallback_rate", 0.0) + else "similar" + ), + "runtime_summary_structure_vs_training_distribution": ( + "requires inspection of summary_distribution stats and prompt comparison" + ), + "raw_outputs_malformed_or_rejected": { + "runtime_flat_runtime_fallback_rate": runtime_flat_runtime.get("wrapper_would_fallback_rate"), + "runtime_flat_runtime_json_valid_rate": runtime_flat_runtime.get("json_valid_rate"), + "runtime_flat_runtime_schema_valid_rate": runtime_flat_runtime.get("schema_valid_before_repair_rate"), + }, + "candidate_constraints_main_problem": bool( + runtime_flat_runtime.get("targets_outside_visible_candidate_rate", 0.0) > 0.2 + or runtime_flat_offline.get("targets_outside_visible_candidate_rate", 0.0) > 0.2 + ), + "truncation_happening": bool( + runtime_flat_runtime.get("possible_truncation_rate", 0.0) > 0.05 + or runtime_flat_offline.get("possible_truncation_rate", 0.0) > 0.05 + ), + "runtime_codepath_succeeds_on_heldout_validation": bool( + runtime_flat_offline.get("wrapper_would_fallback_rate", 1.0) < 0.2 + ), + } + + +def rank_root_causes( + runtime_flat_runtime: dict[str, Any], + training_chat_runtime: dict[str, Any], + runtime_flat_offline: dict[str, Any], + training_chat_offline: dict[str, Any], +) -> list[dict[str, Any]]: + causes: list[dict[str, Any]] = [] + + prompt_gap = ( + runtime_flat_offline.get("wrapper_would_fallback_rate", 0.0) + - training_chat_offline.get("wrapper_would_fallback_rate", 0.0) + ) + causes.append( + { + "cause": "prompt_mismatch_between_runtime_and_training_offline_chat_path", + "score": float(prompt_gap), + "evidence": { + "offline_runtime_flat_fallback_rate": runtime_flat_offline.get("wrapper_would_fallback_rate"), + "offline_training_chat_fallback_rate": training_chat_offline.get("wrapper_would_fallback_rate"), + }, + } + ) + + runtime_summary_gap = ( + training_chat_runtime.get("wrapper_would_fallback_rate", 0.0) + - training_chat_offline.get("wrapper_would_fallback_rate", 0.0) + ) + causes.append( + { + "cause": "runtime_summary_distribution_shift", + "score": float(runtime_summary_gap), + "evidence": { + "runtime_training_chat_fallback_rate": training_chat_runtime.get("wrapper_would_fallback_rate"), + "offline_training_chat_fallback_rate": training_chat_offline.get("wrapper_would_fallback_rate"), + }, + } + ) + + candidate_score = max( + runtime_flat_runtime.get("targets_outside_visible_candidate_rate", 0.0), + runtime_flat_offline.get("targets_outside_visible_candidate_rate", 0.0), + runtime_flat_runtime.get("repair_emptied_targets_rate", 0.0), + runtime_flat_offline.get("repair_emptied_targets_rate", 0.0), + ) + causes.append( + { + "cause": "candidate_intersections_or_visible_target_constraint_mismatch", + "score": float(candidate_score), + "evidence": { + "runtime_targets_outside_visible_rate": runtime_flat_runtime.get("targets_outside_visible_candidate_rate"), + "offline_targets_outside_visible_rate": runtime_flat_offline.get("targets_outside_visible_candidate_rate"), + "runtime_repair_emptied_targets_rate": runtime_flat_runtime.get("repair_emptied_targets_rate"), + }, + } + ) + + validator_score = max( + runtime_flat_runtime.get("wrapper_would_fallback_rate", 0.0) + - runtime_flat_runtime.get("json_valid_rate", 0.0), + runtime_flat_offline.get("wrapper_would_fallback_rate", 0.0) + - runtime_flat_offline.get("json_valid_rate", 0.0), + ) + causes.append( + { + "cause": "validator_or_repair_stricter_than_raw_generation_quality", + "score": float(validator_score), + "evidence": { + "runtime_json_valid_rate": runtime_flat_runtime.get("json_valid_rate"), + "runtime_wrapper_fallback_rate": runtime_flat_runtime.get("wrapper_would_fallback_rate"), + "offline_json_valid_rate": runtime_flat_offline.get("json_valid_rate"), + "offline_wrapper_fallback_rate": runtime_flat_offline.get("wrapper_would_fallback_rate"), + }, + } + ) + + truncation_score = max( + runtime_flat_runtime.get("possible_truncation_rate", 0.0), + runtime_flat_offline.get("possible_truncation_rate", 0.0), + ) + causes.append( + { + "cause": "generation_truncation", + "score": float(truncation_score), + "evidence": { + "runtime_possible_truncation_rate": runtime_flat_runtime.get("possible_truncation_rate"), + "offline_possible_truncation_rate": runtime_flat_offline.get("possible_truncation_rate"), + }, + } + ) + + causes.sort(key=lambda item: item["score"], reverse=True) + return causes + + +def render_prompt_comparison( + runtime_rows: list[dict[str, Any]], + offline_rows: list[dict[str, Any]], + summary_report: dict[str, Any], +) -> str: + runtime_example = runtime_rows[0] if runtime_rows else None + offline_example = offline_rows[0] if offline_rows else None + lines = [ + "# Runtime Prompt Diagnosis", + "", + "## Key Finding", + "", + "Training/offline evaluation uses a chat-style prompt with separate `system` and `user` messages.", + "This report compares the chat-style prompt path against the older flattened prompt path.", + "", + "## Aggregate Answers", + "", + "```json", + json.dumps(summary_report.get("key_answers", {}), indent=2, sort_keys=True), + "```", + "", + ] + if offline_example is not None: + lines.extend( + [ + "## Representative Offline Validation Example", + "", + "### Training System Prompt", + "", + "```text", + offline_example["training_system_prompt"], + "```", + "", + "### Training User Prompt", + "", + "```text", + offline_example["training_user_prompt"], + "```", + "", + "### Runtime Flat Prompt", + "", + "```text", + offline_example["runtime_flat_prompt"], + "```", + "", + "### Training Chat Rendered Prompt", + "", + "```text", + offline_example["training_chat_prompt"], + "```", + "", + "### Prompt Diff", + "", + "```diff", + *list( + difflib.unified_diff( + offline_example["training_chat_prompt"].splitlines(), + offline_example["runtime_flat_prompt"].splitlines(), + fromfile="training_chat_prompt", + tofile="runtime_flat_prompt", + lineterm="", + ) + ), + "```", + "", + ] + ) + if runtime_example is not None: + lines.extend( + [ + "## Representative Runtime Summary Example", + "", + "### Runtime Flat Output", + "", + "```json", + json.dumps(runtime_example["runtime_flat"], indent=2, sort_keys=True), + "```", + "", + "### Training Chat Output On Same Summary", + "", + "```json", + json.dumps(runtime_example["training_chat"], indent=2, sort_keys=True), + "```", + "", + ] + ) + return "\n".join(lines) + "\n" + + +def flatten_failure_example(row: dict[str, Any], prompt_style_key: str) -> dict[str, Any]: + payload = row[prompt_style_key] + return { + "source": row["source"], + "prompt_style": prompt_style_key, + "city_id": row["city_id"], + "scenario": row["scenario"], + "district_id": row["district_id"], + "decision_step": row["decision_step"], + "failure_reasons": payload["failure_reasons"], + "json_valid": payload["json_valid"], + "schema_valid_before_repair": payload["schema_valid_before_repair"], + "wrapper_would_fallback": payload["wrapper_would_fallback"], + "repair_report": payload["repair_report"], + "raw_text": payload["raw_text"], + "parsed_payload_before_repair": payload["parsed_payload_before_repair"], + "action_after_repair": payload["action_after_repair"], + "candidate_diagnostics": payload["candidate_diagnostics"], + "prompt_text": row["runtime_flat_prompt"] if prompt_style_key == "runtime_flat" else row["training_chat_prompt"], + } + + +def resolve_scenario_specs(dataset: CityFlowDataset, args: argparse.Namespace) -> list[ScenarioSpec]: + city_ids = list(args.cities) if args.cities else dataset.load_split(args.split) + scenario_specs: list[ScenarioSpec] = [] + for city_id in city_ids: + available_scenarios = dataset.scenarios_for_city(city_id) + requested = list(args.scenarios) if args.scenarios else available_scenarios + for scenario_name in requested: + scenario_specs.append(dataset.build_scenario_spec(city_id, scenario_name)) + return scenario_specs + + +def default_env_config() -> EnvConfig: + return EnvConfig( + simulator_interval=1, + decision_interval=5, + min_green_time=10, + thread_num=1, + max_episode_seconds=300, + observation=ObservationConfig(), + reward=RewardConfig(variant="wait_queue_throughput"), + ) + + +def token_length(inference: DistrictLLMInference, text: str) -> int | None: + tokenizer = inference.tokenizer + if tokenizer is None: + return None + try: + encoded = tokenizer(text, add_special_tokens=False) + except TypeError: + encoded = tokenizer(text) + return int(len(encoded["input_ids"])) + + +def prompt_near_model_limit(inference: DistrictLLMInference, prompt_token_length: int | None) -> bool | None: + if prompt_token_length is None or inference.tokenizer is None: + return None + model_max_length = getattr(inference.tokenizer, "model_max_length", None) + if model_max_length is None or model_max_length <= 0 or model_max_length > 1_000_000: + return None + return bool(prompt_token_length >= int(0.9 * model_max_length)) + + +def average(values: list[int | float | None]) -> float: + filtered = [float(value) for value in values if value is not None] + return float(mean(filtered)) if filtered else 0.0 + + +def median_or_zero(values: list[int | float | None]) -> float: + filtered = [float(value) for value in values if value is not None] + return float(median(filtered)) if filtered else 0.0 + + +def safe_ratio(numerator: int | float, denominator: int | float) -> float: + if float(denominator) == 0.0: + return 0.0 + return float(numerator) / float(denominator) + + +def write_json(path: Path, payload: Any) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(json.dumps(payload, indent=2, sort_keys=True) + "\n", encoding="utf-8") + + +def write_jsonl(path: Path, rows: list[dict[str, Any]]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + with path.open("w", encoding="utf-8") as handle: + for row in rows: + handle.write(json.dumps(row, sort_keys=True)) + handle.write("\n") + + +def write_text(path: Path, payload: str) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(payload, encoding="utf-8") + + +if __name__ == "__main__": + main() diff --git a/scripts/eval_rl_guidance_ablation.py b/scripts/eval_rl_guidance_ablation.py new file mode 100644 index 0000000000000000000000000000000000000000..bfcb7deac1ff9e8e832848715f3006d0e46fb166 --- /dev/null +++ b/scripts/eval_rl_guidance_ablation.py @@ -0,0 +1,1144 @@ +from __future__ import annotations + +import argparse +import csv +import json +from dataclasses import asdict, dataclass +from datetime import datetime, timezone +from pathlib import Path +from statistics import median +from time import perf_counter +from typing import Any +import sys + +import numpy as np +from tqdm.auto import tqdm + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +from district_llm.heuristic_guidance import HeuristicGuidanceConfig +from district_llm.inference import DistrictLLMInference +from district_llm.repair import RepairConfig +from district_llm.rl_guidance_wrapper import ( + BIAS_DECAY_SCHEDULES, + DistrictGuidedRLController, + FixedRLPolicyAdapter, + GATING_MODES, + GuidanceInfluenceConfig, + HeuristicGuidanceProvider, + LLMGuidanceProvider, + WRAPPER_MODES, + guidance_config_payload, +) +from district_llm.summary_builder import DistrictStateSummaryBuilder +from env.observation_builder import ObservationConfig +from env.reward import RewardConfig +from env.traffic_env import EnvConfig +from env.utils import load_json +from training.cityflow_dataset import CityFlowDataset, ScenarioSpec +from training.train_local_policy import build_env + + +MODE_CHOICES: tuple[str, ...] = ( + "rl_only", + "rl_heuristic", + "rl_llm", +) + + +@dataclass(frozen=True) +class EpisodePlan: + city_id: str + scenario: str + seed: int + episode_id: int + simulator_seed: int + scenario_spec: ScenarioSpec + seeded_scenario_spec: ScenarioSpec + + def pairing_key(self) -> tuple[str, str, int, int]: + return (self.city_id, self.scenario, self.seed, self.episode_id) + + def to_dict(self) -> dict[str, Any]: + return { + "city_id": self.city_id, + "scenario": self.scenario, + "seed": int(self.seed), + "episode_id": int(self.episode_id), + "simulator_seed": int(self.simulator_seed), + "config_path": str(self.seeded_scenario_spec.config_path), + } + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description=( + "Evaluate a fixed DQN checkpoint under rl_only, rl_heuristic, and " + "rl_llm district-guidance modes without changing the RL weights." + ) + ) + parser.add_argument( + "--rl-checkpoint", + required=True, + help="Path to the fixed DQN checkpoint used for all modes.", + ) + parser.add_argument( + "--llm-model-path", + default=None, + help="Model or adapter path used when rl_llm modes are enabled.", + ) + parser.add_argument( + "--modes", + nargs="+", + choices=MODE_CHOICES, + default=["rl_only", "rl_heuristic", "rl_llm"], + ) + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument("--split", default="val", choices=("train", "val", "test")) + parser.add_argument("--cities", nargs="+", default=None) + parser.add_argument("--scenarios", nargs="+", default=None) + parser.add_argument("--num-episodes", type=int, default=1) + parser.add_argument("--seeds", nargs="+", type=int, default=[7, 11, 13]) + parser.add_argument( + "--max-episode-seconds", + type=int, + default=None, + help="Optional override for scenario horizon. Useful for cheap smoke tests.", + ) + parser.add_argument("--guidance-refresh-steps", type=int, default=10) + parser.add_argument("--guidance-persistence-steps", type=int, default=3) + parser.add_argument("--bias-strength", type=float, default=0.12) + parser.add_argument( + "--targeted-bias-strength", + "--target-only-bias-strength", + dest="targeted_bias_strength", + type=float, + default=0.18, + ) + parser.add_argument("--corridor-bias-strength", type=float, default=0.05) + parser.add_argument("--max-guidance-duration", type=int, default=10) + parser.add_argument("--max-intersections-affected", type=int, default=3) + parser.add_argument( + "--gating-mode", + choices=GATING_MODES, + default="always_on", + ) + parser.add_argument("--min-avg-queue-for-guidance", type=float, default=150.0) + parser.add_argument("--min-queue-imbalance-for-guidance", type=float, default=20.0) + parser.add_argument( + "--require-incident-or-spillback", + action=argparse.BooleanOptionalAction, + default=False, + ) + parser.add_argument( + "--allow-guidance-in-normal-conditions", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument( + "--enable-bias-decay", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument( + "--bias-decay-schedule", + choices=BIAS_DECAY_SCHEDULES, + default="linear", + ) + parser.add_argument( + "--apply-global-bias", + action=argparse.BooleanOptionalAction, + default=False, + ) + parser.add_argument( + "--apply-target-only", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument( + "--wrapper-modes", + "--wrapper-mode", + dest="wrapper_modes", + nargs="+", + choices=WRAPPER_MODES, + default=["target_only_soft"], + ) + parser.add_argument( + "--allow-only-visible-candidates", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument("--max-target-intersections", type=int, default=3) + parser.add_argument( + "--fallback-on-empty-targets", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument( + "--fallback-mode", + choices=("heuristic", "hold", "none"), + default="heuristic", + ) + parser.add_argument( + "--fallback-policy", + choices=("no_op", "hold_previous", "heuristic_weak"), + default="hold_previous", + ) + parser.add_argument( + "--log-guidance-debug", + action=argparse.BooleanOptionalAction, + default=False, + ) + parser.add_argument("--max-new-tokens", type=int, default=128) + parser.add_argument("--device", default=None) + parser.add_argument("--output-dir", default="artifacts/rl_guidance_eval") + parser.add_argument( + "--save-step-metrics", + action=argparse.BooleanOptionalAction, + default=False, + ) + parser.add_argument( + "--save-guidance-traces", + action=argparse.BooleanOptionalAction, + default=False, + ) + return parser.parse_args() + + +def main() -> None: + args = parse_args() + if "rl_llm" in args.modes and not args.llm_model_path: + raise ValueError("--llm-model-path is required when rl_llm is selected.") + + output_dir = Path(args.output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + seeded_config_root = output_dir / "seeded_configs" + seeded_config_root.mkdir(parents=True, exist_ok=True) + + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + dataset.generate_default_splits() + scenario_specs = resolve_scenario_specs(dataset=dataset, args=args) + episode_plans = build_episode_plans( + scenario_specs=scenario_specs, + seeds=args.seeds, + num_episodes=args.num_episodes, + seeded_config_root=seeded_config_root, + ) + + rl_policy = FixedRLPolicyAdapter( + checkpoint_path=args.rl_checkpoint, + device=args.device, + ) + env_config = rl_policy.env_config or default_env_config() + if args.max_episode_seconds is not None: + env_config = EnvConfig( + simulator_interval=env_config.simulator_interval, + decision_interval=env_config.decision_interval, + min_green_time=env_config.min_green_time, + thread_num=env_config.thread_num, + max_episode_seconds=int(args.max_episode_seconds), + observation=env_config.observation, + reward=env_config.reward, + ) + controllers = build_mode_controllers( + args=args, + rl_policy=rl_policy, + ) + controller_specs = list(controllers.items()) + + episode_rows: list[dict[str, Any]] = [] + step_rows: list[dict[str, Any]] = [] + guidance_trace_rows: list[dict[str, Any]] = [] + total_runs = len(episode_plans) * len(controller_specs) + progress = tqdm(total=total_runs, desc="RL guidance eval", unit="run") + try: + for plan_index, plan in enumerate(episode_plans, start=1): + tqdm.write( + "[episode-plan] " + f"{plan_index}/{len(episode_plans)} " + f"city={plan.city_id} " + f"scenario={plan.scenario} " + f"seed={plan.seed} " + f"episode_id={plan.episode_id} " + f"simulator_seed={plan.simulator_seed}" + ) + for mode_label, controller in controller_specs: + progress.set_postfix_str( + f"mode={mode_label} city={plan.city_id} scenario={plan.scenario} seed={plan.seed}" + ) + episode_row, mode_step_rows, mode_trace_rows = run_episode( + plan=plan, + mode_label=mode_label, + controller=controller, + env_config=env_config, + save_step_metrics=args.save_step_metrics, + save_guidance_traces=args.save_guidance_traces, + ) + episode_rows.append(episode_row) + step_rows.extend(mode_step_rows) + guidance_trace_rows.extend(mode_trace_rows) + tqdm.write( + "[episode-result] " + f"mode={mode_label} " + f"return={episode_row['total_return']:.3f} " + f"avg_queue={episode_row['avg_queue']:.3f} " + f"avg_wait={episode_row['avg_wait']:.3f} " + f"throughput={episode_row['throughput']:.3f}" + ) + progress.update(1) + finally: + progress.close() + + config_payload = build_config_payload( + args=args, + env_config=env_config, + episode_plans=episode_plans, + ) + summary_payload = build_summary_payload( + episode_rows=episode_rows, + config_payload=config_payload, + ) + + write_json(output_dir / "config.json", config_payload) + write_json(output_dir / "summary.json", summary_payload) + write_csv_rows(output_dir / "episode_metrics.csv", episode_rows) + write_jsonl(output_dir / "episode_metrics.jsonl", episode_rows) + episode_parquet_written = try_write_parquet(output_dir / "episode_metrics.parquet", episode_rows) + + if args.save_step_metrics: + write_csv_rows(output_dir / "step_metrics.csv", step_rows) + write_jsonl(output_dir / "step_metrics.jsonl", step_rows) + try_write_parquet(output_dir / "step_metrics.parquet", step_rows) + + if args.save_guidance_traces: + write_jsonl(output_dir / "guidance_traces.jsonl", guidance_trace_rows) + + print(json.dumps(summary_payload, indent=2, sort_keys=True)) + if not episode_parquet_written: + print( + "[warning] episode_metrics.parquet was not written because neither pyarrow nor pandas " + "is available in the current Python environment." + ) + + +def resolve_scenario_specs( + dataset: CityFlowDataset, + args: argparse.Namespace, +) -> list[ScenarioSpec]: + city_ids = list(args.cities) if args.cities else dataset.load_split(args.split) + scenario_specs: list[ScenarioSpec] = [] + for city_id in city_ids: + available_scenarios = dataset.scenarios_for_city(city_id) + if not available_scenarios: + raise ValueError(f"No scenarios found for city '{city_id}'.") + requested_scenarios = list(args.scenarios) if args.scenarios else available_scenarios + for scenario_name in requested_scenarios: + if scenario_name not in available_scenarios: + raise ValueError( + f"Scenario '{scenario_name}' is not available for city '{city_id}'. " + f"Available scenarios: {available_scenarios}" + ) + scenario_specs.append(dataset.build_scenario_spec(city_id, scenario_name)) + if not scenario_specs: + raise ValueError("No scenario specs were resolved for evaluation.") + return scenario_specs + + +def build_episode_plans( + scenario_specs: list[ScenarioSpec], + seeds: list[int], + num_episodes: int, + seeded_config_root: Path, +) -> list[EpisodePlan]: + plans: list[EpisodePlan] = [] + for scenario_spec in scenario_specs: + for seed in seeds: + for episode_id in range(num_episodes): + simulator_seed = int(seed) * 1000 + int(episode_id) + seeded_spec = build_seeded_scenario_spec( + scenario_spec=scenario_spec, + simulator_seed=simulator_seed, + seeded_config_root=seeded_config_root, + ) + plans.append( + EpisodePlan( + city_id=scenario_spec.city_id, + scenario=scenario_spec.scenario_name, + seed=int(seed), + episode_id=int(episode_id), + simulator_seed=int(simulator_seed), + scenario_spec=scenario_spec, + seeded_scenario_spec=seeded_spec, + ) + ) + return plans + + +def build_seeded_scenario_spec( + scenario_spec: ScenarioSpec, + simulator_seed: int, + seeded_config_root: Path, +) -> ScenarioSpec: + payload = load_json(scenario_spec.config_path) + payload["seed"] = int(simulator_seed) + destination_dir = ( + seeded_config_root + / scenario_spec.city_id + / scenario_spec.scenario_name + / f"seed_{int(simulator_seed):08d}" + ) + destination_dir.mkdir(parents=True, exist_ok=True) + config_path = destination_dir / "config.json" + write_json(config_path, payload) + return ScenarioSpec( + city_id=scenario_spec.city_id, + scenario_name=scenario_spec.scenario_name, + city_dir=scenario_spec.city_dir, + scenario_dir=scenario_spec.scenario_dir, + config_path=config_path, + roadnet_path=scenario_spec.roadnet_path, + district_map_path=scenario_spec.district_map_path, + metadata_path=scenario_spec.metadata_path, + ) + + +def build_mode_controllers( + args: argparse.Namespace, + rl_policy: FixedRLPolicyAdapter, +) -> dict[str, DistrictGuidedRLController]: + heuristic_provider = HeuristicGuidanceProvider( + config=HeuristicGuidanceConfig( + max_target_intersections=args.max_target_intersections, + ) + ) + + llm_inference = None + if "rl_llm" in args.modes: + llm_inference = DistrictLLMInference( + model_name_or_path=args.llm_model_path, + device=args.device, + repair_config=RepairConfig( + allow_only_visible_candidates=args.allow_only_visible_candidates, + max_target_intersections=args.max_target_intersections, + fallback_on_empty_targets=args.fallback_on_empty_targets, + fallback_mode=args.fallback_mode, + ), + ) + + controllers: dict[str, DistrictGuidedRLController] = {} + for mode in args.modes: + if mode == "rl_only": + controllers["rl_only"] = DistrictGuidedRLController( + policy=rl_policy, + mode_source="rl_only", + summary_builder=None, + guidance_provider=None, + influence_config=GuidanceInfluenceConfig( + wrapper_mode="no_op", + bias_strength=args.bias_strength, + target_only_bias_strength=args.targeted_bias_strength, + corridor_bias_strength=args.corridor_bias_strength, + max_intersections_affected=args.max_intersections_affected, + guidance_refresh_steps=args.guidance_refresh_steps, + guidance_persistence_steps=args.guidance_persistence_steps, + max_guidance_duration=args.max_guidance_duration, + apply_global_bias=False, + apply_target_only=True, + gating_mode=args.gating_mode, + min_avg_queue_for_guidance=args.min_avg_queue_for_guidance, + min_queue_imbalance_for_guidance=args.min_queue_imbalance_for_guidance, + require_incident_or_spillback=args.require_incident_or_spillback, + allow_guidance_in_normal_conditions=args.allow_guidance_in_normal_conditions, + enable_bias_decay=args.enable_bias_decay, + bias_decay_schedule=args.bias_decay_schedule, + fallback_policy=args.fallback_policy, + log_guidance_debug=False, + ), + heuristic_provider=None, + ) + continue + + for wrapper_mode in args.wrapper_modes: + influence_config = GuidanceInfluenceConfig( + wrapper_mode=wrapper_mode, + bias_strength=args.bias_strength, + target_only_bias_strength=args.targeted_bias_strength, + corridor_bias_strength=args.corridor_bias_strength, + max_intersections_affected=args.max_intersections_affected, + guidance_refresh_steps=args.guidance_refresh_steps, + guidance_persistence_steps=args.guidance_persistence_steps, + max_guidance_duration=args.max_guidance_duration, + apply_global_bias=args.apply_global_bias, + apply_target_only=args.apply_target_only, + gating_mode=args.gating_mode, + min_avg_queue_for_guidance=args.min_avg_queue_for_guidance, + min_queue_imbalance_for_guidance=args.min_queue_imbalance_for_guidance, + require_incident_or_spillback=args.require_incident_or_spillback, + allow_guidance_in_normal_conditions=args.allow_guidance_in_normal_conditions, + enable_bias_decay=args.enable_bias_decay, + bias_decay_schedule=args.bias_decay_schedule, + fallback_policy=args.fallback_policy, + log_guidance_debug=args.log_guidance_debug, + ) + summary_builder = DistrictStateSummaryBuilder( + top_k=3, + candidate_limit=max(6, int(args.max_target_intersections)), + ) + label = f"{mode}+{wrapper_mode}" + if mode == "rl_heuristic": + controllers[label] = DistrictGuidedRLController( + policy=rl_policy, + mode_source=mode, + summary_builder=summary_builder, + guidance_provider=heuristic_provider, + influence_config=influence_config, + heuristic_provider=heuristic_provider, + ) + continue + + assert llm_inference is not None + controllers[label] = DistrictGuidedRLController( + policy=rl_policy, + mode_source=mode, + summary_builder=summary_builder, + guidance_provider=LLMGuidanceProvider( + inference=llm_inference, + max_new_tokens=args.max_new_tokens, + ), + influence_config=influence_config, + heuristic_provider=heuristic_provider, + ) + return controllers + + +def run_episode( + plan: EpisodePlan, + mode_label: str, + controller: DistrictGuidedRLController, + env_config: EnvConfig, + save_step_metrics: bool, + save_guidance_traces: bool, + show_step_progress: bool = True, +) -> tuple[dict[str, Any], list[dict[str, Any]], list[dict[str, Any]]]: + env = build_env(env_config, plan.seeded_scenario_spec) + controller.reset() + observation_batch = env.reset() + estimated_steps = max( + 1, + int(np.ceil(float(env.max_episode_seconds) / float(env.env_config.decision_interval))), + ) + step_progress = None + if show_step_progress: + step_progress = tqdm( + total=estimated_steps, + desc=f"{mode_label} {plan.city_id}/{plan.scenario} seed={plan.seed}", + unit="step", + leave=False, + ) + episode_started = perf_counter() + wrapper_runtime_seconds = 0.0 + guidance_runtime_seconds = 0.0 + guidance_refresh_count = 0 + fallback_used_count = 0 + invalid_guidance_count = 0 + repaired_guidance_count = 0 + action_changes_vs_base = 0 + decision_steps = 0 + queue_series: list[float] = [] + wait_series: list[float] = [] + running_vehicle_series: list[float] = [] + spillback_total = 0.0 + spillback_event_steps = 0 + step_rows: list[dict[str, Any]] = [] + guidance_trace_rows: list[dict[str, Any]] = [] + scenario_metadata = load_scenario_metadata(plan.scenario_spec) + done = False + + try: + while not done: + action_batch = controller.act(env=env, observation_batch=observation_batch) + wrapper_runtime_seconds += float(action_batch.runtime_seconds) + decision_steps += 1 + action_changes_vs_base += int(np.sum(action_batch.actions != action_batch.base_actions)) + + for trace in action_batch.refresh_traces: + guidance_refresh_count += 1 + guidance_runtime_seconds += float(trace.guidance.get("runtime_seconds", 0.0)) + fallback_used_count += int(trace.fallback_used) + invalid_guidance_count += int(trace.guidance.get("invalid_before_repair", False)) + repaired_guidance_count += int(trace.guidance.get("repair_applied", False)) + if save_guidance_traces: + guidance_trace_rows.append( + build_guidance_trace_row( + plan=plan, + mode_label=mode_label, + trace=trace, + controller=controller, + ) + ) + + next_observation_batch, rewards, done, info = env.step(action_batch.actions) + metrics = info["metrics"] + queue_total = safe_float(metrics.get("total_incoming_vehicles")) + wait_total = safe_float(metrics.get("total_waiting_vehicles")) + queue_series.append(queue_total) + wait_series.append(wait_total) + running_vehicle_series.append(safe_float(metrics.get("running_vehicles"))) + + spillback_intersections = estimate_spillback_intersections(observation_batch) + spillback_total += float(spillback_intersections) + spillback_event_steps += int(spillback_intersections > 0) + + if step_progress is not None: + step_progress.set_postfix_str( + " ".join( + [ + f"sim={int(info['sim_time'])}", + f"queue={queue_total:.0f}", + f"wait={wait_total:.0f}", + f"thr={safe_float(metrics.get('throughput')):.0f}", + f"refresh={guidance_refresh_count}", + f"fallback={fallback_used_count}", + ] + ) + ) + step_progress.update(1) + + if save_step_metrics: + step_rows.append( + build_step_row( + plan=plan, + mode_label=mode_label, + info=info, + action_batch=action_batch, + controller=controller, + spillback_intersections=spillback_intersections, + rewards=rewards, + ) + ) + + observation_batch = next_observation_batch + finally: + if step_progress is not None: + step_progress.close() + + episode_runtime_seconds = perf_counter() - episode_started + final_metrics = env.last_info["metrics"] + wrapper_debug = controller.episode_debug_summary() + episode_row = { + "mode": mode_label, + "mode_source": controller.mode_source, + "wrapper_mode": controller.influence_config.wrapper_mode, + "city_id": plan.city_id, + "scenario": plan.scenario, + "seed": int(plan.seed), + "episode_id": int(plan.episode_id), + "simulator_seed": int(plan.simulator_seed), + "total_return": safe_float(env.total_episode_return), + "mean_return": safe_float(env.episode_return), + "avg_queue": average(queue_series), + "max_queue": max_or_zero(queue_series), + "total_queue": float(sum(queue_series)), + "avg_wait": average(wait_series), + "max_wait": max_or_zero(wait_series), + "total_wait": float(sum(wait_series)), + "throughput": safe_float(final_metrics.get("throughput")), + "travel_time": safe_float(final_metrics.get("average_travel_time")), + "avg_running_vehicles": average(running_vehicle_series), + "max_running_vehicles": max_or_zero(running_vehicle_series), + "spillback_count": float(spillback_total), + "spillback_event_steps": float(spillback_event_steps), + "incident_scenario": float(bool(scenario_metadata.get("blocked_roads"))), + "construction_scenario": float(scenario_metadata.get("name") == "construction"), + "event_scenario": float(bool(scenario_metadata.get("event_district"))), + "overload_scenario": float(bool(scenario_metadata.get("overload_district"))), + "num_guidance_refreshes": float(guidance_refresh_count), + "runtime_seconds": float(episode_runtime_seconds), + "guidance_inference_seconds": float(guidance_runtime_seconds), + "wrapper_runtime_seconds": float(wrapper_runtime_seconds), + "fallback_used_count": float(fallback_used_count), + "invalid_guidance_count": float(invalid_guidance_count), + "repaired_guidance_count": float(repaired_guidance_count), + "action_changes_vs_base": float(action_changes_vs_base), + "decision_steps": float(env.decision_step_count), + "num_controlled_intersections": safe_float(final_metrics.get("num_controlled_intersections")), + } + episode_row.update(wrapper_debug) + return episode_row, step_rows, guidance_trace_rows + + +def build_step_row( + plan: EpisodePlan, + mode_label: str, + info: dict[str, Any], + action_batch, + controller: DistrictGuidedRLController, + spillback_intersections: int, + rewards: np.ndarray, +) -> dict[str, Any]: + metrics = info["metrics"] + active_guidance = controller.active_guidance_snapshot() + return { + "mode": mode_label, + "mode_source": controller.mode_source, + "wrapper_mode": controller.influence_config.wrapper_mode, + "city_id": plan.city_id, + "scenario": plan.scenario, + "seed": int(plan.seed), + "episode_id": int(plan.episode_id), + "simulator_seed": int(plan.simulator_seed), + "step": int(info["decision_step"]), + "sim_time": int(info["sim_time"]), + "queue": safe_float(metrics.get("total_incoming_vehicles")), + "wait": safe_float(metrics.get("total_waiting_vehicles")), + "throughput": safe_float(metrics.get("throughput")), + "travel_time": safe_float(metrics.get("average_travel_time")), + "running_vehicles": safe_float(metrics.get("running_vehicles")), + "step_total_reward": float(np.asarray(rewards, dtype=np.float32).sum()), + "action_changes_vs_base": int(np.sum(action_batch.actions != action_batch.base_actions)), + "mean_abs_q_bias": float(np.abs(action_batch.q_bias).mean()), + "spillback_intersections": int(spillback_intersections), + "active_guidance_count": int(len(active_guidance)), + "active_guidance_json": json.dumps(active_guidance, sort_keys=True), + "selected_target_intersections_json": json.dumps( + collect_target_intersections(active_guidance), + sort_keys=True, + ), + "phase_bias_json": json.dumps( + { + district_id: payload.get("phase_bias") + for district_id, payload in sorted(active_guidance.items()) + }, + sort_keys=True, + ), + "priority_corridor_json": json.dumps( + { + district_id: payload.get("priority_corridor") + for district_id, payload in sorted(active_guidance.items()) + }, + sort_keys=True, + ), + } + + +def build_guidance_trace_row( + plan: EpisodePlan, + mode_label: str, + trace, + controller: DistrictGuidedRLController, +) -> dict[str, Any]: + payload = trace.to_dict() + payload.update( + { + "mode": mode_label, + "wrapper_mode": controller.influence_config.wrapper_mode, + "city_id": plan.city_id, + "scenario": plan.scenario, + "seed": int(plan.seed), + "episode_id": int(plan.episode_id), + "simulator_seed": int(plan.simulator_seed), + "influence_config": guidance_config_payload(controller.influence_config), + } + ) + return payload + + +def estimate_spillback_intersections(observation_batch: dict[str, Any]) -> int: + incoming_totals = np.asarray(observation_batch["incoming_counts"], dtype=np.float32).sum(axis=1) + outgoing_load = np.asarray(observation_batch["outgoing_congestion"], dtype=np.float32) + boundary_mask = np.asarray(observation_batch["boundary_mask"], dtype=np.float32) > 0.0 + spillback_mask = outgoing_load >= np.maximum(8.0, incoming_totals * 0.5) + boundary_spillback = boundary_mask & (outgoing_load >= np.maximum(4.0, incoming_totals * 0.4)) + return int(np.sum(spillback_mask | boundary_spillback)) + + +def collect_target_intersections(active_guidance: dict[str, dict[str, Any]]) -> dict[str, list[str]]: + return { + district_id: list(payload.get("target_intersections", [])) + for district_id, payload in sorted(active_guidance.items()) + } + + +def load_scenario_metadata(scenario_spec: ScenarioSpec) -> dict[str, Any]: + metadata_path = scenario_spec.scenario_dir / "scenario_metadata.json" + return load_json(metadata_path) if metadata_path.exists() else {} + + +def build_summary_payload( + episode_rows: list[dict[str, Any]], + config_payload: dict[str, Any], +) -> dict[str, Any]: + key_metrics = ( + "total_return", + "mean_return", + "avg_queue", + "avg_wait", + "throughput", + "travel_time", + "spillback_count", + "fallback_used_count", + "invalid_guidance_count", + "repaired_guidance_count", + "num_steps_guidance_blocked_by_gate", + "num_guidance_refreshes_blocked_by_gate", + "mean_bias_magnitude", + "max_bias_magnitude", + "avg_num_targeted_intersections", + "avg_num_affected_intersections", + "percent_steps_with_active_guidance", + "num_noop_guidance_events", + ) + metrics_by_mode: dict[str, Any] = {} + for mode in sorted({str(row["mode"]) for row in episode_rows}): + mode_rows = [row for row in episode_rows if row["mode"] == mode] + metrics_by_mode[mode] = { + metric_name: distribution_summary( + [safe_float(row.get(metric_name)) for row in mode_rows] + ) + for metric_name in key_metrics + } + metrics_by_mode[mode]["num_episodes"] = int(len(mode_rows)) + return { + "generated_at": datetime.now(timezone.utc).isoformat(), + "comparison_scope": config_payload["comparison_scope"], + "pairing_keys": ["city_id", "scenario", "seed", "episode_id"], + "metrics_by_mode": metrics_by_mode, + "analysis_summary": build_analysis_summary(episode_rows), + } + + +def build_config_payload( + args: argparse.Namespace, + env_config: EnvConfig, + episode_plans: list[EpisodePlan], +) -> dict[str, Any]: + return { + "generated_at": datetime.now(timezone.utc).isoformat(), + "rl_checkpoint": str(args.rl_checkpoint), + "llm_model_path": args.llm_model_path, + "modes": list(args.modes), + "wrapper_modes": list(args.wrapper_modes), + "comparison_scope": { + "num_episode_plans": int(len(episode_plans)), + "cities": sorted({plan.city_id for plan in episode_plans}), + "scenarios": sorted({plan.scenario for plan in episode_plans}), + "seeds": sorted({int(plan.seed) for plan in episode_plans}), + "episodes_per_seed": int(args.num_episodes), + "total_mode_runs": int( + len( + [ + 1 + for mode in args.modes + for _wrapper in ([None] if mode == "rl_only" else args.wrapper_modes) + ] + ) + * len(episode_plans) + ), + }, + "episode_plans": [plan.to_dict() for plan in episode_plans], + "guidance_influence_config": guidance_config_payload( + GuidanceInfluenceConfig( + wrapper_mode=args.wrapper_modes[0], + bias_strength=args.bias_strength, + target_only_bias_strength=args.targeted_bias_strength, + corridor_bias_strength=args.corridor_bias_strength, + max_intersections_affected=args.max_intersections_affected, + guidance_refresh_steps=args.guidance_refresh_steps, + guidance_persistence_steps=args.guidance_persistence_steps, + max_guidance_duration=args.max_guidance_duration, + apply_global_bias=args.apply_global_bias, + apply_target_only=args.apply_target_only, + gating_mode=args.gating_mode, + min_avg_queue_for_guidance=args.min_avg_queue_for_guidance, + min_queue_imbalance_for_guidance=args.min_queue_imbalance_for_guidance, + require_incident_or_spillback=args.require_incident_or_spillback, + allow_guidance_in_normal_conditions=args.allow_guidance_in_normal_conditions, + enable_bias_decay=args.enable_bias_decay, + bias_decay_schedule=args.bias_decay_schedule, + fallback_policy=args.fallback_policy, + log_guidance_debug=args.log_guidance_debug, + ) + ), + "repair_config": asdict( + RepairConfig( + allow_only_visible_candidates=args.allow_only_visible_candidates, + max_target_intersections=args.max_target_intersections, + fallback_on_empty_targets=args.fallback_on_empty_targets, + fallback_mode=args.fallback_mode, + ) + ), + "heuristic_config": asdict( + HeuristicGuidanceConfig( + max_target_intersections=args.max_target_intersections, + ) + ), + "env_config": env_config_to_payload(env_config), + "save_step_metrics": bool(args.save_step_metrics), + "save_guidance_traces": bool(args.save_guidance_traces), + } + + +def build_analysis_summary(episode_rows: list[dict[str, Any]]) -> dict[str, Any]: + if not episode_rows: + return {} + rl_only_rows = [row for row in episode_rows if row["mode_source"] == "rl_only"] + rl_only_return = average([safe_float(row.get("total_return")) for row in rl_only_rows]) + guided_modes = sorted({str(row["mode"]) for row in episode_rows if row["mode_source"] != "rl_only"}) + ranked_guided = [] + mode_source_rows: dict[str, list[dict[str, Any]]] = {} + for row in episode_rows: + mode_source_rows.setdefault(str(row["mode_source"]), []).append(row) + for row_mode in guided_modes: + mode_rows = [item for item in episode_rows if item["mode"] == row_mode] + return_summary = distribution_summary([safe_float(item.get("total_return")) for item in mode_rows]) + queue_summary = distribution_summary([safe_float(item.get("avg_queue")) for item in mode_rows]) + fallback_summary = distribution_summary([safe_float(item.get("fallback_used_count")) for item in mode_rows]) + affected_summary = distribution_summary( + [safe_float(item.get("avg_num_affected_intersections")) for item in mode_rows] + ) + steps_summary = distribution_summary( + [safe_float(item.get("percent_steps_with_active_guidance")) for item in mode_rows] + ) + gate_block_summary = distribution_summary( + [safe_float(item.get("num_steps_guidance_blocked_by_gate")) for item in mode_rows] + ) + ranked_guided.append( + { + "mode": row_mode, + "mode_source": str(mode_rows[0]["mode_source"]), + "wrapper_mode": str(mode_rows[0]["wrapper_mode"]), + "mean_total_return": return_summary["mean"], + "return_delta_vs_rl_only": return_summary["mean"] - rl_only_return, + "mean_avg_queue": queue_summary["mean"], + "mean_fallback_used_count": fallback_summary["mean"], + "mean_avg_num_affected_intersections": affected_summary["mean"], + "mean_percent_steps_with_active_guidance": steps_summary["mean"], + "mean_num_steps_guidance_blocked_by_gate": gate_block_summary["mean"], + } + ) + ranked_guided.sort(key=lambda item: item["mean_total_return"], reverse=True) + + mode_source_summary = { + mode_source: { + "mean_total_return": distribution_summary( + [safe_float(item.get("total_return")) for item in rows] + )["mean"], + "mean_fallback_used_count": distribution_summary( + [safe_float(item.get("fallback_used_count")) for item in rows] + )["mean"], + "mean_avg_num_affected_intersections": distribution_summary( + [safe_float(item.get("avg_num_affected_intersections")) for item in rows] + )["mean"], + "mean_num_steps_guidance_blocked_by_gate": distribution_summary( + [safe_float(item.get("num_steps_guidance_blocked_by_gate")) for item in rows] + )["mean"], + } + for mode_source, rows in sorted(mode_source_rows.items()) + } + + heuristic_vs_llm_by_wrapper: list[dict[str, Any]] = [] + shared_wrappers = sorted( + { + str(row["wrapper_mode"]) + for row in episode_rows + if row["mode_source"] in {"rl_heuristic", "rl_llm"} + } + ) + for wrapper_mode in shared_wrappers: + heuristic_rows = [ + row for row in episode_rows if row["mode_source"] == "rl_heuristic" and row["wrapper_mode"] == wrapper_mode + ] + llm_rows = [ + row for row in episode_rows if row["mode_source"] == "rl_llm" and row["wrapper_mode"] == wrapper_mode + ] + if not heuristic_rows or not llm_rows: + continue + heuristic_return = distribution_summary([safe_float(row.get("total_return")) for row in heuristic_rows])["mean"] + llm_return = distribution_summary([safe_float(row.get("total_return")) for row in llm_rows])["mean"] + heuristic_vs_llm_by_wrapper.append( + { + "wrapper_mode": wrapper_mode, + "heuristic_mean_total_return": heuristic_return, + "llm_mean_total_return": llm_return, + "llm_minus_heuristic_return": llm_return - heuristic_return, + } + ) + + aggressive_modes = [ + item + for item in ranked_guided + if item["wrapper_mode"] in {"global_soft", "current_legacy"} + ] + conservative_modes = [ + item + for item in ranked_guided + if item["wrapper_mode"] in {"no_op", "target_only_soft", "target_only_medium", "corridor_soft"} + ] + return { + "rl_only_mean_total_return": rl_only_return, + "guided_mode_rankings": ranked_guided, + "least_degrading_guided_mode": ranked_guided[0] if ranked_guided else None, + "mode_source_summary": mode_source_summary, + "heuristic_vs_llm_by_wrapper": heuristic_vs_llm_by_wrapper, + "conservative_guidance_modes": conservative_modes, + "aggressive_guidance_modes": aggressive_modes, + } + + +def distribution_summary(values: list[float]) -> dict[str, float]: + filtered = [float(value) for value in values if value is not None] + if not filtered: + return { + "count": 0.0, + "mean": 0.0, + "std": 0.0, + "median": 0.0, + "p25": 0.0, + "p75": 0.0, + "min": 0.0, + "max": 0.0, + } + array = np.asarray(filtered, dtype=np.float64) + return { + "count": float(array.size), + "mean": float(array.mean()), + "std": float(array.std(ddof=0)), + "median": float(median(filtered)), + "p25": float(np.percentile(array, 25)), + "p75": float(np.percentile(array, 75)), + "min": float(array.min()), + "max": float(array.max()), + } + + +def default_env_config() -> EnvConfig: + return EnvConfig( + simulator_interval=1, + decision_interval=5, + min_green_time=10, + thread_num=1, + max_episode_seconds=None, + observation=ObservationConfig(), + reward=RewardConfig(variant="wait_queue_throughput"), + ) + + +def env_config_to_payload(env_config: EnvConfig) -> dict[str, Any]: + return { + "simulator_interval": env_config.simulator_interval, + "decision_interval": env_config.decision_interval, + "min_green_time": env_config.min_green_time, + "thread_num": env_config.thread_num, + "max_episode_seconds": env_config.max_episode_seconds, + "observation": asdict(env_config.observation), + "reward": asdict(env_config.reward), + } + + +def write_json(path: Path, payload: Any) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(json.dumps(to_jsonable(payload), indent=2, sort_keys=True) + "\n") + + +def write_jsonl(path: Path, rows: list[dict[str, Any]]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + with path.open("w", encoding="utf-8") as handle: + for row in rows: + handle.write(json.dumps(to_jsonable(row), sort_keys=True) + "\n") + + +def write_csv_rows(path: Path, rows: list[dict[str, Any]]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + if not rows: + path.write_text("") + return + fieldnames = sorted({key for row in rows for key in row.keys()}) + with path.open("w", encoding="utf-8", newline="") as handle: + writer = csv.DictWriter(handle, fieldnames=fieldnames) + writer.writeheader() + for row in rows: + writer.writerow( + { + key: format_csv_value(row.get(key)) + for key in fieldnames + } + ) + + +def try_write_parquet(path: Path, rows: list[dict[str, Any]]) -> bool: + if not rows: + return False + json_ready_rows = [to_jsonable(row) for row in rows] + try: + import pyarrow as pa + import pyarrow.parquet as pq + + table = pa.Table.from_pylist(json_ready_rows) + pq.write_table(table, path) + return True + except Exception: + pass + + try: + import pandas as pd + + frame = pd.DataFrame(json_ready_rows) + frame.to_parquet(path, index=False) + return True + except Exception: + return False + + +def to_jsonable(value: Any) -> Any: + if isinstance(value, dict): + return { + str(key): to_jsonable(item) + for key, item in value.items() + } + if isinstance(value, list): + return [to_jsonable(item) for item in value] + if isinstance(value, tuple): + return [to_jsonable(item) for item in value] + if isinstance(value, Path): + return str(value) + if isinstance(value, np.ndarray): + return value.tolist() + if isinstance(value, np.floating): + return float(value) + if isinstance(value, np.integer): + return int(value) + if isinstance(value, np.bool_): + return bool(value) + return value + + +def format_csv_value(value: Any) -> Any: + if isinstance(value, (dict, list, tuple)): + return json.dumps(to_jsonable(value), sort_keys=True) + return to_jsonable(value) + + +def average(values: list[float]) -> float: + if not values: + return 0.0 + return float(np.mean(np.asarray(values, dtype=np.float64))) + + +def max_or_zero(values: list[float]) -> float: + return float(max(values)) if values else 0.0 + + +def safe_float(value: Any) -> float: + if value is None: + return 0.0 + return float(value) + + +if __name__ == "__main__": + main() diff --git a/scripts/evaluate.py b/scripts/evaluate.py new file mode 100644 index 0000000000000000000000000000000000000000..55b029017093b488c90d5068243b252e15f12fe5 --- /dev/null +++ b/scripts/evaluate.py @@ -0,0 +1,112 @@ +from __future__ import annotations + +import json + +from agents.district_coordinator import RuleBasedDistrictCoordinator +from agents.local_policy import SharedHeuristicLocalPolicy +from training.trainer import DistrictCoordinatorEvaluator + + +def make_env(): + from env.traffic_env import TrafficEnv + from env.intersection_config import IntersectionConfig, DistrictConfig + + intersections = { + "I1": IntersectionConfig( + intersection_id="I1", + district_id="D0", + incoming_lanes=["I1_N", "I1_S", "I1_E", "I1_W"], + outgoing_lanes=[], + neighbors=["I2"], + is_border=False, + ), + "I2": IntersectionConfig( + intersection_id="I2", + district_id="D0", + incoming_lanes=["I2_N", "I2_S", "I2_E", "I2_W"], + outgoing_lanes=[], + neighbors=["I1", "I3"], + is_border=True, + ), + "I3": IntersectionConfig( + intersection_id="I3", + district_id="D1", + incoming_lanes=["I3_N", "I3_S", "I3_E", "I3_W"], + outgoing_lanes=[], + neighbors=["I2", "I4"], + is_border=True, + ), + "I4": IntersectionConfig( + intersection_id="I4", + district_id="D1", + incoming_lanes=["I4_N", "I4_S", "I4_E", "I4_W"], + outgoing_lanes=[], + neighbors=["I3"], + is_border=False, + ), + } + + districts = { + "D0": DistrictConfig( + district_id="D0", + intersection_ids=["I1", "I2"], + neighbor_districts=["D1"], + ), + "D1": DistrictConfig( + district_id="D1", + intersection_ids=["I3", "I4"], + neighbor_districts=["D0"], + ), + } + + return TrafficEnv( + config_path="data/cityflow/config.json", + intersections=intersections, + districts=districts, + coordination_interval=20, + max_steps=200, + ) + + +def main(): + local_policy = SharedHeuristicLocalPolicy() + evaluator = DistrictCoordinatorEvaluator( + env_factory=make_env, + local_policy=local_policy, + ) + + local_only = {} + coordinated = { + "D0": RuleBasedDistrictCoordinator(), + "D1": RuleBasedDistrictCoordinator(), + } + + results = evaluator.compare( + seeds=[0, 1, 2, 3, 4], + local_only_coordinators=local_only, + coordinated_coordinators=coordinated, + max_steps=200, + ) + + print( + json.dumps( + { + "local_only": { + "avg_mean_reward": results["local_only"]["avg_mean_reward"], + "avg_total_waiting": results["local_only"]["avg_total_waiting"], + "avg_total_queue": results["local_only"]["avg_total_queue"], + }, + "coordinated": { + "avg_mean_reward": results["coordinated"]["avg_mean_reward"], + "avg_total_waiting": results["coordinated"]["avg_total_waiting"], + "avg_total_queue": results["coordinated"]["avg_total_queue"], + }, + "improvements": results["improvements"], + }, + indent=2, + ) + ) + + +if __name__ == "__main__": + main() diff --git a/scripts/generate_large_district_dataset.py b/scripts/generate_large_district_dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..5667ed12c1e5bf4c96a51c44f41647f769c6964a --- /dev/null +++ b/scripts/generate_large_district_dataset.py @@ -0,0 +1,504 @@ +from __future__ import annotations + +import argparse +import json +import statistics +import sys +from collections import Counter, defaultdict +from dataclasses import dataclass +from datetime import datetime, timezone +from pathlib import Path +from typing import Any + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +from district_llm.generate_dataset import build_env, generate_examples_for_episode +from district_llm.prompting import build_system_prompt +from district_llm.schema import DistrictAction +from district_llm.teachers import BaseTeacher, build_teacher, parse_teacher_spec +from env.observation_builder import ObservationConfig +from env.reward import RewardConfig +from env.traffic_env import EnvConfig +from training.cityflow_dataset import CityFlowDataset, DEFAULT_SCENARIOS + +try: + from tqdm.auto import tqdm +except ImportError: # pragma: no cover + tqdm = None + + +DEFAULT_OUTPUT_DIR = "data/district_llm_dataset_v3" +SCHEMA_VERSION = "district_action_v1_messages_v3_candidates" + + +@dataclass(frozen=True) +class CollectionResult: + rows: list[dict[str, Any]] + duplicate_rows_removed: int + low_signal_rows_removed: int + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description="Generate a large, candidate-constrained district-LLM chat dataset." + ) + parser.add_argument("--num-train", type=int, default=10000) + parser.add_argument("--num-val", type=int, default=2500) + parser.add_argument("--cities", type=int, default=12) + parser.add_argument( + "--scenarios", + default="all", + help="Either 'all' or a comma-separated list such as normal,morning_rush,accident.", + ) + parser.add_argument("--output-dir", default=DEFAULT_OUTPUT_DIR) + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument( + "--teacher-spec", + action="append", + default=[], + help="Repeatable teacher source, e.g. rl_checkpoint=artifacts/dqn_shared/best_validation.pt.", + ) + parser.add_argument( + "--checkpoint", + default="artifacts/dqn_shared/best_validation.pt", + help="Default DQN checkpoint used when no --teacher-spec is provided.", + ) + parser.add_argument("--include-non-dqn-sources", action="store_true") + parser.add_argument("--device", default=None) + parser.add_argument("--seed", type=int, default=3407) + parser.add_argument("--decision-interval", type=int, default=10) + parser.add_argument("--top-k-congested", type=int, default=3) + parser.add_argument("--max-candidate-intersections", type=int, default=6) + parser.add_argument("--max-target-intersections", type=int, default=3) + parser.add_argument("--fixed-green-time", type=int, default=20) + return parser.parse_args() + + +def default_env_config() -> EnvConfig: + return EnvConfig( + simulator_interval=1, + decision_interval=5, + min_green_time=10, + thread_num=1, + max_episode_seconds=None, + observation=ObservationConfig(), + reward=RewardConfig(variant="wait_queue_throughput"), + ) + + +def resolve_teachers(args: argparse.Namespace) -> list[BaseTeacher]: + teacher_specs = list(args.teacher_spec) + if not teacher_specs: + checkpoint_path = Path(args.checkpoint) + teacher_specs = ( + [f"rl_checkpoint={checkpoint_path}"] + if checkpoint_path.exists() + else ["queue_greedy"] + ) + + teachers: list[BaseTeacher] = [] + for spec in teacher_specs: + controller_type, checkpoint = parse_teacher_spec(spec) + teacher = build_teacher( + controller_type=controller_type, + checkpoint=checkpoint, + fixed_green_time=args.fixed_green_time, + seed=args.seed, + device=args.device, + ) + if teacher.metadata.controller_family != "dqn" and not args.include_non_dqn_sources: + continue + teachers.append(teacher) + + if not teachers: + raise ValueError("No usable teachers resolved. Provide a DQN checkpoint or enable non-DQN sources.") + + return sorted( + teachers, + key=lambda teacher: (teacher.metadata.controller_family != "dqn", teacher.metadata.controller_type), + ) + + +def parse_scenarios(raw_value: str) -> set[str] | None: + if raw_value.strip().lower() == "all": + return None + return {item.strip() for item in raw_value.split(",") if item.strip()} + + +def build_balanced_scenario_specs( + dataset: CityFlowDataset, + split_name: str, + max_cities: int, + allowed_scenarios: set[str] | None, +) -> list[Any]: + grouped: dict[str, list[Any]] = defaultdict(list) + city_ids = dataset.load_split(split_name)[:max_cities] + scenario_order = {name: index for index, name in enumerate(DEFAULT_SCENARIOS)} + + for city_id in city_ids: + for scenario_name in dataset.scenarios_for_city(city_id): + if allowed_scenarios is not None and scenario_name not in allowed_scenarios: + continue + grouped[scenario_name].append(dataset.build_scenario_spec(city_id, scenario_name)) + + if not grouped: + raise ValueError(f"No scenario specs found for split={split_name}.") + + for specs in grouped.values(): + specs.sort(key=lambda spec: spec.city_id) + + scenario_names = sorted( + grouped, + key=lambda name: (scenario_order.get(name, len(DEFAULT_SCENARIOS)), name), + ) + interleaved: list[Any] = [] + pending = True + round_index = 0 + while pending: + pending = False + for scenario_name in scenario_names: + specs = grouped[scenario_name] + if round_index < len(specs): + interleaved.append(specs[round_index]) + pending = True + round_index += 1 + return interleaved + + +def extract_summary_text(prompt: str) -> str: + state_marker = "### DISTRICT STATE\n" + decision_marker = "\n\n### DECISION" + if state_marker not in prompt: + return prompt.strip() + summary_block = prompt.split(state_marker, 1)[1] + summary_block = summary_block.split(decision_marker, 1)[0].strip() + return f"### DISTRICT STATE\n{summary_block}" + + +def is_informative_example(example: dict[str, Any]) -> bool: + state = example["state"] + top_congested = state.get("top_congested_intersections", []) + all_zero_top = all( + float(item.get("queue_total", 0.0)) <= 0.0 + and float(item.get("wait_total", 0.0)) <= 0.0 + and float(item.get("outgoing_load", 0.0)) <= 0.0 + for item in top_congested + ) + return not ( + int(state.get("decision_step", 0)) == 0 + or ( + float(state.get("total_queue", 0.0)) <= 0.0 + and float(state.get("total_wait", 0.0)) <= 0.0 + and float(state.get("recent_throughput", 0.0)) <= 0.0 + and not bool(state.get("spillback_risk", False)) + and all_zero_top + ) + ) + + +def make_message_row(example: dict[str, Any], system_prompt: str) -> dict[str, Any]: + assistant_content = json.dumps(example["response_json"], sort_keys=True) + row = { + "messages": [ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": extract_summary_text(example["prompt"])}, + {"role": "assistant", "content": assistant_content}, + ], + "city_id": example["city_id"], + "district_id": example["district_id"], + "district_type": example["district_type"], + "scenario": example["scenario"], + "controller_type": example["controller_type"], + "controller_family": example["controller_family"], + "teacher_algorithm": example["teacher_algorithm"], + "controller_id": example["controller_id"], + "checkpoint_path": example["checkpoint_path"], + "candidate_intersections": example.get("candidate_intersections", []), + } + validate_row(row) + return row + + +def validate_row(row: dict[str, Any]) -> None: + messages = row.get("messages", []) + if len(messages) != 3: + raise ValueError("Each row must contain exactly 3 chat messages.") + if not messages[1]["content"].strip(): + raise ValueError("User summary content is empty.") + payload = json.loads(messages[2]["content"]) + action = DistrictAction.from_dict(payload) + visible_candidates = { + str(item.get("intersection_id")) + for item in row.get("candidate_intersections", []) + if str(item.get("intersection_id", "")).strip() + } + if visible_candidates and any(item not in visible_candidates for item in action.target_intersections): + raise ValueError("target_intersections must remain inside candidate_intersections.") + + +def row_key(row: dict[str, Any]) -> str: + return json.dumps(row["messages"], sort_keys=True, separators=(",", ":")) + + +def collect_split_rows( + split_name: str, + target_rows: int, + scenario_specs: list[Any], + teachers: list[BaseTeacher], + env_config: EnvConfig, + args: argparse.Namespace, +) -> CollectionResult: + rows: list[dict[str, Any]] = [] + system_prompt = build_system_prompt( + max_target_intersections=args.max_target_intersections, + allow_only_visible_candidates=True, + ) + seen_keys: set[str] = set() + duplicate_rows_removed = 0 + low_signal_rows_removed = 0 + episode_index = 0 + max_rounds = max(target_rows * 3, len(scenario_specs) * 40) + progress = ( + tqdm(total=target_rows, desc=f"{split_name} rows", dynamic_ncols=True) + if tqdm is not None + else None + ) + + try: + while len(rows) < target_rows and episode_index < max_rounds: + scenario_spec = scenario_specs[episode_index % len(scenario_specs)] + for teacher in teachers: + if progress is not None: + progress.set_postfix_str( + " ".join( + [ + f"episode={episode_index}", + f"city={scenario_spec.city_id}", + f"scenario={scenario_spec.scenario_name}", + f"teacher={teacher.metadata.controller_type}", + ] + ) + ) + env = build_env(env_config=env_config, scenario_spec=scenario_spec) + examples = generate_examples_for_episode( + env=env, + teacher=teacher, + district_interval=args.decision_interval, + top_k_congested=args.top_k_congested, + max_candidate_intersections=args.max_candidate_intersections, + max_target_intersections=args.max_target_intersections, + episode_index=episode_index, + ) + for example in examples: + if not is_informative_example(example): + low_signal_rows_removed += 1 + continue + row = make_message_row(example, system_prompt=system_prompt) + key = row_key(row) + if key in seen_keys: + duplicate_rows_removed += 1 + continue + seen_keys.add(key) + rows.append(row) + if progress is not None: + progress.update(1) + if len(rows) >= target_rows: + break + if len(rows) >= target_rows: + break + episode_index += 1 + finally: + if progress is not None: + progress.close() + + if len(rows) < target_rows: + raise RuntimeError( + f"Unable to collect {target_rows} rows for split={split_name}. " + f"Collected {len(rows)} rows after filtering." + ) + + return CollectionResult( + rows=rows[:target_rows], + duplicate_rows_removed=duplicate_rows_removed, + low_signal_rows_removed=low_signal_rows_removed, + ) + + +def write_jsonl(path: Path, rows: list[dict[str, Any]]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + with path.open("w", encoding="utf-8") as handle: + for row in rows: + handle.write(json.dumps(row, sort_keys=True)) + handle.write("\n") + + +def counter_dict(values: list[str]) -> dict[str, int]: + return dict(sorted(Counter(values).items())) + + +def average(values: list[float]) -> float: + return float(sum(values) / len(values)) if values else 0.0 + + +def median(values: list[float]) -> float: + return float(statistics.median(values)) if values else 0.0 + + +def build_split_diagnostics(result: CollectionResult) -> dict[str, Any]: + rows = result.rows + assistant_payloads = [json.loads(row["messages"][2]["content"]) for row in rows] + summary_lengths = [len(row["messages"][1]["content"]) for row in rows] + assistant_lengths = [len(row["messages"][2]["content"]) for row in rows] + candidate_counts = [len(row.get("candidate_intersections", [])) for row in rows] + target_counts = [len(payload.get("target_intersections", [])) for payload in assistant_payloads] + assistant_uniqueness = ( + len({row["messages"][2]["content"] for row in rows}) / len(rows) + if rows + else 0.0 + ) + return { + "rows": len(rows), + "rows_per_scenario": counter_dict([row["scenario"] for row in rows]), + "rows_per_district_type": counter_dict([row["district_type"] for row in rows]), + "rows_per_city": counter_dict([row["city_id"] for row in rows]), + "controller_family_counts": counter_dict([row["controller_family"] for row in rows]), + "summary_length": { + "average": average(summary_lengths), + "median": median(summary_lengths), + }, + "assistant_json_length": { + "average": average(assistant_lengths), + "median": median(assistant_lengths), + }, + "candidate_pool_size": { + "average": average(candidate_counts), + "median": median(candidate_counts), + }, + "target_intersections_count": { + "average": average(target_counts), + "median": median(target_counts), + }, + "strategy_distribution": counter_dict([payload["strategy"] for payload in assistant_payloads]), + "priority_corridor_distribution": counter_dict( + [str(payload.get("priority_corridor")) for payload in assistant_payloads] + ), + "phase_bias_distribution": counter_dict([payload["phase_bias"] for payload in assistant_payloads]), + "duration_steps_distribution": counter_dict( + [str(payload["duration_steps"]) for payload in assistant_payloads] + ), + "assistant_uniqueness_ratio": assistant_uniqueness, + "duplicate_rows_removed": result.duplicate_rows_removed, + "low_signal_rows_removed": result.low_signal_rows_removed, + } + + +def aggregate_metadata( + train_result: CollectionResult, + val_result: CollectionResult, + teachers: list[BaseTeacher], +) -> dict[str, Any]: + all_rows = train_result.rows + val_result.rows + all_assistant_payloads = [json.loads(row["messages"][2]["content"]) for row in all_rows] + all_candidate_counts = [len(row.get("candidate_intersections", [])) for row in all_rows] + all_target_counts = [len(payload.get("target_intersections", [])) for payload in all_assistant_payloads] + return { + "num_train_rows": len(train_result.rows), + "num_val_rows": len(val_result.rows), + "generation_timestamp": datetime.now(timezone.utc).isoformat(), + "schema_version": SCHEMA_VERSION, + "teacher_sources": [teacher.metadata.to_dict() for teacher in teachers], + "rows_per_city": counter_dict([row["city_id"] for row in all_rows]), + "rows_per_scenario": counter_dict([row["scenario"] for row in all_rows]), + "rows_per_district_type": counter_dict([row["district_type"] for row in all_rows]), + "controller_family_counts": counter_dict([row["controller_family"] for row in all_rows]), + "average_candidate_intersections_count": average(all_candidate_counts), + "average_target_intersections_count": average(all_target_counts), + "duplicate_rows_removed": train_result.duplicate_rows_removed + val_result.duplicate_rows_removed, + "train_stats": build_split_diagnostics(train_result), + "val_stats": build_split_diagnostics(val_result), + } + + +def print_split_diagnostics(split_name: str, stats: dict[str, Any]) -> None: + print(f"[{split_name}] rows={stats['rows']}") + print(f"[{split_name}] rows_per_scenario={json.dumps(stats['rows_per_scenario'], sort_keys=True)}") + print(f"[{split_name}] rows_per_district_type={json.dumps(stats['rows_per_district_type'], sort_keys=True)}") + print(f"[{split_name}] rows_per_city={json.dumps(stats['rows_per_city'], sort_keys=True)}") + print(f"[{split_name}] summary_length={json.dumps(stats['summary_length'], sort_keys=True)}") + print(f"[{split_name}] assistant_json_length={json.dumps(stats['assistant_json_length'], sort_keys=True)}") + print(f"[{split_name}] candidate_pool_size={json.dumps(stats['candidate_pool_size'], sort_keys=True)}") + print( + f"[{split_name}] target_intersections_count=" + f"{json.dumps(stats['target_intersections_count'], sort_keys=True)}" + ) + print(f"[{split_name}] strategy_distribution={json.dumps(stats['strategy_distribution'], sort_keys=True)}") + print( + f"[{split_name}] priority_corridor_distribution=" + f"{json.dumps(stats['priority_corridor_distribution'], sort_keys=True)}" + ) + print(f"[{split_name}] phase_bias_distribution={json.dumps(stats['phase_bias_distribution'], sort_keys=True)}") + print( + f"[{split_name}] duration_steps_distribution=" + f"{json.dumps(stats['duration_steps_distribution'], sort_keys=True)}" + ) + print(f"[{split_name}] assistant_uniqueness_ratio={stats['assistant_uniqueness_ratio']:.3f}") + print( + f"[{split_name}] duplicate_rows_removed={stats['duplicate_rows_removed']} " + f"low_signal_rows_removed={stats['low_signal_rows_removed']}" + ) + + +def main() -> None: + args = parse_args() + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + dataset.generate_default_splits() + allowed_scenarios = parse_scenarios(args.scenarios) + teachers = resolve_teachers(args) + + checkpoint_env_configs = [ + teacher.env_config for teacher in teachers if teacher.env_config is not None + ] + if checkpoint_env_configs[1:] and any( + config != checkpoint_env_configs[0] for config in checkpoint_env_configs[1:] + ): + raise ValueError("Teacher checkpoint env configs differ. Use one DQN family per generation run.") + env_config = checkpoint_env_configs[0] if checkpoint_env_configs else default_env_config() + + train_specs = build_balanced_scenario_specs(dataset, "train", args.cities, allowed_scenarios) + val_specs = build_balanced_scenario_specs(dataset, "val", args.cities, allowed_scenarios) + + train_result = collect_split_rows("train", args.num_train, train_specs, teachers, env_config, args) + val_result = collect_split_rows("val", args.num_val, val_specs, teachers, env_config, args) + + train_keys = {row_key(row) for row in train_result.rows} + val_keys = {row_key(row) for row in val_result.rows} + overlap = train_keys & val_keys + if overlap: + raise ValueError("Duplicate rows detected across train and val splits.") + + output_dir = Path(args.output_dir) + write_jsonl(output_dir / "train.jsonl", train_result.rows) + write_jsonl(output_dir / "val.jsonl", val_result.rows) + + metadata = aggregate_metadata(train_result, val_result, teachers) + output_dir.mkdir(parents=True, exist_ok=True) + (output_dir / "metadata.json").write_text( + json.dumps(metadata, indent=2, sort_keys=True) + "\n", + encoding="utf-8", + ) + + print_split_diagnostics("train", metadata["train_stats"]) + print_split_diagnostics("val", metadata["val_stats"]) + print(f"[done] wrote {output_dir / 'train.jsonl'}") + print(f"[done] wrote {output_dir / 'val.jsonl'}") + print(f"[done] wrote {output_dir / 'metadata.json'}") + + +if __name__ == "__main__": + main() diff --git a/scripts/generate_medium_district_dataset.py b/scripts/generate_medium_district_dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..4fb49394388f3152507884347e59dce1f9c7536d --- /dev/null +++ b/scripts/generate_medium_district_dataset.py @@ -0,0 +1,477 @@ +from __future__ import annotations + +import argparse +import json +import statistics +import sys +from collections import Counter +from dataclasses import dataclass +from datetime import datetime, timezone +from pathlib import Path +from typing import Any + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +from district_llm.generate_dataset import build_env, generate_examples_for_episode +from district_llm.prompting import build_system_prompt +from district_llm.schema import DistrictAction +from district_llm.teachers import BaseTeacher, build_teacher, parse_teacher_spec +from env.observation_builder import ObservationConfig +from env.reward import RewardConfig +from env.traffic_env import EnvConfig +from training.cityflow_dataset import CityFlowDataset, DEFAULT_SCENARIOS + +try: + from tqdm.auto import tqdm +except ImportError: # pragma: no cover + tqdm = None + + +DEFAULT_OUTPUT_DIR = "data/district_llm_dataset_v2" +SCHEMA_VERSION = "district_action_v1_messages_v2_candidates" + + +@dataclass(frozen=True) +class CollectionResult: + rows: list[dict[str, Any]] + duplicate_rows_removed: int + low_signal_rows_removed: int + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description="Generate a medium-sized district-LLM chat dataset with diagnostics." + ) + parser.add_argument("--num-train", type=int, default=3000) + parser.add_argument("--num-val", type=int, default=500) + parser.add_argument("--cities", type=int, default=8) + parser.add_argument( + "--scenarios", + default="all", + help="Either 'all' or a comma-separated list such as normal,morning_rush,accident.", + ) + parser.add_argument("--output-dir", default=DEFAULT_OUTPUT_DIR) + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument( + "--teacher-spec", + action="append", + default=[], + help="Repeatable teacher source, e.g. rl_checkpoint=artifacts/dqn_shared/best_validation.pt.", + ) + parser.add_argument( + "--checkpoint", + default="artifacts/dqn_shared/best_validation.pt", + help="Default DQN checkpoint used when no --teacher-spec is provided.", + ) + parser.add_argument("--include-non-dqn-sources", action="store_true") + parser.add_argument("--device", default=None) + parser.add_argument("--seed", type=int, default=3407) + parser.add_argument("--decision-interval", type=int, default=10) + parser.add_argument("--top-k-congested", type=int, default=3) + parser.add_argument("--max-candidate-intersections", type=int, default=6) + parser.add_argument("--max-target-intersections", type=int, default=3) + parser.add_argument("--fixed-green-time", type=int, default=20) + return parser.parse_args() + + +def default_env_config() -> EnvConfig: + return EnvConfig( + simulator_interval=1, + decision_interval=5, + min_green_time=10, + thread_num=1, + max_episode_seconds=None, + observation=ObservationConfig(), + reward=RewardConfig(variant="wait_queue_throughput"), + ) + + +def resolve_teachers(args: argparse.Namespace) -> list[BaseTeacher]: + teacher_specs = list(args.teacher_spec) + if not teacher_specs: + checkpoint_path = Path(args.checkpoint) + teacher_specs = ( + [f"rl_checkpoint={checkpoint_path}"] + if checkpoint_path.exists() + else ["queue_greedy"] + ) + + teachers: list[BaseTeacher] = [] + for spec in teacher_specs: + controller_type, checkpoint = parse_teacher_spec(spec) + teacher = build_teacher( + controller_type=controller_type, + checkpoint=checkpoint, + fixed_green_time=args.fixed_green_time, + seed=args.seed, + device=args.device, + ) + if teacher.metadata.controller_family != "dqn" and not args.include_non_dqn_sources: + continue + teachers.append(teacher) + + if not teachers: + raise ValueError("No usable teachers resolved. Provide a DQN checkpoint or enable non-DQN sources.") + + return sorted( + teachers, + key=lambda teacher: (teacher.metadata.controller_family != "dqn", teacher.metadata.controller_type), + ) + + +def parse_scenarios(raw_value: str) -> set[str] | None: + if raw_value.strip().lower() == "all": + return None + return {item.strip() for item in raw_value.split(",") if item.strip()} + + +def build_scenario_specs( + dataset: CityFlowDataset, + split_name: str, + max_cities: int, + allowed_scenarios: set[str] | None, +) -> list[Any]: + scenario_order = {name: index for index, name in enumerate(DEFAULT_SCENARIOS)} + scenario_specs = [] + city_ids = dataset.load_split(split_name)[:max_cities] + for city_id in city_ids: + for scenario_name in dataset.scenarios_for_city(city_id): + if allowed_scenarios is not None and scenario_name not in allowed_scenarios: + continue + scenario_specs.append(dataset.build_scenario_spec(city_id, scenario_name)) + if not scenario_specs: + raise ValueError(f"No scenario specs found for split={split_name}.") + return sorted( + scenario_specs, + key=lambda spec: ( + scenario_order.get(spec.scenario_name, len(DEFAULT_SCENARIOS)), + spec.city_id, + ), + ) + + +def extract_summary_text(prompt: str) -> str: + state_marker = "### DISTRICT STATE\n" + decision_marker = "\n\n### DECISION" + if state_marker not in prompt: + return prompt.strip() + summary_block = prompt.split(state_marker, 1)[1] + summary_block = summary_block.split(decision_marker, 1)[0].strip() + return f"### DISTRICT STATE\n{summary_block}" + + +def is_informative_example(example: dict[str, Any]) -> bool: + state = example["state"] + top_congested = state.get("top_congested_intersections", []) + all_zero_top = all( + float(item.get("queue_total", 0.0)) <= 0.0 + and float(item.get("wait_total", 0.0)) <= 0.0 + and float(item.get("outgoing_load", 0.0)) <= 0.0 + for item in top_congested + ) + return not ( + int(state.get("decision_step", 0)) == 0 + or ( + float(state.get("total_queue", 0.0)) <= 0.0 + and float(state.get("total_wait", 0.0)) <= 0.0 + and float(state.get("recent_throughput", 0.0)) <= 0.0 + and not bool(state.get("spillback_risk", False)) + and all_zero_top + ) + ) + + +def make_message_row(example: dict[str, Any], system_prompt: str) -> dict[str, Any]: + assistant_content = json.dumps(example["response_json"], sort_keys=True) + row = { + "messages": [ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": extract_summary_text(example["prompt"])}, + {"role": "assistant", "content": assistant_content}, + ], + "city_id": example["city_id"], + "district_id": example["district_id"], + "district_type": example["district_type"], + "scenario": example["scenario"], + "controller_type": example["controller_type"], + "controller_family": example["controller_family"], + "teacher_algorithm": example["teacher_algorithm"], + "controller_id": example["controller_id"], + "checkpoint_path": example["checkpoint_path"], + "candidate_intersections": example.get("candidate_intersections", []), + } + validate_row(row) + return row + + +def validate_row(row: dict[str, Any]) -> None: + messages = row.get("messages", []) + if len(messages) != 3: + raise ValueError("Each row must contain exactly 3 chat messages.") + if not messages[1]["content"].strip(): + raise ValueError("User summary content is empty.") + payload = json.loads(messages[2]["content"]) + DistrictAction.from_dict(payload) + + +def row_key(row: dict[str, Any]) -> str: + return json.dumps(row["messages"], sort_keys=True, separators=(",", ":")) + + +def collect_split_rows( + split_name: str, + target_rows: int, + scenario_specs: list[Any], + teachers: list[BaseTeacher], + env_config: EnvConfig, + args: argparse.Namespace, +) -> CollectionResult: + rows: list[dict[str, Any]] = [] + system_prompt = build_system_prompt( + max_target_intersections=args.max_target_intersections, + allow_only_visible_candidates=True, + ) + seen_keys: set[str] = set() + duplicate_rows_removed = 0 + low_signal_rows_removed = 0 + episode_index = 0 + max_rounds = max(target_rows * 3, len(scenario_specs) * 25) + progress = ( + tqdm(total=target_rows, desc=f"{split_name} rows", dynamic_ncols=True) + if tqdm is not None + else None + ) + + try: + while len(rows) < target_rows and episode_index < max_rounds: + scenario_spec = scenario_specs[episode_index % len(scenario_specs)] + for teacher in teachers: + if progress is not None: + progress.set_postfix_str( + " ".join( + [ + f"episode={episode_index}", + f"city={scenario_spec.city_id}", + f"scenario={scenario_spec.scenario_name}", + f"teacher={teacher.metadata.controller_type}", + ] + ) + ) + env = build_env(env_config=env_config, scenario_spec=scenario_spec) + examples = generate_examples_for_episode( + env=env, + teacher=teacher, + district_interval=args.decision_interval, + top_k_congested=args.top_k_congested, + max_candidate_intersections=args.max_candidate_intersections, + max_target_intersections=args.max_target_intersections, + episode_index=episode_index, + ) + for example in examples: + if not is_informative_example(example): + low_signal_rows_removed += 1 + continue + row = make_message_row(example, system_prompt=system_prompt) + key = row_key(row) + if key in seen_keys: + duplicate_rows_removed += 1 + continue + seen_keys.add(key) + rows.append(row) + if progress is not None: + progress.update(1) + if len(rows) >= target_rows: + break + if len(rows) >= target_rows: + break + episode_index += 1 + finally: + if progress is not None: + progress.close() + + if len(rows) < target_rows: + raise RuntimeError( + f"Unable to collect {target_rows} rows for split={split_name}. " + f"Collected {len(rows)} rows after filtering." + ) + + return CollectionResult( + rows=rows[:target_rows], + duplicate_rows_removed=duplicate_rows_removed, + low_signal_rows_removed=low_signal_rows_removed, + ) + + +def write_jsonl(path: Path, rows: list[dict[str, Any]]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + with path.open("w", encoding="utf-8") as handle: + for row in rows: + handle.write(json.dumps(row, sort_keys=True)) + handle.write("\n") + + +def counter_dict(values: list[str]) -> dict[str, int]: + return dict(sorted(Counter(values).items())) + + +def average(values: list[float]) -> float: + return float(sum(values) / len(values)) if values else 0.0 + + +def median(values: list[float]) -> float: + return float(statistics.median(values)) if values else 0.0 + + +def build_split_diagnostics(result: CollectionResult) -> dict[str, Any]: + rows = result.rows + assistant_payloads = [json.loads(row["messages"][2]["content"]) for row in rows] + summary_lengths = [len(row["messages"][1]["content"]) for row in rows] + assistant_lengths = [len(row["messages"][2]["content"]) for row in rows] + target_counts = [len(payload.get("target_intersections", [])) for payload in assistant_payloads] + candidate_counts = [len(row.get("candidate_intersections", [])) for row in rows] + assistant_uniqueness = ( + len({row["messages"][2]["content"] for row in rows}) / len(rows) + if rows + else 0.0 + ) + return { + "rows": len(rows), + "rows_per_scenario": counter_dict([row["scenario"] for row in rows]), + "rows_per_district_type": counter_dict([row["district_type"] for row in rows]), + "rows_per_city": counter_dict([row["city_id"] for row in rows]), + "controller_family_counts": counter_dict([row["controller_family"] for row in rows]), + "summary_length": { + "average": average(summary_lengths), + "median": median(summary_lengths), + }, + "assistant_json_length": { + "average": average(assistant_lengths), + "median": median(assistant_lengths), + }, + "strategy_distribution": counter_dict([payload["strategy"] for payload in assistant_payloads]), + "priority_corridor_distribution": counter_dict( + [str(payload.get("priority_corridor")) for payload in assistant_payloads] + ), + "phase_bias_distribution": counter_dict([payload["phase_bias"] for payload in assistant_payloads]), + "duration_steps_distribution": counter_dict( + [str(payload["duration_steps"]) for payload in assistant_payloads] + ), + "candidate_intersections_count": { + "average": average(candidate_counts), + "median": median(candidate_counts), + }, + "average_target_intersections": average(target_counts), + "assistant_uniqueness_ratio": assistant_uniqueness, + "duplicate_row_count_removed": result.duplicate_rows_removed, + "low_signal_row_count_removed": result.low_signal_rows_removed, + } + + +def aggregate_metadata( + train_result: CollectionResult, + val_result: CollectionResult, + teachers: list[BaseTeacher], +) -> dict[str, Any]: + all_rows = train_result.rows + val_result.rows + train_stats = build_split_diagnostics(train_result) + val_stats = build_split_diagnostics(val_result) + return { + "num_train_rows": len(train_result.rows), + "num_val_rows": len(val_result.rows), + "generation_timestamp": datetime.now(timezone.utc).isoformat(), + "schema_version": SCHEMA_VERSION, + "teacher_sources": [teacher.metadata.to_dict() for teacher in teachers], + "rows_per_scenario": counter_dict([row["scenario"] for row in all_rows]), + "rows_per_district_type": counter_dict([row["district_type"] for row in all_rows]), + "rows_per_city": counter_dict([row["city_id"] for row in all_rows]), + "controller_family_counts": counter_dict([row["controller_family"] for row in all_rows]), + "train_stats": train_stats, + "val_stats": val_stats, + } + + +def print_split_diagnostics(split_name: str, stats: dict[str, Any]) -> None: + print(f"[{split_name}] rows={stats['rows']}") + print(f"[{split_name}] rows_per_scenario={json.dumps(stats['rows_per_scenario'], sort_keys=True)}") + print(f"[{split_name}] rows_per_district_type={json.dumps(stats['rows_per_district_type'], sort_keys=True)}") + print(f"[{split_name}] rows_per_city={json.dumps(stats['rows_per_city'], sort_keys=True)}") + print(f"[{split_name}] summary_length={json.dumps(stats['summary_length'], sort_keys=True)}") + print(f"[{split_name}] assistant_json_length={json.dumps(stats['assistant_json_length'], sort_keys=True)}") + print(f"[{split_name}] strategy_distribution={json.dumps(stats['strategy_distribution'], sort_keys=True)}") + print( + f"[{split_name}] priority_corridor_distribution=" + f"{json.dumps(stats['priority_corridor_distribution'], sort_keys=True)}" + ) + print(f"[{split_name}] phase_bias_distribution={json.dumps(stats['phase_bias_distribution'], sort_keys=True)}") + print( + f"[{split_name}] duration_steps_distribution=" + f"{json.dumps(stats['duration_steps_distribution'], sort_keys=True)}" + ) + print( + f"[{split_name}] candidate_intersections_count=" + f"{json.dumps(stats['candidate_intersections_count'], sort_keys=True)}" + ) + print( + f"[{split_name}] average_target_intersections={stats['average_target_intersections']:.3f} " + f"assistant_uniqueness_ratio={stats['assistant_uniqueness_ratio']:.3f}" + ) + print( + f"[{split_name}] duplicate_row_count_removed={stats['duplicate_row_count_removed']} " + f"low_signal_row_count_removed={stats['low_signal_row_count_removed']}" + ) + + +def main() -> None: + args = parse_args() + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + dataset.generate_default_splits() + allowed_scenarios = parse_scenarios(args.scenarios) + teachers = resolve_teachers(args) + + checkpoint_env_configs = [ + teacher.env_config for teacher in teachers if teacher.env_config is not None + ] + if checkpoint_env_configs[1:] and any( + config != checkpoint_env_configs[0] for config in checkpoint_env_configs[1:] + ): + raise ValueError("Teacher checkpoint env configs differ. Use one DQN family per generation run.") + env_config = checkpoint_env_configs[0] if checkpoint_env_configs else default_env_config() + + train_specs = build_scenario_specs(dataset, "train", args.cities, allowed_scenarios) + val_specs = build_scenario_specs(dataset, "val", args.cities, allowed_scenarios) + + train_result = collect_split_rows("train", args.num_train, train_specs, teachers, env_config, args) + val_result = collect_split_rows("val", args.num_val, val_specs, teachers, env_config, args) + + train_keys = {row_key(row) for row in train_result.rows} + val_keys = {row_key(row) for row in val_result.rows} + overlap = train_keys & val_keys + if overlap: + raise ValueError("Duplicate rows detected across train and val splits.") + + output_dir = Path(args.output_dir) + write_jsonl(output_dir / "train.jsonl", train_result.rows) + write_jsonl(output_dir / "val.jsonl", val_result.rows) + + metadata = aggregate_metadata(train_result, val_result, teachers) + output_dir.mkdir(parents=True, exist_ok=True) + (output_dir / "metadata.json").write_text( + json.dumps(metadata, indent=2, sort_keys=True) + "\n", + encoding="utf-8", + ) + + print_split_diagnostics("train", metadata["train_stats"]) + print_split_diagnostics("val", metadata["val_stats"]) + print(f"[done] wrote {output_dir / 'train.jsonl'}") + print(f"[done] wrote {output_dir / 'val.jsonl'}") + print(f"[done] wrote {output_dir / 'metadata.json'}") + + +if __name__ == "__main__": + main() diff --git a/scripts/generate_small_district_dataset.py b/scripts/generate_small_district_dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..1386d135a2d896f86cda3873cf96b2872ae1974c --- /dev/null +++ b/scripts/generate_small_district_dataset.py @@ -0,0 +1,425 @@ +from __future__ import annotations + +import argparse +import json +import sys +from collections import Counter +from dataclasses import dataclass +from datetime import datetime, timezone +from pathlib import Path +from typing import Any + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +from district_llm.generate_dataset import build_env, generate_examples_for_episode +from district_llm.prompting import build_system_prompt +from district_llm.schema import DistrictAction +from district_llm.teachers import BaseTeacher, build_teacher, parse_teacher_spec +from env.observation_builder import ObservationConfig +from env.reward import RewardConfig +from env.traffic_env import EnvConfig +from training.cityflow_dataset import CityFlowDataset + +try: + from tqdm.auto import tqdm +except ImportError: # pragma: no cover + tqdm = None + + +DEFAULT_OUTPUT_DIR = "data/district_llm_dataset_v1" +SCHEMA_VERSION = "district_action_v1_messages_v1" + + +@dataclass(frozen=True) +class SplitStats: + action_distribution: dict[str, int] + summary_length: dict[str, float] + rows_per_scenario: dict[str, int] + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description="Generate a small pilot district-LLM chat dataset." + ) + parser.add_argument("--num-train", type=int, default=400) + parser.add_argument("--num-val", type=int, default=80) + parser.add_argument("--cities", type=int, default=3) + parser.add_argument( + "--scenarios", + default="all", + help="Either 'all' or a comma-separated scenario list such as normal,accident,event_spike.", + ) + parser.add_argument("--output-dir", default=DEFAULT_OUTPUT_DIR) + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument( + "--teacher-spec", + action="append", + default=[], + help="Repeatable teacher source, e.g. rl_checkpoint=artifacts/dqn_shared/best_validation.pt.", + ) + parser.add_argument( + "--checkpoint", + default="artifacts/dqn_shared/best_validation.pt", + help="Default DQN checkpoint used when no --teacher-spec is provided.", + ) + parser.add_argument("--device", default=None) + parser.add_argument("--seed", type=int, default=7) + parser.add_argument("--decision-interval", type=int, default=10) + parser.add_argument("--top-k-congested", type=int, default=3) + parser.add_argument("--max-candidate-intersections", type=int, default=6) + parser.add_argument("--max-target-intersections", type=int, default=3) + parser.add_argument("--fixed-green-time", type=int, default=20) + return parser.parse_args() + + +def default_env_config() -> EnvConfig: + return EnvConfig( + simulator_interval=1, + decision_interval=5, + min_green_time=10, + thread_num=1, + max_episode_seconds=None, + observation=ObservationConfig(), + reward=RewardConfig(variant="wait_queue_throughput"), + ) + + +def resolve_teachers(args: argparse.Namespace) -> list[BaseTeacher]: + teacher_specs = list(args.teacher_spec) + if not teacher_specs: + checkpoint_path = Path(args.checkpoint) + teacher_specs = ( + [f"rl_checkpoint={checkpoint_path}"] + if checkpoint_path.exists() + else ["queue_greedy"] + ) + + teachers: list[BaseTeacher] = [] + for spec in teacher_specs: + controller_type, checkpoint = parse_teacher_spec(spec) + teachers.append( + build_teacher( + controller_type=controller_type, + checkpoint=checkpoint, + fixed_green_time=args.fixed_green_time, + seed=args.seed, + device=args.device, + ) + ) + return sorted( + teachers, + key=lambda teacher: (teacher.metadata.controller_family != "dqn", teacher.metadata.controller_type), + ) + + +def parse_scenarios(raw_value: str) -> set[str] | None: + if raw_value.strip().lower() == "all": + return None + return { + item.strip() + for item in raw_value.split(",") + if item.strip() + } + + +def build_scenario_specs( + dataset: CityFlowDataset, + split_name: str, + max_cities: int, + allowed_scenarios: set[str] | None, +) -> list[Any]: + city_ids = dataset.load_split(split_name)[:max_cities] + scenario_specs = [] + for city_id in city_ids: + for scenario_name in dataset.scenarios_for_city(city_id): + if allowed_scenarios is not None and scenario_name not in allowed_scenarios: + continue + scenario_specs.append(dataset.build_scenario_spec(city_id, scenario_name)) + if not scenario_specs: + raise ValueError(f"No scenario specs found for split={split_name}.") + return scenario_specs + + +def make_message_row(example: dict[str, Any], system_prompt: str) -> dict[str, Any]: + assistant_content = json.dumps(example["response_json"], sort_keys=True) + user_content = extract_summary_text(example["prompt"]) + + row = { + "messages": [ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": user_content}, + {"role": "assistant", "content": assistant_content}, + ], + "city_id": example["city_id"], + "district_id": example["district_id"], + "district_type": example["district_type"], + "scenario": example["scenario"], + "controller_type": example["controller_type"], + "controller_family": example["controller_family"], + "teacher_algorithm": example["teacher_algorithm"], + "controller_id": example["controller_id"], + "checkpoint_path": example["checkpoint_path"], + "candidate_intersections": example.get("candidate_intersections", []), + } + validate_row(row) + return row + + +def extract_summary_text(prompt: str) -> str: + state_marker = "### DISTRICT STATE\n" + decision_marker = "\n\n### DECISION" + if state_marker not in prompt: + return prompt.strip() + summary_block = prompt.split(state_marker, 1)[1] + summary_block = summary_block.split(decision_marker, 1)[0].strip() + return f"### DISTRICT STATE\n{summary_block}" + + +def validate_row(row: dict[str, Any]) -> None: + messages = row.get("messages", []) + if len(messages) != 3: + raise ValueError("Each row must contain exactly 3 chat messages.") + if not messages[1]["content"].strip(): + raise ValueError("User summary content is empty.") + payload = json.loads(messages[2]["content"]) + DistrictAction.from_dict(payload) + + +def row_key(row: dict[str, Any]) -> str: + return json.dumps(row["messages"], sort_keys=True, separators=(",", ":")) + + +def summary_stats(rows: list[dict[str, Any]]) -> SplitStats: + action_counter = Counter() + scenario_counter = Counter() + summary_lengths: list[int] = [] + + for row in rows: + assistant_payload = json.loads(row["messages"][2]["content"]) + action_counter[str(assistant_payload["strategy"])] += 1 + scenario_counter[str(row["scenario"])] += 1 + summary_lengths.append(len(row["messages"][1]["content"])) + + if not summary_lengths: + length_stats = {"min": 0.0, "max": 0.0, "avg": 0.0} + else: + length_stats = { + "min": float(min(summary_lengths)), + "max": float(max(summary_lengths)), + "avg": float(sum(summary_lengths) / len(summary_lengths)), + } + return SplitStats( + action_distribution=dict(sorted(action_counter.items())), + summary_length=length_stats, + rows_per_scenario=dict(sorted(scenario_counter.items())), + ) + + +def collect_split_rows( + split_name: str, + target_rows: int, + scenario_specs: list[Any], + teachers: list[BaseTeacher], + env_config: EnvConfig, + args: argparse.Namespace, +) -> list[dict[str, Any]]: + rows: list[dict[str, Any]] = [] + system_prompt = build_system_prompt( + max_target_intersections=args.max_target_intersections, + allow_only_visible_candidates=True, + ) + seen_keys: set[str] = set() + pending_non_dqn: list[dict[str, Any]] = [] + episode_index = 0 + max_rounds = max(10, target_rows * 2) + progress = ( + tqdm( + total=target_rows, + desc=f"{split_name} rows", + dynamic_ncols=True, + ) + if tqdm is not None + else None + ) + + try: + while len(rows) < target_rows and episode_index < max_rounds: + scenario_spec = scenario_specs[episode_index % len(scenario_specs)] + if progress is not None: + progress.set_postfix_str( + f"episode={episode_index} city={scenario_spec.city_id} scenario={scenario_spec.scenario_name}" + ) + for teacher in teachers: + if progress is not None: + progress.set_postfix_str( + " ".join( + [ + f"episode={episode_index}", + f"city={scenario_spec.city_id}", + f"scenario={scenario_spec.scenario_name}", + f"teacher={teacher.metadata.controller_type}", + ] + ) + ) + env = build_env(env_config=env_config, scenario_spec=scenario_spec) + examples = generate_examples_for_episode( + env=env, + teacher=teacher, + district_interval=args.decision_interval, + top_k_congested=args.top_k_congested, + max_candidate_intersections=args.max_candidate_intersections, + max_target_intersections=args.max_target_intersections, + episode_index=episode_index, + ) + for example in examples: + row = make_message_row(example, system_prompt=system_prompt) + key = row_key(row) + if key in seen_keys: + continue + seen_keys.add(key) + if example["controller_family"] == "dqn": + rows.append(row) + if progress is not None: + progress.update(1) + else: + pending_non_dqn.append(row) + if len(rows) >= target_rows: + break + if len(rows) >= target_rows: + break + episode_index += 1 + finally: + if progress is not None: + progress.close() + + if len(rows) < target_rows: + for row in pending_non_dqn: + if len(rows) >= target_rows: + break + rows.append(row) + + if len(rows) < target_rows: + raise RuntimeError( + f"Unable to collect {target_rows} unique rows for split={split_name}. " + f"Collected {len(rows)} rows." + ) + + return rows[:target_rows] + + +def write_jsonl(path: Path, rows: list[dict[str, Any]]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + with path.open("w", encoding="utf-8") as handle: + for row in rows: + handle.write(json.dumps(row, sort_keys=True)) + handle.write("\n") + + +def write_metadata( + path: Path, + train_rows: list[dict[str, Any]], + val_rows: list[dict[str, Any]], + teachers: list[BaseTeacher], +) -> None: + metadata = { + "num_train_rows": len(train_rows), + "num_val_rows": len(val_rows), + "teacher_sources": [teacher.metadata.to_dict() for teacher in teachers], + "schema_version": SCHEMA_VERSION, + "generation_timestamp": datetime.now(timezone.utc).isoformat(), + } + path.write_text(json.dumps(metadata, indent=2, sort_keys=True) + "\n", encoding="utf-8") + + +def print_stats(split_name: str, rows: list[dict[str, Any]]) -> None: + stats = summary_stats(rows) + print(f"[{split_name}] rows={len(rows)}") + print(f"[{split_name}] action_distribution={json.dumps(stats.action_distribution, sort_keys=True)}") + print(f"[{split_name}] summary_length={json.dumps(stats.summary_length, sort_keys=True)}") + print(f"[{split_name}] rows_per_scenario={json.dumps(stats.rows_per_scenario, sort_keys=True)}") + + +def validate_unique_rows(train_rows: list[dict[str, Any]], val_rows: list[dict[str, Any]]) -> None: + train_keys = [row_key(row) for row in train_rows] + val_keys = [row_key(row) for row in val_rows] + if len(train_keys) != len(set(train_keys)): + raise ValueError("Duplicate rows detected inside train split.") + if len(val_keys) != len(set(val_keys)): + raise ValueError("Duplicate rows detected inside val split.") + overlap = set(train_keys) & set(val_keys) + if overlap: + raise ValueError("Duplicate rows detected across train and val splits.") + + +def main() -> None: + args = parse_args() + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + dataset.generate_default_splits() + allowed_scenarios = parse_scenarios(args.scenarios) + teachers = resolve_teachers(args) + + checkpoint_env_configs = [ + teacher.env_config for teacher in teachers if teacher.env_config is not None + ] + if checkpoint_env_configs[1:] and any( + config != checkpoint_env_configs[0] for config in checkpoint_env_configs[1:] + ): + raise ValueError("Teacher checkpoint env configs differ. Use one DQN family per pilot run.") + env_config = checkpoint_env_configs[0] if checkpoint_env_configs else default_env_config() + + train_specs = build_scenario_specs( + dataset=dataset, + split_name="train", + max_cities=args.cities, + allowed_scenarios=allowed_scenarios, + ) + val_specs = build_scenario_specs( + dataset=dataset, + split_name="val", + max_cities=args.cities, + allowed_scenarios=allowed_scenarios, + ) + + train_rows = collect_split_rows( + split_name="train", + target_rows=args.num_train, + scenario_specs=train_specs, + teachers=teachers, + env_config=env_config, + args=args, + ) + val_rows = collect_split_rows( + split_name="val", + target_rows=args.num_val, + scenario_specs=val_specs, + teachers=teachers, + env_config=env_config, + args=args, + ) + validate_unique_rows(train_rows, val_rows) + + output_dir = Path(args.output_dir) + write_jsonl(output_dir / "train.jsonl", train_rows) + write_jsonl(output_dir / "val.jsonl", val_rows) + write_metadata( + output_dir / "metadata.json", + train_rows=train_rows, + val_rows=val_rows, + teachers=teachers, + ) + + print_stats("train", train_rows) + print_stats("val", val_rows) + print(f"[done] wrote {output_dir / 'train.jsonl'}") + print(f"[done] wrote {output_dir / 'val.jsonl'}") + print(f"[done] wrote {output_dir / 'metadata.json'}") + + +if __name__ == "__main__": + main() diff --git a/scripts/prepare_openenv_push.sh b/scripts/prepare_openenv_push.sh new file mode 100644 index 0000000000000000000000000000000000000000..cce1c39238ebe318fa919194f51268a1b623c732 --- /dev/null +++ b/scripts/prepare_openenv_push.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +OUT_DIR="${1:-${ROOT_DIR}/.openenv_push}" + +rm -rf "${OUT_DIR}" +mkdir -p "${OUT_DIR}" +mkdir -p "${OUT_DIR}/third_party" "${OUT_DIR}/data" "${OUT_DIR}/artifacts/dqn_shared" \ + "${OUT_DIR}/artifacts/district_llm_adapter_v3/main_run" + +cp -a "${ROOT_DIR}/README.md" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/__init__.py" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/client.py" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/models.py" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/openenv.yaml" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/pyproject.toml" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/openenv_app" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/server" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/agents" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/district_llm" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/env" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/training" "${OUT_DIR}/" +cp -a "${ROOT_DIR}/third_party/CityFlow" "${OUT_DIR}/third_party/" +cp -a "${ROOT_DIR}/data/splits" "${OUT_DIR}/data/" +mkdir -p "${OUT_DIR}/data/generated" +cp -a "${ROOT_DIR}/data/generated/city_0002" "${OUT_DIR}/data/generated/" +cp -a "${ROOT_DIR}/artifacts/dqn_shared/best_validation.pt" "${OUT_DIR}/artifacts/dqn_shared/" +cp -a "${ROOT_DIR}/artifacts/district_llm_adapter_v3/main_run/adapter" \ + "${OUT_DIR}/artifacts/district_llm_adapter_v3/main_run/" + +rm -rf "${OUT_DIR}/third_party/CityFlow/build" +find "${OUT_DIR}" -type d -name '__pycache__' -prune -exec rm -rf {} + +find "${OUT_DIR}" -type f \( -name '*.pyc' -o -name '*.pyo' \) -delete + +echo "Prepared lean OpenEnv push directory at ${OUT_DIR}" +du -sh "${OUT_DIR}" diff --git a/scripts/push_openenv.sh b/scripts/push_openenv.sh new file mode 100644 index 0000000000000000000000000000000000000000..f6d2e650f4838f66327d0e426318f2eeb42b78bf --- /dev/null +++ b/scripts/push_openenv.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +STAGE_DIR="${1:-/tmp/agentic-traffic-openenv-push}" +REPO_ID="${2:-tokev/traffic-visualizer}" + +"${ROOT_DIR}/scripts/prepare_openenv_push.sh" "${STAGE_DIR}" + +cd "${STAGE_DIR}" +openenv push . --repo-id "${REPO_ID}" + +cd "${ROOT_DIR}" +echo "Returned to ${ROOT_DIR}" diff --git a/scripts/quick_rl_llm_eval.py b/scripts/quick_rl_llm_eval.py new file mode 100644 index 0000000000000000000000000000000000000000..f7dfbfcb994b604115754f581694921198a73739 --- /dev/null +++ b/scripts/quick_rl_llm_eval.py @@ -0,0 +1,539 @@ +from __future__ import annotations + +import argparse +import json +from dataclasses import asdict +from datetime import datetime, timezone +from pathlib import Path +from typing import Any +import sys + +from tqdm.auto import tqdm + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +from district_llm.heuristic_guidance import HeuristicGuidanceConfig +from district_llm.inference import DistrictLLMInference +from district_llm.repair import RepairConfig +from district_llm.rl_guidance_wrapper import ( + DistrictGuidedRLController, + FixedRLPolicyAdapter, + GuidanceInfluenceConfig, + HeuristicGuidanceProvider, + LLMGuidanceProvider, + guidance_config_payload, +) +from district_llm.summary_builder import DistrictStateSummaryBuilder +from env.traffic_env import EnvConfig +from scripts.eval_rl_guidance_ablation import ( + build_episode_plans, + default_env_config, + distribution_summary, + env_config_to_payload, + run_episode, + safe_float, + try_write_parquet, + write_csv_rows, + write_json, +) +from training.cityflow_dataset import CityFlowDataset + + +DEFAULT_SEEDS: tuple[int, ...] = (7,) +PREFERRED_DEFAULT_CITIES: tuple[str, ...] = ("city_0001",) +PREFERRED_DEFAULT_SCENARIOS: tuple[str, ...] = ("normal",) +SCENARIO_ALIASES: dict[str, str] = { + "rush": "morning_rush", +} + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description=( + "Quick paired evaluation for rl_only vs rl_heuristic vs rl_llm using the " + "best target_only_soft wrapper settings." + ) + ) + parser.add_argument("--rl-checkpoint", required=True) + parser.add_argument("--llm-model-path", required=True) + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument("--split", default="val", choices=("train", "val", "test")) + parser.add_argument("--cities", nargs="+", default=None) + parser.add_argument("--scenarios", nargs="+", default=None) + parser.add_argument("--seeds", nargs="+", type=int, default=list(DEFAULT_SEEDS)) + parser.add_argument("--episodes-per-seed", type=int, default=1) + parser.add_argument( + "--max-episode-seconds", + type=int, + default=120, + help="Short default horizon so the quick check stays under roughly 10-20 minutes.", + ) + parser.add_argument("--max-new-tokens", type=int, default=128) + parser.add_argument("--device", default=None) + parser.add_argument("--output-dir", default="artifacts/quick_rl_llm_eval") + parser.add_argument( + "--allow-only-visible-candidates", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument("--max-target-intersections", type=int, default=3) + parser.add_argument( + "--fallback-on-empty-targets", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument( + "--fallback-mode", + choices=("heuristic", "hold", "none"), + default="heuristic", + ) + return parser.parse_args() + + +def main() -> None: + args = parse_args() + output_dir = Path(args.output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + seeded_config_root = output_dir / "seeded_configs" + seeded_config_root.mkdir(parents=True, exist_ok=True) + + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + dataset.generate_default_splits() + + city_ids = resolve_quick_cities(dataset=dataset, requested_cities=args.cities) + scenario_specs = resolve_quick_scenario_specs( + dataset=dataset, + city_ids=city_ids, + requested_scenarios=args.scenarios, + ) + episode_plans = build_episode_plans( + scenario_specs=scenario_specs, + seeds=args.seeds, + num_episodes=args.episodes_per_seed, + seeded_config_root=seeded_config_root, + ) + + rl_policy = FixedRLPolicyAdapter( + checkpoint_path=args.rl_checkpoint, + device=args.device, + ) + env_config = rl_policy.env_config or default_env_config() + env_config = EnvConfig( + simulator_interval=env_config.simulator_interval, + decision_interval=env_config.decision_interval, + min_green_time=env_config.min_green_time, + thread_num=env_config.thread_num, + max_episode_seconds=int(args.max_episode_seconds), + observation=env_config.observation, + reward=env_config.reward, + ) + + tuned_config = GuidanceInfluenceConfig( + wrapper_mode="target_only_soft", + bias_strength=0.025, + target_only_bias_strength=0.025, + corridor_bias_strength=0.0125, + max_intersections_affected=2, + guidance_refresh_steps=10, + guidance_persistence_steps=5, + max_guidance_duration=10, + apply_global_bias=False, + apply_target_only=True, + gating_mode="queue_or_imbalance", + min_avg_queue_for_guidance=150.0, + min_queue_imbalance_for_guidance=20.0, + require_incident_or_spillback=False, + allow_guidance_in_normal_conditions=False, + enable_bias_decay=False, + bias_decay_schedule="linear", + fallback_policy="no_op", + log_guidance_debug=False, + ).validate() + + controllers = build_controllers( + args=args, + rl_policy=rl_policy, + tuned_config=tuned_config, + ) + + episode_rows: list[dict[str, Any]] = [] + rows_by_pair: dict[tuple[str, str, int, int], dict[str, dict[str, Any]]] = {} + total_runs = len(episode_plans) * len(controllers) + progress = tqdm(total=total_runs, desc="Quick RL+LLM eval", unit="run") + try: + for plan in episode_plans: + for mode_label, controller in controllers.items(): + progress.set_postfix_str( + f"mode={mode_label} city={plan.city_id} scenario={plan.scenario} seed={plan.seed}" + ) + episode_row, _, _ = run_episode( + plan=plan, + mode_label=mode_label, + controller=controller, + env_config=env_config, + save_step_metrics=False, + save_guidance_traces=False, + show_step_progress=False, + ) + episode_row = augment_episode_row(episode_row, tuned_config) + episode_rows.append(episode_row) + rows_by_pair.setdefault(plan.pairing_key(), {})[mode_label] = episode_row + progress.update(1) + finally: + progress.close() + + paired_delta_rows = build_paired_delta_rows(rows_by_pair) + summary_payload = build_summary_payload( + episode_rows=episode_rows, + paired_delta_rows=paired_delta_rows, + tuned_config=tuned_config, + args=args, + scenario_specs=scenario_specs, + ) + + write_csv_rows(output_dir / "episode_metrics.csv", episode_rows) + episode_parquet_written = try_write_parquet(output_dir / "episode_metrics.parquet", episode_rows) + write_csv_rows(output_dir / "paired_deltas.csv", paired_delta_rows) + try_write_parquet(output_dir / "paired_deltas.parquet", paired_delta_rows) + write_json(output_dir / "summary.json", summary_payload) + + print(json.dumps(summary_payload, indent=2, sort_keys=True)) + if not episode_parquet_written: + print( + "[warning] episode_metrics.parquet was not written because neither pyarrow nor pandas " + "is available in the current Python environment." + ) + + +def resolve_quick_cities( + dataset: CityFlowDataset, + requested_cities: list[str] | None, +) -> list[str]: + available = set(dataset.discover_cities()) + if requested_cities: + selected = [city_id for city_id in requested_cities if city_id in available] + if not selected: + raise ValueError(f"None of the requested cities are available: {requested_cities}") + return selected + defaults = [city_id for city_id in PREFERRED_DEFAULT_CITIES if city_id in available] + if defaults: + return defaults[:1] + discovered = sorted(available) + if not discovered: + raise ValueError("No generated cities were found under the generated-root.") + return discovered[:1] + + +def resolve_quick_scenario_specs( + dataset: CityFlowDataset, + city_ids: list[str], + requested_scenarios: list[str] | None, +) -> list[Any]: + specs: list[Any] = [] + for city_id in city_ids: + available_scenarios = set(dataset.scenarios_for_city(city_id)) + if requested_scenarios: + desired = [ + SCENARIO_ALIASES.get(scenario_name, scenario_name) + for scenario_name in requested_scenarios + ] + else: + desired = [ + scenario_name + for scenario_name in PREFERRED_DEFAULT_SCENARIOS + if scenario_name in available_scenarios + ][:2] + selected = [scenario_name for scenario_name in desired if scenario_name in available_scenarios] + if not selected: + raise ValueError( + f"No requested/default scenarios are available for city '{city_id}'. " + f"Available scenarios: {sorted(available_scenarios)}" + ) + for scenario_name in selected: + specs.append(dataset.build_scenario_spec(city_id, scenario_name)) + if not specs: + raise ValueError("No scenario specs were resolved for the quick evaluation.") + return specs + + +def build_controllers( + args: argparse.Namespace, + rl_policy: FixedRLPolicyAdapter, + tuned_config: GuidanceInfluenceConfig, +) -> dict[str, DistrictGuidedRLController]: + heuristic_provider = HeuristicGuidanceProvider( + config=HeuristicGuidanceConfig( + max_target_intersections=args.max_target_intersections, + ) + ) + llm_inference = DistrictLLMInference( + model_name_or_path=args.llm_model_path, + device=args.device, + repair_config=RepairConfig( + allow_only_visible_candidates=args.allow_only_visible_candidates, + max_target_intersections=args.max_target_intersections, + fallback_on_empty_targets=args.fallback_on_empty_targets, + fallback_mode=args.fallback_mode, + ), + ) + llm_provider = LLMGuidanceProvider( + inference=llm_inference, + max_new_tokens=args.max_new_tokens, + ) + + def summary_builder() -> DistrictStateSummaryBuilder: + return DistrictStateSummaryBuilder( + top_k=3, + candidate_limit=max(6, int(args.max_target_intersections)), + ) + + return { + "rl_only": DistrictGuidedRLController( + policy=rl_policy, + mode_source="rl_only", + summary_builder=None, + guidance_provider=None, + influence_config=GuidanceInfluenceConfig( + wrapper_mode="no_op", + bias_strength=0.0, + target_only_bias_strength=0.0, + corridor_bias_strength=0.0, + max_intersections_affected=1, + guidance_refresh_steps=tuned_config.guidance_refresh_steps, + guidance_persistence_steps=1, + max_guidance_duration=tuned_config.max_guidance_duration, + fallback_policy="no_op", + enable_bias_decay=False, + ), + heuristic_provider=None, + ), + "rl_heuristic": DistrictGuidedRLController( + policy=rl_policy, + mode_source="rl_heuristic", + summary_builder=summary_builder(), + guidance_provider=heuristic_provider, + influence_config=tuned_config, + heuristic_provider=heuristic_provider, + ), + "rl_llm": DistrictGuidedRLController( + policy=rl_policy, + mode_source="rl_llm", + summary_builder=summary_builder(), + guidance_provider=llm_provider, + influence_config=tuned_config, + heuristic_provider=heuristic_provider, + ), + } + + +def augment_episode_row( + row: dict[str, Any], + tuned_config: GuidanceInfluenceConfig, +) -> dict[str, Any]: + payload = dict(row) + payload.update( + { + "wrapper_mode": tuned_config.wrapper_mode if row["mode"] != "rl_only" else "no_op", + "bias_strength": 0.0 if row["mode"] == "rl_only" else tuned_config.bias_strength, + "target_only_bias_strength": 0.0 + if row["mode"] == "rl_only" + else tuned_config.target_only_bias_strength, + "corridor_bias_strength": 0.0 + if row["mode"] == "rl_only" + else tuned_config.corridor_bias_strength, + "max_intersections_affected": 0 + if row["mode"] == "rl_only" + else tuned_config.max_intersections_affected, + "gating_mode": "always_on" if row["mode"] == "rl_only" else tuned_config.gating_mode, + "guidance_persistence_steps": 0 + if row["mode"] == "rl_only" + else tuned_config.guidance_persistence_steps, + "guidance_refresh_steps": 0 + if row["mode"] == "rl_only" + else tuned_config.guidance_refresh_steps, + "enable_bias_decay": False if row["mode"] == "rl_only" else tuned_config.enable_bias_decay, + "min_avg_queue_for_guidance": 0.0 + if row["mode"] == "rl_only" + else tuned_config.min_avg_queue_for_guidance, + "min_queue_imbalance_for_guidance": 0.0 + if row["mode"] == "rl_only" + else tuned_config.min_queue_imbalance_for_guidance, + } + ) + return payload + + +def build_paired_delta_rows( + rows_by_pair: dict[tuple[str, str, int, int], dict[str, dict[str, Any]]], +) -> list[dict[str, Any]]: + comparison_modes = ("rl_heuristic", "rl_llm") + paired_rows: list[dict[str, Any]] = [] + for (city_id, scenario, seed, episode_id), mode_rows in sorted(rows_by_pair.items()): + rl_only_row = mode_rows.get("rl_only") + if rl_only_row is None: + continue + for comparison_mode in comparison_modes: + other_row = mode_rows.get(comparison_mode) + if other_row is None: + continue + paired_rows.append( + { + "city_id": city_id, + "scenario": scenario, + "seed": int(seed), + "episode_id": int(episode_id), + "comparison": f"{comparison_mode}_vs_rl_only", + "mode": comparison_mode, + "total_return_delta": safe_float(other_row.get("total_return")) + - safe_float(rl_only_row.get("total_return")), + "avg_queue_delta": safe_float(other_row.get("avg_queue")) + - safe_float(rl_only_row.get("avg_queue")), + "avg_wait_delta": safe_float(other_row.get("avg_wait")) + - safe_float(rl_only_row.get("avg_wait")), + "throughput_delta": safe_float(other_row.get("throughput")) + - safe_float(rl_only_row.get("throughput")), + "travel_time_delta": safe_float(other_row.get("travel_time")) + - safe_float(rl_only_row.get("travel_time")), + "spillback_delta": safe_float(other_row.get("spillback_count")) + - safe_float(rl_only_row.get("spillback_count")), + "return_beats_rl_only": float( + safe_float(other_row.get("total_return")) + > safe_float(rl_only_row.get("total_return")) + ), + } + ) + return paired_rows + + +def build_summary_payload( + episode_rows: list[dict[str, Any]], + paired_delta_rows: list[dict[str, Any]], + tuned_config: GuidanceInfluenceConfig, + args: argparse.Namespace, + scenario_specs: list[Any], +) -> dict[str, Any]: + metrics_by_mode: dict[str, dict[str, float]] = {} + for mode in ("rl_only", "rl_heuristic", "rl_llm"): + mode_rows = [row for row in episode_rows if row["mode"] == mode] + metrics_by_mode[mode] = { + "mean_total_return": distribution_summary( + [safe_float(row.get("total_return")) for row in mode_rows] + )["mean"], + "std_total_return": distribution_summary( + [safe_float(row.get("total_return")) for row in mode_rows] + )["std"], + "mean_avg_queue": distribution_summary( + [safe_float(row.get("avg_queue")) for row in mode_rows] + )["mean"], + "mean_avg_wait": distribution_summary( + [safe_float(row.get("avg_wait")) for row in mode_rows] + )["mean"], + "mean_throughput": distribution_summary( + [safe_float(row.get("throughput")) for row in mode_rows] + )["mean"], + "mean_travel_time": distribution_summary( + [safe_float(row.get("travel_time")) for row in mode_rows] + )["mean"], + "mean_spillback_count": distribution_summary( + [safe_float(row.get("spillback_count")) for row in mode_rows] + )["mean"], + "mean_percent_steps_with_active_guidance": distribution_summary( + [safe_float(row.get("percent_steps_with_active_guidance")) for row in mode_rows] + )["mean"], + "mean_avg_num_affected_intersections": distribution_summary( + [safe_float(row.get("avg_num_affected_intersections")) for row in mode_rows] + )["mean"], + "mean_fallback_used_count": distribution_summary( + [safe_float(row.get("fallback_used_count")) for row in mode_rows] + )["mean"], + "mean_invalid_guidance_count": distribution_summary( + [safe_float(row.get("invalid_guidance_count")) for row in mode_rows] + )["mean"], + } + + rl_only_metrics = metrics_by_mode["rl_only"] + paired_summary = { + comparison: { + "mean_total_return_delta": distribution_summary( + [safe_float(row.get("total_return_delta")) for row in paired_delta_rows if row["comparison"] == comparison] + )["mean"], + "std_total_return_delta": distribution_summary( + [safe_float(row.get("total_return_delta")) for row in paired_delta_rows if row["comparison"] == comparison] + )["std"], + "mean_avg_queue_delta": distribution_summary( + [safe_float(row.get("avg_queue_delta")) for row in paired_delta_rows if row["comparison"] == comparison] + )["mean"], + "mean_avg_wait_delta": distribution_summary( + [safe_float(row.get("avg_wait_delta")) for row in paired_delta_rows if row["comparison"] == comparison] + )["mean"], + "mean_throughput_delta": distribution_summary( + [safe_float(row.get("throughput_delta")) for row in paired_delta_rows if row["comparison"] == comparison] + )["mean"], + "beats_fraction": distribution_summary( + [safe_float(row.get("return_beats_rl_only")) for row in paired_delta_rows if row["comparison"] == comparison] + )["mean"], + } + for comparison in ("rl_heuristic_vs_rl_only", "rl_llm_vs_rl_only") + } + + return { + "generated_at": datetime.now(timezone.utc).isoformat(), + "comparison_scope": { + "cities": sorted({spec.city_id for spec in scenario_specs}), + "scenarios": sorted({spec.scenario_name for spec in scenario_specs}), + "seeds": [int(seed) for seed in args.seeds], + "episodes_per_seed": int(args.episodes_per_seed), + "max_episode_seconds": int(args.max_episode_seconds), + "total_runs": int(len(episode_rows)), + }, + "wrapper_config": guidance_config_payload(tuned_config), + "repair_config": asdict( + RepairConfig( + allow_only_visible_candidates=args.allow_only_visible_candidates, + max_target_intersections=args.max_target_intersections, + fallback_on_empty_targets=args.fallback_on_empty_targets, + fallback_mode=args.fallback_mode, + ) + ), + "metrics_by_mode": metrics_by_mode, + "paired_summary": paired_summary, + "rl_only_mean_return": rl_only_metrics["mean_total_return"], + "rl_heuristic_mean_return": metrics_by_mode["rl_heuristic"]["mean_total_return"], + "rl_llm_mean_return": metrics_by_mode["rl_llm"]["mean_total_return"], + "rl_heuristic_return_delta_vs_rl_only": ( + metrics_by_mode["rl_heuristic"]["mean_total_return"] - rl_only_metrics["mean_total_return"] + ), + "rl_llm_return_delta_vs_rl_only": ( + metrics_by_mode["rl_llm"]["mean_total_return"] - rl_only_metrics["mean_total_return"] + ), + "rl_heuristic_avg_queue_delta_vs_rl_only": ( + metrics_by_mode["rl_heuristic"]["mean_avg_queue"] - rl_only_metrics["mean_avg_queue"] + ), + "rl_llm_avg_queue_delta_vs_rl_only": ( + metrics_by_mode["rl_llm"]["mean_avg_queue"] - rl_only_metrics["mean_avg_queue"] + ), + "rl_heuristic_avg_wait_delta_vs_rl_only": ( + metrics_by_mode["rl_heuristic"]["mean_avg_wait"] - rl_only_metrics["mean_avg_wait"] + ), + "rl_llm_avg_wait_delta_vs_rl_only": ( + metrics_by_mode["rl_llm"]["mean_avg_wait"] - rl_only_metrics["mean_avg_wait"] + ), + "rl_heuristic_throughput_delta_vs_rl_only": ( + metrics_by_mode["rl_heuristic"]["mean_throughput"] - rl_only_metrics["mean_throughput"] + ), + "rl_llm_throughput_delta_vs_rl_only": ( + metrics_by_mode["rl_llm"]["mean_throughput"] - rl_only_metrics["mean_throughput"] + ), + "heuristic_beats_rl_fraction": paired_summary["rl_heuristic_vs_rl_only"]["beats_fraction"], + "llm_beats_rl_fraction": paired_summary["rl_llm_vs_rl_only"]["beats_fraction"], + } + + +if __name__ == "__main__": + main() diff --git a/scripts/run_demo.py b/scripts/run_demo.py new file mode 100644 index 0000000000000000000000000000000000000000..9030829a4a80437947123a078fd3450173c2b907 --- /dev/null +++ b/scripts/run_demo.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +import json + +from agents.district_coordinator import RuleBasedDistrictCoordinator +from agents.local_policy import SharedHeuristicLocalPolicy +from training.rollout import run_episode + + +def make_env(): + from env.traffic_env import TrafficEnv + from env.intersection_config import IntersectionConfig, DistrictConfig + + intersections = { + "I1": IntersectionConfig( + intersection_id="I1", + district_id="D0", + incoming_lanes=["I1_N", "I1_S", "I1_E", "I1_W"], + outgoing_lanes=[], + neighbors=["I2"], + is_border=False, + ), + "I2": IntersectionConfig( + intersection_id="I2", + district_id="D0", + incoming_lanes=["I2_N", "I2_S", "I2_E", "I2_W"], + outgoing_lanes=[], + neighbors=["I1", "I3"], + is_border=True, + ), + "I3": IntersectionConfig( + intersection_id="I3", + district_id="D1", + incoming_lanes=["I3_N", "I3_S", "I3_E", "I3_W"], + outgoing_lanes=[], + neighbors=["I2", "I4"], + is_border=True, + ), + "I4": IntersectionConfig( + intersection_id="I4", + district_id="D1", + incoming_lanes=["I4_N", "I4_S", "I4_E", "I4_W"], + outgoing_lanes=[], + neighbors=["I3"], + is_border=False, + ), + } + + districts = { + "D0": DistrictConfig( + district_id="D0", + intersection_ids=["I1", "I2"], + neighbor_districts=["D1"], + ), + "D1": DistrictConfig( + district_id="D1", + intersection_ids=["I3", "I4"], + neighbor_districts=["D0"], + ), + } + + return TrafficEnv( + config_path="data/cityflow/config.json", + intersections=intersections, + districts=districts, + coordination_interval=20, + max_steps=200, + ) + + +def main(): + env = make_env() + local_policy = SharedHeuristicLocalPolicy() + district_coordinators = { + "D0": RuleBasedDistrictCoordinator(), + "D1": RuleBasedDistrictCoordinator(), + } + + result = run_episode( + env=env, + local_policy=local_policy, + district_coordinators=district_coordinators, + seed=0, + max_steps=200, + record_history=True, + policy_update=False, + ) + + output = { + "seed": result.seed, + "steps": result.steps, + "mean_reward": result.mean_reward, + "total_waiting": result.total_waiting, + "total_queue": result.total_queue, + "final_info": result.final_info, + } + + print(json.dumps(output, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/scripts/smoke_test_env.py b/scripts/smoke_test_env.py new file mode 100644 index 0000000000000000000000000000000000000000..1bd50b9d70121c8a5d0a34e664abe1603a251cec --- /dev/null +++ b/scripts/smoke_test_env.py @@ -0,0 +1,120 @@ +from __future__ import annotations + +import argparse +import json +from collections import Counter + +import numpy as np + +from agents.local_policy import FixedCyclePolicy, HoldPhasePolicy +from training.cityflow_dataset import CityFlowDataset +from training.train_local_policy import build_env, build_env_config + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description="Smoke test the CityFlow environment and district-type routing." + ) + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument("--city-id", default="city_0001") + parser.add_argument("--scenario-name", default="normal") + parser.add_argument("--steps", type=int, default=5) + parser.add_argument("--policy", choices=("hold", "fixed", "random"), default="random") + parser.add_argument("--seed", type=int, default=7) + parser.add_argument("--decision-interval", type=int, default=5) + parser.add_argument("--simulator-interval", type=int, default=1) + parser.add_argument("--min-green-time", type=int, default=10) + parser.add_argument("--thread-num", type=int, default=1) + parser.add_argument("--max-episode-seconds", type=int, default=120) + parser.add_argument("--max-incoming-lanes", type=int, default=16) + parser.add_argument("--count-scale", type=float, default=20.0) + parser.add_argument("--elapsed-time-scale", type=float, default=60.0) + parser.add_argument("--disable-district-context", action="store_true") + parser.add_argument("--disable-outgoing-congestion", action="store_true") + parser.add_argument("--waiting-weight", type=float, default=1.0) + parser.add_argument("--vehicle-weight", type=float, default=0.25) + parser.add_argument("--pressure-weight", type=float, default=0.0) + parser.add_argument("--reward-scale", type=float, default=1.0) + return parser.parse_args() + + +def main() -> None: + args = parse_args() + rng = np.random.default_rng(args.seed) + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + scenario_spec = dataset.build_scenario_spec(args.city_id, args.scenario_name) + env = build_env(build_env_config(args), scenario_spec) + + observation = env.reset() + print( + json.dumps( + { + "city_id": args.city_id, + "scenario_name": args.scenario_name, + "observation_shape": list(observation["observations"].shape), + "observation_dim": env.observation_dim, + "controlled_intersections": len(observation["intersection_ids"]), + "district_type_counts": Counter(observation["district_types"]), + "district_type_indices_sample": observation["district_type_indices"][:10].tolist(), + "boundary_fraction": float(observation["boundary_mask"].mean()), + }, + indent=2, + ) + ) + + policy = resolve_policy(args.policy) + for step in range(args.steps): + if args.policy == "random": + actions = sample_random_actions(observation["action_mask"], rng) + else: + actions = policy.act(observation) + + observation, rewards, done, info = env.step(actions) + print( + json.dumps( + { + "step": step, + "sim_time": info["sim_time"], + "reward_mean": float(rewards.mean()), + "reward_min": float(rewards.min()), + "reward_max": float(rewards.max()), + "waiting_mean": info["metrics"]["mean_waiting_vehicles"], + "throughput": info["metrics"]["throughput"], + "district_type_metrics": { + key: value + for key, value in info["metrics"].items() + if "residential" in key + or "commercial" in key + or "industrial" in key + or "mixed" in key + }, + }, + indent=2, + ) + ) + if done: + break + + +def resolve_policy(name: str): + if name == "hold": + return HoldPhasePolicy() + if name == "fixed": + return FixedCyclePolicy() + return None + + +def sample_random_actions(action_mask: np.ndarray, rng: np.random.Generator) -> np.ndarray: + actions = np.zeros(action_mask.shape[0], dtype=np.int64) + for row_index, mask in enumerate(action_mask): + valid_actions = np.flatnonzero(mask > 0.0) + actions[row_index] = int(rng.choice(valid_actions)) + return actions + + +if __name__ == "__main__": + main() diff --git a/scripts/sweep_rl_llm_wrapper.py b/scripts/sweep_rl_llm_wrapper.py new file mode 100644 index 0000000000000000000000000000000000000000..efe686ab05fe1e5091652d47e430c47becd1d70c --- /dev/null +++ b/scripts/sweep_rl_llm_wrapper.py @@ -0,0 +1,918 @@ +from __future__ import annotations + +import argparse +import json +from dataclasses import asdict, dataclass +from datetime import datetime, timezone +from pathlib import Path +from typing import Any +import sys + +from tqdm.auto import tqdm + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +from district_llm.heuristic_guidance import HeuristicGuidanceConfig +from district_llm.inference import DistrictLLMInference +from district_llm.repair import RepairConfig +from district_llm.rl_guidance_wrapper import ( + BIAS_DECAY_SCHEDULES, + GATING_MODES, + DistrictGuidedRLController, + FixedRLPolicyAdapter, + GuidanceInfluenceConfig, + HeuristicGuidanceProvider, + LLMGuidanceProvider, + guidance_config_payload, +) +from district_llm.summary_builder import DistrictStateSummaryBuilder +from env.traffic_env import EnvConfig +from scripts.eval_rl_guidance_ablation import ( + build_episode_plans, + default_env_config, + distribution_summary, + env_config_to_payload, + resolve_scenario_specs, + run_episode, + safe_float, + try_write_parquet, + write_csv_rows, + write_json, + write_jsonl, +) +from training.cityflow_dataset import CityFlowDataset + + +PRESET_CHOICES: tuple[str, ...] = ( + "strength_only", + "strength_and_targets", + "strength_targets_gating", + "full_conservative", +) +DEFAULT_CITIES: tuple[str, ...] = ("city_0001",) +DEFAULT_SCENARIOS: tuple[str, ...] = ("normal",) + + +@dataclass(frozen=True) +class SweepConfigSpec: + config_id: str + description: str + wrapper_mode: str + bias_strength: float + target_only_bias_strength: float + corridor_bias_strength: float + max_intersections_affected: int + guidance_persistence_steps: int + guidance_refresh_steps: int + max_guidance_duration: int + gating_mode: str + min_avg_queue_for_guidance: float + min_queue_imbalance_for_guidance: float + require_incident_or_spillback: bool + allow_guidance_in_normal_conditions: bool + enable_bias_decay: bool + bias_decay_schedule: str + fallback_policy: str + is_reference: bool = False + + def to_influence_config(self) -> GuidanceInfluenceConfig: + return GuidanceInfluenceConfig( + wrapper_mode=self.wrapper_mode, + bias_strength=self.bias_strength, + target_only_bias_strength=self.target_only_bias_strength, + corridor_bias_strength=self.corridor_bias_strength, + max_intersections_affected=self.max_intersections_affected, + guidance_refresh_steps=self.guidance_refresh_steps, + guidance_persistence_steps=self.guidance_persistence_steps, + max_guidance_duration=self.max_guidance_duration, + apply_global_bias=False, + apply_target_only=True, + gating_mode=self.gating_mode, + min_avg_queue_for_guidance=self.min_avg_queue_for_guidance, + min_queue_imbalance_for_guidance=self.min_queue_imbalance_for_guidance, + require_incident_or_spillback=self.require_incident_or_spillback, + allow_guidance_in_normal_conditions=self.allow_guidance_in_normal_conditions, + enable_bias_decay=self.enable_bias_decay, + bias_decay_schedule=self.bias_decay_schedule, + fallback_policy=self.fallback_policy, + log_guidance_debug=False, + ).validate() + + def to_dict(self) -> dict[str, Any]: + return asdict(self) + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description=( + "Cheap paired hyperparameter sweep for the fixed RL + district LLM wrapper. " + "The RL checkpoint and LLM checkpoint stay fixed; only inference-time wrapper " + "hyperparameters are varied." + ) + ) + parser.add_argument("--rl-checkpoint", required=True) + parser.add_argument("--llm-model-path", required=True) + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument("--split", default="val", choices=("train", "val", "test")) + parser.add_argument("--cities", nargs="+", default=list(DEFAULT_CITIES)) + parser.add_argument("--scenarios", nargs="+", default=list(DEFAULT_SCENARIOS)) + parser.add_argument("--seeds", nargs="+", type=int, default=[7, 11, 13]) + parser.add_argument("--episodes-per-seed", type=int, default=1) + parser.add_argument( + "--max-episode-seconds", + type=int, + default=300, + help="Cheap default horizon for wrapper tuning sweeps.", + ) + parser.add_argument( + "--preset", + choices=PRESET_CHOICES, + default="strength_targets_gating", + ) + parser.add_argument("--guidance-refresh-steps", type=int, default=10) + parser.add_argument("--max-guidance-duration", type=int, default=10) + parser.add_argument("--queue-threshold", type=float, default=150.0) + parser.add_argument("--imbalance-threshold", type=float, default=20.0) + parser.add_argument("--max-new-tokens", type=int, default=128) + parser.add_argument("--device", default=None) + parser.add_argument("--output-dir", default="artifacts/rl_llm_wrapper_sweep") + parser.add_argument( + "--allow-only-visible-candidates", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument("--max-target-intersections", type=int, default=3) + parser.add_argument( + "--fallback-on-empty-targets", + action=argparse.BooleanOptionalAction, + default=True, + ) + parser.add_argument( + "--fallback-mode", + choices=("heuristic", "hold", "none"), + default="heuristic", + ) + parser.add_argument( + "--fallback-policy", + choices=("no_op", "hold_previous", "heuristic_weak"), + default="no_op", + ) + parser.add_argument( + "--save-step-metrics", + action=argparse.BooleanOptionalAction, + default=False, + ) + parser.add_argument( + "--save-guidance-traces", + action=argparse.BooleanOptionalAction, + default=False, + ) + parser.add_argument( + "--bias-decay-schedule", + choices=BIAS_DECAY_SCHEDULES, + default="linear", + ) + return parser.parse_args() + + +def main() -> None: + args = parse_args() + + output_dir = Path(args.output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + seeded_config_root = output_dir / "seeded_configs" + seeded_config_root.mkdir(parents=True, exist_ok=True) + + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + dataset.generate_default_splits() + scenario_specs = resolve_scenario_specs(dataset=dataset, args=args) + episode_plans = build_episode_plans( + scenario_specs=scenario_specs, + seeds=args.seeds, + num_episodes=args.episodes_per_seed, + seeded_config_root=seeded_config_root, + ) + sweep_configs = build_sweep_configs(args) + + rl_policy = FixedRLPolicyAdapter( + checkpoint_path=args.rl_checkpoint, + device=args.device, + ) + env_config = rl_policy.env_config or default_env_config() + if args.max_episode_seconds is not None: + env_config = EnvConfig( + simulator_interval=env_config.simulator_interval, + decision_interval=env_config.decision_interval, + min_green_time=env_config.min_green_time, + thread_num=env_config.thread_num, + max_episode_seconds=int(args.max_episode_seconds), + observation=env_config.observation, + reward=env_config.reward, + ) + + rl_only_controller = build_rl_only_controller( + rl_policy=rl_policy, + guidance_refresh_steps=args.guidance_refresh_steps, + max_guidance_duration=args.max_guidance_duration, + ) + guided_controllers = build_guided_controllers( + args=args, + rl_policy=rl_policy, + sweep_configs=sweep_configs, + ) + + sweep_rows: list[dict[str, Any]] = [] + paired_rows: list[dict[str, Any]] = [] + rl_only_rows: list[dict[str, Any]] = [] + step_rows: list[dict[str, Any]] = [] + guidance_trace_rows: list[dict[str, Any]] = [] + + total_runs = len(episode_plans) * (1 + len(sweep_configs)) + progress = tqdm(total=total_runs, desc="RL+LLM wrapper sweep", unit="run") + try: + for plan_index, plan in enumerate(episode_plans, start=1): + progress.set_postfix_str( + f"rl_only city={plan.city_id} scenario={plan.scenario} seed={plan.seed}" + ) + rl_only_row, rl_only_step_rows, rl_only_trace_rows = run_episode( + plan=plan, + mode_label="rl_only", + controller=rl_only_controller, + env_config=env_config, + save_step_metrics=args.save_step_metrics, + save_guidance_traces=args.save_guidance_traces, + show_step_progress=False, + ) + rl_only_row = augment_rl_only_row(rl_only_row) + rl_only_rows.append(rl_only_row) + if args.save_step_metrics: + step_rows.extend( + augment_auxiliary_rows( + rows=rl_only_step_rows, + config_id="rl_only", + config_spec=None, + ) + ) + if args.save_guidance_traces: + guidance_trace_rows.extend( + augment_auxiliary_rows( + rows=rl_only_trace_rows, + config_id="rl_only", + config_spec=None, + ) + ) + progress.update(1) + + for config in sweep_configs: + controller = guided_controllers[config.config_id] + progress.set_postfix_str( + f"{config.config_id} city={plan.city_id} scenario={plan.scenario} seed={plan.seed}" + ) + episode_row, mode_step_rows, mode_trace_rows = run_episode( + plan=plan, + mode_label=config.config_id, + controller=controller, + env_config=env_config, + save_step_metrics=args.save_step_metrics, + save_guidance_traces=args.save_guidance_traces, + show_step_progress=False, + ) + episode_row = augment_guided_row(episode_row, config) + sweep_rows.append(episode_row) + paired_rows.append(build_paired_row(guided_row=episode_row, rl_only_row=rl_only_row)) + if args.save_step_metrics: + step_rows.extend( + augment_auxiliary_rows( + rows=mode_step_rows, + config_id=config.config_id, + config_spec=config, + ) + ) + if args.save_guidance_traces: + guidance_trace_rows.extend( + augment_auxiliary_rows( + rows=mode_trace_rows, + config_id=config.config_id, + config_spec=config, + ) + ) + progress.update(1) + tqdm.write( + "[sweep-plan] " + f"{plan_index}/{len(episode_plans)} " + f"city={plan.city_id} scenario={plan.scenario} seed={plan.seed} complete" + ) + finally: + progress.close() + + ranking_rows = build_config_rankings( + paired_rows=paired_rows, + sweep_configs=sweep_configs, + ) + summary_report = build_summary_report( + paired_rows=paired_rows, + ranking_rows=ranking_rows, + rl_only_rows=rl_only_rows, + args=args, + sweep_configs=sweep_configs, + ) + config_payload = build_config_payload( + args=args, + env_config=env_config, + episode_plans=episode_plans, + sweep_configs=sweep_configs, + ) + + write_json(output_dir / "config.json", config_payload) + write_csv_rows(output_dir / "sweep_results.csv", sweep_rows) + write_jsonl(output_dir / "sweep_results.jsonl", sweep_rows) + try_write_parquet(output_dir / "sweep_results.parquet", sweep_rows) + write_csv_rows(output_dir / "paired_episode_metrics.csv", paired_rows) + write_jsonl(output_dir / "paired_episode_metrics.jsonl", paired_rows) + try_write_parquet(output_dir / "paired_episode_metrics.parquet", paired_rows) + write_csv_rows(output_dir / "rl_only_episode_metrics.csv", rl_only_rows) + write_json(output_dir / "ranking.json", ranking_rows) + write_json(output_dir / "summary_report.json", summary_report) + + if args.save_step_metrics: + write_csv_rows(output_dir / "step_metrics.csv", step_rows) + write_jsonl(output_dir / "step_metrics.jsonl", step_rows) + try_write_parquet(output_dir / "step_metrics.parquet", step_rows) + if args.save_guidance_traces: + write_jsonl(output_dir / "guidance_traces.jsonl", guidance_trace_rows) + + print(json.dumps(summary_report, indent=2, sort_keys=True)) + + +def build_rl_only_controller( + rl_policy: FixedRLPolicyAdapter, + guidance_refresh_steps: int, + max_guidance_duration: int, +) -> DistrictGuidedRLController: + return DistrictGuidedRLController( + policy=rl_policy, + mode_source="rl_only", + summary_builder=None, + guidance_provider=None, + influence_config=GuidanceInfluenceConfig( + wrapper_mode="no_op", + bias_strength=0.0, + target_only_bias_strength=0.0, + corridor_bias_strength=0.0, + max_intersections_affected=1, + guidance_refresh_steps=guidance_refresh_steps, + guidance_persistence_steps=1, + max_guidance_duration=max_guidance_duration, + gating_mode="always_on", + enable_bias_decay=False, + fallback_policy="no_op", + ), + heuristic_provider=None, + ) + + +def build_guided_controllers( + args: argparse.Namespace, + rl_policy: FixedRLPolicyAdapter, + sweep_configs: list[SweepConfigSpec], +) -> dict[str, DistrictGuidedRLController]: + repair_config = RepairConfig( + allow_only_visible_candidates=args.allow_only_visible_candidates, + max_target_intersections=args.max_target_intersections, + fallback_on_empty_targets=args.fallback_on_empty_targets, + fallback_mode=args.fallback_mode, + ) + llm_inference = DistrictLLMInference( + model_name_or_path=args.llm_model_path, + device=args.device, + repair_config=repair_config, + ) + heuristic_provider = HeuristicGuidanceProvider( + config=HeuristicGuidanceConfig( + max_target_intersections=args.max_target_intersections, + ) + ) + llm_provider = LLMGuidanceProvider( + inference=llm_inference, + max_new_tokens=args.max_new_tokens, + ) + controllers: dict[str, DistrictGuidedRLController] = {} + for config in sweep_configs: + controllers[config.config_id] = DistrictGuidedRLController( + policy=rl_policy, + mode_source="rl_llm", + summary_builder=DistrictStateSummaryBuilder( + top_k=3, + candidate_limit=max(6, int(args.max_target_intersections)), + ), + guidance_provider=llm_provider, + influence_config=config.to_influence_config(), + heuristic_provider=heuristic_provider, + ) + return controllers + + +def build_sweep_configs(args: argparse.Namespace) -> list[SweepConfigSpec]: + configs: list[SweepConfigSpec] = [ + build_baseline_reference_config(args), + ] + if args.preset == "strength_only": + for bias_strength in (0.025, 0.05, 0.075, 0.10): + configs.append( + build_target_only_soft_config( + args=args, + bias_strength=bias_strength, + max_intersections_affected=2, + guidance_persistence_steps=5, + gating_mode="queue_or_imbalance", + enable_bias_decay=False, + ) + ) + elif args.preset == "strength_and_targets": + for bias_strength in (0.025, 0.05, 0.075, 0.10): + for max_intersections_affected in (1, 2): + configs.append( + build_target_only_soft_config( + args=args, + bias_strength=bias_strength, + max_intersections_affected=max_intersections_affected, + guidance_persistence_steps=5, + gating_mode="queue_or_imbalance", + enable_bias_decay=False, + ) + ) + elif args.preset == "strength_targets_gating": + for bias_strength in (0.025, 0.05, 0.075): + for max_intersections_affected in (1, 2): + for gating_mode in ("always_on", "incident_or_spillback", "queue_or_imbalance"): + configs.append( + build_target_only_soft_config( + args=args, + bias_strength=bias_strength, + max_intersections_affected=max_intersections_affected, + guidance_persistence_steps=5, + gating_mode=gating_mode, + enable_bias_decay=False, + ) + ) + else: + for bias_strength in (0.025, 0.05, 0.075): + for max_intersections_affected in (1, 2): + for gating_mode, guidance_persistence_steps, enable_bias_decay in ( + ("queue_or_imbalance", 5, False), + ("queue_or_imbalance", 10, True), + ("incident_or_spillback", 5, False), + ("incident_or_spillback", 10, True), + ): + configs.append( + build_target_only_soft_config( + args=args, + bias_strength=bias_strength, + max_intersections_affected=max_intersections_affected, + guidance_persistence_steps=guidance_persistence_steps, + gating_mode=gating_mode, + enable_bias_decay=enable_bias_decay, + ) + ) + return dedupe_sweep_configs(configs) + + +def build_baseline_reference_config(args: argparse.Namespace) -> SweepConfigSpec: + return SweepConfigSpec( + config_id="baseline_current_soft", + description="Current rl_llm + target_only_soft reference config from the smoke runs.", + wrapper_mode="target_only_soft", + bias_strength=0.12, + target_only_bias_strength=0.18, + corridor_bias_strength=0.05, + max_intersections_affected=3, + guidance_persistence_steps=3, + guidance_refresh_steps=args.guidance_refresh_steps, + max_guidance_duration=max(args.max_guidance_duration, 3), + gating_mode="always_on", + min_avg_queue_for_guidance=args.queue_threshold, + min_queue_imbalance_for_guidance=args.imbalance_threshold, + require_incident_or_spillback=False, + allow_guidance_in_normal_conditions=True, + enable_bias_decay=True, + bias_decay_schedule=args.bias_decay_schedule, + fallback_policy=args.fallback_policy, + is_reference=True, + ) + + +def build_target_only_soft_config( + args: argparse.Namespace, + bias_strength: float, + max_intersections_affected: int, + guidance_persistence_steps: int, + gating_mode: str, + enable_bias_decay: bool, +) -> SweepConfigSpec: + target_only_bias_strength = bias_strength + corridor_bias_strength = 0.5 * bias_strength + config_id = ( + f"bs{format_float_token(bias_strength)}" + f"_aff{int(max_intersections_affected)}" + f"_gate{gating_mode_token(gating_mode)}" + f"_p{int(guidance_persistence_steps)}" + f"_decay{int(enable_bias_decay)}" + ) + return SweepConfigSpec( + config_id=config_id, + description=( + "Curated conservative target_only_soft sweep config with locally tied target/corridor " + "bias strengths." + ), + wrapper_mode="target_only_soft", + bias_strength=float(bias_strength), + target_only_bias_strength=float(target_only_bias_strength), + corridor_bias_strength=float(corridor_bias_strength), + max_intersections_affected=int(max_intersections_affected), + guidance_persistence_steps=int(guidance_persistence_steps), + guidance_refresh_steps=int(args.guidance_refresh_steps), + max_guidance_duration=max(int(args.max_guidance_duration), int(guidance_persistence_steps)), + gating_mode=gating_mode, + min_avg_queue_for_guidance=float(args.queue_threshold), + min_queue_imbalance_for_guidance=float(args.imbalance_threshold), + require_incident_or_spillback=False, + allow_guidance_in_normal_conditions=(gating_mode == "always_on"), + enable_bias_decay=bool(enable_bias_decay), + bias_decay_schedule=args.bias_decay_schedule, + fallback_policy=args.fallback_policy, + is_reference=False, + ) + + +def dedupe_sweep_configs(configs: list[SweepConfigSpec]) -> list[SweepConfigSpec]: + deduped: list[SweepConfigSpec] = [] + seen_ids: set[str] = set() + for config in configs: + if config.config_id in seen_ids: + continue + deduped.append(config) + seen_ids.add(config.config_id) + return deduped + + +def augment_rl_only_row(row: dict[str, Any]) -> dict[str, Any]: + payload = dict(row) + payload.update( + { + "config_id": "rl_only", + "description": "Fixed RL policy with no district guidance.", + "is_reference": True, + "bias_strength": 0.0, + "target_only_bias_strength": 0.0, + "corridor_bias_strength": 0.0, + "max_intersections_affected": 0, + "guidance_persistence_steps": 0, + "guidance_refresh_steps": 0, + "max_guidance_duration": 0, + "gating_mode": "always_on", + "min_avg_queue_for_guidance": 0.0, + "min_queue_imbalance_for_guidance": 0.0, + "require_incident_or_spillback": False, + "allow_guidance_in_normal_conditions": True, + "enable_bias_decay": False, + "bias_decay_schedule": "linear", + } + ) + return payload + + +def augment_guided_row(row: dict[str, Any], config: SweepConfigSpec) -> dict[str, Any]: + payload = dict(row) + payload.update( + { + "config_id": config.config_id, + "description": config.description, + "is_reference": bool(config.is_reference), + "bias_strength": float(config.bias_strength), + "target_only_bias_strength": float(config.target_only_bias_strength), + "corridor_bias_strength": float(config.corridor_bias_strength), + "max_intersections_affected": int(config.max_intersections_affected), + "guidance_persistence_steps": int(config.guidance_persistence_steps), + "guidance_refresh_steps": int(config.guidance_refresh_steps), + "max_guidance_duration": int(config.max_guidance_duration), + "gating_mode": config.gating_mode, + "min_avg_queue_for_guidance": float(config.min_avg_queue_for_guidance), + "min_queue_imbalance_for_guidance": float(config.min_queue_imbalance_for_guidance), + "require_incident_or_spillback": bool(config.require_incident_or_spillback), + "allow_guidance_in_normal_conditions": bool(config.allow_guidance_in_normal_conditions), + "enable_bias_decay": bool(config.enable_bias_decay), + "bias_decay_schedule": config.bias_decay_schedule, + } + ) + return payload + + +def augment_auxiliary_rows( + rows: list[dict[str, Any]], + config_id: str, + config_spec: SweepConfigSpec | None, +) -> list[dict[str, Any]]: + augmented: list[dict[str, Any]] = [] + for row in rows: + payload = dict(row) + payload["config_id"] = config_id + payload["is_reference"] = bool(config_spec.is_reference) if config_spec is not None else False + if config_spec is not None: + payload["gating_mode"] = config_spec.gating_mode + payload["bias_strength"] = float(config_spec.bias_strength) + payload["max_intersections_affected"] = int(config_spec.max_intersections_affected) + payload["guidance_persistence_steps"] = int(config_spec.guidance_persistence_steps) + payload["enable_bias_decay"] = bool(config_spec.enable_bias_decay) + augmented.append(payload) + return augmented + + +def build_paired_row(guided_row: dict[str, Any], rl_only_row: dict[str, Any]) -> dict[str, Any]: + paired_row = dict(guided_row) + paired_row.update( + { + "rl_only_total_return": safe_float(rl_only_row.get("total_return")), + "rl_only_avg_queue": safe_float(rl_only_row.get("avg_queue")), + "rl_only_avg_wait": safe_float(rl_only_row.get("avg_wait")), + "rl_only_throughput": safe_float(rl_only_row.get("throughput")), + "rl_only_travel_time": safe_float(rl_only_row.get("travel_time")), + "total_return_delta_vs_rl_only": safe_float(guided_row.get("total_return")) + - safe_float(rl_only_row.get("total_return")), + "avg_queue_delta_vs_rl_only": safe_float(guided_row.get("avg_queue")) + - safe_float(rl_only_row.get("avg_queue")), + "avg_wait_delta_vs_rl_only": safe_float(guided_row.get("avg_wait")) + - safe_float(rl_only_row.get("avg_wait")), + "throughput_delta_vs_rl_only": safe_float(guided_row.get("throughput")) + - safe_float(rl_only_row.get("throughput")), + "travel_time_delta_vs_rl_only": safe_float(guided_row.get("travel_time")) + - safe_float(rl_only_row.get("travel_time")), + } + ) + return paired_row + + +def build_config_rankings( + paired_rows: list[dict[str, Any]], + sweep_configs: list[SweepConfigSpec], +) -> list[dict[str, Any]]: + rows_by_config = { + config.config_id: [row for row in paired_rows if row["config_id"] == config.config_id] + for config in sweep_configs + } + rankings: list[dict[str, Any]] = [] + config_lookup = {config.config_id: config for config in sweep_configs} + for config_id, rows in rows_by_config.items(): + if not rows: + continue + config = config_lookup[config_id] + summary = { + "config_id": config_id, + "description": config.description, + "is_reference": bool(config.is_reference), + "wrapper_mode": config.wrapper_mode, + "bias_strength": float(config.bias_strength), + "target_only_bias_strength": float(config.target_only_bias_strength), + "corridor_bias_strength": float(config.corridor_bias_strength), + "max_intersections_affected": int(config.max_intersections_affected), + "guidance_persistence_steps": int(config.guidance_persistence_steps), + "guidance_refresh_steps": int(config.guidance_refresh_steps), + "gating_mode": config.gating_mode, + "min_avg_queue_for_guidance": float(config.min_avg_queue_for_guidance), + "min_queue_imbalance_for_guidance": float(config.min_queue_imbalance_for_guidance), + "require_incident_or_spillback": bool(config.require_incident_or_spillback), + "allow_guidance_in_normal_conditions": bool(config.allow_guidance_in_normal_conditions), + "enable_bias_decay": bool(config.enable_bias_decay), + "mean_total_return": distribution_summary( + [safe_float(row.get("total_return")) for row in rows] + )["mean"], + "mean_return_delta_vs_rl_only": distribution_summary( + [safe_float(row.get("total_return_delta_vs_rl_only")) for row in rows] + )["mean"], + "mean_avg_queue_delta_vs_rl_only": distribution_summary( + [safe_float(row.get("avg_queue_delta_vs_rl_only")) for row in rows] + )["mean"], + "mean_avg_wait_delta_vs_rl_only": distribution_summary( + [safe_float(row.get("avg_wait_delta_vs_rl_only")) for row in rows] + )["mean"], + "mean_throughput_delta_vs_rl_only": distribution_summary( + [safe_float(row.get("throughput_delta_vs_rl_only")) for row in rows] + )["mean"], + "mean_travel_time_delta_vs_rl_only": distribution_summary( + [safe_float(row.get("travel_time_delta_vs_rl_only")) for row in rows] + )["mean"], + "mean_percent_steps_with_active_guidance": distribution_summary( + [safe_float(row.get("percent_steps_with_active_guidance")) for row in rows] + )["mean"], + "mean_avg_num_affected_intersections": distribution_summary( + [safe_float(row.get("avg_num_affected_intersections")) for row in rows] + )["mean"], + "mean_avg_num_targeted_intersections": distribution_summary( + [safe_float(row.get("avg_num_targeted_intersections")) for row in rows] + )["mean"], + "mean_num_steps_guidance_blocked_by_gate": distribution_summary( + [safe_float(row.get("num_steps_guidance_blocked_by_gate")) for row in rows] + )["mean"], + "mean_fallback_used_count": distribution_summary( + [safe_float(row.get("fallback_used_count")) for row in rows] + )["mean"], + "mean_invalid_guidance_count": distribution_summary( + [safe_float(row.get("invalid_guidance_count")) for row in rows] + )["mean"], + "num_episodes": int(len(rows)), + } + summary["beats_rl_only"] = bool(summary["mean_return_delta_vs_rl_only"] >= 0.0) + rankings.append(summary) + rankings.sort( + key=lambda item: ( + float(item["mean_return_delta_vs_rl_only"]), + float(item["mean_throughput_delta_vs_rl_only"]), + -float(item["mean_avg_queue_delta_vs_rl_only"]), + -float(item["mean_avg_wait_delta_vs_rl_only"]), + ), + reverse=True, + ) + return rankings + + +def build_summary_report( + paired_rows: list[dict[str, Any]], + ranking_rows: list[dict[str, Any]], + rl_only_rows: list[dict[str, Any]], + args: argparse.Namespace, + sweep_configs: list[SweepConfigSpec], +) -> dict[str, Any]: + rl_only_mean_total_return = distribution_summary( + [safe_float(row.get("total_return")) for row in rl_only_rows] + )["mean"] + top_5 = ranking_rows[:5] + best_config = ranking_rows[0] if ranking_rows else None + configs_beating_rl_only = [row for row in ranking_rows if row["beats_rl_only"]] + + bias_effects = group_rankings_by_parameter(ranking_rows, "bias_strength") + affected_intersections_effects = group_rankings_by_parameter(ranking_rows, "max_intersections_affected") + gating_effects = group_rankings_by_parameter(ranking_rows, "gating_mode") + persistence_effects = group_rankings_by_parameter(ranking_rows, "guidance_persistence_steps") + decay_effects = group_rankings_by_parameter(ranking_rows, "enable_bias_decay") + + best_bias = best_group_value(bias_effects) + best_max_affected = best_group_value(affected_intersections_effects) + best_gating = best_group_value(gating_effects) + best_persistence = best_group_value(persistence_effects) + best_decay = best_group_value(decay_effects) + + recommendation = None + if best_config is not None: + recommendation = ( + f"Start the next paired eval with {best_config['config_id']} " + f"(bias={best_config['bias_strength']}, max_affected={best_config['max_intersections_affected']}, " + f"gate={best_config['gating_mode']}, persistence={best_config['guidance_persistence_steps']}, " + f"decay={best_config['enable_bias_decay']})." + ) + + return { + "generated_at": datetime.now(timezone.utc).isoformat(), + "preset": args.preset, + "comparison_scope": { + "cities": list(args.cities), + "scenarios": list(args.scenarios), + "seeds": [int(seed) for seed in args.seeds], + "episodes_per_seed": int(args.episodes_per_seed), + "num_sweep_configs": int(len(sweep_configs)), + "num_paired_rows": int(len(paired_rows)), + }, + "rl_only_mean_total_return": rl_only_mean_total_return, + "best_overall_config": best_config, + "did_any_rl_llm_config_beat_rl_only": bool(configs_beating_rl_only), + "closest_if_no_beat": None if configs_beating_rl_only else best_config, + "top_5_configs": top_5, + "parameter_effects": { + "bias_strength": bias_effects, + "max_intersections_affected": affected_intersections_effects, + "gating_mode": gating_effects, + "guidance_persistence_steps": persistence_effects, + "enable_bias_decay": decay_effects, + }, + "analysis_answers": { + "which_config_was_best_overall": None if best_config is None else best_config["config_id"], + "did_any_rl_llm_config_beat_rl_only": bool(configs_beating_rl_only), + "did_weaker_bias_help": best_bias in {"0.025", "0.05"}, + "did_affecting_fewer_intersections_help": best_max_affected == "1", + "did_gating_help": best_gating not in {None, "always_on"}, + "did_shorter_persistence_help": best_persistence == "5", + "did_bias_decay_help": best_decay == "True", + }, + "recommendation": recommendation, + } + + +def group_rankings_by_parameter( + ranking_rows: list[dict[str, Any]], + parameter_name: str, +) -> list[dict[str, Any]]: + buckets: dict[str, list[dict[str, Any]]] = {} + for row in ranking_rows: + key = str(row[parameter_name]) + buckets.setdefault(key, []).append(row) + grouped: list[dict[str, Any]] = [] + for key, rows in sorted(buckets.items(), key=lambda item: item[0]): + grouped.append( + { + "value": key, + "num_configs": int(len(rows)), + "mean_return_delta_vs_rl_only": distribution_summary( + [safe_float(row.get("mean_return_delta_vs_rl_only")) for row in rows] + )["mean"], + "mean_throughput_delta_vs_rl_only": distribution_summary( + [safe_float(row.get("mean_throughput_delta_vs_rl_only")) for row in rows] + )["mean"], + "mean_avg_queue_delta_vs_rl_only": distribution_summary( + [safe_float(row.get("mean_avg_queue_delta_vs_rl_only")) for row in rows] + )["mean"], + "mean_avg_wait_delta_vs_rl_only": distribution_summary( + [safe_float(row.get("mean_avg_wait_delta_vs_rl_only")) for row in rows] + )["mean"], + "mean_percent_steps_with_active_guidance": distribution_summary( + [safe_float(row.get("mean_percent_steps_with_active_guidance")) for row in rows] + )["mean"], + } + ) + grouped.sort( + key=lambda item: ( + float(item["mean_return_delta_vs_rl_only"]), + float(item["mean_throughput_delta_vs_rl_only"]), + -float(item["mean_avg_queue_delta_vs_rl_only"]), + -float(item["mean_avg_wait_delta_vs_rl_only"]), + ), + reverse=True, + ) + return grouped + + +def best_group_value(grouped_rows: list[dict[str, Any]]) -> str | None: + return grouped_rows[0]["value"] if grouped_rows else None + + +def build_config_payload( + args: argparse.Namespace, + env_config: EnvConfig, + episode_plans: list[Any], + sweep_configs: list[SweepConfigSpec], +) -> dict[str, Any]: + return { + "generated_at": datetime.now(timezone.utc).isoformat(), + "preset": args.preset, + "rl_checkpoint": str(args.rl_checkpoint), + "llm_model_path": str(args.llm_model_path), + "comparison_scope": { + "num_episode_plans": int(len(episode_plans)), + "cities": sorted({plan.city_id for plan in episode_plans}), + "scenarios": sorted({plan.scenario for plan in episode_plans}), + "seeds": sorted({int(plan.seed) for plan in episode_plans}), + "episodes_per_seed": int(args.episodes_per_seed), + "max_episode_seconds": args.max_episode_seconds, + "total_runs": int(len(episode_plans) * (1 + len(sweep_configs))), + }, + "episode_plans": [plan.to_dict() for plan in episode_plans], + "sweep_configs": [config.to_dict() for config in sweep_configs], + "influence_configs": { + config.config_id: guidance_config_payload(config.to_influence_config()) + for config in sweep_configs + }, + "repair_config": asdict( + RepairConfig( + allow_only_visible_candidates=args.allow_only_visible_candidates, + max_target_intersections=args.max_target_intersections, + fallback_on_empty_targets=args.fallback_on_empty_targets, + fallback_mode=args.fallback_mode, + ) + ), + "env_config": env_config_to_payload(env_config), + "save_step_metrics": bool(args.save_step_metrics), + "save_guidance_traces": bool(args.save_guidance_traces), + } + + +def format_float_token(value: float) -> str: + text = f"{float(value):.3f}".rstrip("0").rstrip(".") + return text.replace("-", "m").replace(".", "p") + + +def gating_mode_token(value: str) -> str: + return { + "always_on": "always", + "incident_or_spillback": "incident", + "queue_threshold": "queue", + "imbalance_threshold": "imbalance", + "queue_or_imbalance": "queue_or_imb", + "combined": "combined", + }[value] + + +if __name__ == "__main__": + main() diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..000e0b39b34d5ca89a35d065ca72b53c6c67efa6 --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,49 @@ +FROM python:3.12-slim AS builder + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + cmake \ + libboost-all-dev \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /build + +COPY third_party/CityFlow ./CityFlow +RUN rm -rf ./CityFlow/build +RUN pip install --no-cache-dir ./CityFlow + + +FROM python:3.12-slim AS runtime + +WORKDIR /app + +COPY --from=builder /usr/local/lib/python3.12/site-packages/cityflow* \ + /usr/local/lib/python3.12/site-packages/ + +COPY openenv_app/requirements.txt ./requirements.txt +RUN pip install --no-cache-dir -r requirements.txt + +COPY __init__.py ./__init__.py +COPY client.py ./client.py +COPY models.py ./models.py +COPY agents/ ./agents/ +COPY district_llm/ ./district_llm/ +COPY env/ ./env/ +COPY openenv_app/ ./openenv_app/ +COPY server/ ./server/ +COPY training/ ./training/ +COPY data/splits/ ./data/splits/ +COPY data/generated/city_0002/ ./data/generated/city_0002/ +COPY artifacts/dqn_shared/best_validation.pt ./artifacts/dqn_shared/best_validation.pt +COPY artifacts/district_llm_adapter_v3/main_run/adapter/ ./artifacts/district_llm_adapter_v3/main_run/adapter/ + +RUN mkdir -p /app/data/generated /app/data/splits + +ENV DATA_DIR=/app/data/generated +ENV SPLITS_DIR=/app/data/splits +ENV CHECKPOINT_PATH=/app/artifacts/dqn_shared/best_validation.pt +ENV DISTRICT_LLM_ADAPTER_PATH=/app/artifacts/district_llm_adapter_v3/main_run/adapter + +EXPOSE 7860 + +CMD ["sh", "-c", "uvicorn server.app:app --host 0.0.0.0 --port ${PORT:-7860}"] diff --git a/server/__init__.py b/server/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/server/app.py b/server/app.py new file mode 100644 index 0000000000000000000000000000000000000000..21425eb8533508251d080855bf68f2a9767efc7e --- /dev/null +++ b/server/app.py @@ -0,0 +1,13 @@ +from __future__ import annotations + +from openenv.core.env_server import create_app + +from models import AgenticTrafficAction, AgenticTrafficObservation +from server.environment import AgenticTrafficEnvironment + + +app = create_app( + AgenticTrafficEnvironment, + AgenticTrafficAction, + AgenticTrafficObservation, +) diff --git a/server/environment.py b/server/environment.py new file mode 100644 index 0000000000000000000000000000000000000000..bdb3c57c36f09aec22fec66297ee134432f8f715 --- /dev/null +++ b/server/environment.py @@ -0,0 +1,168 @@ +from __future__ import annotations + +import os +import uuid +from pathlib import Path +from typing import Any + +from district_llm.inference import DistrictLLMInference +from district_llm.schema import DistrictAction +from models import ( + AgenticTrafficAction, + AgenticTrafficObservation, + AgenticTrafficState, +) +from openenv.core.env_server.interfaces import Environment +from openenv_app.openenv_wrapper import OpenEnvTrafficWrapper + + +REPO_ROOT = Path(__file__).resolve().parents[1] +DATA_DIR = Path(os.environ.get("DATA_DIR", "") or (REPO_ROOT / "data" / "generated")) +SPLITS_DIR = Path(os.environ.get("SPLITS_DIR", "") or (REPO_ROOT / "data" / "splits")) +DISTRICT_LLM_ADAPTER_PATH = Path( + os.environ.get("DISTRICT_LLM_ADAPTER_PATH", "") + or (REPO_ROOT / "artifacts" / "district_llm_adapter_v3" / "main_run" / "adapter") +) +DISTRICT_LLM_DEVICE = os.environ.get("DISTRICT_LLM_DEVICE") + + +class AgenticTrafficEnvironment( + Environment[AgenticTrafficAction, AgenticTrafficObservation, AgenticTrafficState] +): + """Minimal OpenEnv-compatible wrapper around the existing district controller stack.""" + + def __init__(self) -> None: + super().__init__() + self.wrapper = OpenEnvTrafficWrapper( + generated_root=DATA_DIR, + splits_root=SPLITS_DIR, + ) + self._state = AgenticTrafficState() + self._llm_inference: DistrictLLMInference | None = None + self._llm_load_attempted = False + self._llm_error: str | None = None + + def reset( + self, + seed: int | None = None, + episode_id: str | None = None, + **kwargs: Any, + ) -> AgenticTrafficObservation: + payload = self.wrapper.reset( + seed=seed, + city_id=kwargs.get("city_id"), + scenario_name=kwargs.get("scenario_name"), + ) + self._state.episode_id = episode_id or str(uuid.uuid4()) + self._state.step_count = 0 + self._sync_state() + observation = AgenticTrafficObservation.model_validate(payload["observation"]) + observation.reward = None + observation.done = False + observation.metadata["llm"] = self._llm_status() + return observation + + def step( + self, + action: AgenticTrafficAction, + timeout_s: float | None = None, + **kwargs: Any, + ) -> AgenticTrafficObservation: + del timeout_s, kwargs + payload = self.wrapper.step(action=self._build_step_payload(action)) + self._state.step_count += 1 + self._sync_state() + observation = AgenticTrafficObservation.model_validate(payload["observation"]) + observation.done = bool(payload.get("done", False)) + observation.reward = float(payload.get("reward", 0.0)) + observation.metadata["llm"] = self._llm_status() + return observation + + @property + def state(self) -> AgenticTrafficState: + self._sync_state() + return self._state + + def _build_step_payload(self, action: AgenticTrafficAction) -> dict[str, Any]: + district_actions = dict(action.district_actions) + llm_generated_actions: dict[str, Any] = {} + + if action.use_llm: + llm_generated_actions = self._generate_llm_actions( + existing_actions=district_actions, + max_new_tokens=action.llm_max_new_tokens, + ) + for district_id, directive in llm_generated_actions.items(): + district_actions.setdefault(district_id, directive) + + payload = {"district_actions": district_actions} + payload["metadata"] = { + "use_llm": bool(action.use_llm), + "llm_generated_districts": sorted(llm_generated_actions), + "llm": self._llm_status(), + } + return payload + + def _generate_llm_actions( + self, + existing_actions: dict[str, Any], + max_new_tokens: int, + ) -> dict[str, Any]: + if not self.wrapper.last_summaries: + return {} + + inference = self._get_llm_inference() + if inference is None: + return {} + + generated_actions: dict[str, Any] = {} + for district_id, summary in self.wrapper.last_summaries.items(): + if district_id in existing_actions: + continue + result = inference.predict_with_result(summary=summary, max_new_tokens=max_new_tokens) + generated_actions[district_id] = result.action.to_dict() + return generated_actions + + def _get_llm_inference(self) -> DistrictLLMInference | None: + if self._llm_inference is not None: + return self._llm_inference + if self._llm_load_attempted: + return None + + self._llm_load_attempted = True + if not DISTRICT_LLM_ADAPTER_PATH.exists(): + self._llm_error = f"Adapter not found at {DISTRICT_LLM_ADAPTER_PATH}" + return None + + try: + self._llm_inference = DistrictLLMInference( + model_name_or_path=str(DISTRICT_LLM_ADAPTER_PATH), + device=DISTRICT_LLM_DEVICE, + fallback_action=DistrictAction.default_hold( + duration_steps=self.wrapper.district_decision_interval + ), + ) + except Exception as exc: + self._llm_error = f"{type(exc).__name__}: {exc}" + self._llm_inference = None + return self._llm_inference + + def _llm_status(self) -> dict[str, Any]: + return { + "adapter_path": str(DISTRICT_LLM_ADAPTER_PATH), + "adapter_present": DISTRICT_LLM_ADAPTER_PATH.exists(), + "loaded": self._llm_inference is not None, + "load_attempted": self._llm_load_attempted, + "error": self._llm_error, + } + + def _sync_state(self) -> None: + payload = self.wrapper.state()["state"] + self._state = AgenticTrafficState.model_validate( + { + **payload, + "episode_id": self._state.episode_id, + "step_count": self._state.step_count, + "llm": self._llm_status(), + } + ) diff --git a/server/path_validators.py b/server/path_validators.py new file mode 100644 index 0000000000000000000000000000000000000000..5dc496d280ffabde67f99b7b3f7ec9865a6d6c59 --- /dev/null +++ b/server/path_validators.py @@ -0,0 +1,31 @@ +"""Validation helpers for URL path parameters used to construct filesystem paths.""" +from __future__ import annotations + +import re + +from fastapi import HTTPException + +# Allow letters, digits, underscores, hyphens, and dots (for e.g. "city_01.v2"). +# Disallow anything that could traverse directories: slashes, null bytes, etc. +_SAFE_SEGMENT = re.compile(r"^[A-Za-z0-9_\-\.]+$") +_MAX_SEGMENT_LEN = 128 + + +def validate_path_segment(value: str, field: str) -> str: + """Raise HTTP 400 if *value* is not a safe filesystem path component.""" + if not value: + raise HTTPException(status_code=400, detail=f"{field} must not be empty.") + if len(value) > _MAX_SEGMENT_LEN: + raise HTTPException( + status_code=400, + detail=f"{field} exceeds maximum length of {_MAX_SEGMENT_LEN} characters.", + ) + if not _SAFE_SEGMENT.match(value): + raise HTTPException( + status_code=400, + detail=( + f"{field} contains invalid characters. " + "Only letters, digits, underscores, hyphens, and dots are allowed." + ), + ) + return value diff --git a/server/policy_runner.py b/server/policy_runner.py new file mode 100644 index 0000000000000000000000000000000000000000..33f97b6790a19f9a064e317563230abe0c6be0ba --- /dev/null +++ b/server/policy_runner.py @@ -0,0 +1,431 @@ +"""Run traffic policies and generate CityFlow replay files for visualization.""" +from __future__ import annotations + +import json +import os +import sys +import tempfile +import gc +from dataclasses import dataclass +from pathlib import Path +from typing import Any + +import numpy as np +import torch + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +# --- DQN singleton (loaded once at server startup) --- + +_dqn_actor = None +_dqn_obs_normalizer = None +_dqn_env_config = None +_district_llm_inference = None + +LLM_MODEL_PATH = Path( + os.environ.get("LLM_MODEL_PATH", "") + or (REPO_ROOT / "artifacts" / "district_llm_adapter_v3" / "main_run" / "adapter") +) +VISUALIZER_MAX_SIM_SECONDS = int(os.environ.get("VISUALIZER_MAX_SIM_SECONDS", "180")) + + +def load_dqn_checkpoint(checkpoint_path: str | Path) -> None: + global _dqn_actor, _dqn_obs_normalizer, _dqn_env_config + + from training.models import RunningNormalizer, TrafficControlQNetwork + from training.train_local_policy import load_env_config + + checkpoint = torch.load(str(checkpoint_path), map_location="cpu", weights_only=False) + + network_arch = checkpoint.get("network_architecture") or checkpoint.get( + "policy_architecture", {} + ) + trainer_config = checkpoint.get("dqn_config", {}) + policy_arch = network_arch.get( + "policy_arch", trainer_config.get("policy_arch", "single_head") + ) + + actor = TrafficControlQNetwork( + observation_dim=int(network_arch["observation_dim"]), + action_dim=int(network_arch.get("action_dim", 2)), + hidden_dim=int(trainer_config.get("hidden_dim", 256)), + num_layers=int(trainer_config.get("hidden_layers", 2)), + district_types=tuple(network_arch.get("district_types", ())), + policy_arch=policy_arch, + dueling=bool(network_arch.get("dueling", True)), + ) + actor.load_state_dict( + checkpoint.get("q_network_state_dict") or checkpoint["policy_state_dict"] + ) + actor.eval() + + obs_normalizer = None + if checkpoint.get("obs_normalizer"): + obs_normalizer = RunningNormalizer() + obs_normalizer.load_state_dict(checkpoint["obs_normalizer"]) + + env_config = None + if checkpoint.get("env_config"): + env_config = load_env_config(checkpoint["env_config"]) + + _dqn_actor = actor + _dqn_obs_normalizer = obs_normalizer + _dqn_env_config = env_config + print(f"[policy_runner] DQN checkpoint loaded from {Path(checkpoint_path).name}") + + +# --- Result type --- + +@dataclass +class RunResult: + policy_name: str + metrics: dict[str, Any] + replay_path: Path + roadnet_log_path: Path + + +# --- Core runner --- + +ALL_POLICIES = ( + "no_intervention", + "fixed", + "random", + "learned", + "dqn_heuristic", + "llm_dqn", +) + + +class _LoadedDQNPolicyAdapter: + @property + def env_config(self): + return _dqn_env_config + + def decide(self, observation_batch: dict[str, Any]): + from district_llm.rl_guidance_wrapper import RLPolicyDecision + + if _dqn_actor is None: + raise RuntimeError("DQN checkpoint not loaded. Call load_dqn_checkpoint() first.") + + raw_obs = observation_batch["observations"].astype(np.float32) + normalized_obs = ( + _dqn_obs_normalizer.normalize(raw_obs) if _dqn_obs_normalizer is not None else raw_obs + ) + obs_tensor = torch.as_tensor(normalized_obs, dtype=torch.float32) + district_type_tensor = torch.as_tensor( + observation_batch["district_type_indices"], + dtype=torch.int64, + ) + action_mask_tensor = torch.as_tensor( + observation_batch["action_mask"], + dtype=torch.float32, + ) + with torch.no_grad(): + q_values = _dqn_actor.forward( + observations=obs_tensor, + district_type_indices=district_type_tensor, + action_mask=action_mask_tensor, + ) + q_values_np = q_values.detach().cpu().numpy().astype(np.float32) + return RLPolicyDecision( + q_values=q_values_np, + actions=q_values_np.argmax(axis=1).astype(np.int64), + ) + + +def _load_district_llm_inference(): + global _district_llm_inference + if _district_llm_inference is not None: + return _district_llm_inference + if not LLM_MODEL_PATH.exists(): + raise FileNotFoundError( + f"LLM adapter path not found: {LLM_MODEL_PATH}. " + "Set LLM_MODEL_PATH to enable the llm_dqn visualizer policy." + ) + from district_llm.inference import DistrictLLMInference + from district_llm.repair import RepairConfig + + _district_llm_inference = DistrictLLMInference( + model_name_or_path=str(LLM_MODEL_PATH), + device=None, + repair_config=RepairConfig( + allow_only_visible_candidates=True, + max_target_intersections=3, + fallback_on_empty_targets=True, + fallback_mode="heuristic", + ), + ) + return _district_llm_inference + + +def load_district_llm_inference(): + inference = _load_district_llm_inference() + print(f"[policy_runner] District LLM prewarmed from {LLM_MODEL_PATH}") + return inference + + +def unload_district_llm_inference() -> None: + global _district_llm_inference + if _district_llm_inference is None: + return + inference = _district_llm_inference + _district_llm_inference = None + + model = getattr(inference, "model", None) + tokenizer = getattr(inference, "tokenizer", None) + if model is not None: + try: + del model + except Exception: + pass + if tokenizer is not None: + try: + del tokenizer + except Exception: + pass + try: + import torch + + if torch.cuda.is_available(): + torch.cuda.empty_cache() + if hasattr(torch.cuda, "ipc_collect"): + torch.cuda.ipc_collect() + except Exception: + pass + gc.collect() + print("[policy_runner] District LLM unloaded") + + +def _build_guided_controller(policy_name: str): + from district_llm.heuristic_guidance import HeuristicGuidanceConfig + from district_llm.rl_guidance_wrapper import ( + DistrictGuidedRLController, + GuidanceInfluenceConfig, + HeuristicGuidanceProvider, + LLMGuidanceProvider, + ) + from district_llm.summary_builder import DistrictStateSummaryBuilder + + heuristic_provider = HeuristicGuidanceProvider( + config=HeuristicGuidanceConfig(max_target_intersections=3) + ) + influence_config = GuidanceInfluenceConfig( + wrapper_mode="target_only_soft", + bias_strength=0.025, + target_only_bias_strength=0.025, + corridor_bias_strength=0.0125, + max_intersections_affected=2, + guidance_refresh_steps=10, + guidance_persistence_steps=5, + max_guidance_duration=10, + apply_global_bias=False, + apply_target_only=True, + gating_mode="queue_or_imbalance", + min_avg_queue_for_guidance=150.0, + min_queue_imbalance_for_guidance=20.0, + require_incident_or_spillback=False, + allow_guidance_in_normal_conditions=False, + enable_bias_decay=False, + bias_decay_schedule="linear", + fallback_policy="no_op", + log_guidance_debug=False, + ).validate() + summary_builder = DistrictStateSummaryBuilder(top_k=3, candidate_limit=6) + guidance_provider = heuristic_provider + mode_source = "rl_heuristic" + if policy_name == "llm_dqn": + guidance_provider = LLMGuidanceProvider( + inference=_load_district_llm_inference(), + max_new_tokens=128, + ) + mode_source = "rl_llm" + print( + f"[policy_runner] guided_controller policy={policy_name} mode_source={mode_source} " + f"wrapper_mode={influence_config.wrapper_mode} bias={influence_config.bias_strength} " + f"target_bias={influence_config.target_only_bias_strength} corridor_bias={influence_config.corridor_bias_strength} " + f"max_affected={influence_config.max_intersections_affected} gating={influence_config.gating_mode} " + f"refresh={influence_config.guidance_refresh_steps} persistence={influence_config.guidance_persistence_steps} " + f"fallback_policy={influence_config.fallback_policy}" + ) + return DistrictGuidedRLController( + policy=_LoadedDQNPolicyAdapter(), + mode_source=mode_source, + summary_builder=summary_builder, + guidance_provider=guidance_provider, + influence_config=influence_config, + heuristic_provider=heuristic_provider, + ) + + +def _evaluate_guided_policy(env_factory, controller) -> dict[str, float | str]: + env = env_factory() + observation_batch = env.reset() + done = False + final_info = env.last_info + controller.reset() + max_decision_steps = max( + 1, + int(getattr(env, "max_episode_seconds", 0) // max(1, env.env_config.decision_interval)), + ) + + while not done: + action_batch = controller.act(env=env, observation_batch=observation_batch) + observation_batch, _, done, final_info = env.step(action_batch.actions) + decision_step = int(getattr(env, "decision_step_count", 0)) + should_log = decision_step == 1 or done or (decision_step % 5 == 0) + if should_log: + metrics = final_info.get("metrics", {}) if isinstance(final_info, dict) else {} + print( + f"[policy_runner][{controller.mode_source}] step={decision_step}/{max_decision_steps} " + f"sim_time={int(env.adapter.get_current_time())}s " + f"wait={float(metrics.get('mean_waiting_vehicles', float('nan'))):.2f} " + f"throughput={float(metrics.get('throughput', float('nan'))):.1f}" + ) + + metrics = { + key: float(value) + for key, value in final_info["metrics"].items() + if value is not None and isinstance(value, (int, float)) + } + metrics.update( + { + "city_id": env.city_id, + "scenario_name": env.scenario_name, + "episode_return": float(env.episode_return), + "total_episode_return": float(env.total_episode_return), + "decision_steps": float(env.decision_step_count), + } + ) + metrics.update(controller.episode_debug_summary()) + return metrics + + +def run_policy_for_city( + city_id: str, + scenario_name: str, + policy_name: str, + generated_root: Path, + output_root: Path, +) -> RunResult: + """Run a single policy on one city/scenario and write a CityFlow replay file.""" + from agents.local_policy import FixedCyclePolicy, HoldPhasePolicy, RandomPhasePolicy + from env.traffic_env import EnvConfig + from training.cityflow_dataset import CityFlowDataset, ScenarioSpec + from training.rollout import evaluate_policy + from training.train_local_policy import build_env + + output_dir = output_root / city_id / scenario_name / policy_name + output_dir.mkdir(parents=True, exist_ok=True) + print( + f"[policy_runner] start policy={policy_name} city={city_id} scenario={scenario_name} " + f"max_sim_seconds={VISUALIZER_MAX_SIM_SECONDS}" + ) + + replay_path = output_dir / "replay.txt" + roadnet_log_path = output_dir / "roadnetLogFile.json" + + dataset = CityFlowDataset(generated_root=str(generated_root)) + spec = dataset.build_scenario_spec(city_id, scenario_name) + + # Build a modified config that enables replay to our output dir. + original_config = json.loads(spec.config_path.read_text()) + city_dir_resolved = spec.city_dir.resolve() + + # Compute replay/roadnet paths relative to the city dir (CityFlow resolves from dir). + rel_replay = os.path.relpath( + str(replay_path.resolve()), str(city_dir_resolved) + ).replace("\\", "/") + rel_roadnet_log = os.path.relpath( + str(roadnet_log_path.resolve()), str(city_dir_resolved) + ).replace("\\", "/") + + temp_config = dict(original_config) + temp_config["saveReplay"] = True + temp_config["replayLogFile"] = rel_replay + temp_config["roadnetLogFile"] = rel_roadnet_log + original_step = int(temp_config.get("step", 0) or 0) + temp_config["step"] = ( + VISUALIZER_MAX_SIM_SECONDS if original_step <= 0 + else min(original_step, VISUALIZER_MAX_SIM_SECONDS) + ) + + # Write temp config to a temporary file so we don't touch on-disk configs. + with tempfile.NamedTemporaryFile( + mode="w", suffix=".json", delete=False, dir=str(output_dir) + ) as tmp: + json.dump(temp_config, tmp) + temp_config_path = Path(tmp.name) + + try: + temp_spec = ScenarioSpec( + city_id=spec.city_id, + scenario_name=spec.scenario_name, + city_dir=spec.city_dir, + scenario_dir=spec.scenario_dir, + config_path=temp_config_path, + roadnet_path=spec.roadnet_path, + district_map_path=spec.district_map_path, + metadata_path=spec.metadata_path, + ) + + env_config = _dqn_env_config or EnvConfig() + + if policy_name == "learned": + if _dqn_actor is None: + raise RuntimeError("DQN checkpoint not loaded. Call load_dqn_checkpoint() first.") + actor = _dqn_actor + device = None + obs_normalizer = _dqn_obs_normalizer + elif policy_name == "fixed": + actor = FixedCyclePolicy(green_time=20) + device = None + obs_normalizer = None + elif policy_name == "random": + actor = RandomPhasePolicy(seed=7) + device = None + obs_normalizer = None + elif policy_name == "no_intervention": + actor = HoldPhasePolicy() + device = None + obs_normalizer = None + elif policy_name in {"dqn_heuristic", "llm_dqn"}: + actor = _build_guided_controller(policy_name) + device = None + obs_normalizer = None + else: + raise ValueError(f"Unknown policy name: {policy_name!r}") + + if policy_name in {"dqn_heuristic", "llm_dqn"}: + metrics = _evaluate_guided_policy( + env_factory=lambda: build_env(env_config, temp_spec), + controller=actor, + ) + else: + metrics = evaluate_policy( + env_factory=lambda: build_env(env_config, temp_spec), + actor=actor, + device=device, + obs_normalizer=obs_normalizer, + deterministic=True, + log_prefix=f"[policy_runner][{policy_name}]", + log_every_steps=5, + ) + finally: + temp_config_path.unlink(missing_ok=True) + + # Persist metrics so subsequent requests can be served from cache. + (output_dir / "metrics.json").write_text(json.dumps(metrics)) + print( + f"[policy_runner] done policy={policy_name} city={city_id} scenario={scenario_name} " + f"decision_steps={metrics.get('decision_steps')} replay={replay_path.exists()} " + f"roadnet_log={roadnet_log_path.exists()}" + ) + + return RunResult( + policy_name=policy_name, + metrics=metrics, + replay_path=replay_path, + roadnet_log_path=roadnet_log_path, + ) diff --git a/server/remote_runner.py b/server/remote_runner.py new file mode 100644 index 0000000000000000000000000000000000000000..39ba5e742105986f1707277a0708c5cca49ecea5 --- /dev/null +++ b/server/remote_runner.py @@ -0,0 +1,58 @@ +"""HTTP client that delegates simulation runs to a remote OpenEnv API Space.""" +from __future__ import annotations + +import json +import logging +from pathlib import Path +from typing import Any + +import httpx + +logger = logging.getLogger(__name__) + + +def run_policy_remote( + city_id: str, + scenario_name: str, + policy_name: str, + openenv_api_url: str, + output_root: Path, + timeout: float = 120.0, +): + """Call Space 1's /replay endpoint and write results to output_root.""" + from server.policy_runner import RunResult + + url = f"{openenv_api_url.rstrip('/')}/replay/{city_id}/{scenario_name}/{policy_name}" + logger.info("Remote replay request: %s", url) + + with httpx.Client(timeout=timeout) as client: + resp = client.get(url) + resp.raise_for_status() + + payload: dict[str, Any] = resp.json() + + output_dir = output_root / city_id / scenario_name / policy_name + output_dir.mkdir(parents=True, exist_ok=True) + + replay_path = output_dir / "replay.txt" + replay_path.write_text(payload["replay_text"], encoding="utf-8") + + roadnet_log_path = output_dir / "roadnetLogFile.json" + if payload.get("roadnet_log"): + roadnet_log_path.write_text( + json.dumps(payload["roadnet_log"], indent=2), encoding="utf-8" + ) + + metrics_path = output_dir / "metrics.json" + metrics_path.write_text( + json.dumps(payload.get("metrics", {}), indent=2), encoding="utf-8" + ) + + return RunResult( + city_id=city_id, + scenario_name=scenario_name, + policy_name=policy_name, + replay_path=replay_path, + roadnet_log_path=roadnet_log_path, + metrics=payload.get("metrics", {}), + ) diff --git a/server/roadnet_matcher.py b/server/roadnet_matcher.py new file mode 100644 index 0000000000000000000000000000000000000000..6824e1319fb66f5438697d47af00aaaa3366919c --- /dev/null +++ b/server/roadnet_matcher.py @@ -0,0 +1,55 @@ +"""Match an uploaded roadnet.json to a known city in the dataset by fingerprint.""" +from __future__ import annotations + +import json +from pathlib import Path + + +def match_city_by_roadnet(roadnet_data: dict, generated_root: Path) -> str | None: + """Return the city_id whose roadnet.json matches the uploaded data, or None.""" + uploaded_fp = _fingerprint(roadnet_data) + if not uploaded_fp: + return None + + for city_dir in sorted(generated_root.glob("city_*")): + roadnet_path = city_dir / "roadnet.json" + if not roadnet_path.exists(): + continue + try: + candidate = json.loads(roadnet_path.read_text()) + if _fingerprint(candidate) == uploaded_fp: + return city_dir.name + except Exception: + continue + + return None + + +def list_all_cities(generated_root: Path) -> list[str]: + return sorted( + d.name + for d in generated_root.glob("city_*") + if d.is_dir() and (d / "roadnet.json").exists() + ) + + +def list_scenarios_for_city(city_id: str, generated_root: Path) -> list[str]: + scenario_root = generated_root / city_id / "scenarios" + if not scenario_root.exists(): + return [] + return sorted( + d.name + for d in scenario_root.iterdir() + if d.is_dir() + and (d / "config.json").exists() + and (d / "flow.json").exists() + ) + + +def _fingerprint(roadnet: dict) -> frozenset[str]: + """Fingerprint = set of non-virtual intersection IDs.""" + return frozenset( + item["id"] + for item in roadnet.get("intersections", []) + if not item.get("virtual", False) and item.get("id") + ) diff --git a/server/visualizer_app.py b/server/visualizer_app.py new file mode 100644 index 0000000000000000000000000000000000000000..9b1e0cbd7aac8d1599323e58abf8eb75d9b22e8f --- /dev/null +++ b/server/visualizer_app.py @@ -0,0 +1,404 @@ +"""FastAPI visualizer server for CityFlow multi-policy comparison dashboard. + +Deployment modes +---------------- +Local (no OPENENV_API_URL set): + Runs CityFlow simulations in-process via ``server.policy_runner``. + +HF Space 2 (OPENENV_API_URL set to Space 1's URL): + Delegates all simulation runs to the remote OpenEnv API via + ``server.remote_runner``. No CityFlow or torch needed locally. +""" +from __future__ import annotations + +import json +import logging +import os +import sys +import time +from contextlib import asynccontextmanager +from pathlib import Path +from typing import Any + +import httpx +from fastapi import FastAPI, HTTPException, UploadFile +from fastapi.middleware.cors import CORSMiddleware +from fastapi.responses import FileResponse, JSONResponse, PlainTextResponse +from fastapi.staticfiles import StaticFiles +from joblib import Parallel, delayed +from pydantic import BaseModel + +REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +logger = logging.getLogger(__name__) + +# --------------------------------------------------------------------------- +# Configuration — all overridable via environment variables +# --------------------------------------------------------------------------- + +OPENENV_API_URL: str | None = os.environ.get("OPENENV_API_URL") or None + +GENERATED_ROOT = Path( + os.environ.get("DATA_DIR", "") or (REPO_ROOT / "data" / "generated") +) +REPLAY_OUTPUT_ROOT = Path( + os.environ.get("REPLAY_ROOT", "") or (REPO_ROOT / "results" / "replays") +) +CHECKPOINT_PATH = Path( + os.environ.get("CHECKPOINT_PATH", "") + or (REPO_ROOT / "artifacts" / "dqn_shared" / "best_validation.pt") +) +FRONTEND_DIR = REPO_ROOT / "third_party" / "CityFlow" / "frontend" + +# --------------------------------------------------------------------------- +# Runner selection: local (policy_runner) vs. remote (remote_runner) +# --------------------------------------------------------------------------- + +from server.path_validators import validate_path_segment +from server.policy_runner import ALL_POLICIES, RunResult + +if OPENENV_API_URL: + logger.info("Remote mode — OpenEnv API at %s", OPENENV_API_URL) + from server.remote_runner import run_policy_remote as _run_remote + + def _run_policy(city_id: str, scenario_name: str, policy_name: str) -> RunResult: + return _run_remote( + city_id=city_id, + scenario_name=scenario_name, + policy_name=policy_name, + openenv_api_url=OPENENV_API_URL, # type: ignore[arg-type] + output_root=REPLAY_OUTPUT_ROOT, + ) + +else: + logger.info("Local mode — running CityFlow in-process") + from server.policy_runner import run_policy_for_city as _run_local + + def _run_policy(city_id: str, scenario_name: str, policy_name: str) -> RunResult: + return _run_local( + city_id=city_id, + scenario_name=scenario_name, + policy_name=policy_name, + generated_root=GENERATED_ROOT, + output_root=REPLAY_OUTPUT_ROOT, + ) + + +from server.roadnet_matcher import ( + list_all_cities, + list_scenarios_for_city, + match_city_by_roadnet, +) + +# --------------------------------------------------------------------------- +# Lifespan +# --------------------------------------------------------------------------- + + +@asynccontextmanager +async def lifespan(app: FastAPI): + REPLAY_OUTPUT_ROOT.mkdir(parents=True, exist_ok=True) + + if OPENENV_API_URL: + try: + with httpx.Client(timeout=10.0) as client: + resp = client.get(f"{OPENENV_API_URL.rstrip('/')}/health") + resp.raise_for_status() + logger.info("OpenEnv API health check passed: %s", OPENENV_API_URL) + except Exception as exc: + logger.warning( + "OpenEnv API at %s did not respond to /health: %s. " + "Simulation requests will fail until it is reachable.", + OPENENV_API_URL, + exc, + ) + else: + from server.policy_runner import load_district_llm_inference, load_dqn_checkpoint + if CHECKPOINT_PATH.exists(): + load_dqn_checkpoint(CHECKPOINT_PATH) + else: + logger.warning("Checkpoint not found at %s — 'learned' policy will fail", CHECKPOINT_PATH) + try: + load_district_llm_inference() + except Exception as exc: + logger.warning( + "District LLM prewarm failed: %s. " + "The llm_dqn policy will retry loading lazily on first use.", + exc, + ) + + yield + + if not OPENENV_API_URL: + from server.policy_runner import unload_district_llm_inference + + try: + unload_district_llm_inference() + except Exception as exc: + logger.warning("District LLM unload failed during shutdown: %s", exc) + + +# --------------------------------------------------------------------------- +# App setup +# --------------------------------------------------------------------------- + +app = FastAPI( + title="Traffic Visualizer", + description="Multi-policy CityFlow replay comparison dashboard.", + version="1.0.0", + lifespan=lifespan, +) + +app.add_middleware( + CORSMiddleware, + allow_origins=["*"], + allow_methods=["*"], + allow_headers=["*"], +) + +app.mount("/static", StaticFiles(directory=str(FRONTEND_DIR)), name="frontend") + +# --------------------------------------------------------------------------- +# Request / response models +# --------------------------------------------------------------------------- + + +class RunSimulationsRequest(BaseModel): + city_id: str + scenario_name: str + policies: list[str] = list(ALL_POLICIES) + force: bool = False + + +class PolicyMetrics(BaseModel): + policy_name: str + metrics: dict[str, Any] + replay_available: bool + roadnet_log_available: bool + elapsed_ms: float | None = None + + +class RunSimulationsResponse(BaseModel): + city_id: str + scenario_name: str + results: list[PolicyMetrics] + + +# --------------------------------------------------------------------------- +# Endpoints +# --------------------------------------------------------------------------- + + +@app.get("/") +def root(): + index_path = FRONTEND_DIR / "index.html" + if index_path.exists(): + return FileResponse(str(index_path)) + return JSONResponse({"status": "Traffic Visualizer API running"}) + + +@app.post("/upload-roadnet") +async def upload_roadnet(file: UploadFile) -> dict: + raw = await file.read() + try: + roadnet_data = json.loads(raw) + except json.JSONDecodeError as exc: + raise HTTPException(status_code=400, detail=f"Invalid JSON: {exc}") + + city_id = match_city_by_roadnet(roadnet_data, GENERATED_ROOT) + if city_id is None: + return { + "matched": False, + "city_id": None, + "scenarios": [], + "all_cities": list_all_cities(GENERATED_ROOT), + } + + scenarios = list_scenarios_for_city(city_id, GENERATED_ROOT) + return {"matched": True, "city_id": city_id, "scenarios": scenarios, "all_cities": []} + + +@app.get("/cities") +def get_cities() -> dict: + return {"cities": list_all_cities(GENERATED_ROOT)} + + +@app.get("/cities/{city_id}/scenarios") +def get_scenarios(city_id: str) -> dict: + validate_path_segment(city_id, "city_id") + scenarios = list_scenarios_for_city(city_id, GENERATED_ROOT) + if not scenarios: + raise HTTPException( + status_code=404, + detail=f"City '{city_id}' not found or has no scenarios.", + ) + return {"city_id": city_id, "scenarios": scenarios} + + +@app.get("/cities/{city_id}/district-map") +def get_district_map(city_id: str) -> JSONResponse: + validate_path_segment(city_id, "city_id") + district_map_path = GENERATED_ROOT / city_id / "district_map.json" + if not district_map_path.exists(): + raise HTTPException( + status_code=404, + detail=f"District map not found for city '{city_id}'.", + ) + return JSONResponse(json.loads(district_map_path.read_text(encoding="utf-8"))) + + +@app.post("/run-simulations", response_model=RunSimulationsResponse) +def run_simulations(request: RunSimulationsRequest) -> RunSimulationsResponse: + validate_path_segment(request.city_id, "city_id") + validate_path_segment(request.scenario_name, "scenario_name") + + valid_policies = set(ALL_POLICIES) + bad = [p for p in request.policies if p not in valid_policies] + if bad: + raise HTTPException( + status_code=400, + detail=f"Unknown policies: {bad}. Valid: {list(ALL_POLICIES)}", + ) + + def _run_one(policy_name: str) -> PolicyMetrics: + started_at = time.perf_counter() + output_dir = REPLAY_OUTPUT_ROOT / request.city_id / request.scenario_name / policy_name + replay_path = output_dir / "replay.txt" + roadnet_path = output_dir / "roadnetLogFile.json" + metrics_path = output_dir / "metrics.json" + + if not request.force and replay_path.exists() and metrics_path.exists(): + return PolicyMetrics( + policy_name=policy_name, + metrics=json.loads(metrics_path.read_text(encoding="utf-8")), + replay_available=True, + roadnet_log_available=roadnet_path.exists(), + elapsed_ms=0.0, + ) + + try: + result: RunResult = _run_policy( + city_id=request.city_id, + scenario_name=request.scenario_name, + policy_name=policy_name, + ) + return PolicyMetrics( + policy_name=policy_name, + metrics=result.metrics, + replay_available=result.replay_path.exists(), + roadnet_log_available=result.roadnet_log_path.exists(), + elapsed_ms=(time.perf_counter() - started_at) * 1000.0, + ) + except Exception as exc: + logger.error("Policy run failed for %s/%s/%s: %s", request.city_id, request.scenario_name, policy_name, exc) + return PolicyMetrics( + policy_name=policy_name, + metrics={"error": "Simulation failed. Check server logs."}, + replay_available=False, + roadnet_log_available=False, + elapsed_ms=(time.perf_counter() - started_at) * 1000.0, + ) + + n_jobs = min(len(request.policies), 4) + results: list[PolicyMetrics] = Parallel( + n_jobs=n_jobs, prefer="threads" + )(delayed(_run_one)(p) for p in request.policies) + + return RunSimulationsResponse( + city_id=request.city_id, + scenario_name=request.scenario_name, + results=results, + ) + + +@app.get("/replay/{city_id}/{scenario_name}/{policy_name}", response_model=None) +def get_replay( + city_id: str, + scenario_name: str, + policy_name: str, + max_steps: int = 0, +) -> PlainTextResponse | FileResponse: + validate_path_segment(city_id, "city_id") + validate_path_segment(scenario_name, "scenario_name") + validate_path_segment(policy_name, "policy_name") + + replay_path = REPLAY_OUTPUT_ROOT / city_id / scenario_name / policy_name / "replay.txt" + if not replay_path.exists(): + raise HTTPException( + status_code=404, + detail=f"Replay not found for {city_id}/{scenario_name}/{policy_name}. Run /run-simulations first.", + ) + if max_steps > 0: + lines: list[str] = [] + with open(replay_path, encoding="utf-8") as fh: + for raw in fh: + if raw.strip(): + lines.append(raw.rstrip("\n")) + if len(lines) >= max_steps: + break + return PlainTextResponse("\n".join(lines)) + return FileResponse(str(replay_path), media_type="text/plain") + + +@app.get("/roadnet-log/{city_id}/{scenario_name}/{policy_name}") +def get_roadnet_log(city_id: str, scenario_name: str, policy_name: str) -> JSONResponse: + validate_path_segment(city_id, "city_id") + validate_path_segment(scenario_name, "scenario_name") + validate_path_segment(policy_name, "policy_name") + + path = REPLAY_OUTPUT_ROOT / city_id / scenario_name / policy_name / "roadnetLogFile.json" + if not path.exists(): + for p in ALL_POLICIES: + fallback = REPLAY_OUTPUT_ROOT / city_id / scenario_name / p / "roadnetLogFile.json" + if fallback.exists(): + path = fallback + break + if not path.exists(): + raise HTTPException( + status_code=404, + detail=f"Roadnet log not found for {city_id}/{scenario_name}.", + ) + return JSONResponse(json.loads(path.read_text(encoding="utf-8"))) + + +@app.get("/metrics/{city_id}/{scenario_name}") +def get_metrics(city_id: str, scenario_name: str) -> dict: + validate_path_segment(city_id, "city_id") + validate_path_segment(scenario_name, "scenario_name") + + base = REPLAY_OUTPUT_ROOT / city_id / scenario_name + if not base.exists(): + raise HTTPException( + status_code=404, + detail=f"No simulation results found for {city_id}/{scenario_name}.", + ) + + metrics: dict[str, Any] = {} + for policy_dir in sorted(base.iterdir()): + if not policy_dir.is_dir(): + continue + metrics_path = policy_dir / "metrics.json" + replay_path = policy_dir / "replay.txt" + roadnet_log_path = policy_dir / "roadnetLogFile.json" + payload: dict[str, Any] = {} + if metrics_path.exists(): + payload.update(json.loads(metrics_path.read_text(encoding="utf-8"))) + if replay_path.exists(): + payload["replay_available"] = True + if roadnet_log_path.exists(): + payload["roadnet_log_available"] = True + if payload: + metrics[policy_dir.name] = payload + + return {"city_id": city_id, "scenario_name": scenario_name, "metrics": metrics} + + +# --------------------------------------------------------------------------- +# Entry point +# --------------------------------------------------------------------------- + +if __name__ == "__main__": + import uvicorn + uvicorn.run("server.visualizer_app:app", host="0.0.0.0", port=8080, reload=False) diff --git a/test.py b/test.py new file mode 100644 index 0000000000000000000000000000000000000000..1fa79c43811b75e9aa173ba8ebbcae3047a67942 --- /dev/null +++ b/test.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +import argparse +import json +import random + +import numpy as np + +from env.observation_builder import ObservationConfig +from env.reward import RewardConfig +from env.traffic_env import EnvConfig, TrafficEnv +from training.cityflow_dataset import CityFlowDataset + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser(description="Smoke test for the CityFlow RL environment.") + parser.add_argument("--generated-root", default="data/generated") + parser.add_argument("--splits-root", default="data/splits") + parser.add_argument("--city-id", default=None) + parser.add_argument("--scenario-name", default=None) + parser.add_argument("--decision-steps", type=int, default=5) + parser.add_argument("--decision-interval", type=int, default=5) + parser.add_argument("--min-green-time", type=int, default=10) + parser.add_argument("--thread-num", type=int, default=1) + parser.add_argument("--seed", type=int, default=7) + return parser.parse_args() + + +def main() -> None: + args = parse_args() + rng = random.Random(args.seed) + + dataset = CityFlowDataset( + generated_root=args.generated_root, + splits_root=args.splits_root, + ) + dataset.generate_default_splits() + scenario_spec = ( + dataset.build_scenario_spec(args.city_id, args.scenario_name) + if args.city_id and args.scenario_name + else dataset.sample_scenario("train", rng) + ) + + env = TrafficEnv( + city_id=scenario_spec.city_id, + scenario_name=scenario_spec.scenario_name, + city_dir=scenario_spec.city_dir, + scenario_dir=scenario_spec.scenario_dir, + config_path=scenario_spec.config_path, + roadnet_path=scenario_spec.roadnet_path, + district_map_path=scenario_spec.district_map_path, + metadata_path=scenario_spec.metadata_path, + env_config=EnvConfig( + decision_interval=args.decision_interval, + min_green_time=args.min_green_time, + thread_num=args.thread_num, + observation=ObservationConfig(), + reward=RewardConfig(), + ), + ) + + observation_batch = env.reset() + print( + json.dumps( + { + "city_id": env.city_id, + "scenario_name": env.scenario_name, + "num_controlled_intersections": len(observation_batch["intersection_ids"]), + "observation_shape": list(observation_batch["observations"].shape), + "lane_mask_shape": list(observation_batch["lane_mask"].shape), + "observation_dim": env.observation_dim, + }, + indent=2, + ) + ) + + for decision_step in range(args.decision_steps): + random_actions = np.asarray( + [rng.randint(0, 1) for _ in observation_batch["intersection_ids"]], + dtype=np.int64, + ) + observation_batch, rewards, done, info = env.step(random_actions) + reward_summary = { + "decision_step": decision_step + 1, + "reward_mean": float(rewards.mean()), + "reward_min": float(rewards.min()), + "reward_max": float(rewards.max()), + "mean_waiting_vehicles": info["metrics"]["mean_waiting_vehicles"], + "throughput": info["metrics"]["throughput"], + "sim_time": info["sim_time"], + } + print(json.dumps(reward_summary)) + if done: + break + + +if __name__ == "__main__": + main() diff --git a/third_party/CityFlow/.gitignore b/third_party/CityFlow/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..96e058e5170630def5565b17b4d71a9ee7456b40 --- /dev/null +++ b/third_party/CityFlow/.gitignore @@ -0,0 +1,14 @@ +data/ +build/ +build-docker/ +local/ +.vs/ +.vscode/ +.idea/ +.DS_Store +__pycache__ +CMakeSettings.json +cmake-build-* +CityFlow.egg-info +frontend/replay/* +results/replays \ No newline at end of file diff --git a/third_party/CityFlow/.gitmodules b/third_party/CityFlow/.gitmodules new file mode 100644 index 0000000000000000000000000000000000000000..1d9c6039b0ef05d1328b7cee5e075fb0a7f3a4a0 --- /dev/null +++ b/third_party/CityFlow/.gitmodules @@ -0,0 +1,6 @@ +[submodule "extern/rapidjson"] + path = extern/rapidjson + url = https://github.com/cityflow-project/rapidjson.git +[submodule "extern/pybind11"] + path = extern/pybind11 + url = https://github.com/cityflow-project/pybind11.git diff --git a/third_party/CityFlow/CMakeLists.txt b/third_party/CityFlow/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..86be1fdb12617ddd04520a87ccf71fe2321dcb44 --- /dev/null +++ b/third_party/CityFlow/CMakeLists.txt @@ -0,0 +1,76 @@ +cmake_minimum_required(VERSION 3.5) +project(cityflow) + +set(CMAKE_CXX_STANDARD "11" CACHE STRING "") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -DRAPIDJSON_HAS_STDSTRING=1") +set(CMAKE_CXX_FLAGS_RELEASE "-O2") +set(CMAKE_CXX_FLAGS_DEBUG "-g") +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +if(POLICY CMP0063) + cmake_policy(SET CMP0063 NEW) +endif() + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif(NOT CMAKE_BUILD_TYPE) + +include_directories(extern/milo) + +set(REQUIRED_SUBMODULES + "extern/pybind11/CMakeLists.txt" + "extern/rapidjson/include" +) + +foreach(REQUIRED_SUBMODULE ${REQUIRED_SUBMODULES}) + if(NOT EXISTS "${PROJECT_SOURCE_DIR}/${REQUIRED_SUBMODULE}") + # update submodule + # https://cliutils.gitlab.io/modern-cmake/chapters/projects/submodule.html + find_package(Git QUIET) + if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") + # Update submodules as needed + option(GIT_SUBMODULE "Check submodules during build" ON) + if(GIT_SUBMODULE) + message(STATUS "Submodule update, this may take some time...") + execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + RESULT_VARIABLE GIT_SUBMOD_RESULT) + if(NOT GIT_SUBMOD_RESULT EQUAL "0") + message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules") + endif() + endif() + endif() + break() + else() + message(STATUS "Found Submodule: ${REQUIRED_SUBMODULE}") + endif() +endforeach() + +foreach(REQUIRED_SUBMODULE ${REQUIRED_SUBMODULES}) + if(NOT EXISTS "${PROJECT_SOURCE_DIR}/${REQUIRED_SUBMODULE}") + message(FATAL_ERROR "The submodule ${REQUIRED_SUBMODULE} was not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.") + endif() +endforeach() + +add_subdirectory(extern/pybind11) +include_directories(extern/rapidjson/include) + +add_subdirectory(src) + +# Tests +find_package(GTest) +if(GTEST_FOUND) + enable_testing() + add_subdirectory(tests) +endif() + +if (${CMAKE_BUILD_TYPE} STREQUAL Debug) + add_subdirectory(tools/debug) +endif() + +pybind11_add_module(${PROJECT_NAME} MODULE src/cityflow.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_LIB_NAME}) +if(VERSION) + target_compile_definitions(${PROJECT_NAME} PRIVATE -DVERSION=${VERSION}) +endif() + diff --git a/third_party/CityFlow/Dockerfile b/third_party/CityFlow/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..aeb37d7862e38a2c7b75d285704d88ed49f40d58 --- /dev/null +++ b/third_party/CityFlow/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:16.04 + +# c++ dependencies +RUN apt update && \ + apt-get install -y build-essential cmake wget git + +# install Miniconda Python 3.6 +ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 +ENV PATH /opt/conda/bin:$PATH + +RUN wget -P /tmp/ https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh && \ + /bin/bash /tmp/Miniconda3-4.5.4-Linux-x86_64.sh -b -p /opt/conda && \ + rm /tmp/Miniconda3-4.5.4-Linux-x86_64.sh && \ + ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ + echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc + +# install cityflow +COPY . /home/cityflow +RUN pip install flask && \ + cd /home/cityflow && \ + pip install . \ No newline at end of file diff --git a/third_party/CityFlow/LICENSE.txt b/third_party/CityFlow/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..f49a4e16e68b128803cc2dcea614603632b04eac --- /dev/null +++ b/third_party/CityFlow/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/third_party/CityFlow/README.rst b/third_party/CityFlow/README.rst new file mode 100644 index 0000000000000000000000000000000000000000..aa79d95e0dca65395caeb3881843248b7944f1d4 --- /dev/null +++ b/third_party/CityFlow/README.rst @@ -0,0 +1,51 @@ +CityFlow +============ + +.. image:: https://readthedocs.org/projects/cityflow/badge/?version=latest + :target: https://cityflow.readthedocs.io/en/latest/?badge=latest + :alt: Documentation Status + +.. image:: https://dev.azure.com/CityFlow/CityFlow/_apis/build/status/cityflow-project.CityFlow?branchName=master + :target: https://dev.azure.com/CityFlow/CityFlow/_build/latest?definitionId=2&branchName=master + :alt: Build Status + +CityFlow is a multi-agent reinforcement learning environment for large-scale city traffic scenario. + +Checkout these features! + +- A microscopic traffic simulator which simulates the behavior of each vehicle, providing highest level detail of traffic evolution. +- Supports flexible definitions for road network and traffic flow +- Provides friendly python interface for reinforcement learning +- **Fast!** Elaborately designed data structure and simulation algorithm with multithreading. Capable of simulating city-wide traffic. See the performance comparison with SUMO [#sumo]_. + +.. figure:: https://user-images.githubusercontent.com/44251346/54403537-5ce16b00-470b-11e9-928d-76c8ba0ab463.png + :align: center + :alt: performance compared with SUMO + + Performance comparison between CityFlow with different number of threads (1, 2, 4, 8) and SUMO. From small 1x1 grid roadnet to city-level 30x30 roadnet. Even faster when you need to interact with the simulator through python API. + +Screencast +---------- + +.. figure:: https://user-images.githubusercontent.com/44251346/62375390-c9e98600-b570-11e9-8808-e13dbe776f1e.gif + :align: center + :alt: demo + +Featured Research and Projects Using CityFlow +--------------------------------------------- +- `PressLight: Learning Max Pressure Control to Coordinate Traffic Signals in Arterial Network (KDD 2019) `_ +- `CoLight: Learning Network-level Cooperation for Traffic Signal Control `_ +- `Traffic Signal Control Benchmark `_ +- `TSCC2050: A Traffic Signal Control Game by Tianrang Intelligence (in Chinese) `_ [#tianrang]_ + +Links +----- + +- `WWW 2019 Demo Paper `_ +- `Home Page `_ +- `Documentation and Quick Start `_ +- `Docker `_ + + +.. [#sumo] `SUMO home page `_ +.. [#tianrang] `Tianrang Intelligence home page `_ diff --git a/third_party/CityFlow/docs/Makefile b/third_party/CityFlow/docs/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..10323d6fe8a6947a570d610e5566239a3ac86c40 --- /dev/null +++ b/third_party/CityFlow/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SPHINXPROJ = CityFlow +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/third_party/CityFlow/docs/make.bat b/third_party/CityFlow/docs/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..af03486a12ba16ef723c5287aed543bb20f8b6f7 --- /dev/null +++ b/third_party/CityFlow/docs/make.bat @@ -0,0 +1,36 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build +set SPHINXPROJ=CityFlow + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/third_party/CityFlow/docs/source/conf.py b/third_party/CityFlow/docs/source/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..74894ffc2020b78ac5ade852b7fddace1bb88d4d --- /dev/null +++ b/third_party/CityFlow/docs/source/conf.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +# +# Configuration file for the Sphinx documentation builder. +# +# This file does only contain a selection of the most common options. For a +# full list see the documentation: +# http://www.sphinx-doc.org/en/master/config + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'CityFlow' +copyright = '2019, CityFlow' +author = 'Huichu Zhang' + +# The short X.Y version +version = '' +# The full version, including alpha/beta/rc tags +release = '0.1' + + +# -- General configuration --------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path . +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# The default sidebars (for documents that don't match any pattern) are +# defined by theme itself. Builtin themes are using these templates by +# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', +# 'searchbox.html']``. +# +# html_sidebars = {} + + +# -- Options for HTMLHelp output --------------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = 'CityFlowdoc' + + +# -- Options for LaTeX output ------------------------------------------------ + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'CityFlow.tex', 'CityFlow Documentation', + 'Huichu Zhang', 'manual'), +] + + +# -- Options for manual page output ------------------------------------------ + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'cityflow', 'CityFlow Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ---------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'CityFlow', 'CityFlow Documentation', + author, 'CityFlow', 'One line description of project.', + 'Miscellaneous'), +] \ No newline at end of file diff --git a/third_party/CityFlow/docs/source/flow.rst b/third_party/CityFlow/docs/source/flow.rst new file mode 100644 index 0000000000000000000000000000000000000000..cf3f38daec0de0580eca742124d272e707db4654 --- /dev/null +++ b/third_party/CityFlow/docs/source/flow.rst @@ -0,0 +1,23 @@ +.. _flow: + +Flow File Format +=================== + +Flow file defines the traffic flow. Each flow contains following field: + +- ``vehicle``: defines the parameter of vehicle. + - length: length of the vehicle + - width: width of the vehicle + - maxPosAcc: maximum acceleration (in m/s) + - maxNegAcc: maximum deceleration (in m/s) + - usualPosAcc: usual acceleration (in m/s) + - usualNegAcc: usual deceleration (in m/s) + - minGap: minimum acceptable gap with leading vehicle (in meter) + - maxSpeed: maximum cruising speed (in m/s) + - headwayTime: desired headway time (in seconds) with leading vehicle, keep *current speed \* headwayTime* gap. +- ``route``: defines the route, all vehicles of this flow will follow the route. Specify the source and the destination, optionally some anchor points and the router will connect them with shortest paths automatically. +- ``interval``: defines the interval of consecutive vehicles (in seconds). If the interval is too small, vehicles may not be able to enter the road due to blockage, it will be held and let go once there are enough space. +- ``startTime``, ``endTime``: Flow will generate vehicles between time [startTime, endTime] (in seconds), including ``startTime`` and ``endTime``. + +.. note:: + Runnable sample flow files can be found in ``examples`` folder. diff --git a/third_party/CityFlow/docs/source/index.rst b/third_party/CityFlow/docs/source/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..5835eac91dae7133839bb9f78abba39738df3455 --- /dev/null +++ b/third_party/CityFlow/docs/source/index.rst @@ -0,0 +1,18 @@ +.. CityFlow documentation master file, created by + sphinx-quickstart on Wed Mar 13 21:59:27 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to CityFlow's documentation! +==================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + introduction + install + start + roadnet + flow + replay diff --git a/third_party/CityFlow/docs/source/install.rst b/third_party/CityFlow/docs/source/install.rst new file mode 100644 index 0000000000000000000000000000000000000000..137f42b5272716f07a89868199ae50c49ed4c395 --- /dev/null +++ b/third_party/CityFlow/docs/source/install.rst @@ -0,0 +1,66 @@ +.. _install: + +Installation Guide +================== + +Docker +------ + +The easiest way to use CityFlow is via docker. + +.. code-block:: shell + + docker pull cityflowproject/cityflow:latest + +This will create docker image ``cityflow:latest``. + +.. code-block:: shell + + docker run -it cityflowproject/cityflow:latest + +Create and start a container, CityFlow is out-of-the-box along with miniconda with python3.6. + +.. code-block:: python + + import cityflow + eng = cityflow.Engine + +Build From Source +----------------- + +If you want to get nightly version of CityFlow or running on native system, you can build CityFlow from source. Currently, we only support building on Unix systems. This guide is based on Ubuntu 16.04. + +CityFlow has little dependencies, so building from source is not scary. + +1. Check that you have python 3 installed. Other version of python might work, however, we only tested on python with version >= 3.5. + + +2. Install cpp dependencies + +.. code-block:: shell + + sudo apt update && sudo apt install -y build-essential cmake + +3. Clone CityFlow project from github. + +.. code-block:: shell + + git clone https://github.com/cityflow-project/CityFlow.git + +4. Go to CityFlow project's root directory and run + +.. code-block:: shell + + pip install . + +5. Wait for installation to complete and CityFlow should be successfully installed. + +.. code-block:: python + + import cityflow + eng = cityflow.Engine + +For Windows Users +------------------ + +For Windows users, it is recommended to run CityFlow under Windows Subsystem for Linux (WSL) or use docker. diff --git a/third_party/CityFlow/docs/source/introduction.rst b/third_party/CityFlow/docs/source/introduction.rst new file mode 100644 index 0000000000000000000000000000000000000000..60f3e39d80a286086e5036cd079d7ae8fd09339a --- /dev/null +++ b/third_party/CityFlow/docs/source/introduction.rst @@ -0,0 +1,21 @@ +Introduction +============ + +CityFlow is a multi-agent reinforcement learning environment for large scale city traffic scenario. + +Checkout these features! + +- a microscopic traffic simulator which simulates the behavior of each vehicle, providing highest level detail of traffic evolution. +- support flexible definitions for road network and traffic flow +- provides friendly python interface for reinforcement learning +- **Fast!** Elaborately designed data structure and simulation algorithm with multithreading. Capable of simulating city-wide traffic. See the performance comparison with SUMO [#sumo]_. + +.. figure:: https://github.com/cityflow-project/data/raw/master/docs/images/performance.png + :align: center + + Performance comparison between CityFlow with different number of threads (1, 2, 4, 8) and SUMO. From small 1x1 grid roadnet to city-level 30x30 roadnet. Even faster when you need to interact with the simulator through python API. + +See :ref:`start` to get started. + +.. [#paper] `WWW 2019 Demo Paper `_ +.. [#sumo] `SUMO home page `_ \ No newline at end of file diff --git a/third_party/CityFlow/docs/source/replay.rst b/third_party/CityFlow/docs/source/replay.rst new file mode 100644 index 0000000000000000000000000000000000000000..e6635ea9559a8a5ab6af667f93f2bcf627b3b873 --- /dev/null +++ b/third_party/CityFlow/docs/source/replay.rst @@ -0,0 +1,69 @@ +.. _replay: + +Replay +====== + +Start +------ + +1. enter the ``frontend`` folder and open ``index.html`` in your browser. + +2. choose the roadnet log file (as defined by ``roadnetLogFile`` field in the config file, **not 'roadnetFile'**) and wait for it to be loaded. When it has finished loading, there will be a message shown in the info box. + +3. choose the replay file (as defined by ``replayLogFile`` field in the config file) . + +4. choose the chart data file (optional, see section *Chart* below). + +5. press ``Start`` button to start the replay. + +Control +------- + +- Use the mouse to navigate. Dragging and mouse wheel zooming are supported. + +- Move the slider in Control Box to adjust the replay speed. You can also press ``1`` on keyboard to slow down or ``2`` to speed up. + +- Press ``Pause`` button in Control Box to pause/resume. You can also double-click on the map to pause and resume. + +- Press ``[`` or ``]`` on keyboard to take a step backward or forward. + +- To restart the replay, just press ``Start`` button again. + +- The ``debug`` option enables displaying the ID of vehicles, roads and intersections during a mouse hover. **This will cause a slower replaying**, so we suggest using it only for debugging purposes. + +Chart +------ + +The player supports showing the change of different metrics in a chart simultaneously with the replay process. + +To provide required data, a log file in a format as shown below is needed: + +.. code-block:: + + title + 0.3 0.4 0.1 ...(step1) + 0.5 0.2 0.2 ...(step2) + ...(metric1) ...(metric2) ...(metric3) + +The first line is the title of the chart. + +Each row stands for a time step and each column stands for a specific metric. +For example, to track vehicle numbers of three crossroads respectively, we need three columns and each column stands for the vehicle number of a certain crossroads. + +In one row, numbers are separated by one or more spaces or tabs. + +The numbers in one column will be shown as points connected by one line in the chart. + +.. note:: + Make sure that each row is corresponding with the right time step. + +Notes +------ + +- To get the example replay files, run ``download_replay.py`` under ``frontend`` folder. + +- If you create a new Engine object with same ``replayLogFile``, it will clear the old replay file first + +- Using ``eng.reset()`` won't clear old replays, it will append newly generated replay to the end of ``replayLogFile`` + +- You can change ``replayLogFile`` during runtime using ``set_replay_file``, see :ref:`set-replay-file` diff --git a/third_party/CityFlow/docs/source/roadnet.rst b/third_party/CityFlow/docs/source/roadnet.rst new file mode 100644 index 0000000000000000000000000000000000000000..caa88d301c0f645b4214dc6785a0d8c1b4e87128 --- /dev/null +++ b/third_party/CityFlow/docs/source/roadnet.rst @@ -0,0 +1,129 @@ +.. _roadnet: + +Roadnet File Format +=================== + +Roadnet file defines the roadnet structure. CityFlow's roadnet mainly consists of intersections and roads (see them as nodes and edges of a graph). + +- *Road* represents a directional road from one *intersection* to another *intersection* with road-specific properties. A *road* may contain multiple *lanes*. +- *Intersection* is where roads intersects. An *intersection* contains several *roadlinks*. Each *roadlink* connects two roads of the intersection and can be controlled by traffic signals. +- A *roadlink* may contain several *lanelinks*. Each lanelink represents a specific path from one lane of incoming road to one lane of outgoing road. + +Now let's see a sample roadnet file and we'll explain the meaning of each components. Relax, the definition of field is quite straight forward, if you are familiar with modern road networks. For the following json file, ``[]`` means this field is an array, but we will only show one object for demonstration. + +.. note:: + Runnable sample roadnet files can be found in ``examples`` folder. + +Sample ``roadnet.json`` with explanation. + +.. code-block:: js + + { + "intersections": [ + { + // id of the intersection + "id": "intersection_1_0", + // coordinate of center of intersection + "point": { + "x": 0, + "y": 0 + }, + // width of the intersection + "width": 10, + // roads connected to the intersection + "roads": [ + "road_1", + "road_2" + ], + // roadLinks of the intersection + "roadLinks": [ + { + // 'turn_left', 'turn_right', 'go_straight' + "type": "go_straight", + // id of starting road + "startRoad": "road_1", + // id of ending road + "endRoad": "road_2", + // lanelinks of roadlink + "laneLinks": [ + { + // from startRoad's startLaneIndex lane to endRoad's endLaneIndex lane + "startLaneIndex": 0, + "endLaneIndex": 1, + // points along the laneLink which describe the shape of laneLink + "points": [ + { + "x": -10, + "y": 2 + }, + { + "x": 10, + "y": -2 + } + ] + } + ] + } + ], + // traffic light plan of the intersection + "trafficLight": { + "lightphases": [ + { + // default duration of the phase + "time": 30, + // available roadLinks of current phase, index is the no. of roadlinks defined above. + "availableRoadLinks": [ + 0, + 2 + ] + } + ] + }, + // true if it's a peripheral intersection (if it only connects to one road) + "virtual": false + } + ], + "roads": [ + { + // id of road + "id": "road_1", + // id of start intersection + "startIntersection": "intersection_1", + // id of end intersection + "endIntersection": "intersection_2", + // points along the road which describe the shape of the road + "points": [ + { + "x": -200, + "y": 0 + }, + { + "x": 0, + "y": 0 + } + ], + // property of each lane + "lanes": [ + { + "width": 4, + "maxSpeed": 16.67 + } + ] + } + ] + } + + +.. figure:: https://github.com/cityflow-project/data/raw/master/docs/images/roadnet.jpg + :align: center + + Illustration of a 1x2 grid roadnet. + + +You can convert SUMO roadnet files into CityFlow format using tools/Converter/converter.py + +For example, the following code converts a sumo roadnet file, atlanta.net.xml, to CityFlow format. + +.. code-block:: shell + + python converter.py --sumonet atlanta_sumo.net.xml --cityflownet atlanta_cityflow.json diff --git a/third_party/CityFlow/docs/source/start.rst b/third_party/CityFlow/docs/source/start.rst new file mode 100644 index 0000000000000000000000000000000000000000..0feba4161025ffd646216e8307847bfb16ecc217 --- /dev/null +++ b/third_party/CityFlow/docs/source/start.rst @@ -0,0 +1,229 @@ +.. _start: + +Quick Start +=========== + +Installation +------------ + +If you have not installed CityFlow yet, :ref:`install` is a simple guide for installation. + + +Create Engine +------------- + +.. code-block:: python + + import cityflow + eng = cityflow.Engine(config_path, thread_num=1) + + +- ``config_path``: path for config file. +- ``thread_num``: number of threads. + +Arguments In Config File +^^^^^^^^^^^^^^^^^^^^^^^^ +- ``interval``: time of each simulation step (in seconds). An ``interval`` of 0.5 means for each simulation step, the system will move 0.5 seconds forward. For example, if a car is at location 0 with speed 10m/s, after one simulation step, it will move to location 10*0.5=5. +- ``seed``: random seed. +- ``dir``: root directory, all file path will be relative to this directory. +- ``roadnetFile``: path for roadnet file. +- ``flowFile``: path for flow file. +- ``rlTrafficLight``: whether to enable traffic light control through python API. If set to ``false``, default traffic light plan defined in ``roadnetFile`` will be used. +- ``saveReplay``: whether to save simulation for replay. If set to ``true``, ``roadnetLogFile`` and ``replayLogFile`` are required. +- ``roadnetLogFile``: path for roadnet replay file. This is a special roadnet file for replay, not the same as ``roadnetFile``. +- ``replayLogFile``: path for replay. This file contains vehicle positions and traffic light situation of each simulation step. +- ``laneChange``: whether to enable lane changing. The default value is 'false'. + +For format of ``roadnetFile`` and ``flowFile``, please see :ref:`roadnet`, :ref:`flow` + +.. note:: + Runnable sample roadnet and flow files can be found in ``examples`` folder. + +You can generate grid roadnet and flow files using `tools/generate_grid_scenario.py` + +For example, you can generate a 2x3 roadnet with predefined traffic light plan and a corresponding flow file with + +.. code-block:: shell + + python generate_grid_scenario.py 2 3 --roadnetFile roadnet.json --flowFile flow.json --dir . --tlPlan + +Sample Config File +^^^^^^^^^^^^^^^^^^^ + +.. note:: + Runnable sample config files can be found in ``examples`` folder. + +.. code-block:: json + + { + "interval": 1.0, + "seed": 0, + "dir": "data/", + "roadnetFile": "roadnet/testcase_roadnet_3x3.json", + "flowFile": "flow/testcase_flow_3x3.json", + "rlTrafficLight": false, + "saveReplay": true, + "roadnetLogFile": "frontend/web/testcase_roadnet_3x3.json", + "replayLogFile": "frontend/web/testcase_replay_3x3.txt" + } + +Simulation +---------- + +To simulate one step, simply call ``eng.next_step()`` + +.. code-block:: python + + eng.next_step() + +Data Access API +--------------- + +``get_vehicle_count()``: + +- Get number of total running vehicles. +- Return an ``int`` + +``get_vehicles(include_waiting=False)``: + +- Get all vehicle ids +- Include vehicles in lane's waiting buffer if ``include_waiting=True`` +- Return an ``list`` of vehicle ids + +``get_lane_vehicle_count()``: + +- Get number of running vehicles on each lane. +- Return a ``dict`` with lane id as key and corresponding number as value. + +``get_lane_waiting_vehicle_count()``: + +- Get number of waiting vehicles on each lane. Currently, vehicles with speed less than 0.1m/s is considered as waiting. +- Return a ``dict`` with lane id as key and corresponding number as value. + +``get_lane_vehicles()``: + +- Get vehicle ids on each lane. +- Return a ``dict`` with lane id as key and list of vehicle id as value. + +``get_vehicle_info(vehicle_id)``: + +- Return a ``dict`` which contains information of the given vehicle. +- The items include: + + + ``running``: whether the vehicle is running. + + If the vehicle is running: + + * ``speed``: The speed of the vehicle. + * ``distance``: The distance the vehicle has travelled on the current lane or lanelink. + * ``drivable``: The id of the current drivable(lane or lanelink) + * ``road``: The id of the current road if the vehicle is running on a lane. + * ``intersection``: The next intersection if the vehicle is running on a lane. + * ``route``: A string contains ids of following roads in the vehicle's route which are separated by ``' '``. + +- Note that all items are stored as ``str``. + +``get_vehicle_speed()``: + +- Get speed of each vehicle +- Return a ``dict`` with vehicle id as key and corresponding speed as value. + +``get_vehicle_distance()``: + +- Get distance travelled on current lane of each vehicle. +- Return a ``dict`` with vehicle id as key and corresponding distance as value. + +``get_leader(vehicle_id)`` + +- Return the id of the vehicle in front of ``vehicle_id``. +- Return an empty string ``""`` when ``vehicle_id`` does not have a leader + +``get_current_time()``: + +- Get simulation time (in seconds) +- Return a ``double`` + +``get_average_travel_time()``: + +- Get average travel time (in seconds) +- Return a ``double`` + +Control API +----------- + +``set_tl_phase(intersection_id, phase_id)``: + +- Set the phase of traffic light of ``intersection_id`` to ``phase_id``. Only works when ``rlTrafficLight`` is set to ``true``. +- The ``intersection_id`` should be defined in ``roadnetFile`` +- ``phase_id`` is the index of phase in array ``"lightphases"``, defined in ``roadnetFile``. + +``set_vehicle_speed(vehicle_id, speed)``: + +- Set the speed of ``vehicle_id`` to ``speed``. +- The vehicles have to obey fundamental rules to avoid collisions so the real speed might be different from ``speed``. + +``reset(seed=False)``: + +- Reset the simulation (clear all vehicles and set simulation time back to zero) +- Reset random seed if ``seed`` is set to ``True`` +- This does not clear old replays, instead, it appends new replays to ``replayLogFile``. + +``snapshot()``: + +- Take a snapshot of current simulation state +- This will generate an ``Archive`` object which can be loaded later +- You can save an ``Archive`` object to a file using its ``dump`` method. + +``load(archive)``: + +- Load an ``Archive`` object and restore simulation state + +``load_from_file(path)`` + +- Load a snapshot file created by ``dump`` method and restore simulation state. +- The whole process of saving and loading file is like: + + .. code-block:: python + + archive = eng.snapshot() # create an archive object + archive.dump("save.json") # if you want to save the snapshot to a file + + # do something + + eng.load(archive) + # load 'archive' and the simulation will start from the status when 'archive'is created + + # or if you want to load from 'save.json' + eng.load_from_file("save.json") + + +``set_random_seed(seed)``: + +- Set seed of random generator to ``seed`` + +.. _set-replay-file: + + +``set_vehicle_route(vehicle_id, route)``: + +- To change the route of a vehicle during its travelling. +- `route` is a list of road ids (doesn't include the current road) +- Return true if the route is available and can be connected. + + + +Other API +--------- + +``set_replay_file(replay_file)``: + +- ``replay_file`` should be a path related to ``dir`` in config file +- Set ``replayLogFile`` to ``replay_file``, newly generated replays will be output into ``replay_file`` +- This is useful when you want to look at a specific episode for debugging purposes +- This API works only when ``saveReplay`` is ``true`` in config json + +``set_save_replay(open)``: + +- Open or close replay saving +- Set ``open`` to False to stop replay saving +- Set ``open`` to True to start replay saving +- This API works only when ``saveReplay`` is ``true`` in config json \ No newline at end of file diff --git a/third_party/CityFlow/examples/config.json b/third_party/CityFlow/examples/config.json new file mode 100644 index 0000000000000000000000000000000000000000..3422b60994b05be2b75628b7cc7945800cc39e96 --- /dev/null +++ b/third_party/CityFlow/examples/config.json @@ -0,0 +1,12 @@ +{ + "interval": 1.0, + "seed": 0, + "dir": "CityFlow/examples/", + "roadnetFile": "roadnet.json", + "flowFile": "flow.json", + "rlTrafficLight": false, + "laneChange": false, + "saveReplay": true, + "roadnetLogFile": "replay_roadnet.json", + "replayLogFile": "replay.txt" +} \ No newline at end of file diff --git a/third_party/CityFlow/examples/flow.json b/third_party/CityFlow/examples/flow.json new file mode 100644 index 0000000000000000000000000000000000000000..73834e4c1c8db3bf6ccb8b300a01798bbaa0a511 --- /dev/null +++ b/third_party/CityFlow/examples/flow.json @@ -0,0 +1,242 @@ +[ + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_0_1_0", + "road_1_1_0" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_2_1_2", + "road_1_1_2" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_1_0_1", + "road_1_1_1" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_1_2_3", + "road_1_1_3" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_1_0_1", + "road_1_1_0" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_0_1_0", + "road_1_1_1" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_2_1_2", + "road_1_1_3" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_1_2_3", + "road_1_1_2" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_0_1_0", + "road_1_1_3" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_1_2_3", + "road_1_1_0" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_2_1_2", + "road_1_1_1" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + }, + { + "vehicle": { + "length": 5.0, + "width": 2.0, + "maxPosAcc": 2.0, + "maxNegAcc": 4.5, + "usualPosAcc": 2.0, + "usualNegAcc": 4.5, + "minGap": 2.5, + "maxSpeed": 16.67, + "headwayTime": 1.5 + }, + "route": [ + "road_1_0_1", + "road_1_1_2" + ], + "interval": 5.0, + "startTime": 0, + "endTime": -1 + } +] \ No newline at end of file diff --git a/third_party/CityFlow/examples/replay.txt b/third_party/CityFlow/examples/replay.txt new file mode 100644 index 0000000000000000000000000000000000000000..675142121322843fe0a01ba3afc0119fd5ec31e2 --- /dev/null +++ b/third_party/CityFlow/examples/replay.txt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a56a3c1a4441558d9698c7b9c725e7d361796fe3731cf4d1dfd60709220916f8 +size 11824603 diff --git a/third_party/CityFlow/examples/replay_roadnet.json b/third_party/CityFlow/examples/replay_roadnet.json new file mode 100644 index 0000000000000000000000000000000000000000..7abf370588580982d9cdc93c719e5b491907dc4d --- /dev/null +++ b/third_party/CityFlow/examples/replay_roadnet.json @@ -0,0 +1 @@ +{"static":{"nodes":[{"id":"intersection_1_0","point":[0.0,-300.0],"virtual":true,"outline":[0.0,-300.0,28.0,-300.0,28.0,-295.0,-28.0,-295.0,-28.0,-300.0]},{"id":"intersection_0_1","point":[-300.0,0.0],"virtual":true,"outline":[-300.0,-28.0,-295.0,-28.0,-295.0,28.0,-300.0,28.0,-300.0,0.0]},{"id":"intersection_1_1","point":[0.0,0.0],"virtual":false,"width":30.0,"outline":[0.0,-44.0,28.0,-44.0,44.0,-28.0,44.0,28.0,28.0,44.0,-28.0,44.0,-44.0,28.0,-44.0,-28.0,-28.0,-44.0]},{"id":"intersection_2_1","point":[300.0,0.0],"virtual":true,"outline":[300.0,-28.0,300.0,28.0,295.0,28.0,295.0,-28.0]},{"id":"intersection_1_2","point":[0.0,300.0],"virtual":true,"outline":[0.0,295.0,28.0,300.0,-28.0,300.0,-28.0,295.0]}],"edges":[{"id":"road_1_0_1","from":"intersection_1_0","to":"intersection_1_1","points":[[0.0,-300.0],[0.0,0.0]],"nLane":7,"laneWidths":[4.0,4.0,4.0,4.0,4.0,4.0,4.0]},{"id":"road_0_1_0","from":"intersection_0_1","to":"intersection_1_1","points":[[-300.0,0.0],[0.0,0.0]],"nLane":7,"laneWidths":[4.0,4.0,4.0,4.0,4.0,4.0,4.0]},{"id":"road_1_1_0","from":"intersection_1_1","to":"intersection_2_1","points":[[0.0,0.0],[300.0,0.0]],"nLane":7,"laneWidths":[4.0,4.0,4.0,4.0,4.0,4.0,4.0]},{"id":"road_1_1_1","from":"intersection_1_1","to":"intersection_1_2","points":[[0.0,0.0],[0.0,300.0]],"nLane":7,"laneWidths":[4.0,4.0,4.0,4.0,4.0,4.0,4.0]},{"id":"road_1_1_2","from":"intersection_1_1","to":"intersection_0_1","points":[[0.0,0.0],[-300.0,0.0]],"nLane":7,"laneWidths":[4.0,4.0,4.0,4.0,4.0,4.0,4.0]},{"id":"road_1_1_3","from":"intersection_1_1","to":"intersection_1_0","points":[[0.0,0.0],[0.0,-300.0]],"nLane":7,"laneWidths":[4.0,4.0,4.0,4.0,4.0,4.0,4.0]},{"id":"road_2_1_2","from":"intersection_2_1","to":"intersection_1_1","points":[[300.0,0.0],[0.0,0.0]],"nLane":7,"laneWidths":[4.0,4.0,4.0,4.0,4.0,4.0,4.0]},{"id":"road_1_2_3","from":"intersection_1_2","to":"intersection_1_1","points":[[0.0,300.0],[0.0,0.0]],"nLane":7,"laneWidths":[4.0,4.0,4.0,4.0,4.0,4.0,4.0]}]}} \ No newline at end of file diff --git a/third_party/CityFlow/examples/roadnet.json b/third_party/CityFlow/examples/roadnet.json new file mode 100644 index 0000000000000000000000000000000000000000..db319e3afc4238373fef1bc7bee7cf46b0777c42 --- /dev/null +++ b/third_party/CityFlow/examples/roadnet.json @@ -0,0 +1 @@ +{"intersections":[{"id":"intersection_1_0","point":{"x":0,"y":-300},"width":0,"roads":["road_1_1_3","road_1_0_1"],"roadLinks":[],"trafficLight":{"roadLinkIndices":[],"lightphases":[{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]}]},"virtual":true},{"id":"intersection_0_1","point":{"x":-300,"y":0},"width":0,"roads":["road_1_1_2","road_0_1_0"],"roadLinks":[],"trafficLight":{"roadLinkIndices":[],"lightphases":[{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]}]},"virtual":true},{"id":"intersection_1_1","point":{"x":0,"y":0},"width":30,"roads":["road_0_1_0","road_1_0_1","road_2_1_2","road_1_2_3","road_1_1_0","road_1_1_1","road_1_1_2","road_1_1_3"],"roadLinks":[{"type":"go_straight","startRoad":"road_0_1_0","endRoad":"road_1_1_0","direction":0,"laneLinks":[{"startLaneIndex":2,"endLaneIndex":0,"points":[{"x":-30,"y":-10},{"x":-26.16,"y":-9.775999999999998},{"x":-20.88,"y":-9.168000000000001},{"x":-14.52,"y":-8.272},{"x":-7.439999999999998,"y":-7.183999999999999},{"x":0,"y":-6},{"x":7.440000000000009,"y":-4.815999999999999},{"x":14.519999999999992,"y":-3.7280000000000006},{"x":20.880000000000006,"y":-2.831999999999999},{"x":26.16,"y":-2.224},{"x":30,"y":-2}]},{"startLaneIndex":2,"endLaneIndex":1,"points":[{"x":-30,"y":-10},{"x":-26.16,"y":-9.887999999999998},{"x":-20.88,"y":-9.584000000000001},{"x":-14.52,"y":-9.136},{"x":-7.439999999999998,"y":-8.591999999999999},{"x":0,"y":-8},{"x":7.440000000000009,"y":-7.4079999999999995},{"x":14.519999999999992,"y":-6.864000000000001},{"x":20.880000000000006,"y":-6.416},{"x":26.16,"y":-6.112},{"x":30,"y":-6}]},{"startLaneIndex":2,"endLaneIndex":2,"points":[{"x":-30,"y":-10},{"x":-26.16,"y":-9.999999999999998},{"x":-20.88,"y":-10.000000000000002},{"x":-14.52,"y":-10},{"x":-7.439999999999998,"y":-10},{"x":0,"y":-10},{"x":7.440000000000009,"y":-10},{"x":14.519999999999992,"y":-10},{"x":20.880000000000006,"y":-10},{"x":26.16,"y":-10},{"x":30,"y":-10}]},{"startLaneIndex":2,"endLaneIndex":3,"points":[{"x":-30,"y":-10},{"x":-26.16,"y":-10.111999999999998},{"x":-20.88,"y":-10.416},{"x":-14.52,"y":-10.864},{"x":-7.439999999999998,"y":-11.408},{"x":0,"y":-12},{"x":7.440000000000009,"y":-12.592000000000002},{"x":14.519999999999992,"y":-13.136},{"x":20.880000000000006,"y":-13.584000000000001},{"x":26.16,"y":-13.888000000000002},{"x":30,"y":-14}]},{"startLaneIndex":2,"endLaneIndex":4,"points":[{"x":-30,"y":-10},{"x":-26.16,"y":-10.223999999999998},{"x":-20.88,"y":-10.832},{"x":-14.52,"y":-11.728},{"x":-7.439999999999998,"y":-12.816},{"x":0,"y":-14},{"x":7.440000000000009,"y":-15.184000000000001},{"x":14.519999999999992,"y":-16.272},{"x":20.880000000000006,"y":-17.168000000000003},{"x":26.16,"y":-17.776},{"x":30,"y":-18}]},{"startLaneIndex":2,"endLaneIndex":5,"points":[{"x":-30,"y":-10},{"x":-26.16,"y":-10.335999999999999},{"x":-20.88,"y":-11.248000000000001},{"x":-14.52,"y":-12.592},{"x":-7.439999999999998,"y":-14.224},{"x":0,"y":-16},{"x":7.440000000000009,"y":-17.776000000000003},{"x":14.519999999999992,"y":-19.407999999999998},{"x":20.880000000000006,"y":-20.752000000000002},{"x":26.16,"y":-21.664},{"x":30,"y":-22}]},{"startLaneIndex":2,"endLaneIndex":6,"points":[{"x":-30,"y":-10},{"x":-26.16,"y":-10.447999999999999},{"x":-20.88,"y":-11.664000000000001},{"x":-14.52,"y":-13.456},{"x":-7.439999999999998,"y":-15.632000000000001},{"x":0,"y":-18},{"x":7.440000000000009,"y":-20.368000000000002},{"x":14.519999999999992,"y":-22.543999999999997},{"x":20.880000000000006,"y":-24.336000000000002},{"x":26.16,"y":-25.552},{"x":30,"y":-26}]},{"startLaneIndex":3,"endLaneIndex":0,"points":[{"x":-30,"y":-14},{"x":-26.16,"y":-13.664},{"x":-20.88,"y":-12.752},{"x":-14.52,"y":-11.408000000000001},{"x":-7.439999999999998,"y":-9.776},{"x":0,"y":-8},{"x":7.440000000000009,"y":-6.223999999999998},{"x":14.519999999999992,"y":-4.5920000000000005},{"x":20.880000000000006,"y":-3.2479999999999984},{"x":26.16,"y":-2.3360000000000003},{"x":30,"y":-2}]},{"startLaneIndex":3,"endLaneIndex":1,"points":[{"x":-30,"y":-14},{"x":-26.16,"y":-13.776},{"x":-20.88,"y":-13.168000000000001},{"x":-14.52,"y":-12.272000000000002},{"x":-7.439999999999998,"y":-11.184},{"x":0,"y":-10},{"x":7.440000000000009,"y":-8.815999999999999},{"x":14.519999999999992,"y":-7.728000000000001},{"x":20.880000000000006,"y":-6.831999999999999},{"x":26.16,"y":-6.224},{"x":30,"y":-6}]},{"startLaneIndex":3,"endLaneIndex":2,"points":[{"x":-30,"y":-14},{"x":-26.16,"y":-13.888},{"x":-20.88,"y":-13.584000000000001},{"x":-14.52,"y":-13.136000000000001},{"x":-7.439999999999998,"y":-12.592},{"x":0,"y":-12},{"x":7.440000000000009,"y":-11.408},{"x":14.519999999999992,"y":-10.864},{"x":20.880000000000006,"y":-10.415999999999999},{"x":26.16,"y":-10.111999999999998},{"x":30,"y":-10}]},{"startLaneIndex":3,"endLaneIndex":3,"points":[{"x":-30,"y":-14},{"x":-26.16,"y":-14},{"x":-20.88,"y":-14},{"x":-14.52,"y":-14.000000000000002},{"x":-7.439999999999998,"y":-14},{"x":0,"y":-14},{"x":7.440000000000009,"y":-14},{"x":14.519999999999992,"y":-14},{"x":20.880000000000006,"y":-14},{"x":26.16,"y":-14},{"x":30,"y":-14}]},{"startLaneIndex":3,"endLaneIndex":4,"points":[{"x":-30,"y":-14},{"x":-26.16,"y":-14.112},{"x":-20.88,"y":-14.416},{"x":-14.52,"y":-14.864},{"x":-7.439999999999998,"y":-15.408000000000001},{"x":0,"y":-16},{"x":7.440000000000009,"y":-16.592},{"x":14.519999999999992,"y":-17.136},{"x":20.880000000000006,"y":-17.584000000000003},{"x":26.16,"y":-17.887999999999998},{"x":30,"y":-18}]},{"startLaneIndex":3,"endLaneIndex":5,"points":[{"x":-30,"y":-14},{"x":-26.16,"y":-14.224},{"x":-20.88,"y":-14.832},{"x":-14.52,"y":-15.728000000000002},{"x":-7.439999999999998,"y":-16.816000000000003},{"x":0,"y":-18},{"x":7.440000000000009,"y":-19.184},{"x":14.519999999999992,"y":-20.272},{"x":20.880000000000006,"y":-21.168000000000003},{"x":26.16,"y":-21.776},{"x":30,"y":-22}]},{"startLaneIndex":3,"endLaneIndex":6,"points":[{"x":-30,"y":-14},{"x":-26.16,"y":-14.336},{"x":-20.88,"y":-15.248000000000001},{"x":-14.52,"y":-16.592000000000002},{"x":-7.439999999999998,"y":-18.224000000000004},{"x":0,"y":-20},{"x":7.440000000000009,"y":-21.776},{"x":14.519999999999992,"y":-23.407999999999998},{"x":20.880000000000006,"y":-24.752000000000002},{"x":26.16,"y":-25.663999999999998},{"x":30,"y":-26}]},{"startLaneIndex":4,"endLaneIndex":0,"points":[{"x":-30,"y":-18},{"x":-26.16,"y":-17.552},{"x":-20.88,"y":-16.336},{"x":-14.52,"y":-14.544},{"x":-7.439999999999998,"y":-12.367999999999999},{"x":0,"y":-10},{"x":7.440000000000009,"y":-7.631999999999998},{"x":14.519999999999992,"y":-5.456000000000001},{"x":20.880000000000006,"y":-3.663999999999998},{"x":26.16,"y":-2.4480000000000004},{"x":30,"y":-2}]},{"startLaneIndex":4,"endLaneIndex":1,"points":[{"x":-30,"y":-18},{"x":-26.16,"y":-17.663999999999998},{"x":-20.88,"y":-16.752},{"x":-14.52,"y":-15.408000000000001},{"x":-7.439999999999998,"y":-13.775999999999998},{"x":0,"y":-12},{"x":7.440000000000009,"y":-10.223999999999998},{"x":14.519999999999992,"y":-8.592000000000002},{"x":20.880000000000006,"y":-7.247999999999999},{"x":26.16,"y":-6.336},{"x":30,"y":-6}]},{"startLaneIndex":4,"endLaneIndex":2,"points":[{"x":-30,"y":-18},{"x":-26.16,"y":-17.776},{"x":-20.88,"y":-17.168},{"x":-14.52,"y":-16.272},{"x":-7.439999999999998,"y":-15.184},{"x":0,"y":-14},{"x":7.440000000000009,"y":-12.815999999999999},{"x":14.519999999999992,"y":-11.728000000000002},{"x":20.880000000000006,"y":-10.831999999999999},{"x":26.16,"y":-10.224},{"x":30,"y":-10}]},{"startLaneIndex":4,"endLaneIndex":3,"points":[{"x":-30,"y":-18},{"x":-26.16,"y":-17.887999999999998},{"x":-20.88,"y":-17.584},{"x":-14.52,"y":-17.136},{"x":-7.439999999999998,"y":-16.592},{"x":0,"y":-16},{"x":7.440000000000009,"y":-15.408000000000001},{"x":14.519999999999992,"y":-14.864},{"x":20.880000000000006,"y":-14.416},{"x":26.16,"y":-14.112000000000002},{"x":30,"y":-14}]},{"startLaneIndex":4,"endLaneIndex":4,"points":[{"x":-30,"y":-18},{"x":-26.16,"y":-18},{"x":-20.88,"y":-18},{"x":-14.52,"y":-18},{"x":-7.439999999999998,"y":-18},{"x":0,"y":-18},{"x":7.440000000000009,"y":-18},{"x":14.519999999999992,"y":-18},{"x":20.880000000000006,"y":-18},{"x":26.16,"y":-18},{"x":30,"y":-18}]},{"startLaneIndex":4,"endLaneIndex":5,"points":[{"x":-30,"y":-18},{"x":-26.16,"y":-18.112},{"x":-20.88,"y":-18.416},{"x":-14.52,"y":-18.864},{"x":-7.439999999999998,"y":-19.408},{"x":0,"y":-20},{"x":7.440000000000009,"y":-20.592000000000002},{"x":14.519999999999992,"y":-21.136},{"x":20.880000000000006,"y":-21.584},{"x":26.16,"y":-21.888},{"x":30,"y":-22}]},{"startLaneIndex":4,"endLaneIndex":6,"points":[{"x":-30,"y":-18},{"x":-26.16,"y":-18.224},{"x":-20.88,"y":-18.832},{"x":-14.52,"y":-19.728},{"x":-7.439999999999998,"y":-20.816000000000003},{"x":0,"y":-22},{"x":7.440000000000009,"y":-23.184},{"x":14.519999999999992,"y":-24.272},{"x":20.880000000000006,"y":-25.168},{"x":26.16,"y":-25.776},{"x":30,"y":-26}]}]},{"type":"turn_left","startRoad":"road_0_1_0","endRoad":"road_1_1_1","direction":0,"laneLinks":[{"startLaneIndex":0,"endLaneIndex":0,"points":[{"x":-30,"y":-2},{"x":-26.674,"y":-1.3739999999999999},{"x":-22.832,"y":0.3680000000000003},{"x":-18.678,"y":3.0220000000000007},{"x":-14.415999999999999,"y":6.384000000000002},{"x":-10.25,"y":10.25},{"x":-6.383999999999996,"y":14.416000000000004},{"x":-3.022000000000004,"y":18.677999999999997},{"x":-0.3679999999999981,"y":22.832000000000004},{"x":1.3739999999999994,"y":26.674},{"x":2,"y":30}]},{"startLaneIndex":0,"endLaneIndex":1,"points":[{"x":-30,"y":-2},{"x":-26.562,"y":-1.3739999999999999},{"x":-22.416,"y":0.3680000000000003},{"x":-17.814,"y":3.0220000000000007},{"x":-13.008,"y":6.384000000000002},{"x":-8.25,"y":10.25},{"x":-3.7919999999999954,"y":14.416000000000004},{"x":0.11399999999999633,"y":18.677999999999997},{"x":3.216000000000003,"y":22.832000000000004},{"x":5.262,"y":26.674},{"x":6,"y":30}]},{"startLaneIndex":0,"endLaneIndex":2,"points":[{"x":-30,"y":-2},{"x":-26.45,"y":-1.3739999999999999},{"x":-22,"y":0.3680000000000003},{"x":-16.95,"y":3.0220000000000007},{"x":-11.599999999999998,"y":6.384000000000002},{"x":-6.25,"y":10.25},{"x":-1.1999999999999948,"y":14.416000000000004},{"x":3.2499999999999956,"y":18.677999999999997},{"x":6.8000000000000025,"y":22.832000000000004},{"x":9.149999999999999,"y":26.674},{"x":10,"y":30}]},{"startLaneIndex":0,"endLaneIndex":3,"points":[{"x":-30,"y":-2},{"x":-26.338,"y":-1.3739999999999999},{"x":-21.584,"y":0.3680000000000003},{"x":-16.086,"y":3.0220000000000007},{"x":-10.191999999999998,"y":6.384000000000002},{"x":-4.25,"y":10.25},{"x":1.3920000000000066,"y":14.416000000000004},{"x":6.385999999999996,"y":18.677999999999997},{"x":10.384000000000004,"y":22.832000000000004},{"x":13.038,"y":26.674},{"x":14,"y":30}]},{"startLaneIndex":0,"endLaneIndex":4,"points":[{"x":-30,"y":-2},{"x":-26.226,"y":-1.3739999999999999},{"x":-21.168,"y":0.3680000000000003},{"x":-15.222,"y":3.0220000000000007},{"x":-8.783999999999997,"y":6.384000000000002},{"x":-2.25,"y":10.25},{"x":3.9840000000000053,"y":14.416000000000004},{"x":9.521999999999995,"y":18.677999999999997},{"x":13.968000000000005,"y":22.832000000000004},{"x":16.926,"y":26.674},{"x":18,"y":30}]},{"startLaneIndex":0,"endLaneIndex":5,"points":[{"x":-30,"y":-2},{"x":-26.114,"y":-1.3739999999999999},{"x":-20.752,"y":0.3680000000000003},{"x":-14.357999999999999,"y":3.0220000000000007},{"x":-7.375999999999998,"y":6.384000000000002},{"x":-0.25,"y":10.25},{"x":6.576000000000008,"y":14.416000000000004},{"x":12.657999999999994,"y":18.677999999999997},{"x":17.552000000000007,"y":22.832000000000004},{"x":20.814,"y":26.674},{"x":22,"y":30}]},{"startLaneIndex":0,"endLaneIndex":6,"points":[{"x":-30,"y":-2},{"x":-26.002,"y":-1.3739999999999999},{"x":-20.336,"y":0.3680000000000003},{"x":-13.494,"y":3.0220000000000007},{"x":-5.967999999999996,"y":6.384000000000002},{"x":1.75,"y":10.25},{"x":9.168000000000006,"y":14.416000000000004},{"x":15.793999999999993,"y":18.677999999999997},{"x":21.136000000000003,"y":22.832000000000004},{"x":24.701999999999998,"y":26.674},{"x":26,"y":30}]},{"startLaneIndex":1,"endLaneIndex":0,"points":[{"x":-30,"y":-6},{"x":-26.674,"y":-5.2620000000000005},{"x":-22.832,"y":-3.216},{"x":-18.678,"y":-0.11400000000000032},{"x":-14.415999999999999,"y":3.792000000000002},{"x":-10.25,"y":8.25},{"x":-6.383999999999996,"y":13.008000000000006},{"x":-3.022000000000004,"y":17.813999999999997},{"x":-0.3679999999999981,"y":22.416000000000004},{"x":1.3739999999999994,"y":26.562},{"x":2,"y":30}]},{"startLaneIndex":1,"endLaneIndex":1,"points":[{"x":-30,"y":-6},{"x":-26.562,"y":-5.2620000000000005},{"x":-22.416,"y":-3.216},{"x":-17.814,"y":-0.11400000000000032},{"x":-13.008,"y":3.792000000000002},{"x":-8.25,"y":8.25},{"x":-3.7919999999999954,"y":13.008000000000006},{"x":0.11399999999999633,"y":17.813999999999997},{"x":3.216000000000003,"y":22.416000000000004},{"x":5.262,"y":26.562},{"x":6,"y":30}]},{"startLaneIndex":1,"endLaneIndex":2,"points":[{"x":-30,"y":-6},{"x":-26.45,"y":-5.2620000000000005},{"x":-22,"y":-3.216},{"x":-16.95,"y":-0.11400000000000032},{"x":-11.599999999999998,"y":3.792000000000002},{"x":-6.25,"y":8.25},{"x":-1.1999999999999948,"y":13.008000000000006},{"x":3.2499999999999956,"y":17.813999999999997},{"x":6.8000000000000025,"y":22.416000000000004},{"x":9.149999999999999,"y":26.562},{"x":10,"y":30}]},{"startLaneIndex":1,"endLaneIndex":3,"points":[{"x":-30,"y":-6},{"x":-26.338,"y":-5.2620000000000005},{"x":-21.584,"y":-3.216},{"x":-16.086,"y":-0.11400000000000032},{"x":-10.191999999999998,"y":3.792000000000002},{"x":-4.25,"y":8.25},{"x":1.3920000000000066,"y":13.008000000000006},{"x":6.385999999999996,"y":17.813999999999997},{"x":10.384000000000004,"y":22.416000000000004},{"x":13.038,"y":26.562},{"x":14,"y":30}]},{"startLaneIndex":1,"endLaneIndex":4,"points":[{"x":-30,"y":-6},{"x":-26.226,"y":-5.2620000000000005},{"x":-21.168,"y":-3.216},{"x":-15.222,"y":-0.11400000000000032},{"x":-8.783999999999997,"y":3.792000000000002},{"x":-2.25,"y":8.25},{"x":3.9840000000000053,"y":13.008000000000006},{"x":9.521999999999995,"y":17.813999999999997},{"x":13.968000000000005,"y":22.416000000000004},{"x":16.926,"y":26.562},{"x":18,"y":30}]},{"startLaneIndex":1,"endLaneIndex":5,"points":[{"x":-30,"y":-6},{"x":-26.114,"y":-5.2620000000000005},{"x":-20.752,"y":-3.216},{"x":-14.357999999999999,"y":-0.11400000000000032},{"x":-7.375999999999998,"y":3.792000000000002},{"x":-0.25,"y":8.25},{"x":6.576000000000008,"y":13.008000000000006},{"x":12.657999999999994,"y":17.813999999999997},{"x":17.552000000000007,"y":22.416000000000004},{"x":20.814,"y":26.562},{"x":22,"y":30}]},{"startLaneIndex":1,"endLaneIndex":6,"points":[{"x":-30,"y":-6},{"x":-26.002,"y":-5.2620000000000005},{"x":-20.336,"y":-3.216},{"x":-13.494,"y":-0.11400000000000032},{"x":-5.967999999999996,"y":3.792000000000002},{"x":1.75,"y":8.25},{"x":9.168000000000006,"y":13.008000000000006},{"x":15.793999999999993,"y":17.813999999999997},{"x":21.136000000000003,"y":22.416000000000004},{"x":24.701999999999998,"y":26.562},{"x":26,"y":30}]}]},{"type":"turn_right","startRoad":"road_0_1_0","endRoad":"road_1_1_3","direction":0,"laneLinks":[{"startLaneIndex":5,"endLaneIndex":0,"points":[{"x":-30,"y":-22},{"x":-26.786,"y":-21.954},{"x":-23.247999999999998,"y":-21.872},{"x":-19.541999999999998,"y":-21.838},{"x":-15.824,"y":-21.936000000000003},{"x":-12.25,"y":-22.25},{"x":-8.975999999999996,"y":-22.864},{"x":-6.158000000000003,"y":-23.862},{"x":-3.9519999999999986,"y":-25.328},{"x":-2.5140000000000002,"y":-27.346},{"x":-2,"y":-30}]},{"startLaneIndex":5,"endLaneIndex":1,"points":[{"x":-30,"y":-22},{"x":-26.898,"y":-21.954},{"x":-23.663999999999998,"y":-21.872},{"x":-20.406,"y":-21.838},{"x":-17.232,"y":-21.936000000000003},{"x":-14.25,"y":-22.25},{"x":-11.567999999999998,"y":-22.864},{"x":-9.294000000000004,"y":-23.862},{"x":-7.536,"y":-25.328},{"x":-6.402,"y":-27.346},{"x":-6,"y":-30}]},{"startLaneIndex":5,"endLaneIndex":2,"points":[{"x":-30,"y":-22},{"x":-27.01,"y":-21.954},{"x":-24.08,"y":-21.872},{"x":-21.27,"y":-21.838},{"x":-18.64,"y":-21.936000000000003},{"x":-16.25,"y":-22.25},{"x":-14.159999999999997,"y":-22.864},{"x":-12.430000000000003,"y":-23.862},{"x":-11.12,"y":-25.328},{"x":-10.29,"y":-27.346},{"x":-10,"y":-30}]},{"startLaneIndex":5,"endLaneIndex":3,"points":[{"x":-30,"y":-22},{"x":-27.122,"y":-21.954},{"x":-24.496,"y":-21.872},{"x":-22.134,"y":-21.838},{"x":-20.048000000000002,"y":-21.936000000000003},{"x":-18.25,"y":-22.25},{"x":-16.752,"y":-22.864},{"x":-15.566000000000003,"y":-23.862},{"x":-14.704,"y":-25.328},{"x":-14.178,"y":-27.346},{"x":-14,"y":-30}]},{"startLaneIndex":5,"endLaneIndex":4,"points":[{"x":-30,"y":-22},{"x":-27.234,"y":-21.954},{"x":-24.912,"y":-21.872},{"x":-22.998,"y":-21.838},{"x":-21.456000000000003,"y":-21.936000000000003},{"x":-20.25,"y":-22.25},{"x":-19.343999999999998,"y":-22.864},{"x":-18.702,"y":-23.862},{"x":-18.288000000000004,"y":-25.328},{"x":-18.066,"y":-27.346},{"x":-18,"y":-30}]},{"startLaneIndex":5,"endLaneIndex":5,"points":[{"x":-30,"y":-22},{"x":-27.346,"y":-21.954},{"x":-25.328,"y":-21.872},{"x":-23.862000000000002,"y":-21.838},{"x":-22.864,"y":-21.936000000000003},{"x":-22.25,"y":-22.25},{"x":-21.936,"y":-22.864},{"x":-21.838,"y":-23.862},{"x":-21.872,"y":-25.328},{"x":-21.954,"y":-27.346},{"x":-22,"y":-30}]},{"startLaneIndex":5,"endLaneIndex":6,"points":[{"x":-30,"y":-22},{"x":-27.458000000000002,"y":-21.954},{"x":-25.744,"y":-21.872},{"x":-24.726,"y":-21.838},{"x":-24.272000000000002,"y":-21.936000000000003},{"x":-24.25,"y":-22.25},{"x":-24.528,"y":-22.864},{"x":-24.974,"y":-23.862},{"x":-25.456000000000003,"y":-25.328},{"x":-25.842,"y":-27.346},{"x":-26,"y":-30}]},{"startLaneIndex":6,"endLaneIndex":0,"points":[{"x":-30,"y":-26},{"x":-26.786,"y":-25.842},{"x":-23.247999999999998,"y":-25.456},{"x":-19.541999999999998,"y":-24.974},{"x":-15.824,"y":-24.528000000000002},{"x":-12.25,"y":-24.25},{"x":-8.975999999999996,"y":-24.272000000000002},{"x":-6.158000000000003,"y":-24.726},{"x":-3.9519999999999986,"y":-25.744},{"x":-2.5140000000000002,"y":-27.458000000000002},{"x":-2,"y":-30}]},{"startLaneIndex":6,"endLaneIndex":1,"points":[{"x":-30,"y":-26},{"x":-26.898,"y":-25.842},{"x":-23.663999999999998,"y":-25.456},{"x":-20.406,"y":-24.974},{"x":-17.232,"y":-24.528000000000002},{"x":-14.25,"y":-24.25},{"x":-11.567999999999998,"y":-24.272000000000002},{"x":-9.294000000000004,"y":-24.726},{"x":-7.536,"y":-25.744},{"x":-6.402,"y":-27.458000000000002},{"x":-6,"y":-30}]},{"startLaneIndex":6,"endLaneIndex":2,"points":[{"x":-30,"y":-26},{"x":-27.01,"y":-25.842},{"x":-24.08,"y":-25.456},{"x":-21.27,"y":-24.974},{"x":-18.64,"y":-24.528000000000002},{"x":-16.25,"y":-24.25},{"x":-14.159999999999997,"y":-24.272000000000002},{"x":-12.430000000000003,"y":-24.726},{"x":-11.12,"y":-25.744},{"x":-10.29,"y":-27.458000000000002},{"x":-10,"y":-30}]},{"startLaneIndex":6,"endLaneIndex":3,"points":[{"x":-30,"y":-26},{"x":-27.122,"y":-25.842},{"x":-24.496,"y":-25.456},{"x":-22.134,"y":-24.974},{"x":-20.048000000000002,"y":-24.528000000000002},{"x":-18.25,"y":-24.25},{"x":-16.752,"y":-24.272000000000002},{"x":-15.566000000000003,"y":-24.726},{"x":-14.704,"y":-25.744},{"x":-14.178,"y":-27.458000000000002},{"x":-14,"y":-30}]},{"startLaneIndex":6,"endLaneIndex":4,"points":[{"x":-30,"y":-26},{"x":-27.234,"y":-25.842},{"x":-24.912,"y":-25.456},{"x":-22.998,"y":-24.974},{"x":-21.456000000000003,"y":-24.528000000000002},{"x":-20.25,"y":-24.25},{"x":-19.343999999999998,"y":-24.272000000000002},{"x":-18.702,"y":-24.726},{"x":-18.288000000000004,"y":-25.744},{"x":-18.066,"y":-27.458000000000002},{"x":-18,"y":-30}]},{"startLaneIndex":6,"endLaneIndex":5,"points":[{"x":-30,"y":-26},{"x":-27.346,"y":-25.842},{"x":-25.328,"y":-25.456},{"x":-23.862000000000002,"y":-24.974},{"x":-22.864,"y":-24.528000000000002},{"x":-22.25,"y":-24.25},{"x":-21.936,"y":-24.272000000000002},{"x":-21.838,"y":-24.726},{"x":-21.872,"y":-25.744},{"x":-21.954,"y":-27.458000000000002},{"x":-22,"y":-30}]},{"startLaneIndex":6,"endLaneIndex":6,"points":[{"x":-30,"y":-26},{"x":-27.458000000000002,"y":-25.842},{"x":-25.744,"y":-25.456},{"x":-24.726,"y":-24.974},{"x":-24.272000000000002,"y":-24.528000000000002},{"x":-24.25,"y":-24.25},{"x":-24.528,"y":-24.272000000000002},{"x":-24.974,"y":-24.726},{"x":-25.456000000000003,"y":-25.744},{"x":-25.842,"y":-27.458000000000002},{"x":-26,"y":-30}]}]},{"type":"turn_right","startRoad":"road_1_0_1","endRoad":"road_1_1_0","direction":1,"laneLinks":[{"startLaneIndex":5,"endLaneIndex":0,"points":[{"x":22,"y":-30},{"x":21.954,"y":-26.786},{"x":21.872,"y":-23.247999999999998},{"x":21.838,"y":-19.541999999999998},{"x":21.936000000000003,"y":-15.824},{"x":22.25,"y":-12.25},{"x":22.864,"y":-8.975999999999996},{"x":23.862,"y":-6.158000000000003},{"x":25.328,"y":-3.9519999999999986},{"x":27.346,"y":-2.5140000000000002},{"x":30,"y":-2}]},{"startLaneIndex":5,"endLaneIndex":1,"points":[{"x":22,"y":-30},{"x":21.954,"y":-26.898},{"x":21.872,"y":-23.663999999999998},{"x":21.838,"y":-20.406},{"x":21.936000000000003,"y":-17.232},{"x":22.25,"y":-14.25},{"x":22.864,"y":-11.567999999999998},{"x":23.862,"y":-9.294000000000004},{"x":25.328,"y":-7.536},{"x":27.346,"y":-6.402},{"x":30,"y":-6}]},{"startLaneIndex":5,"endLaneIndex":2,"points":[{"x":22,"y":-30},{"x":21.954,"y":-27.01},{"x":21.872,"y":-24.08},{"x":21.838,"y":-21.27},{"x":21.936000000000003,"y":-18.64},{"x":22.25,"y":-16.25},{"x":22.864,"y":-14.159999999999997},{"x":23.862,"y":-12.430000000000003},{"x":25.328,"y":-11.12},{"x":27.346,"y":-10.29},{"x":30,"y":-10}]},{"startLaneIndex":5,"endLaneIndex":3,"points":[{"x":22,"y":-30},{"x":21.954,"y":-27.122},{"x":21.872,"y":-24.496},{"x":21.838,"y":-22.134},{"x":21.936000000000003,"y":-20.048000000000002},{"x":22.25,"y":-18.25},{"x":22.864,"y":-16.752},{"x":23.862,"y":-15.566000000000003},{"x":25.328,"y":-14.704},{"x":27.346,"y":-14.178},{"x":30,"y":-14}]},{"startLaneIndex":5,"endLaneIndex":4,"points":[{"x":22,"y":-30},{"x":21.954,"y":-27.234},{"x":21.872,"y":-24.912},{"x":21.838,"y":-22.998},{"x":21.936000000000003,"y":-21.456000000000003},{"x":22.25,"y":-20.25},{"x":22.864,"y":-19.343999999999998},{"x":23.862,"y":-18.702},{"x":25.328,"y":-18.288000000000004},{"x":27.346,"y":-18.066},{"x":30,"y":-18}]},{"startLaneIndex":5,"endLaneIndex":5,"points":[{"x":22,"y":-30},{"x":21.954,"y":-27.346},{"x":21.872,"y":-25.328},{"x":21.838,"y":-23.862000000000002},{"x":21.936000000000003,"y":-22.864},{"x":22.25,"y":-22.25},{"x":22.864,"y":-21.936},{"x":23.862,"y":-21.838},{"x":25.328,"y":-21.872},{"x":27.346,"y":-21.954},{"x":30,"y":-22}]},{"startLaneIndex":5,"endLaneIndex":6,"points":[{"x":22,"y":-30},{"x":21.954,"y":-27.458000000000002},{"x":21.872,"y":-25.744},{"x":21.838,"y":-24.726},{"x":21.936000000000003,"y":-24.272000000000002},{"x":22.25,"y":-24.25},{"x":22.864,"y":-24.528},{"x":23.862,"y":-24.974},{"x":25.328,"y":-25.456000000000003},{"x":27.346,"y":-25.842},{"x":30,"y":-26}]},{"startLaneIndex":6,"endLaneIndex":0,"points":[{"x":26,"y":-30},{"x":25.842,"y":-26.786},{"x":25.456,"y":-23.247999999999998},{"x":24.974,"y":-19.541999999999998},{"x":24.528000000000002,"y":-15.824},{"x":24.25,"y":-12.25},{"x":24.272000000000002,"y":-8.975999999999996},{"x":24.726,"y":-6.158000000000003},{"x":25.744,"y":-3.9519999999999986},{"x":27.458000000000002,"y":-2.5140000000000002},{"x":30,"y":-2}]},{"startLaneIndex":6,"endLaneIndex":1,"points":[{"x":26,"y":-30},{"x":25.842,"y":-26.898},{"x":25.456,"y":-23.663999999999998},{"x":24.974,"y":-20.406},{"x":24.528000000000002,"y":-17.232},{"x":24.25,"y":-14.25},{"x":24.272000000000002,"y":-11.567999999999998},{"x":24.726,"y":-9.294000000000004},{"x":25.744,"y":-7.536},{"x":27.458000000000002,"y":-6.402},{"x":30,"y":-6}]},{"startLaneIndex":6,"endLaneIndex":2,"points":[{"x":26,"y":-30},{"x":25.842,"y":-27.01},{"x":25.456,"y":-24.08},{"x":24.974,"y":-21.27},{"x":24.528000000000002,"y":-18.64},{"x":24.25,"y":-16.25},{"x":24.272000000000002,"y":-14.159999999999997},{"x":24.726,"y":-12.430000000000003},{"x":25.744,"y":-11.12},{"x":27.458000000000002,"y":-10.29},{"x":30,"y":-10}]},{"startLaneIndex":6,"endLaneIndex":3,"points":[{"x":26,"y":-30},{"x":25.842,"y":-27.122},{"x":25.456,"y":-24.496},{"x":24.974,"y":-22.134},{"x":24.528000000000002,"y":-20.048000000000002},{"x":24.25,"y":-18.25},{"x":24.272000000000002,"y":-16.752},{"x":24.726,"y":-15.566000000000003},{"x":25.744,"y":-14.704},{"x":27.458000000000002,"y":-14.178},{"x":30,"y":-14}]},{"startLaneIndex":6,"endLaneIndex":4,"points":[{"x":26,"y":-30},{"x":25.842,"y":-27.234},{"x":25.456,"y":-24.912},{"x":24.974,"y":-22.998},{"x":24.528000000000002,"y":-21.456000000000003},{"x":24.25,"y":-20.25},{"x":24.272000000000002,"y":-19.343999999999998},{"x":24.726,"y":-18.702},{"x":25.744,"y":-18.288000000000004},{"x":27.458000000000002,"y":-18.066},{"x":30,"y":-18}]},{"startLaneIndex":6,"endLaneIndex":5,"points":[{"x":26,"y":-30},{"x":25.842,"y":-27.346},{"x":25.456,"y":-25.328},{"x":24.974,"y":-23.862000000000002},{"x":24.528000000000002,"y":-22.864},{"x":24.25,"y":-22.25},{"x":24.272000000000002,"y":-21.936},{"x":24.726,"y":-21.838},{"x":25.744,"y":-21.872},{"x":27.458000000000002,"y":-21.954},{"x":30,"y":-22}]},{"startLaneIndex":6,"endLaneIndex":6,"points":[{"x":26,"y":-30},{"x":25.842,"y":-27.458000000000002},{"x":25.456,"y":-25.744},{"x":24.974,"y":-24.726},{"x":24.528000000000002,"y":-24.272000000000002},{"x":24.25,"y":-24.25},{"x":24.272000000000002,"y":-24.528},{"x":24.726,"y":-24.974},{"x":25.744,"y":-25.456000000000003},{"x":27.458000000000002,"y":-25.842},{"x":30,"y":-26}]}]},{"type":"go_straight","startRoad":"road_1_0_1","endRoad":"road_1_1_1","direction":1,"laneLinks":[{"startLaneIndex":2,"endLaneIndex":0,"points":[{"x":10,"y":-30},{"x":9.775999999999998,"y":-26.16},{"x":9.168000000000001,"y":-20.88},{"x":8.272,"y":-14.52},{"x":7.183999999999999,"y":-7.439999999999998},{"x":6,"y":0},{"x":4.815999999999999,"y":7.440000000000009},{"x":3.7280000000000006,"y":14.519999999999992},{"x":2.831999999999999,"y":20.880000000000006},{"x":2.224,"y":26.16},{"x":2,"y":30}]},{"startLaneIndex":2,"endLaneIndex":1,"points":[{"x":10,"y":-30},{"x":9.887999999999998,"y":-26.16},{"x":9.584000000000001,"y":-20.88},{"x":9.136,"y":-14.52},{"x":8.591999999999999,"y":-7.439999999999998},{"x":8,"y":0},{"x":7.4079999999999995,"y":7.440000000000009},{"x":6.864000000000001,"y":14.519999999999992},{"x":6.416,"y":20.880000000000006},{"x":6.112,"y":26.16},{"x":6,"y":30}]},{"startLaneIndex":2,"endLaneIndex":2,"points":[{"x":10,"y":-30},{"x":9.999999999999998,"y":-26.16},{"x":10.000000000000002,"y":-20.88},{"x":10,"y":-14.52},{"x":10,"y":-7.439999999999998},{"x":10,"y":0},{"x":10,"y":7.440000000000009},{"x":10,"y":14.519999999999992},{"x":10,"y":20.880000000000006},{"x":10,"y":26.16},{"x":10,"y":30}]},{"startLaneIndex":2,"endLaneIndex":3,"points":[{"x":10,"y":-30},{"x":10.111999999999998,"y":-26.16},{"x":10.416,"y":-20.88},{"x":10.864,"y":-14.52},{"x":11.408,"y":-7.439999999999998},{"x":12,"y":0},{"x":12.592000000000002,"y":7.440000000000009},{"x":13.136,"y":14.519999999999992},{"x":13.584000000000001,"y":20.880000000000006},{"x":13.888000000000002,"y":26.16},{"x":14,"y":30}]},{"startLaneIndex":2,"endLaneIndex":4,"points":[{"x":10,"y":-30},{"x":10.223999999999998,"y":-26.16},{"x":10.832,"y":-20.88},{"x":11.728,"y":-14.52},{"x":12.816,"y":-7.439999999999998},{"x":14,"y":0},{"x":15.184000000000001,"y":7.440000000000009},{"x":16.272,"y":14.519999999999992},{"x":17.168000000000003,"y":20.880000000000006},{"x":17.776,"y":26.16},{"x":18,"y":30}]},{"startLaneIndex":2,"endLaneIndex":5,"points":[{"x":10,"y":-30},{"x":10.335999999999999,"y":-26.16},{"x":11.248000000000001,"y":-20.88},{"x":12.592,"y":-14.52},{"x":14.224,"y":-7.439999999999998},{"x":16,"y":0},{"x":17.776000000000003,"y":7.440000000000009},{"x":19.407999999999998,"y":14.519999999999992},{"x":20.752000000000002,"y":20.880000000000006},{"x":21.664,"y":26.16},{"x":22,"y":30}]},{"startLaneIndex":2,"endLaneIndex":6,"points":[{"x":10,"y":-30},{"x":10.447999999999999,"y":-26.16},{"x":11.664000000000001,"y":-20.88},{"x":13.456,"y":-14.52},{"x":15.632000000000001,"y":-7.439999999999998},{"x":18,"y":0},{"x":20.368000000000002,"y":7.440000000000009},{"x":22.543999999999997,"y":14.519999999999992},{"x":24.336000000000002,"y":20.880000000000006},{"x":25.552,"y":26.16},{"x":26,"y":30}]},{"startLaneIndex":3,"endLaneIndex":0,"points":[{"x":14,"y":-30},{"x":13.664,"y":-26.16},{"x":12.752,"y":-20.88},{"x":11.408000000000001,"y":-14.52},{"x":9.776,"y":-7.439999999999998},{"x":8,"y":0},{"x":6.223999999999998,"y":7.440000000000009},{"x":4.5920000000000005,"y":14.519999999999992},{"x":3.2479999999999984,"y":20.880000000000006},{"x":2.3360000000000003,"y":26.16},{"x":2,"y":30}]},{"startLaneIndex":3,"endLaneIndex":1,"points":[{"x":14,"y":-30},{"x":13.776,"y":-26.16},{"x":13.168000000000001,"y":-20.88},{"x":12.272000000000002,"y":-14.52},{"x":11.184,"y":-7.439999999999998},{"x":10,"y":0},{"x":8.815999999999999,"y":7.440000000000009},{"x":7.728000000000001,"y":14.519999999999992},{"x":6.831999999999999,"y":20.880000000000006},{"x":6.224,"y":26.16},{"x":6,"y":30}]},{"startLaneIndex":3,"endLaneIndex":2,"points":[{"x":14,"y":-30},{"x":13.888,"y":-26.16},{"x":13.584000000000001,"y":-20.88},{"x":13.136000000000001,"y":-14.52},{"x":12.592,"y":-7.439999999999998},{"x":12,"y":0},{"x":11.408,"y":7.440000000000009},{"x":10.864,"y":14.519999999999992},{"x":10.415999999999999,"y":20.880000000000006},{"x":10.111999999999998,"y":26.16},{"x":10,"y":30}]},{"startLaneIndex":3,"endLaneIndex":3,"points":[{"x":14,"y":-30},{"x":14,"y":-26.16},{"x":14,"y":-20.88},{"x":14.000000000000002,"y":-14.52},{"x":14,"y":-7.439999999999998},{"x":14,"y":0},{"x":14,"y":7.440000000000009},{"x":14,"y":14.519999999999992},{"x":14,"y":20.880000000000006},{"x":14,"y":26.16},{"x":14,"y":30}]},{"startLaneIndex":3,"endLaneIndex":4,"points":[{"x":14,"y":-30},{"x":14.112,"y":-26.16},{"x":14.416,"y":-20.88},{"x":14.864,"y":-14.52},{"x":15.408000000000001,"y":-7.439999999999998},{"x":16,"y":0},{"x":16.592,"y":7.440000000000009},{"x":17.136,"y":14.519999999999992},{"x":17.584000000000003,"y":20.880000000000006},{"x":17.887999999999998,"y":26.16},{"x":18,"y":30}]},{"startLaneIndex":3,"endLaneIndex":5,"points":[{"x":14,"y":-30},{"x":14.224,"y":-26.16},{"x":14.832,"y":-20.88},{"x":15.728000000000002,"y":-14.52},{"x":16.816000000000003,"y":-7.439999999999998},{"x":18,"y":0},{"x":19.184,"y":7.440000000000009},{"x":20.272,"y":14.519999999999992},{"x":21.168000000000003,"y":20.880000000000006},{"x":21.776,"y":26.16},{"x":22,"y":30}]},{"startLaneIndex":3,"endLaneIndex":6,"points":[{"x":14,"y":-30},{"x":14.336,"y":-26.16},{"x":15.248000000000001,"y":-20.88},{"x":16.592000000000002,"y":-14.52},{"x":18.224000000000004,"y":-7.439999999999998},{"x":20,"y":0},{"x":21.776,"y":7.440000000000009},{"x":23.407999999999998,"y":14.519999999999992},{"x":24.752000000000002,"y":20.880000000000006},{"x":25.663999999999998,"y":26.16},{"x":26,"y":30}]},{"startLaneIndex":4,"endLaneIndex":0,"points":[{"x":18,"y":-30},{"x":17.552,"y":-26.16},{"x":16.336,"y":-20.88},{"x":14.544,"y":-14.52},{"x":12.367999999999999,"y":-7.439999999999998},{"x":10,"y":0},{"x":7.631999999999998,"y":7.440000000000009},{"x":5.456000000000001,"y":14.519999999999992},{"x":3.663999999999998,"y":20.880000000000006},{"x":2.4480000000000004,"y":26.16},{"x":2,"y":30}]},{"startLaneIndex":4,"endLaneIndex":1,"points":[{"x":18,"y":-30},{"x":17.663999999999998,"y":-26.16},{"x":16.752,"y":-20.88},{"x":15.408000000000001,"y":-14.52},{"x":13.775999999999998,"y":-7.439999999999998},{"x":12,"y":0},{"x":10.223999999999998,"y":7.440000000000009},{"x":8.592000000000002,"y":14.519999999999992},{"x":7.247999999999999,"y":20.880000000000006},{"x":6.336,"y":26.16},{"x":6,"y":30}]},{"startLaneIndex":4,"endLaneIndex":2,"points":[{"x":18,"y":-30},{"x":17.776,"y":-26.16},{"x":17.168,"y":-20.88},{"x":16.272,"y":-14.52},{"x":15.184,"y":-7.439999999999998},{"x":14,"y":0},{"x":12.815999999999999,"y":7.440000000000009},{"x":11.728000000000002,"y":14.519999999999992},{"x":10.831999999999999,"y":20.880000000000006},{"x":10.224,"y":26.16},{"x":10,"y":30}]},{"startLaneIndex":4,"endLaneIndex":3,"points":[{"x":18,"y":-30},{"x":17.887999999999998,"y":-26.16},{"x":17.584,"y":-20.88},{"x":17.136,"y":-14.52},{"x":16.592,"y":-7.439999999999998},{"x":16,"y":0},{"x":15.408000000000001,"y":7.440000000000009},{"x":14.864,"y":14.519999999999992},{"x":14.416,"y":20.880000000000006},{"x":14.112000000000002,"y":26.16},{"x":14,"y":30}]},{"startLaneIndex":4,"endLaneIndex":4,"points":[{"x":18,"y":-30},{"x":18,"y":-26.16},{"x":18,"y":-20.88},{"x":18,"y":-14.52},{"x":18,"y":-7.439999999999998},{"x":18,"y":0},{"x":18,"y":7.440000000000009},{"x":18,"y":14.519999999999992},{"x":18,"y":20.880000000000006},{"x":18,"y":26.16},{"x":18,"y":30}]},{"startLaneIndex":4,"endLaneIndex":5,"points":[{"x":18,"y":-30},{"x":18.112,"y":-26.16},{"x":18.416,"y":-20.88},{"x":18.864,"y":-14.52},{"x":19.408,"y":-7.439999999999998},{"x":20,"y":0},{"x":20.592000000000002,"y":7.440000000000009},{"x":21.136,"y":14.519999999999992},{"x":21.584,"y":20.880000000000006},{"x":21.888,"y":26.16},{"x":22,"y":30}]},{"startLaneIndex":4,"endLaneIndex":6,"points":[{"x":18,"y":-30},{"x":18.224,"y":-26.16},{"x":18.832,"y":-20.88},{"x":19.728,"y":-14.52},{"x":20.816000000000003,"y":-7.439999999999998},{"x":22,"y":0},{"x":23.184,"y":7.440000000000009},{"x":24.272,"y":14.519999999999992},{"x":25.168,"y":20.880000000000006},{"x":25.776,"y":26.16},{"x":26,"y":30}]}]},{"type":"turn_left","startRoad":"road_1_0_1","endRoad":"road_1_1_2","direction":1,"laneLinks":[{"startLaneIndex":0,"endLaneIndex":0,"points":[{"x":2,"y":-30},{"x":1.3739999999999999,"y":-26.674},{"x":-0.3680000000000003,"y":-22.832},{"x":-3.0220000000000007,"y":-18.678},{"x":-6.384000000000002,"y":-14.415999999999999},{"x":-10.25,"y":-10.25},{"x":-14.416000000000004,"y":-6.383999999999996},{"x":-18.677999999999997,"y":-3.022000000000004},{"x":-22.832000000000004,"y":-0.3679999999999981},{"x":-26.674,"y":1.3739999999999994},{"x":-30,"y":2}]},{"startLaneIndex":0,"endLaneIndex":1,"points":[{"x":2,"y":-30},{"x":1.3739999999999999,"y":-26.562},{"x":-0.3680000000000003,"y":-22.416},{"x":-3.0220000000000007,"y":-17.814},{"x":-6.384000000000002,"y":-13.008},{"x":-10.25,"y":-8.25},{"x":-14.416000000000004,"y":-3.7919999999999954},{"x":-18.677999999999997,"y":0.11399999999999633},{"x":-22.832000000000004,"y":3.216000000000003},{"x":-26.674,"y":5.262},{"x":-30,"y":6}]},{"startLaneIndex":0,"endLaneIndex":2,"points":[{"x":2,"y":-30},{"x":1.3739999999999999,"y":-26.45},{"x":-0.3680000000000003,"y":-22},{"x":-3.0220000000000007,"y":-16.95},{"x":-6.384000000000002,"y":-11.599999999999998},{"x":-10.25,"y":-6.25},{"x":-14.416000000000004,"y":-1.1999999999999948},{"x":-18.677999999999997,"y":3.2499999999999956},{"x":-22.832000000000004,"y":6.8000000000000025},{"x":-26.674,"y":9.149999999999999},{"x":-30,"y":10}]},{"startLaneIndex":0,"endLaneIndex":3,"points":[{"x":2,"y":-30},{"x":1.3739999999999999,"y":-26.338},{"x":-0.3680000000000003,"y":-21.584},{"x":-3.0220000000000007,"y":-16.086},{"x":-6.384000000000002,"y":-10.191999999999998},{"x":-10.25,"y":-4.25},{"x":-14.416000000000004,"y":1.3920000000000066},{"x":-18.677999999999997,"y":6.385999999999996},{"x":-22.832000000000004,"y":10.384000000000004},{"x":-26.674,"y":13.038},{"x":-30,"y":14}]},{"startLaneIndex":0,"endLaneIndex":4,"points":[{"x":2,"y":-30},{"x":1.3739999999999999,"y":-26.226},{"x":-0.3680000000000003,"y":-21.168},{"x":-3.0220000000000007,"y":-15.222},{"x":-6.384000000000002,"y":-8.783999999999997},{"x":-10.25,"y":-2.25},{"x":-14.416000000000004,"y":3.9840000000000053},{"x":-18.677999999999997,"y":9.521999999999995},{"x":-22.832000000000004,"y":13.968000000000005},{"x":-26.674,"y":16.926},{"x":-30,"y":18}]},{"startLaneIndex":0,"endLaneIndex":5,"points":[{"x":2,"y":-30},{"x":1.3739999999999999,"y":-26.114},{"x":-0.3680000000000003,"y":-20.752},{"x":-3.0220000000000007,"y":-14.357999999999999},{"x":-6.384000000000002,"y":-7.375999999999998},{"x":-10.25,"y":-0.25},{"x":-14.416000000000004,"y":6.576000000000008},{"x":-18.677999999999997,"y":12.657999999999994},{"x":-22.832000000000004,"y":17.552000000000007},{"x":-26.674,"y":20.814},{"x":-30,"y":22}]},{"startLaneIndex":0,"endLaneIndex":6,"points":[{"x":2,"y":-30},{"x":1.3739999999999999,"y":-26.002},{"x":-0.3680000000000003,"y":-20.336},{"x":-3.0220000000000007,"y":-13.494},{"x":-6.384000000000002,"y":-5.967999999999996},{"x":-10.25,"y":1.75},{"x":-14.416000000000004,"y":9.168000000000006},{"x":-18.677999999999997,"y":15.793999999999993},{"x":-22.832000000000004,"y":21.136000000000003},{"x":-26.674,"y":24.701999999999998},{"x":-30,"y":26}]},{"startLaneIndex":1,"endLaneIndex":0,"points":[{"x":6,"y":-30},{"x":5.2620000000000005,"y":-26.674},{"x":3.216,"y":-22.832},{"x":0.11400000000000032,"y":-18.678},{"x":-3.792000000000002,"y":-14.415999999999999},{"x":-8.25,"y":-10.25},{"x":-13.008000000000006,"y":-6.383999999999996},{"x":-17.813999999999997,"y":-3.022000000000004},{"x":-22.416000000000004,"y":-0.3679999999999981},{"x":-26.562,"y":1.3739999999999994},{"x":-30,"y":2}]},{"startLaneIndex":1,"endLaneIndex":1,"points":[{"x":6,"y":-30},{"x":5.2620000000000005,"y":-26.562},{"x":3.216,"y":-22.416},{"x":0.11400000000000032,"y":-17.814},{"x":-3.792000000000002,"y":-13.008},{"x":-8.25,"y":-8.25},{"x":-13.008000000000006,"y":-3.7919999999999954},{"x":-17.813999999999997,"y":0.11399999999999633},{"x":-22.416000000000004,"y":3.216000000000003},{"x":-26.562,"y":5.262},{"x":-30,"y":6}]},{"startLaneIndex":1,"endLaneIndex":2,"points":[{"x":6,"y":-30},{"x":5.2620000000000005,"y":-26.45},{"x":3.216,"y":-22},{"x":0.11400000000000032,"y":-16.95},{"x":-3.792000000000002,"y":-11.599999999999998},{"x":-8.25,"y":-6.25},{"x":-13.008000000000006,"y":-1.1999999999999948},{"x":-17.813999999999997,"y":3.2499999999999956},{"x":-22.416000000000004,"y":6.8000000000000025},{"x":-26.562,"y":9.149999999999999},{"x":-30,"y":10}]},{"startLaneIndex":1,"endLaneIndex":3,"points":[{"x":6,"y":-30},{"x":5.2620000000000005,"y":-26.338},{"x":3.216,"y":-21.584},{"x":0.11400000000000032,"y":-16.086},{"x":-3.792000000000002,"y":-10.191999999999998},{"x":-8.25,"y":-4.25},{"x":-13.008000000000006,"y":1.3920000000000066},{"x":-17.813999999999997,"y":6.385999999999996},{"x":-22.416000000000004,"y":10.384000000000004},{"x":-26.562,"y":13.038},{"x":-30,"y":14}]},{"startLaneIndex":1,"endLaneIndex":4,"points":[{"x":6,"y":-30},{"x":5.2620000000000005,"y":-26.226},{"x":3.216,"y":-21.168},{"x":0.11400000000000032,"y":-15.222},{"x":-3.792000000000002,"y":-8.783999999999997},{"x":-8.25,"y":-2.25},{"x":-13.008000000000006,"y":3.9840000000000053},{"x":-17.813999999999997,"y":9.521999999999995},{"x":-22.416000000000004,"y":13.968000000000005},{"x":-26.562,"y":16.926},{"x":-30,"y":18}]},{"startLaneIndex":1,"endLaneIndex":5,"points":[{"x":6,"y":-30},{"x":5.2620000000000005,"y":-26.114},{"x":3.216,"y":-20.752},{"x":0.11400000000000032,"y":-14.357999999999999},{"x":-3.792000000000002,"y":-7.375999999999998},{"x":-8.25,"y":-0.25},{"x":-13.008000000000006,"y":6.576000000000008},{"x":-17.813999999999997,"y":12.657999999999994},{"x":-22.416000000000004,"y":17.552000000000007},{"x":-26.562,"y":20.814},{"x":-30,"y":22}]},{"startLaneIndex":1,"endLaneIndex":6,"points":[{"x":6,"y":-30},{"x":5.2620000000000005,"y":-26.002},{"x":3.216,"y":-20.336},{"x":0.11400000000000032,"y":-13.494},{"x":-3.792000000000002,"y":-5.967999999999996},{"x":-8.25,"y":1.75},{"x":-13.008000000000006,"y":9.168000000000006},{"x":-17.813999999999997,"y":15.793999999999993},{"x":-22.416000000000004,"y":21.136000000000003},{"x":-26.562,"y":24.701999999999998},{"x":-30,"y":26}]}]},{"type":"turn_right","startRoad":"road_2_1_2","endRoad":"road_1_1_1","direction":2,"laneLinks":[{"startLaneIndex":5,"endLaneIndex":0,"points":[{"x":30,"y":22},{"x":26.786,"y":21.954},{"x":23.247999999999998,"y":21.872},{"x":19.541999999999998,"y":21.838},{"x":15.824,"y":21.936000000000003},{"x":12.25,"y":22.25},{"x":8.975999999999996,"y":22.864},{"x":6.158000000000003,"y":23.862},{"x":3.9519999999999986,"y":25.328},{"x":2.5140000000000002,"y":27.346},{"x":2,"y":30}]},{"startLaneIndex":5,"endLaneIndex":1,"points":[{"x":30,"y":22},{"x":26.898,"y":21.954},{"x":23.663999999999998,"y":21.872},{"x":20.406,"y":21.838},{"x":17.232,"y":21.936000000000003},{"x":14.25,"y":22.25},{"x":11.567999999999998,"y":22.864},{"x":9.294000000000004,"y":23.862},{"x":7.536,"y":25.328},{"x":6.402,"y":27.346},{"x":6,"y":30}]},{"startLaneIndex":5,"endLaneIndex":2,"points":[{"x":30,"y":22},{"x":27.01,"y":21.954},{"x":24.08,"y":21.872},{"x":21.27,"y":21.838},{"x":18.64,"y":21.936000000000003},{"x":16.25,"y":22.25},{"x":14.159999999999997,"y":22.864},{"x":12.430000000000003,"y":23.862},{"x":11.12,"y":25.328},{"x":10.29,"y":27.346},{"x":10,"y":30}]},{"startLaneIndex":5,"endLaneIndex":3,"points":[{"x":30,"y":22},{"x":27.122,"y":21.954},{"x":24.496,"y":21.872},{"x":22.134,"y":21.838},{"x":20.048000000000002,"y":21.936000000000003},{"x":18.25,"y":22.25},{"x":16.752,"y":22.864},{"x":15.566000000000003,"y":23.862},{"x":14.704,"y":25.328},{"x":14.178,"y":27.346},{"x":14,"y":30}]},{"startLaneIndex":5,"endLaneIndex":4,"points":[{"x":30,"y":22},{"x":27.234,"y":21.954},{"x":24.912,"y":21.872},{"x":22.998,"y":21.838},{"x":21.456000000000003,"y":21.936000000000003},{"x":20.25,"y":22.25},{"x":19.343999999999998,"y":22.864},{"x":18.702,"y":23.862},{"x":18.288000000000004,"y":25.328},{"x":18.066,"y":27.346},{"x":18,"y":30}]},{"startLaneIndex":5,"endLaneIndex":5,"points":[{"x":30,"y":22},{"x":27.346,"y":21.954},{"x":25.328,"y":21.872},{"x":23.862000000000002,"y":21.838},{"x":22.864,"y":21.936000000000003},{"x":22.25,"y":22.25},{"x":21.936,"y":22.864},{"x":21.838,"y":23.862},{"x":21.872,"y":25.328},{"x":21.954,"y":27.346},{"x":22,"y":30}]},{"startLaneIndex":5,"endLaneIndex":6,"points":[{"x":30,"y":22},{"x":27.458000000000002,"y":21.954},{"x":25.744,"y":21.872},{"x":24.726,"y":21.838},{"x":24.272000000000002,"y":21.936000000000003},{"x":24.25,"y":22.25},{"x":24.528,"y":22.864},{"x":24.974,"y":23.862},{"x":25.456000000000003,"y":25.328},{"x":25.842,"y":27.346},{"x":26,"y":30}]},{"startLaneIndex":6,"endLaneIndex":0,"points":[{"x":30,"y":26},{"x":26.786,"y":25.842},{"x":23.247999999999998,"y":25.456},{"x":19.541999999999998,"y":24.974},{"x":15.824,"y":24.528000000000002},{"x":12.25,"y":24.25},{"x":8.975999999999996,"y":24.272000000000002},{"x":6.158000000000003,"y":24.726},{"x":3.9519999999999986,"y":25.744},{"x":2.5140000000000002,"y":27.458000000000002},{"x":2,"y":30}]},{"startLaneIndex":6,"endLaneIndex":1,"points":[{"x":30,"y":26},{"x":26.898,"y":25.842},{"x":23.663999999999998,"y":25.456},{"x":20.406,"y":24.974},{"x":17.232,"y":24.528000000000002},{"x":14.25,"y":24.25},{"x":11.567999999999998,"y":24.272000000000002},{"x":9.294000000000004,"y":24.726},{"x":7.536,"y":25.744},{"x":6.402,"y":27.458000000000002},{"x":6,"y":30}]},{"startLaneIndex":6,"endLaneIndex":2,"points":[{"x":30,"y":26},{"x":27.01,"y":25.842},{"x":24.08,"y":25.456},{"x":21.27,"y":24.974},{"x":18.64,"y":24.528000000000002},{"x":16.25,"y":24.25},{"x":14.159999999999997,"y":24.272000000000002},{"x":12.430000000000003,"y":24.726},{"x":11.12,"y":25.744},{"x":10.29,"y":27.458000000000002},{"x":10,"y":30}]},{"startLaneIndex":6,"endLaneIndex":3,"points":[{"x":30,"y":26},{"x":27.122,"y":25.842},{"x":24.496,"y":25.456},{"x":22.134,"y":24.974},{"x":20.048000000000002,"y":24.528000000000002},{"x":18.25,"y":24.25},{"x":16.752,"y":24.272000000000002},{"x":15.566000000000003,"y":24.726},{"x":14.704,"y":25.744},{"x":14.178,"y":27.458000000000002},{"x":14,"y":30}]},{"startLaneIndex":6,"endLaneIndex":4,"points":[{"x":30,"y":26},{"x":27.234,"y":25.842},{"x":24.912,"y":25.456},{"x":22.998,"y":24.974},{"x":21.456000000000003,"y":24.528000000000002},{"x":20.25,"y":24.25},{"x":19.343999999999998,"y":24.272000000000002},{"x":18.702,"y":24.726},{"x":18.288000000000004,"y":25.744},{"x":18.066,"y":27.458000000000002},{"x":18,"y":30}]},{"startLaneIndex":6,"endLaneIndex":5,"points":[{"x":30,"y":26},{"x":27.346,"y":25.842},{"x":25.328,"y":25.456},{"x":23.862000000000002,"y":24.974},{"x":22.864,"y":24.528000000000002},{"x":22.25,"y":24.25},{"x":21.936,"y":24.272000000000002},{"x":21.838,"y":24.726},{"x":21.872,"y":25.744},{"x":21.954,"y":27.458000000000002},{"x":22,"y":30}]},{"startLaneIndex":6,"endLaneIndex":6,"points":[{"x":30,"y":26},{"x":27.458000000000002,"y":25.842},{"x":25.744,"y":25.456},{"x":24.726,"y":24.974},{"x":24.272000000000002,"y":24.528000000000002},{"x":24.25,"y":24.25},{"x":24.528,"y":24.272000000000002},{"x":24.974,"y":24.726},{"x":25.456000000000003,"y":25.744},{"x":25.842,"y":27.458000000000002},{"x":26,"y":30}]}]},{"type":"go_straight","startRoad":"road_2_1_2","endRoad":"road_1_1_2","direction":2,"laneLinks":[{"startLaneIndex":2,"endLaneIndex":0,"points":[{"x":30,"y":10},{"x":26.16,"y":9.775999999999998},{"x":20.88,"y":9.168000000000001},{"x":14.52,"y":8.272},{"x":7.439999999999998,"y":7.183999999999999},{"x":0,"y":6},{"x":-7.440000000000009,"y":4.815999999999999},{"x":-14.519999999999992,"y":3.7280000000000006},{"x":-20.880000000000006,"y":2.831999999999999},{"x":-26.16,"y":2.224},{"x":-30,"y":2}]},{"startLaneIndex":2,"endLaneIndex":1,"points":[{"x":30,"y":10},{"x":26.16,"y":9.887999999999998},{"x":20.88,"y":9.584000000000001},{"x":14.52,"y":9.136},{"x":7.439999999999998,"y":8.591999999999999},{"x":0,"y":8},{"x":-7.440000000000009,"y":7.4079999999999995},{"x":-14.519999999999992,"y":6.864000000000001},{"x":-20.880000000000006,"y":6.416},{"x":-26.16,"y":6.112},{"x":-30,"y":6}]},{"startLaneIndex":2,"endLaneIndex":2,"points":[{"x":30,"y":10},{"x":26.16,"y":9.999999999999998},{"x":20.88,"y":10.000000000000002},{"x":14.52,"y":10},{"x":7.439999999999998,"y":10},{"x":0,"y":10},{"x":-7.440000000000009,"y":10},{"x":-14.519999999999992,"y":10},{"x":-20.880000000000006,"y":10},{"x":-26.16,"y":10},{"x":-30,"y":10}]},{"startLaneIndex":2,"endLaneIndex":3,"points":[{"x":30,"y":10},{"x":26.16,"y":10.111999999999998},{"x":20.88,"y":10.416},{"x":14.52,"y":10.864},{"x":7.439999999999998,"y":11.408},{"x":0,"y":12},{"x":-7.440000000000009,"y":12.592000000000002},{"x":-14.519999999999992,"y":13.136},{"x":-20.880000000000006,"y":13.584000000000001},{"x":-26.16,"y":13.888000000000002},{"x":-30,"y":14}]},{"startLaneIndex":2,"endLaneIndex":4,"points":[{"x":30,"y":10},{"x":26.16,"y":10.223999999999998},{"x":20.88,"y":10.832},{"x":14.52,"y":11.728},{"x":7.439999999999998,"y":12.816},{"x":0,"y":14},{"x":-7.440000000000009,"y":15.184000000000001},{"x":-14.519999999999992,"y":16.272},{"x":-20.880000000000006,"y":17.168000000000003},{"x":-26.16,"y":17.776},{"x":-30,"y":18}]},{"startLaneIndex":2,"endLaneIndex":5,"points":[{"x":30,"y":10},{"x":26.16,"y":10.335999999999999},{"x":20.88,"y":11.248000000000001},{"x":14.52,"y":12.592},{"x":7.439999999999998,"y":14.224},{"x":0,"y":16},{"x":-7.440000000000009,"y":17.776000000000003},{"x":-14.519999999999992,"y":19.407999999999998},{"x":-20.880000000000006,"y":20.752000000000002},{"x":-26.16,"y":21.664},{"x":-30,"y":22}]},{"startLaneIndex":2,"endLaneIndex":6,"points":[{"x":30,"y":10},{"x":26.16,"y":10.447999999999999},{"x":20.88,"y":11.664000000000001},{"x":14.52,"y":13.456},{"x":7.439999999999998,"y":15.632000000000001},{"x":0,"y":18},{"x":-7.440000000000009,"y":20.368000000000002},{"x":-14.519999999999992,"y":22.543999999999997},{"x":-20.880000000000006,"y":24.336000000000002},{"x":-26.16,"y":25.552},{"x":-30,"y":26}]},{"startLaneIndex":3,"endLaneIndex":0,"points":[{"x":30,"y":14},{"x":26.16,"y":13.664},{"x":20.88,"y":12.752},{"x":14.52,"y":11.408000000000001},{"x":7.439999999999998,"y":9.776},{"x":0,"y":8},{"x":-7.440000000000009,"y":6.223999999999998},{"x":-14.519999999999992,"y":4.5920000000000005},{"x":-20.880000000000006,"y":3.2479999999999984},{"x":-26.16,"y":2.3360000000000003},{"x":-30,"y":2}]},{"startLaneIndex":3,"endLaneIndex":1,"points":[{"x":30,"y":14},{"x":26.16,"y":13.776},{"x":20.88,"y":13.168000000000001},{"x":14.52,"y":12.272000000000002},{"x":7.439999999999998,"y":11.184},{"x":0,"y":10},{"x":-7.440000000000009,"y":8.815999999999999},{"x":-14.519999999999992,"y":7.728000000000001},{"x":-20.880000000000006,"y":6.831999999999999},{"x":-26.16,"y":6.224},{"x":-30,"y":6}]},{"startLaneIndex":3,"endLaneIndex":2,"points":[{"x":30,"y":14},{"x":26.16,"y":13.888},{"x":20.88,"y":13.584000000000001},{"x":14.52,"y":13.136000000000001},{"x":7.439999999999998,"y":12.592},{"x":0,"y":12},{"x":-7.440000000000009,"y":11.408},{"x":-14.519999999999992,"y":10.864},{"x":-20.880000000000006,"y":10.415999999999999},{"x":-26.16,"y":10.111999999999998},{"x":-30,"y":10}]},{"startLaneIndex":3,"endLaneIndex":3,"points":[{"x":30,"y":14},{"x":26.16,"y":14},{"x":20.88,"y":14},{"x":14.52,"y":14.000000000000002},{"x":7.439999999999998,"y":14},{"x":0,"y":14},{"x":-7.440000000000009,"y":14},{"x":-14.519999999999992,"y":14},{"x":-20.880000000000006,"y":14},{"x":-26.16,"y":14},{"x":-30,"y":14}]},{"startLaneIndex":3,"endLaneIndex":4,"points":[{"x":30,"y":14},{"x":26.16,"y":14.112},{"x":20.88,"y":14.416},{"x":14.52,"y":14.864},{"x":7.439999999999998,"y":15.408000000000001},{"x":0,"y":16},{"x":-7.440000000000009,"y":16.592},{"x":-14.519999999999992,"y":17.136},{"x":-20.880000000000006,"y":17.584000000000003},{"x":-26.16,"y":17.887999999999998},{"x":-30,"y":18}]},{"startLaneIndex":3,"endLaneIndex":5,"points":[{"x":30,"y":14},{"x":26.16,"y":14.224},{"x":20.88,"y":14.832},{"x":14.52,"y":15.728000000000002},{"x":7.439999999999998,"y":16.816000000000003},{"x":0,"y":18},{"x":-7.440000000000009,"y":19.184},{"x":-14.519999999999992,"y":20.272},{"x":-20.880000000000006,"y":21.168000000000003},{"x":-26.16,"y":21.776},{"x":-30,"y":22}]},{"startLaneIndex":3,"endLaneIndex":6,"points":[{"x":30,"y":14},{"x":26.16,"y":14.336},{"x":20.88,"y":15.248000000000001},{"x":14.52,"y":16.592000000000002},{"x":7.439999999999998,"y":18.224000000000004},{"x":0,"y":20},{"x":-7.440000000000009,"y":21.776},{"x":-14.519999999999992,"y":23.407999999999998},{"x":-20.880000000000006,"y":24.752000000000002},{"x":-26.16,"y":25.663999999999998},{"x":-30,"y":26}]},{"startLaneIndex":4,"endLaneIndex":0,"points":[{"x":30,"y":18},{"x":26.16,"y":17.552},{"x":20.88,"y":16.336},{"x":14.52,"y":14.544},{"x":7.439999999999998,"y":12.367999999999999},{"x":0,"y":10},{"x":-7.440000000000009,"y":7.631999999999998},{"x":-14.519999999999992,"y":5.456000000000001},{"x":-20.880000000000006,"y":3.663999999999998},{"x":-26.16,"y":2.4480000000000004},{"x":-30,"y":2}]},{"startLaneIndex":4,"endLaneIndex":1,"points":[{"x":30,"y":18},{"x":26.16,"y":17.663999999999998},{"x":20.88,"y":16.752},{"x":14.52,"y":15.408000000000001},{"x":7.439999999999998,"y":13.775999999999998},{"x":0,"y":12},{"x":-7.440000000000009,"y":10.223999999999998},{"x":-14.519999999999992,"y":8.592000000000002},{"x":-20.880000000000006,"y":7.247999999999999},{"x":-26.16,"y":6.336},{"x":-30,"y":6}]},{"startLaneIndex":4,"endLaneIndex":2,"points":[{"x":30,"y":18},{"x":26.16,"y":17.776},{"x":20.88,"y":17.168},{"x":14.52,"y":16.272},{"x":7.439999999999998,"y":15.184},{"x":0,"y":14},{"x":-7.440000000000009,"y":12.815999999999999},{"x":-14.519999999999992,"y":11.728000000000002},{"x":-20.880000000000006,"y":10.831999999999999},{"x":-26.16,"y":10.224},{"x":-30,"y":10}]},{"startLaneIndex":4,"endLaneIndex":3,"points":[{"x":30,"y":18},{"x":26.16,"y":17.887999999999998},{"x":20.88,"y":17.584},{"x":14.52,"y":17.136},{"x":7.439999999999998,"y":16.592},{"x":0,"y":16},{"x":-7.440000000000009,"y":15.408000000000001},{"x":-14.519999999999992,"y":14.864},{"x":-20.880000000000006,"y":14.416},{"x":-26.16,"y":14.112000000000002},{"x":-30,"y":14}]},{"startLaneIndex":4,"endLaneIndex":4,"points":[{"x":30,"y":18},{"x":26.16,"y":18},{"x":20.88,"y":18},{"x":14.52,"y":18},{"x":7.439999999999998,"y":18},{"x":0,"y":18},{"x":-7.440000000000009,"y":18},{"x":-14.519999999999992,"y":18},{"x":-20.880000000000006,"y":18},{"x":-26.16,"y":18},{"x":-30,"y":18}]},{"startLaneIndex":4,"endLaneIndex":5,"points":[{"x":30,"y":18},{"x":26.16,"y":18.112},{"x":20.88,"y":18.416},{"x":14.52,"y":18.864},{"x":7.439999999999998,"y":19.408},{"x":0,"y":20},{"x":-7.440000000000009,"y":20.592000000000002},{"x":-14.519999999999992,"y":21.136},{"x":-20.880000000000006,"y":21.584},{"x":-26.16,"y":21.888},{"x":-30,"y":22}]},{"startLaneIndex":4,"endLaneIndex":6,"points":[{"x":30,"y":18},{"x":26.16,"y":18.224},{"x":20.88,"y":18.832},{"x":14.52,"y":19.728},{"x":7.439999999999998,"y":20.816000000000003},{"x":0,"y":22},{"x":-7.440000000000009,"y":23.184},{"x":-14.519999999999992,"y":24.272},{"x":-20.880000000000006,"y":25.168},{"x":-26.16,"y":25.776},{"x":-30,"y":26}]}]},{"type":"turn_left","startRoad":"road_2_1_2","endRoad":"road_1_1_3","direction":2,"laneLinks":[{"startLaneIndex":0,"endLaneIndex":0,"points":[{"x":30,"y":2},{"x":26.674,"y":1.3739999999999999},{"x":22.832,"y":-0.3680000000000003},{"x":18.678,"y":-3.0220000000000007},{"x":14.415999999999999,"y":-6.384000000000002},{"x":10.25,"y":-10.25},{"x":6.383999999999996,"y":-14.416000000000004},{"x":3.022000000000004,"y":-18.677999999999997},{"x":0.3679999999999981,"y":-22.832000000000004},{"x":-1.3739999999999994,"y":-26.674},{"x":-2,"y":-30}]},{"startLaneIndex":0,"endLaneIndex":1,"points":[{"x":30,"y":2},{"x":26.562,"y":1.3739999999999999},{"x":22.416,"y":-0.3680000000000003},{"x":17.814,"y":-3.0220000000000007},{"x":13.008,"y":-6.384000000000002},{"x":8.25,"y":-10.25},{"x":3.7919999999999954,"y":-14.416000000000004},{"x":-0.11399999999999633,"y":-18.677999999999997},{"x":-3.216000000000003,"y":-22.832000000000004},{"x":-5.262,"y":-26.674},{"x":-6,"y":-30}]},{"startLaneIndex":0,"endLaneIndex":2,"points":[{"x":30,"y":2},{"x":26.45,"y":1.3739999999999999},{"x":22,"y":-0.3680000000000003},{"x":16.95,"y":-3.0220000000000007},{"x":11.599999999999998,"y":-6.384000000000002},{"x":6.25,"y":-10.25},{"x":1.1999999999999948,"y":-14.416000000000004},{"x":-3.2499999999999956,"y":-18.677999999999997},{"x":-6.8000000000000025,"y":-22.832000000000004},{"x":-9.149999999999999,"y":-26.674},{"x":-10,"y":-30}]},{"startLaneIndex":0,"endLaneIndex":3,"points":[{"x":30,"y":2},{"x":26.338,"y":1.3739999999999999},{"x":21.584,"y":-0.3680000000000003},{"x":16.086,"y":-3.0220000000000007},{"x":10.191999999999998,"y":-6.384000000000002},{"x":4.25,"y":-10.25},{"x":-1.3920000000000066,"y":-14.416000000000004},{"x":-6.385999999999996,"y":-18.677999999999997},{"x":-10.384000000000004,"y":-22.832000000000004},{"x":-13.038,"y":-26.674},{"x":-14,"y":-30}]},{"startLaneIndex":0,"endLaneIndex":4,"points":[{"x":30,"y":2},{"x":26.226,"y":1.3739999999999999},{"x":21.168,"y":-0.3680000000000003},{"x":15.222,"y":-3.0220000000000007},{"x":8.783999999999997,"y":-6.384000000000002},{"x":2.25,"y":-10.25},{"x":-3.9840000000000053,"y":-14.416000000000004},{"x":-9.521999999999995,"y":-18.677999999999997},{"x":-13.968000000000005,"y":-22.832000000000004},{"x":-16.926,"y":-26.674},{"x":-18,"y":-30}]},{"startLaneIndex":0,"endLaneIndex":5,"points":[{"x":30,"y":2},{"x":26.114,"y":1.3739999999999999},{"x":20.752,"y":-0.3680000000000003},{"x":14.357999999999999,"y":-3.0220000000000007},{"x":7.375999999999998,"y":-6.384000000000002},{"x":0.25,"y":-10.25},{"x":-6.576000000000008,"y":-14.416000000000004},{"x":-12.657999999999994,"y":-18.677999999999997},{"x":-17.552000000000007,"y":-22.832000000000004},{"x":-20.814,"y":-26.674},{"x":-22,"y":-30}]},{"startLaneIndex":0,"endLaneIndex":6,"points":[{"x":30,"y":2},{"x":26.002,"y":1.3739999999999999},{"x":20.336,"y":-0.3680000000000003},{"x":13.494,"y":-3.0220000000000007},{"x":5.967999999999996,"y":-6.384000000000002},{"x":-1.75,"y":-10.25},{"x":-9.168000000000006,"y":-14.416000000000004},{"x":-15.793999999999993,"y":-18.677999999999997},{"x":-21.136000000000003,"y":-22.832000000000004},{"x":-24.701999999999998,"y":-26.674},{"x":-26,"y":-30}]},{"startLaneIndex":1,"endLaneIndex":0,"points":[{"x":30,"y":6},{"x":26.674,"y":5.2620000000000005},{"x":22.832,"y":3.216},{"x":18.678,"y":0.11400000000000032},{"x":14.415999999999999,"y":-3.792000000000002},{"x":10.25,"y":-8.25},{"x":6.383999999999996,"y":-13.008000000000006},{"x":3.022000000000004,"y":-17.813999999999997},{"x":0.3679999999999981,"y":-22.416000000000004},{"x":-1.3739999999999994,"y":-26.562},{"x":-2,"y":-30}]},{"startLaneIndex":1,"endLaneIndex":1,"points":[{"x":30,"y":6},{"x":26.562,"y":5.2620000000000005},{"x":22.416,"y":3.216},{"x":17.814,"y":0.11400000000000032},{"x":13.008,"y":-3.792000000000002},{"x":8.25,"y":-8.25},{"x":3.7919999999999954,"y":-13.008000000000006},{"x":-0.11399999999999633,"y":-17.813999999999997},{"x":-3.216000000000003,"y":-22.416000000000004},{"x":-5.262,"y":-26.562},{"x":-6,"y":-30}]},{"startLaneIndex":1,"endLaneIndex":2,"points":[{"x":30,"y":6},{"x":26.45,"y":5.2620000000000005},{"x":22,"y":3.216},{"x":16.95,"y":0.11400000000000032},{"x":11.599999999999998,"y":-3.792000000000002},{"x":6.25,"y":-8.25},{"x":1.1999999999999948,"y":-13.008000000000006},{"x":-3.2499999999999956,"y":-17.813999999999997},{"x":-6.8000000000000025,"y":-22.416000000000004},{"x":-9.149999999999999,"y":-26.562},{"x":-10,"y":-30}]},{"startLaneIndex":1,"endLaneIndex":3,"points":[{"x":30,"y":6},{"x":26.338,"y":5.2620000000000005},{"x":21.584,"y":3.216},{"x":16.086,"y":0.11400000000000032},{"x":10.191999999999998,"y":-3.792000000000002},{"x":4.25,"y":-8.25},{"x":-1.3920000000000066,"y":-13.008000000000006},{"x":-6.385999999999996,"y":-17.813999999999997},{"x":-10.384000000000004,"y":-22.416000000000004},{"x":-13.038,"y":-26.562},{"x":-14,"y":-30}]},{"startLaneIndex":1,"endLaneIndex":4,"points":[{"x":30,"y":6},{"x":26.226,"y":5.2620000000000005},{"x":21.168,"y":3.216},{"x":15.222,"y":0.11400000000000032},{"x":8.783999999999997,"y":-3.792000000000002},{"x":2.25,"y":-8.25},{"x":-3.9840000000000053,"y":-13.008000000000006},{"x":-9.521999999999995,"y":-17.813999999999997},{"x":-13.968000000000005,"y":-22.416000000000004},{"x":-16.926,"y":-26.562},{"x":-18,"y":-30}]},{"startLaneIndex":1,"endLaneIndex":5,"points":[{"x":30,"y":6},{"x":26.114,"y":5.2620000000000005},{"x":20.752,"y":3.216},{"x":14.357999999999999,"y":0.11400000000000032},{"x":7.375999999999998,"y":-3.792000000000002},{"x":0.25,"y":-8.25},{"x":-6.576000000000008,"y":-13.008000000000006},{"x":-12.657999999999994,"y":-17.813999999999997},{"x":-17.552000000000007,"y":-22.416000000000004},{"x":-20.814,"y":-26.562},{"x":-22,"y":-30}]},{"startLaneIndex":1,"endLaneIndex":6,"points":[{"x":30,"y":6},{"x":26.002,"y":5.2620000000000005},{"x":20.336,"y":3.216},{"x":13.494,"y":0.11400000000000032},{"x":5.967999999999996,"y":-3.792000000000002},{"x":-1.75,"y":-8.25},{"x":-9.168000000000006,"y":-13.008000000000006},{"x":-15.793999999999993,"y":-17.813999999999997},{"x":-21.136000000000003,"y":-22.416000000000004},{"x":-24.701999999999998,"y":-26.562},{"x":-26,"y":-30}]}]},{"type":"turn_left","startRoad":"road_1_2_3","endRoad":"road_1_1_0","direction":3,"laneLinks":[{"startLaneIndex":0,"endLaneIndex":0,"points":[{"x":-2,"y":30},{"x":-1.3739999999999999,"y":26.674},{"x":0.3680000000000003,"y":22.832},{"x":3.0220000000000007,"y":18.678},{"x":6.384000000000002,"y":14.415999999999999},{"x":10.25,"y":10.25},{"x":14.416000000000004,"y":6.383999999999996},{"x":18.677999999999997,"y":3.022000000000004},{"x":22.832000000000004,"y":0.3679999999999981},{"x":26.674,"y":-1.3739999999999994},{"x":30,"y":-2}]},{"startLaneIndex":0,"endLaneIndex":1,"points":[{"x":-2,"y":30},{"x":-1.3739999999999999,"y":26.562},{"x":0.3680000000000003,"y":22.416},{"x":3.0220000000000007,"y":17.814},{"x":6.384000000000002,"y":13.008},{"x":10.25,"y":8.25},{"x":14.416000000000004,"y":3.7919999999999954},{"x":18.677999999999997,"y":-0.11399999999999633},{"x":22.832000000000004,"y":-3.216000000000003},{"x":26.674,"y":-5.262},{"x":30,"y":-6}]},{"startLaneIndex":0,"endLaneIndex":2,"points":[{"x":-2,"y":30},{"x":-1.3739999999999999,"y":26.45},{"x":0.3680000000000003,"y":22},{"x":3.0220000000000007,"y":16.95},{"x":6.384000000000002,"y":11.599999999999998},{"x":10.25,"y":6.25},{"x":14.416000000000004,"y":1.1999999999999948},{"x":18.677999999999997,"y":-3.2499999999999956},{"x":22.832000000000004,"y":-6.8000000000000025},{"x":26.674,"y":-9.149999999999999},{"x":30,"y":-10}]},{"startLaneIndex":0,"endLaneIndex":3,"points":[{"x":-2,"y":30},{"x":-1.3739999999999999,"y":26.338},{"x":0.3680000000000003,"y":21.584},{"x":3.0220000000000007,"y":16.086},{"x":6.384000000000002,"y":10.191999999999998},{"x":10.25,"y":4.25},{"x":14.416000000000004,"y":-1.3920000000000066},{"x":18.677999999999997,"y":-6.385999999999996},{"x":22.832000000000004,"y":-10.384000000000004},{"x":26.674,"y":-13.038},{"x":30,"y":-14}]},{"startLaneIndex":0,"endLaneIndex":4,"points":[{"x":-2,"y":30},{"x":-1.3739999999999999,"y":26.226},{"x":0.3680000000000003,"y":21.168},{"x":3.0220000000000007,"y":15.222},{"x":6.384000000000002,"y":8.783999999999997},{"x":10.25,"y":2.25},{"x":14.416000000000004,"y":-3.9840000000000053},{"x":18.677999999999997,"y":-9.521999999999995},{"x":22.832000000000004,"y":-13.968000000000005},{"x":26.674,"y":-16.926},{"x":30,"y":-18}]},{"startLaneIndex":0,"endLaneIndex":5,"points":[{"x":-2,"y":30},{"x":-1.3739999999999999,"y":26.114},{"x":0.3680000000000003,"y":20.752},{"x":3.0220000000000007,"y":14.357999999999999},{"x":6.384000000000002,"y":7.375999999999998},{"x":10.25,"y":0.25},{"x":14.416000000000004,"y":-6.576000000000008},{"x":18.677999999999997,"y":-12.657999999999994},{"x":22.832000000000004,"y":-17.552000000000007},{"x":26.674,"y":-20.814},{"x":30,"y":-22}]},{"startLaneIndex":0,"endLaneIndex":6,"points":[{"x":-2,"y":30},{"x":-1.3739999999999999,"y":26.002},{"x":0.3680000000000003,"y":20.336},{"x":3.0220000000000007,"y":13.494},{"x":6.384000000000002,"y":5.967999999999996},{"x":10.25,"y":-1.75},{"x":14.416000000000004,"y":-9.168000000000006},{"x":18.677999999999997,"y":-15.793999999999993},{"x":22.832000000000004,"y":-21.136000000000003},{"x":26.674,"y":-24.701999999999998},{"x":30,"y":-26}]},{"startLaneIndex":1,"endLaneIndex":0,"points":[{"x":-6,"y":30},{"x":-5.2620000000000005,"y":26.674},{"x":-3.216,"y":22.832},{"x":-0.11400000000000032,"y":18.678},{"x":3.792000000000002,"y":14.415999999999999},{"x":8.25,"y":10.25},{"x":13.008000000000006,"y":6.383999999999996},{"x":17.813999999999997,"y":3.022000000000004},{"x":22.416000000000004,"y":0.3679999999999981},{"x":26.562,"y":-1.3739999999999994},{"x":30,"y":-2}]},{"startLaneIndex":1,"endLaneIndex":1,"points":[{"x":-6,"y":30},{"x":-5.2620000000000005,"y":26.562},{"x":-3.216,"y":22.416},{"x":-0.11400000000000032,"y":17.814},{"x":3.792000000000002,"y":13.008},{"x":8.25,"y":8.25},{"x":13.008000000000006,"y":3.7919999999999954},{"x":17.813999999999997,"y":-0.11399999999999633},{"x":22.416000000000004,"y":-3.216000000000003},{"x":26.562,"y":-5.262},{"x":30,"y":-6}]},{"startLaneIndex":1,"endLaneIndex":2,"points":[{"x":-6,"y":30},{"x":-5.2620000000000005,"y":26.45},{"x":-3.216,"y":22},{"x":-0.11400000000000032,"y":16.95},{"x":3.792000000000002,"y":11.599999999999998},{"x":8.25,"y":6.25},{"x":13.008000000000006,"y":1.1999999999999948},{"x":17.813999999999997,"y":-3.2499999999999956},{"x":22.416000000000004,"y":-6.8000000000000025},{"x":26.562,"y":-9.149999999999999},{"x":30,"y":-10}]},{"startLaneIndex":1,"endLaneIndex":3,"points":[{"x":-6,"y":30},{"x":-5.2620000000000005,"y":26.338},{"x":-3.216,"y":21.584},{"x":-0.11400000000000032,"y":16.086},{"x":3.792000000000002,"y":10.191999999999998},{"x":8.25,"y":4.25},{"x":13.008000000000006,"y":-1.3920000000000066},{"x":17.813999999999997,"y":-6.385999999999996},{"x":22.416000000000004,"y":-10.384000000000004},{"x":26.562,"y":-13.038},{"x":30,"y":-14}]},{"startLaneIndex":1,"endLaneIndex":4,"points":[{"x":-6,"y":30},{"x":-5.2620000000000005,"y":26.226},{"x":-3.216,"y":21.168},{"x":-0.11400000000000032,"y":15.222},{"x":3.792000000000002,"y":8.783999999999997},{"x":8.25,"y":2.25},{"x":13.008000000000006,"y":-3.9840000000000053},{"x":17.813999999999997,"y":-9.521999999999995},{"x":22.416000000000004,"y":-13.968000000000005},{"x":26.562,"y":-16.926},{"x":30,"y":-18}]},{"startLaneIndex":1,"endLaneIndex":5,"points":[{"x":-6,"y":30},{"x":-5.2620000000000005,"y":26.114},{"x":-3.216,"y":20.752},{"x":-0.11400000000000032,"y":14.357999999999999},{"x":3.792000000000002,"y":7.375999999999998},{"x":8.25,"y":0.25},{"x":13.008000000000006,"y":-6.576000000000008},{"x":17.813999999999997,"y":-12.657999999999994},{"x":22.416000000000004,"y":-17.552000000000007},{"x":26.562,"y":-20.814},{"x":30,"y":-22}]},{"startLaneIndex":1,"endLaneIndex":6,"points":[{"x":-6,"y":30},{"x":-5.2620000000000005,"y":26.002},{"x":-3.216,"y":20.336},{"x":-0.11400000000000032,"y":13.494},{"x":3.792000000000002,"y":5.967999999999996},{"x":8.25,"y":-1.75},{"x":13.008000000000006,"y":-9.168000000000006},{"x":17.813999999999997,"y":-15.793999999999993},{"x":22.416000000000004,"y":-21.136000000000003},{"x":26.562,"y":-24.701999999999998},{"x":30,"y":-26}]}]},{"type":"turn_right","startRoad":"road_1_2_3","endRoad":"road_1_1_2","direction":3,"laneLinks":[{"startLaneIndex":5,"endLaneIndex":0,"points":[{"x":-22,"y":30},{"x":-21.954,"y":26.786},{"x":-21.872,"y":23.247999999999998},{"x":-21.838,"y":19.541999999999998},{"x":-21.936000000000003,"y":15.824},{"x":-22.25,"y":12.25},{"x":-22.864,"y":8.975999999999996},{"x":-23.862,"y":6.158000000000003},{"x":-25.328,"y":3.9519999999999986},{"x":-27.346,"y":2.5140000000000002},{"x":-30,"y":2}]},{"startLaneIndex":5,"endLaneIndex":1,"points":[{"x":-22,"y":30},{"x":-21.954,"y":26.898},{"x":-21.872,"y":23.663999999999998},{"x":-21.838,"y":20.406},{"x":-21.936000000000003,"y":17.232},{"x":-22.25,"y":14.25},{"x":-22.864,"y":11.567999999999998},{"x":-23.862,"y":9.294000000000004},{"x":-25.328,"y":7.536},{"x":-27.346,"y":6.402},{"x":-30,"y":6}]},{"startLaneIndex":5,"endLaneIndex":2,"points":[{"x":-22,"y":30},{"x":-21.954,"y":27.01},{"x":-21.872,"y":24.08},{"x":-21.838,"y":21.27},{"x":-21.936000000000003,"y":18.64},{"x":-22.25,"y":16.25},{"x":-22.864,"y":14.159999999999997},{"x":-23.862,"y":12.430000000000003},{"x":-25.328,"y":11.12},{"x":-27.346,"y":10.29},{"x":-30,"y":10}]},{"startLaneIndex":5,"endLaneIndex":3,"points":[{"x":-22,"y":30},{"x":-21.954,"y":27.122},{"x":-21.872,"y":24.496},{"x":-21.838,"y":22.134},{"x":-21.936000000000003,"y":20.048000000000002},{"x":-22.25,"y":18.25},{"x":-22.864,"y":16.752},{"x":-23.862,"y":15.566000000000003},{"x":-25.328,"y":14.704},{"x":-27.346,"y":14.178},{"x":-30,"y":14}]},{"startLaneIndex":5,"endLaneIndex":4,"points":[{"x":-22,"y":30},{"x":-21.954,"y":27.234},{"x":-21.872,"y":24.912},{"x":-21.838,"y":22.998},{"x":-21.936000000000003,"y":21.456000000000003},{"x":-22.25,"y":20.25},{"x":-22.864,"y":19.343999999999998},{"x":-23.862,"y":18.702},{"x":-25.328,"y":18.288000000000004},{"x":-27.346,"y":18.066},{"x":-30,"y":18}]},{"startLaneIndex":5,"endLaneIndex":5,"points":[{"x":-22,"y":30},{"x":-21.954,"y":27.346},{"x":-21.872,"y":25.328},{"x":-21.838,"y":23.862000000000002},{"x":-21.936000000000003,"y":22.864},{"x":-22.25,"y":22.25},{"x":-22.864,"y":21.936},{"x":-23.862,"y":21.838},{"x":-25.328,"y":21.872},{"x":-27.346,"y":21.954},{"x":-30,"y":22}]},{"startLaneIndex":5,"endLaneIndex":6,"points":[{"x":-22,"y":30},{"x":-21.954,"y":27.458000000000002},{"x":-21.872,"y":25.744},{"x":-21.838,"y":24.726},{"x":-21.936000000000003,"y":24.272000000000002},{"x":-22.25,"y":24.25},{"x":-22.864,"y":24.528},{"x":-23.862,"y":24.974},{"x":-25.328,"y":25.456000000000003},{"x":-27.346,"y":25.842},{"x":-30,"y":26}]},{"startLaneIndex":6,"endLaneIndex":0,"points":[{"x":-26,"y":30},{"x":-25.842,"y":26.786},{"x":-25.456,"y":23.247999999999998},{"x":-24.974,"y":19.541999999999998},{"x":-24.528000000000002,"y":15.824},{"x":-24.25,"y":12.25},{"x":-24.272000000000002,"y":8.975999999999996},{"x":-24.726,"y":6.158000000000003},{"x":-25.744,"y":3.9519999999999986},{"x":-27.458000000000002,"y":2.5140000000000002},{"x":-30,"y":2}]},{"startLaneIndex":6,"endLaneIndex":1,"points":[{"x":-26,"y":30},{"x":-25.842,"y":26.898},{"x":-25.456,"y":23.663999999999998},{"x":-24.974,"y":20.406},{"x":-24.528000000000002,"y":17.232},{"x":-24.25,"y":14.25},{"x":-24.272000000000002,"y":11.567999999999998},{"x":-24.726,"y":9.294000000000004},{"x":-25.744,"y":7.536},{"x":-27.458000000000002,"y":6.402},{"x":-30,"y":6}]},{"startLaneIndex":6,"endLaneIndex":2,"points":[{"x":-26,"y":30},{"x":-25.842,"y":27.01},{"x":-25.456,"y":24.08},{"x":-24.974,"y":21.27},{"x":-24.528000000000002,"y":18.64},{"x":-24.25,"y":16.25},{"x":-24.272000000000002,"y":14.159999999999997},{"x":-24.726,"y":12.430000000000003},{"x":-25.744,"y":11.12},{"x":-27.458000000000002,"y":10.29},{"x":-30,"y":10}]},{"startLaneIndex":6,"endLaneIndex":3,"points":[{"x":-26,"y":30},{"x":-25.842,"y":27.122},{"x":-25.456,"y":24.496},{"x":-24.974,"y":22.134},{"x":-24.528000000000002,"y":20.048000000000002},{"x":-24.25,"y":18.25},{"x":-24.272000000000002,"y":16.752},{"x":-24.726,"y":15.566000000000003},{"x":-25.744,"y":14.704},{"x":-27.458000000000002,"y":14.178},{"x":-30,"y":14}]},{"startLaneIndex":6,"endLaneIndex":4,"points":[{"x":-26,"y":30},{"x":-25.842,"y":27.234},{"x":-25.456,"y":24.912},{"x":-24.974,"y":22.998},{"x":-24.528000000000002,"y":21.456000000000003},{"x":-24.25,"y":20.25},{"x":-24.272000000000002,"y":19.343999999999998},{"x":-24.726,"y":18.702},{"x":-25.744,"y":18.288000000000004},{"x":-27.458000000000002,"y":18.066},{"x":-30,"y":18}]},{"startLaneIndex":6,"endLaneIndex":5,"points":[{"x":-26,"y":30},{"x":-25.842,"y":27.346},{"x":-25.456,"y":25.328},{"x":-24.974,"y":23.862000000000002},{"x":-24.528000000000002,"y":22.864},{"x":-24.25,"y":22.25},{"x":-24.272000000000002,"y":21.936},{"x":-24.726,"y":21.838},{"x":-25.744,"y":21.872},{"x":-27.458000000000002,"y":21.954},{"x":-30,"y":22}]},{"startLaneIndex":6,"endLaneIndex":6,"points":[{"x":-26,"y":30},{"x":-25.842,"y":27.458000000000002},{"x":-25.456,"y":25.744},{"x":-24.974,"y":24.726},{"x":-24.528000000000002,"y":24.272000000000002},{"x":-24.25,"y":24.25},{"x":-24.272000000000002,"y":24.528},{"x":-24.726,"y":24.974},{"x":-25.744,"y":25.456000000000003},{"x":-27.458000000000002,"y":25.842},{"x":-30,"y":26}]}]},{"type":"go_straight","startRoad":"road_1_2_3","endRoad":"road_1_1_3","direction":3,"laneLinks":[{"startLaneIndex":2,"endLaneIndex":0,"points":[{"x":-10,"y":30},{"x":-9.775999999999998,"y":26.16},{"x":-9.168000000000001,"y":20.88},{"x":-8.272,"y":14.52},{"x":-7.183999999999999,"y":7.439999999999998},{"x":-6,"y":0},{"x":-4.815999999999999,"y":-7.440000000000009},{"x":-3.7280000000000006,"y":-14.519999999999992},{"x":-2.831999999999999,"y":-20.880000000000006},{"x":-2.224,"y":-26.16},{"x":-2,"y":-30}]},{"startLaneIndex":2,"endLaneIndex":1,"points":[{"x":-10,"y":30},{"x":-9.887999999999998,"y":26.16},{"x":-9.584000000000001,"y":20.88},{"x":-9.136,"y":14.52},{"x":-8.591999999999999,"y":7.439999999999998},{"x":-8,"y":0},{"x":-7.4079999999999995,"y":-7.440000000000009},{"x":-6.864000000000001,"y":-14.519999999999992},{"x":-6.416,"y":-20.880000000000006},{"x":-6.112,"y":-26.16},{"x":-6,"y":-30}]},{"startLaneIndex":2,"endLaneIndex":2,"points":[{"x":-10,"y":30},{"x":-9.999999999999998,"y":26.16},{"x":-10.000000000000002,"y":20.88},{"x":-10,"y":14.52},{"x":-10,"y":7.439999999999998},{"x":-10,"y":0},{"x":-10,"y":-7.440000000000009},{"x":-10,"y":-14.519999999999992},{"x":-10,"y":-20.880000000000006},{"x":-10,"y":-26.16},{"x":-10,"y":-30}]},{"startLaneIndex":2,"endLaneIndex":3,"points":[{"x":-10,"y":30},{"x":-10.111999999999998,"y":26.16},{"x":-10.416,"y":20.88},{"x":-10.864,"y":14.52},{"x":-11.408,"y":7.439999999999998},{"x":-12,"y":0},{"x":-12.592000000000002,"y":-7.440000000000009},{"x":-13.136,"y":-14.519999999999992},{"x":-13.584000000000001,"y":-20.880000000000006},{"x":-13.888000000000002,"y":-26.16},{"x":-14,"y":-30}]},{"startLaneIndex":2,"endLaneIndex":4,"points":[{"x":-10,"y":30},{"x":-10.223999999999998,"y":26.16},{"x":-10.832,"y":20.88},{"x":-11.728,"y":14.52},{"x":-12.816,"y":7.439999999999998},{"x":-14,"y":0},{"x":-15.184000000000001,"y":-7.440000000000009},{"x":-16.272,"y":-14.519999999999992},{"x":-17.168000000000003,"y":-20.880000000000006},{"x":-17.776,"y":-26.16},{"x":-18,"y":-30}]},{"startLaneIndex":2,"endLaneIndex":5,"points":[{"x":-10,"y":30},{"x":-10.335999999999999,"y":26.16},{"x":-11.248000000000001,"y":20.88},{"x":-12.592,"y":14.52},{"x":-14.224,"y":7.439999999999998},{"x":-16,"y":0},{"x":-17.776000000000003,"y":-7.440000000000009},{"x":-19.407999999999998,"y":-14.519999999999992},{"x":-20.752000000000002,"y":-20.880000000000006},{"x":-21.664,"y":-26.16},{"x":-22,"y":-30}]},{"startLaneIndex":2,"endLaneIndex":6,"points":[{"x":-10,"y":30},{"x":-10.447999999999999,"y":26.16},{"x":-11.664000000000001,"y":20.88},{"x":-13.456,"y":14.52},{"x":-15.632000000000001,"y":7.439999999999998},{"x":-18,"y":0},{"x":-20.368000000000002,"y":-7.440000000000009},{"x":-22.543999999999997,"y":-14.519999999999992},{"x":-24.336000000000002,"y":-20.880000000000006},{"x":-25.552,"y":-26.16},{"x":-26,"y":-30}]},{"startLaneIndex":3,"endLaneIndex":0,"points":[{"x":-14,"y":30},{"x":-13.664,"y":26.16},{"x":-12.752,"y":20.88},{"x":-11.408000000000001,"y":14.52},{"x":-9.776,"y":7.439999999999998},{"x":-8,"y":0},{"x":-6.223999999999998,"y":-7.440000000000009},{"x":-4.5920000000000005,"y":-14.519999999999992},{"x":-3.2479999999999984,"y":-20.880000000000006},{"x":-2.3360000000000003,"y":-26.16},{"x":-2,"y":-30}]},{"startLaneIndex":3,"endLaneIndex":1,"points":[{"x":-14,"y":30},{"x":-13.776,"y":26.16},{"x":-13.168000000000001,"y":20.88},{"x":-12.272000000000002,"y":14.52},{"x":-11.184,"y":7.439999999999998},{"x":-10,"y":0},{"x":-8.815999999999999,"y":-7.440000000000009},{"x":-7.728000000000001,"y":-14.519999999999992},{"x":-6.831999999999999,"y":-20.880000000000006},{"x":-6.224,"y":-26.16},{"x":-6,"y":-30}]},{"startLaneIndex":3,"endLaneIndex":2,"points":[{"x":-14,"y":30},{"x":-13.888,"y":26.16},{"x":-13.584000000000001,"y":20.88},{"x":-13.136000000000001,"y":14.52},{"x":-12.592,"y":7.439999999999998},{"x":-12,"y":0},{"x":-11.408,"y":-7.440000000000009},{"x":-10.864,"y":-14.519999999999992},{"x":-10.415999999999999,"y":-20.880000000000006},{"x":-10.111999999999998,"y":-26.16},{"x":-10,"y":-30}]},{"startLaneIndex":3,"endLaneIndex":3,"points":[{"x":-14,"y":30},{"x":-14,"y":26.16},{"x":-14,"y":20.88},{"x":-14.000000000000002,"y":14.52},{"x":-14,"y":7.439999999999998},{"x":-14,"y":0},{"x":-14,"y":-7.440000000000009},{"x":-14,"y":-14.519999999999992},{"x":-14,"y":-20.880000000000006},{"x":-14,"y":-26.16},{"x":-14,"y":-30}]},{"startLaneIndex":3,"endLaneIndex":4,"points":[{"x":-14,"y":30},{"x":-14.112,"y":26.16},{"x":-14.416,"y":20.88},{"x":-14.864,"y":14.52},{"x":-15.408000000000001,"y":7.439999999999998},{"x":-16,"y":0},{"x":-16.592,"y":-7.440000000000009},{"x":-17.136,"y":-14.519999999999992},{"x":-17.584000000000003,"y":-20.880000000000006},{"x":-17.887999999999998,"y":-26.16},{"x":-18,"y":-30}]},{"startLaneIndex":3,"endLaneIndex":5,"points":[{"x":-14,"y":30},{"x":-14.224,"y":26.16},{"x":-14.832,"y":20.88},{"x":-15.728000000000002,"y":14.52},{"x":-16.816000000000003,"y":7.439999999999998},{"x":-18,"y":0},{"x":-19.184,"y":-7.440000000000009},{"x":-20.272,"y":-14.519999999999992},{"x":-21.168000000000003,"y":-20.880000000000006},{"x":-21.776,"y":-26.16},{"x":-22,"y":-30}]},{"startLaneIndex":3,"endLaneIndex":6,"points":[{"x":-14,"y":30},{"x":-14.336,"y":26.16},{"x":-15.248000000000001,"y":20.88},{"x":-16.592000000000002,"y":14.52},{"x":-18.224000000000004,"y":7.439999999999998},{"x":-20,"y":0},{"x":-21.776,"y":-7.440000000000009},{"x":-23.407999999999998,"y":-14.519999999999992},{"x":-24.752000000000002,"y":-20.880000000000006},{"x":-25.663999999999998,"y":-26.16},{"x":-26,"y":-30}]},{"startLaneIndex":4,"endLaneIndex":0,"points":[{"x":-18,"y":30},{"x":-17.552,"y":26.16},{"x":-16.336,"y":20.88},{"x":-14.544,"y":14.52},{"x":-12.367999999999999,"y":7.439999999999998},{"x":-10,"y":0},{"x":-7.631999999999998,"y":-7.440000000000009},{"x":-5.456000000000001,"y":-14.519999999999992},{"x":-3.663999999999998,"y":-20.880000000000006},{"x":-2.4480000000000004,"y":-26.16},{"x":-2,"y":-30}]},{"startLaneIndex":4,"endLaneIndex":1,"points":[{"x":-18,"y":30},{"x":-17.663999999999998,"y":26.16},{"x":-16.752,"y":20.88},{"x":-15.408000000000001,"y":14.52},{"x":-13.775999999999998,"y":7.439999999999998},{"x":-12,"y":0},{"x":-10.223999999999998,"y":-7.440000000000009},{"x":-8.592000000000002,"y":-14.519999999999992},{"x":-7.247999999999999,"y":-20.880000000000006},{"x":-6.336,"y":-26.16},{"x":-6,"y":-30}]},{"startLaneIndex":4,"endLaneIndex":2,"points":[{"x":-18,"y":30},{"x":-17.776,"y":26.16},{"x":-17.168,"y":20.88},{"x":-16.272,"y":14.52},{"x":-15.184,"y":7.439999999999998},{"x":-14,"y":0},{"x":-12.815999999999999,"y":-7.440000000000009},{"x":-11.728000000000002,"y":-14.519999999999992},{"x":-10.831999999999999,"y":-20.880000000000006},{"x":-10.224,"y":-26.16},{"x":-10,"y":-30}]},{"startLaneIndex":4,"endLaneIndex":3,"points":[{"x":-18,"y":30},{"x":-17.887999999999998,"y":26.16},{"x":-17.584,"y":20.88},{"x":-17.136,"y":14.52},{"x":-16.592,"y":7.439999999999998},{"x":-16,"y":0},{"x":-15.408000000000001,"y":-7.440000000000009},{"x":-14.864,"y":-14.519999999999992},{"x":-14.416,"y":-20.880000000000006},{"x":-14.112000000000002,"y":-26.16},{"x":-14,"y":-30}]},{"startLaneIndex":4,"endLaneIndex":4,"points":[{"x":-18,"y":30},{"x":-18,"y":26.16},{"x":-18,"y":20.88},{"x":-18,"y":14.52},{"x":-18,"y":7.439999999999998},{"x":-18,"y":0},{"x":-18,"y":-7.440000000000009},{"x":-18,"y":-14.519999999999992},{"x":-18,"y":-20.880000000000006},{"x":-18,"y":-26.16},{"x":-18,"y":-30}]},{"startLaneIndex":4,"endLaneIndex":5,"points":[{"x":-18,"y":30},{"x":-18.112,"y":26.16},{"x":-18.416,"y":20.88},{"x":-18.864,"y":14.52},{"x":-19.408,"y":7.439999999999998},{"x":-20,"y":0},{"x":-20.592000000000002,"y":-7.440000000000009},{"x":-21.136,"y":-14.519999999999992},{"x":-21.584,"y":-20.880000000000006},{"x":-21.888,"y":-26.16},{"x":-22,"y":-30}]},{"startLaneIndex":4,"endLaneIndex":6,"points":[{"x":-18,"y":30},{"x":-18.224,"y":26.16},{"x":-18.832,"y":20.88},{"x":-19.728,"y":14.52},{"x":-20.816000000000003,"y":7.439999999999998},{"x":-22,"y":0},{"x":-23.184,"y":-7.440000000000009},{"x":-24.272,"y":-14.519999999999992},{"x":-25.168,"y":-20.880000000000006},{"x":-25.776,"y":-26.16},{"x":-26,"y":-30}]}]}],"trafficLight":{"roadLinkIndices":[0,1,2,3,4,5,6,7,8,9,10,11],"lightphases":[{"time":30,"availableRoadLinks":[0,2,3,6,7,10]},{"time":5,"availableRoadLinks":[10,2,3,6]},{"time":30,"availableRoadLinks":[1,2,3,6,8,10]},{"time":5,"availableRoadLinks":[10,2,3,6]},{"time":30,"availableRoadLinks":[2,3,4,6,10,11]},{"time":5,"availableRoadLinks":[10,2,3,6]},{"time":30,"availableRoadLinks":[2,3,5,6,9,10]},{"time":5,"availableRoadLinks":[10,2,3,6]}]},"virtual":false},{"id":"intersection_2_1","point":{"x":300,"y":0},"width":0,"roads":["road_1_1_0","road_2_1_2"],"roadLinks":[],"trafficLight":{"roadLinkIndices":[],"lightphases":[{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]}]},"virtual":true},{"id":"intersection_1_2","point":{"x":0,"y":300},"width":0,"roads":["road_1_1_1","road_1_2_3"],"roadLinks":[],"trafficLight":{"roadLinkIndices":[],"lightphases":[{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]},{"time":30,"availableRoadLinks":[]},{"time":5,"availableRoadLinks":[]}]},"virtual":true}],"roads":[{"id":"road_1_0_1","points":[{"x":0,"y":-300},{"x":0,"y":0}],"lanes":[{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67}],"startIntersection":"intersection_1_0","endIntersection":"intersection_1_1"},{"id":"road_0_1_0","points":[{"x":-300,"y":0},{"x":0,"y":0}],"lanes":[{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67}],"startIntersection":"intersection_0_1","endIntersection":"intersection_1_1"},{"id":"road_1_1_0","points":[{"x":0,"y":0},{"x":300,"y":0}],"lanes":[{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67}],"startIntersection":"intersection_1_1","endIntersection":"intersection_2_1"},{"id":"road_1_1_1","points":[{"x":0,"y":0},{"x":0,"y":300}],"lanes":[{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67}],"startIntersection":"intersection_1_1","endIntersection":"intersection_1_2"},{"id":"road_1_1_2","points":[{"x":0,"y":0},{"x":-300,"y":0}],"lanes":[{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67}],"startIntersection":"intersection_1_1","endIntersection":"intersection_0_1"},{"id":"road_1_1_3","points":[{"x":0,"y":0},{"x":0,"y":-300}],"lanes":[{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67}],"startIntersection":"intersection_1_1","endIntersection":"intersection_1_0"},{"id":"road_2_1_2","points":[{"x":300,"y":0},{"x":0,"y":0}],"lanes":[{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67}],"startIntersection":"intersection_2_1","endIntersection":"intersection_1_1"},{"id":"road_1_2_3","points":[{"x":0,"y":300},{"x":0,"y":0}],"lanes":[{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67},{"width":4,"maxSpeed":16.67}],"startIntersection":"intersection_1_2","endIntersection":"intersection_1_1"}]} \ No newline at end of file diff --git a/third_party/CityFlow/extern/milo/dtoa_milo.h b/third_party/CityFlow/extern/milo/dtoa_milo.h new file mode 100644 index 0000000000000000000000000000000000000000..46cb0e176cd0ddac6f6bfa2e53fd766657af72a5 --- /dev/null +++ b/third_party/CityFlow/extern/milo/dtoa_milo.h @@ -0,0 +1,396 @@ +#pragma once +#include +#include +#include +#include + +#define UINT64_C2(h, l) ((static_cast(h) << 32) | static_cast(l)) + +struct DiyFp { + DiyFp() {} + + DiyFp(uint64_t f, int e) : f(f), e(e) {} + + DiyFp(double d) { + union { + double d; + uint64_t u64; + } u = { d }; + + int biased_e = (u.u64 & kDpExponentMask) >> kDpSignificandSize; + uint64_t significand = (u.u64 & kDpSignificandMask); + if (biased_e != 0) { + f = significand + kDpHiddenBit; + e = biased_e - kDpExponentBias; + } + else { + f = significand; + e = kDpMinExponent + 1; + } + } + + DiyFp operator-(const DiyFp& rhs) const { + assert(e == rhs.e); + assert(f >= rhs.f); + return DiyFp(f - rhs.f, e); + } + + DiyFp operator*(const DiyFp& rhs) const { +#if defined(_MSC_VER) && defined(_M_AMD64) + uint64_t h; + uint64_t l = _umul128(f, rhs.f, &h); + if (l & (uint64_t(1) << 63)) // rounding + h++; + return DiyFp(h, e + rhs.e + 64); +#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__) + unsigned __int128 p = static_cast(f) * static_cast(rhs.f); + uint64_t h = p >> 64; + uint64_t l = static_cast(p); + if (l & (uint64_t(1) << 63)) // rounding + h++; + return DiyFp(h, e + rhs.e + 64); +#else + const uint64_t M32 = 0xFFFFFFFF; + const uint64_t a = f >> 32; + const uint64_t b = f & M32; + const uint64_t c = rhs.f >> 32; + const uint64_t d = rhs.f & M32; + const uint64_t ac = a * c; + const uint64_t bc = b * c; + const uint64_t ad = a * d; + const uint64_t bd = b * d; + uint64_t tmp = (bd >> 32) + (ad & M32) + (bc & M32); + tmp += 1U << 31; /// mult_round + return DiyFp(ac + (ad >> 32) + (bc >> 32) + (tmp >> 32), e + rhs.e + 64); +#endif + } + + DiyFp Normalize() const { +#if defined(_MSC_VER) && defined(_M_AMD64) + unsigned long index; + _BitScanReverse64(&index, f); + return DiyFp(f << (63 - index), e - (63 - index)); +#elif defined(__GNUC__) + int s = __builtin_clzll(f); + return DiyFp(f << s, e - s); +#else + DiyFp res = *this; + while (!(res.f & kDpHiddenBit)) { + res.f <<= 1; + res.e--; + } + res.f <<= (kDiySignificandSize - kDpSignificandSize - 1); + res.e = res.e - (kDiySignificandSize - kDpSignificandSize - 1); + return res; +#endif + } + + DiyFp NormalizeBoundary() const { +#if defined(_MSC_VER) && defined(_M_AMD64) + unsigned long index; + _BitScanReverse64(&index, f); + return DiyFp (f << (63 - index), e - (63 - index)); +#else + DiyFp res = *this; + while (!(res.f & (kDpHiddenBit << 1))) { + res.f <<= 1; + res.e--; + } + res.f <<= (kDiySignificandSize - kDpSignificandSize - 2); + res.e = res.e - (kDiySignificandSize - kDpSignificandSize - 2); + return res; +#endif + } + + void NormalizedBoundaries(DiyFp* minus, DiyFp* plus) const { + DiyFp pl = DiyFp((f << 1) + 1, e - 1).NormalizeBoundary(); + DiyFp mi = (f == kDpHiddenBit) ? DiyFp((f << 2) - 1, e - 2) : DiyFp((f << 1) - 1, e - 1); + mi.f <<= mi.e - pl.e; + mi.e = pl.e; + *plus = pl; + *minus = mi; + } + + static const int kDiySignificandSize = 64; + static const int kDpSignificandSize = 52; + static const int kDpExponentBias = 0x3FF + kDpSignificandSize; + static const int kDpMinExponent = -kDpExponentBias; + static const uint64_t kDpExponentMask = UINT64_C2(0x7FF00000, 0x00000000); + static const uint64_t kDpSignificandMask = UINT64_C2(0x000FFFFF, 0xFFFFFFFF); + static const uint64_t kDpHiddenBit = UINT64_C2(0x00100000, 0x00000000); + + uint64_t f; + int e; +}; + +inline DiyFp GetCachedPower(int e, int* K) { + // 10^-348, 10^-340, ..., 10^340 + static const uint64_t kCachedPowers_F[] = { + UINT64_C2(0xfa8fd5a0, 0x081c0288), UINT64_C2(0xbaaee17f, 0xa23ebf76), + UINT64_C2(0x8b16fb20, 0x3055ac76), UINT64_C2(0xcf42894a, 0x5dce35ea), + UINT64_C2(0x9a6bb0aa, 0x55653b2d), UINT64_C2(0xe61acf03, 0x3d1a45df), + UINT64_C2(0xab70fe17, 0xc79ac6ca), UINT64_C2(0xff77b1fc, 0xbebcdc4f), + UINT64_C2(0xbe5691ef, 0x416bd60c), UINT64_C2(0x8dd01fad, 0x907ffc3c), + UINT64_C2(0xd3515c28, 0x31559a83), UINT64_C2(0x9d71ac8f, 0xada6c9b5), + UINT64_C2(0xea9c2277, 0x23ee8bcb), UINT64_C2(0xaecc4991, 0x4078536d), + UINT64_C2(0x823c1279, 0x5db6ce57), UINT64_C2(0xc2109436, 0x4dfb5637), + UINT64_C2(0x9096ea6f, 0x3848984f), UINT64_C2(0xd77485cb, 0x25823ac7), + UINT64_C2(0xa086cfcd, 0x97bf97f4), UINT64_C2(0xef340a98, 0x172aace5), + UINT64_C2(0xb23867fb, 0x2a35b28e), UINT64_C2(0x84c8d4df, 0xd2c63f3b), + UINT64_C2(0xc5dd4427, 0x1ad3cdba), UINT64_C2(0x936b9fce, 0xbb25c996), + UINT64_C2(0xdbac6c24, 0x7d62a584), UINT64_C2(0xa3ab6658, 0x0d5fdaf6), + UINT64_C2(0xf3e2f893, 0xdec3f126), UINT64_C2(0xb5b5ada8, 0xaaff80b8), + UINT64_C2(0x87625f05, 0x6c7c4a8b), UINT64_C2(0xc9bcff60, 0x34c13053), + UINT64_C2(0x964e858c, 0x91ba2655), UINT64_C2(0xdff97724, 0x70297ebd), + UINT64_C2(0xa6dfbd9f, 0xb8e5b88f), UINT64_C2(0xf8a95fcf, 0x88747d94), + UINT64_C2(0xb9447093, 0x8fa89bcf), UINT64_C2(0x8a08f0f8, 0xbf0f156b), + UINT64_C2(0xcdb02555, 0x653131b6), UINT64_C2(0x993fe2c6, 0xd07b7fac), + UINT64_C2(0xe45c10c4, 0x2a2b3b06), UINT64_C2(0xaa242499, 0x697392d3), + UINT64_C2(0xfd87b5f2, 0x8300ca0e), UINT64_C2(0xbce50864, 0x92111aeb), + UINT64_C2(0x8cbccc09, 0x6f5088cc), UINT64_C2(0xd1b71758, 0xe219652c), + UINT64_C2(0x9c400000, 0x00000000), UINT64_C2(0xe8d4a510, 0x00000000), + UINT64_C2(0xad78ebc5, 0xac620000), UINT64_C2(0x813f3978, 0xf8940984), + UINT64_C2(0xc097ce7b, 0xc90715b3), UINT64_C2(0x8f7e32ce, 0x7bea5c70), + UINT64_C2(0xd5d238a4, 0xabe98068), UINT64_C2(0x9f4f2726, 0x179a2245), + UINT64_C2(0xed63a231, 0xd4c4fb27), UINT64_C2(0xb0de6538, 0x8cc8ada8), + UINT64_C2(0x83c7088e, 0x1aab65db), UINT64_C2(0xc45d1df9, 0x42711d9a), + UINT64_C2(0x924d692c, 0xa61be758), UINT64_C2(0xda01ee64, 0x1a708dea), + UINT64_C2(0xa26da399, 0x9aef774a), UINT64_C2(0xf209787b, 0xb47d6b85), + UINT64_C2(0xb454e4a1, 0x79dd1877), UINT64_C2(0x865b8692, 0x5b9bc5c2), + UINT64_C2(0xc83553c5, 0xc8965d3d), UINT64_C2(0x952ab45c, 0xfa97a0b3), + UINT64_C2(0xde469fbd, 0x99a05fe3), UINT64_C2(0xa59bc234, 0xdb398c25), + UINT64_C2(0xf6c69a72, 0xa3989f5c), UINT64_C2(0xb7dcbf53, 0x54e9bece), + UINT64_C2(0x88fcf317, 0xf22241e2), UINT64_C2(0xcc20ce9b, 0xd35c78a5), + UINT64_C2(0x98165af3, 0x7b2153df), UINT64_C2(0xe2a0b5dc, 0x971f303a), + UINT64_C2(0xa8d9d153, 0x5ce3b396), UINT64_C2(0xfb9b7cd9, 0xa4a7443c), + UINT64_C2(0xbb764c4c, 0xa7a44410), UINT64_C2(0x8bab8eef, 0xb6409c1a), + UINT64_C2(0xd01fef10, 0xa657842c), UINT64_C2(0x9b10a4e5, 0xe9913129), + UINT64_C2(0xe7109bfb, 0xa19c0c9d), UINT64_C2(0xac2820d9, 0x623bf429), + UINT64_C2(0x80444b5e, 0x7aa7cf85), UINT64_C2(0xbf21e440, 0x03acdd2d), + UINT64_C2(0x8e679c2f, 0x5e44ff8f), UINT64_C2(0xd433179d, 0x9c8cb841), + UINT64_C2(0x9e19db92, 0xb4e31ba9), UINT64_C2(0xeb96bf6e, 0xbadf77d9), + UINT64_C2(0xaf87023b, 0x9bf0ee6b) + }; + static const int16_t kCachedPowers_E[] = { + -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, + -954, -927, -901, -874, -847, -821, -794, -768, -741, -715, + -688, -661, -635, -608, -582, -555, -529, -502, -475, -449, + -422, -396, -369, -343, -316, -289, -263, -236, -210, -183, + -157, -130, -103, -77, -50, -24, 3, 30, 56, 83, + 109, 136, 162, 189, 216, 242, 269, 295, 322, 348, + 375, 402, 428, 455, 481, 508, 534, 561, 588, 614, + 641, 667, 694, 720, 747, 774, 800, 827, 853, 880, + 907, 933, 960, 986, 1013, 1039, 1066 + }; + + //int k = static_cast(ceil((-61 - e) * 0.30102999566398114)) + 374; + double dk = (-61 - e) * 0.30102999566398114 + 347; // dk must be positive, so can do ceiling in positive + int k = static_cast(dk); + if (k != dk) + k++; + + unsigned index = static_cast((k >> 3) + 1); + *K = -(-348 + static_cast(index << 3)); // decimal exponent no need lookup table + + assert(index < sizeof(kCachedPowers_F) / sizeof(kCachedPowers_F[0])); + return DiyFp(kCachedPowers_F[index], kCachedPowers_E[index]); +} + +inline void GrisuRound(char* buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t wp_w) { + while (rest < wp_w && delta - rest >= ten_kappa && + (rest + ten_kappa < wp_w || /// closer + wp_w - rest > rest + ten_kappa - wp_w)) { + buffer[len - 1]--; + rest += ten_kappa; + } +} + +inline unsigned CountDecimalDigit32(uint32_t n) { + // Simple pure C++ implementation was faster than __builtin_clz version in this situation. + if (n < 10) return 1; + if (n < 100) return 2; + if (n < 1000) return 3; + if (n < 10000) return 4; + if (n < 100000) return 5; + if (n < 1000000) return 6; + if (n < 10000000) return 7; + if (n < 100000000) return 8; + if (n < 1000000000) return 9; + return 10; +} + +inline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buffer, int* len, int* K) { + static const uint32_t kPow10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 }; + const DiyFp one(uint64_t(1) << -Mp.e, Mp.e); + const DiyFp wp_w = Mp - W; + uint32_t p1 = static_cast(Mp.f >> -one.e); + uint64_t p2 = Mp.f & (one.f - 1); + int kappa = static_cast(CountDecimalDigit32(p1)); + *len = 0; + + while (kappa > 0) { + uint32_t d; + switch (kappa) { + case 10: d = p1 / 1000000000; p1 %= 1000000000; break; + case 9: d = p1 / 100000000; p1 %= 100000000; break; + case 8: d = p1 / 10000000; p1 %= 10000000; break; + case 7: d = p1 / 1000000; p1 %= 1000000; break; + case 6: d = p1 / 100000; p1 %= 100000; break; + case 5: d = p1 / 10000; p1 %= 10000; break; + case 4: d = p1 / 1000; p1 %= 1000; break; + case 3: d = p1 / 100; p1 %= 100; break; + case 2: d = p1 / 10; p1 %= 10; break; + case 1: d = p1; p1 = 0; break; + default: +#if defined(_MSC_VER) + __assume(0); +#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) + __builtin_unreachable(); +#else + d = 0; +#endif + } + if (d || *len) + buffer[(*len)++] = '0' + static_cast(d); + kappa--; + uint64_t tmp = (static_cast(p1) << -one.e) + p2; + if (tmp <= delta) { + *K += kappa; + GrisuRound(buffer, *len, delta, tmp, static_cast(kPow10[kappa]) << -one.e, wp_w.f); + return; + } + } + + // kappa = 0 + for (;;) { + p2 *= 10; + delta *= 10; + char d = static_cast(p2 >> -one.e); + if (d || *len) + buffer[(*len)++] = '0' + d; + p2 &= one.f - 1; + kappa--; + if (p2 < delta) { + *K += kappa; + GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * kPow10[-kappa]); + return; + } + } +} + +inline void Grisu2(double value, char* buffer, int* length, int* K) { + const DiyFp v(value); + DiyFp w_m, w_p; + v.NormalizedBoundaries(&w_m, &w_p); + + const DiyFp c_mk = GetCachedPower(w_p.e, K); + const DiyFp W = v.Normalize() * c_mk; + DiyFp Wp = w_p * c_mk; + DiyFp Wm = w_m * c_mk; + Wm.f++; + Wp.f--; + DigitGen(W, Wp, Wp.f - Wm.f, buffer, length, K); +} + +inline const char* GetDigitsLut() { + static const char cDigitsLut[200] = { + '0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', '7', '0', '8', '0', '9', + '1', '0', '1', '1', '1', '2', '1', '3', '1', '4', '1', '5', '1', '6', '1', '7', '1', '8', '1', '9', + '2', '0', '2', '1', '2', '2', '2', '3', '2', '4', '2', '5', '2', '6', '2', '7', '2', '8', '2', '9', + '3', '0', '3', '1', '3', '2', '3', '3', '3', '4', '3', '5', '3', '6', '3', '7', '3', '8', '3', '9', + '4', '0', '4', '1', '4', '2', '4', '3', '4', '4', '4', '5', '4', '6', '4', '7', '4', '8', '4', '9', + '5', '0', '5', '1', '5', '2', '5', '3', '5', '4', '5', '5', '5', '6', '5', '7', '5', '8', '5', '9', + '6', '0', '6', '1', '6', '2', '6', '3', '6', '4', '6', '5', '6', '6', '6', '7', '6', '8', '6', '9', + '7', '0', '7', '1', '7', '2', '7', '3', '7', '4', '7', '5', '7', '6', '7', '7', '7', '8', '7', '9', + '8', '0', '8', '1', '8', '2', '8', '3', '8', '4', '8', '5', '8', '6', '8', '7', '8', '8', '8', '9', + '9', '0', '9', '1', '9', '2', '9', '3', '9', '4', '9', '5', '9', '6', '9', '7', '9', '8', '9', '9' + }; + return cDigitsLut; +} + +inline void WriteExponent(int K, char* buffer) { + if (K < 0) { + *buffer++ = '-'; + K = -K; + } + + if (K >= 100) { + *buffer++ = '0' + static_cast(K / 100); + K %= 100; + const char* d = GetDigitsLut() + K * 2; + *buffer++ = d[0]; + *buffer++ = d[1]; + } + else if (K >= 10) { + const char* d = GetDigitsLut() + K * 2; + *buffer++ = d[0]; + *buffer++ = d[1]; + } + else + *buffer++ = '0' + static_cast(K); + + *buffer = '\0'; +} + +inline void Prettify(char* buffer, int length, int k) { + const int kk = length + k; // 10^(kk-1) <= v < 10^kk + + if (length <= kk && kk <= 21) { + // 1234e7 -> 12340000000 + for (int i = length; i < kk; i++) + buffer[i] = '0'; + buffer[kk] = '.'; + buffer[kk + 1] = '0'; + buffer[kk + 2] = '\0'; + } + else if (0 < kk && kk <= 21) { + // 1234e-2 -> 12.34 + memmove(&buffer[kk + 1], &buffer[kk], length - kk); + buffer[kk] = '.'; + buffer[length + 1] = '\0'; + } + else if (-6 < kk && kk <= 0) { + // 1234e-6 -> 0.001234 + const int offset = 2 - kk; + memmove(&buffer[offset], &buffer[0], length); + buffer[0] = '0'; + buffer[1] = '.'; + for (int i = 2; i < offset; i++) + buffer[i] = '0'; + buffer[length + offset] = '\0'; + } + else if (length == 1) { + // 1e30 + buffer[1] = 'e'; + WriteExponent(kk - 1, &buffer[2]); + } + else { + // 1234e30 -> 1.234e33 + memmove(&buffer[2], &buffer[1], length - 1); + buffer[1] = '.'; + buffer[length + 1] = 'e'; + WriteExponent(kk - 1, &buffer[0 + length + 2]); + } +} + +inline void dtoa_milo(double value, char* buffer) { + // Not handling NaN and inf + assert(!std::isnan(value)); + assert(!std::isinf(value)); + + if (value == 0) { + buffer[0] = '0'; + buffer[1] = '.'; + buffer[2] = '0'; + buffer[3] = '\0'; + } + else { + if (value < 0) { + *buffer++ = '-'; + value = -value; + } + int length, K; + Grisu2(value, buffer, &length, &K); + Prettify(buffer, length, K); + } +} \ No newline at end of file diff --git a/third_party/CityFlow/extern/pybind11/.appveyor.yml b/third_party/CityFlow/extern/pybind11/.appveyor.yml new file mode 100644 index 0000000000000000000000000000000000000000..360760ac8db71a68cd2f874723e1e2bbb80545fb --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.appveyor.yml @@ -0,0 +1,35 @@ +version: 1.0.{build} +image: +- Visual Studio 2017 +test: off +skip_branch_with_pr: true +build: + parallel: true +platform: +- x86 +environment: + matrix: + - PYTHON: 36 + CONFIG: Debug +install: +- ps: | + $env:CMAKE_GENERATOR = "Visual Studio 15 2017" + if ($env:PLATFORM -eq "x64") { $env:PYTHON = "$env:PYTHON-x64" } + $env:PATH = "C:\Python$env:PYTHON\;C:\Python$env:PYTHON\Scripts\;$env:PATH" + python -W ignore -m pip install --upgrade pip wheel + python -W ignore -m pip install pytest numpy --no-warn-script-location pytest-timeout +- ps: | + Start-FileDownload 'https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.zip' + 7z x eigen-3.3.7.zip -y > $null + $env:CMAKE_INCLUDE_PATH = "eigen-3.3.7;$env:CMAKE_INCLUDE_PATH" +build_script: +- cmake -G "%CMAKE_GENERATOR%" -A "%CMAKE_ARCH%" + -DCMAKE_CXX_STANDARD=14 + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DCMAKE_SUPPRESS_REGENERATION=1 + . +- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" +- cmake --build . --config %CONFIG% --target pytest -- /m /v:m /logger:%MSBuildLogger% +- cmake --build . --config %CONFIG% --target cpptest -- /m /v:m /logger:%MSBuildLogger% +on_failure: if exist "tests\test_cmake_build" type tests\test_cmake_build\*.log* diff --git a/third_party/CityFlow/extern/pybind11/.clang-format b/third_party/CityFlow/extern/pybind11/.clang-format new file mode 100644 index 0000000000000000000000000000000000000000..b477a16037bc70dabe91e0bf7f8dae057124c653 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.clang-format @@ -0,0 +1,38 @@ +--- +# See all possible options and defaults with: +# clang-format --style=llvm --dump-config +BasedOnStyle: LLVM +AccessModifierOffset: -4 +AllowShortLambdasOnASingleLine: true +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: false +BinPackParameters: false +BreakBeforeBinaryOperators: All +BreakConstructorInitializers: BeforeColon +ColumnLimit: 99 +CommentPragmas: 'NOLINT:.*|^ IWYU pragma:' +IncludeBlocks: Regroup +IndentCaseLabels: true +IndentPPDirectives: AfterHash +IndentWidth: 4 +Language: Cpp +SpaceAfterCStyleCast: true +Standard: Cpp11 +StatementMacros: ['PyObject_HEAD'] +TabWidth: 4 +IncludeCategories: + - Regex: '' + Priority: 4 + - Regex: '.*' + Priority: 5 +... diff --git a/third_party/CityFlow/extern/pybind11/.clang-tidy b/third_party/CityFlow/extern/pybind11/.clang-tidy new file mode 100644 index 0000000000000000000000000000000000000000..23018386c1079cbc82d62e44aac840bd825396eb --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.clang-tidy @@ -0,0 +1,77 @@ +FormatStyle: file + +Checks: | + *bugprone*, + *performance*, + clang-analyzer-optin.cplusplus.VirtualCall, + clang-analyzer-optin.performance.Padding, + cppcoreguidelines-init-variables, + cppcoreguidelines-prefer-member-initializer, + cppcoreguidelines-pro-type-static-cast-downcast, + cppcoreguidelines-slicing, + google-explicit-constructor, + llvm-namespace-comment, + misc-definitions-in-headers, + misc-misplaced-const, + misc-non-copyable-objects, + misc-static-assert, + misc-throw-by-value-catch-by-reference, + misc-uniqueptr-reset-release, + misc-unused-parameters, + modernize-avoid-bind, + modernize-loop-convert, + modernize-make-shared, + modernize-redundant-void-arg, + modernize-replace-auto-ptr, + modernize-replace-disallow-copy-and-assign-macro, + modernize-replace-random-shuffle, + modernize-shrink-to-fit, + modernize-use-auto, + modernize-use-bool-literals, + modernize-use-default-member-init, + modernize-use-emplace, + modernize-use-equals-default, + modernize-use-equals-delete, + modernize-use-noexcept, + modernize-use-nullptr, + modernize-use-override, + modernize-use-using, + readability-avoid-const-params-in-decls, + readability-braces-around-statements, + readability-const-return-type, + readability-container-size-empty, + readability-delete-null-pointer, + readability-else-after-return, + readability-implicit-bool-conversion, + readability-inconsistent-declaration-parameter-name, + readability-make-member-function-const, + readability-misplaced-array-index, + readability-non-const-parameter, + readability-qualified-auto, + readability-redundant-function-ptr-dereference, + readability-redundant-smartptr-get, + readability-redundant-string-cstr, + readability-simplify-subscript-expr, + readability-static-accessed-through-instance, + readability-static-definition-in-anonymous-namespace, + readability-string-compare, + readability-suspicious-call-argument, + readability-uniqueptr-delete-release, + -bugprone-easily-swappable-parameters, + -bugprone-exception-escape, + -bugprone-reserved-identifier, + -bugprone-unused-raii, + +CheckOptions: +- key: modernize-use-equals-default.IgnoreMacros + value: false +- key: performance-for-range-copy.WarnOnAllAutoCopies + value: true +- key: performance-inefficient-string-concatenation.StrictMode + value: true +- key: performance-unnecessary-value-param.AllowedTypes + value: 'exception_ptr$;' +- key: readability-implicit-bool-conversion.AllowPointerConditions + value: true + +HeaderFilterRegex: 'pybind11/.*h' diff --git a/third_party/CityFlow/extern/pybind11/.cmake-format.yaml b/third_party/CityFlow/extern/pybind11/.cmake-format.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a2a69f3f897da990a4255b593dc3fcdf4b89a764 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.cmake-format.yaml @@ -0,0 +1,73 @@ +parse: + additional_commands: + pybind11_add_module: + flags: + - THIN_LTO + - MODULE + - SHARED + - NO_EXTRAS + - EXCLUDE_FROM_ALL + - SYSTEM + +format: + line_width: 99 + tab_size: 2 + + # If an argument group contains more than this many sub-groups + # (parg or kwarg groups) then force it to a vertical layout. + max_subgroups_hwrap: 2 + + # If a positional argument group contains more than this many + # arguments, then force it to a vertical layout. + max_pargs_hwrap: 6 + + # If a cmdline positional group consumes more than this many + # lines without nesting, then invalidate the layout (and nest) + max_rows_cmdline: 2 + separate_ctrl_name_with_space: false + separate_fn_name_with_space: false + dangle_parens: false + + # If the trailing parenthesis must be 'dangled' on its on + # 'line, then align it to this reference: `prefix`: the start' + # 'of the statement, `prefix-indent`: the start of the' + # 'statement, plus one indentation level, `child`: align to' + # the column of the arguments + dangle_align: prefix + # If the statement spelling length (including space and + # parenthesis) is smaller than this amount, then force reject + # nested layouts. + min_prefix_chars: 4 + + # If the statement spelling length (including space and + # parenthesis) is larger than the tab width by more than this + # amount, then force reject un-nested layouts. + max_prefix_chars: 10 + + # If a candidate layout is wrapped horizontally but it exceeds + # this many lines, then reject the layout. + max_lines_hwrap: 2 + + line_ending: unix + + # Format command names consistently as 'lower' or 'upper' case + command_case: canonical + + # Format keywords consistently as 'lower' or 'upper' case + # unchanged is valid too + keyword_case: 'upper' + + # A list of command names which should always be wrapped + always_wrap: [] + + # If true, the argument lists which are known to be sortable + # will be sorted lexicographically + enable_sort: true + + # If true, the parsers may infer whether or not an argument + # list is sortable (without annotation). + autosort: false + +# Causes a few issues - can be solved later, possibly. +markup: + enable_markup: false diff --git a/third_party/CityFlow/extern/pybind11/.codespell-ignore-lines b/third_party/CityFlow/extern/pybind11/.codespell-ignore-lines new file mode 100644 index 0000000000000000000000000000000000000000..2a01d63ebb35287ef7e95ddf5c856ca272872b6b --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.codespell-ignore-lines @@ -0,0 +1,24 @@ +template + template + auto &this_ = static_cast(*this); + if (load_impl(temp, false)) { + ssize_t nd = 0; + auto trivial = broadcast(buffers, nd, shape); + auto ndim = (size_t) nd; + int nd; + ssize_t ndim() const { return detail::array_proxy(m_ptr)->nd; } + using op = op_impl; +template + template + class_ &def(const detail::op_ &op, const Extra &...extra) { + class_ &def_cast(const detail::op_ &op, const Extra &...extra) { +@pytest.mark.parametrize("access", ["ro", "rw", "static_ro", "static_rw"]) +struct IntStruct { + explicit IntStruct(int v) : value(v){}; + ~IntStruct() { value = -value; } + IntStruct(const IntStruct &) = default; + IntStruct &operator=(const IntStruct &) = default; + py::class_(m, "IntStruct").def(py::init([](const int i) { return IntStruct(i); })); + py::implicitly_convertible(); + m.def("test", [](int expected, const IntStruct &in) { + [](int expected, const IntStruct &in) { diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/FETCH_HEAD b/third_party/CityFlow/extern/pybind11/.git.bak/FETCH_HEAD new file mode 100644 index 0000000000000000000000000000000000000000..ef06204eb799d121d6a90c8b5901470094a4faf2 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/FETCH_HEAD @@ -0,0 +1,32 @@ +68a11bb65b774df161c898204d08e85ac2cbac5f not-for-merge branch 'archive/smart_holder' of https://github.com/pybind/pybind11 +619fb2305697c1eb4a6e248af03eab2c8c57237d not-for-merge branch 'array-sequence-fix' of https://github.com/pybind/pybind11 +1423623205a5d656ec2f068b948dcf5f02146f2f not-for-merge branch 'cpp17-aligned-new' of https://github.com/pybind/pybind11 +fd3a93c520a661b78e177280128a9c855d7f5be5 not-for-merge branch 'fold-expression-caster' of https://github.com/pybind/pybind11 +9fa6acdf5bf53b6f26d6bf2f1bdab65da782ec08 not-for-merge branch 'henryiii-patch-1' of https://github.com/pybind/pybind11 +d8c30a8f2df87007ca2a5679119af50aff5c0695 not-for-merge branch 'henryiii-patch-2' of https://github.com/pybind/pybind11 +d7cc5b052d737de8478b536fee4a2075cedec866 not-for-merge branch 'henryiii-patch-3' of https://github.com/pybind/pybind11 +19ddbe5bc3eb3064201a914626ac642e1884e654 not-for-merge branch 'henryiii/revert/pycapsule' of https://github.com/pybind/pybind11 +78e074b8bbda1073e60273620e084aac28b0740c not-for-merge branch 'internals_ptr' of https://github.com/pybind/pybind11 +8986743b6daebfcb07428e921192ff77308db055 not-for-merge branch 'issue1561_fix' of https://github.com/pybind/pybind11 +cd538ed1184d41cf685dd4da81c1eca80d24f353 not-for-merge branch 'master' of https://github.com/pybind/pybind11 +45c45eefe9bb7ba37a7e71dcabff5e7b5ff4596c not-for-merge branch 'pre-commit-ci-update-config' of https://github.com/pybind/pybind11 +dba00d7369677617d00974f5a00ebcd5e6288cdc not-for-merge branch 'revert-4220-fix-nvcc-11.4-11.8' of https://github.com/pybind/pybind11 +04cfb45b7998fe960a70743770b94bdb3a712f73 not-for-merge branch 'stable' of https://github.com/pybind/pybind11 +e076c4513dc2c89c1e9b7cb716fb8e4588e8e067 not-for-merge branch 'undefined-macos' of https://github.com/pybind/pybind11 +121360c6ae0fff0c97c64470508c11a0cc27bf94 not-for-merge branch 'v1.8' of https://github.com/pybind/pybind11 +07de0d8627101be53986e841cd4e21ee38c2498a not-for-merge branch 'v2.0' of https://github.com/pybind/pybind11 +1df91d36cfa997c8987889234304ea5e37cc3e68 not-for-merge branch 'v2.1' of https://github.com/pybind/pybind11 +5b0a6fc2017fcc176545afe3e09c9f9885283242 not-for-merge branch 'v2.10' of https://github.com/pybind/pybind11 +95d943ae0ebdf609bbd650d119fda539509929b6 not-for-merge branch 'v2.11' of https://github.com/pybind/pybind11 +2e0815278cb899b20870a67ca8205996ef47e70f not-for-merge branch 'v2.12' of https://github.com/pybind/pybind11 +a2e59f0e7065404b44dfe92a28aca47ba1378dc4 not-for-merge branch 'v2.13' of https://github.com/pybind/pybind11 +a23996fce38ff6ccfbcdc09f1e63f2c4be5ea2ef not-for-merge branch 'v2.2' of https://github.com/pybind/pybind11 +a1b71df137e015d44f7e31f7b6d4807253fb7871 not-for-merge branch 'v2.3' of https://github.com/pybind/pybind11 +80d452484c5409444b0ec19383faa84bb7a4d351 not-for-merge branch 'v2.4' of https://github.com/pybind/pybind11 +3b1dbebabc801c9cf6f0953a4c20b904d444f879 not-for-merge branch 'v2.5' of https://github.com/pybind/pybind11 +8de7772cc72daca8e947b79b83fea46214931604 not-for-merge branch 'v2.6' of https://github.com/pybind/pybind11 +5b4432439ed72417253f9eec99f2a014636c0362 not-for-merge branch 'v2.7' of https://github.com/pybind/pybind11 +f7b499615e14d70ab098a20deb0cdb3889998a1a not-for-merge branch 'v2.8' of https://github.com/pybind/pybind11 +914c06fb252b6cc3727d0eedab6736e88a3fcb01 not-for-merge branch 'v2.9' of https://github.com/pybind/pybind11 +45fab4087eaaff234227a10cf7845e8b07f28a98 not-for-merge branch 'v3.0' of https://github.com/pybind/pybind11 +0991e90375606254087f7bffe0dd15dd910ec62b not-for-merge branch 'void-caster-fix' of https://github.com/pybind/pybind11 diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/HEAD b/third_party/CityFlow/extern/pybind11/.git.bak/HEAD new file mode 100644 index 0000000000000000000000000000000000000000..a65636e1da5633cb681a3a0abcecd6d2b72c5904 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/HEAD @@ -0,0 +1 @@ +3e9dfa2866941655c56877882565e7577de6fc7b diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/config b/third_party/CityFlow/extern/pybind11/.git.bak/config new file mode 100644 index 0000000000000000000000000000000000000000..aa0aa90930a61bad0f04470655e698cd6f85de6e --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/config @@ -0,0 +1,13 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = https://github.com/pybind/pybind11.git + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/description b/third_party/CityFlow/extern/pybind11/.git.bak/description new file mode 100644 index 0000000000000000000000000000000000000000..498b267a8c7812490d6479839c5577eaaec79d62 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/applypatch-msg.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/applypatch-msg.sample new file mode 100644 index 0000000000000000000000000000000000000000..a5d7b84a673458d14d9aab082183a1968c2c7492 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +commitmsg="$(git rev-parse --git-path hooks/commit-msg)" +test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +: diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/commit-msg.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/commit-msg.sample new file mode 100644 index 0000000000000000000000000000000000000000..b58d1184a9d43a39c0d95f32453efc78581877d6 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/fsmonitor-watchman.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/fsmonitor-watchman.sample new file mode 100644 index 0000000000000000000000000000000000000000..23e856f5deeb7f564afc22f2beed54449c2d3afb --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/fsmonitor-watchman.sample @@ -0,0 +1,174 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use IPC::Open2; + +# An example hook script to integrate Watchman +# (https://facebook.github.io/watchman/) with git to speed up detecting +# new and modified files. +# +# The hook is passed a version (currently 2) and last update token +# formatted as a string and outputs to stdout a new update token and +# all files that have been modified since the update token. Paths must +# be relative to the root of the working tree and separated by a single NUL. +# +# To enable this hook, rename this file to "query-watchman" and set +# 'git config core.fsmonitor .git/hooks/query-watchman' +# +my ($version, $last_update_token) = @ARGV; + +# Uncomment for debugging +# print STDERR "$0 $version $last_update_token\n"; + +# Check the hook interface version +if ($version ne 2) { + die "Unsupported query-fsmonitor hook version '$version'.\n" . + "Falling back to scanning...\n"; +} + +my $git_work_tree = get_working_dir(); + +my $retry = 1; + +my $json_pkg; +eval { + require JSON::XS; + $json_pkg = "JSON::XS"; + 1; +} or do { + require JSON::PP; + $json_pkg = "JSON::PP"; +}; + +launch_watchman(); + +sub launch_watchman { + my $o = watchman_query(); + if (is_work_tree_watched($o)) { + output_result($o->{clock}, @{$o->{files}}); + } +} + +sub output_result { + my ($clockid, @files) = @_; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # binmode $fh, ":utf8"; + # print $fh "$clockid\n@files\n"; + # close $fh; + + binmode STDOUT, ":utf8"; + print $clockid; + print "\0"; + local $, = "\0"; + print @files; +} + +sub watchman_clock { + my $response = qx/watchman clock "$git_work_tree"/; + die "Failed to get clock id on '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + + return $json_pkg->new->utf8->decode($response); +} + +sub watchman_query { + my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') + or die "open2() failed: $!\n" . + "Falling back to scanning...\n"; + + # In the query expression below we're asking for names of files that + # changed since $last_update_token but not from the .git folder. + # + # To accomplish this, we're using the "since" generator to use the + # recency index to select candidate nodes and "fields" to limit the + # output to file names only. Then we're using the "expression" term to + # further constrain the results. + my $last_update_line = ""; + if (substr($last_update_token, 0, 1) eq "c") { + $last_update_token = "\"$last_update_token\""; + $last_update_line = qq[\n"since": $last_update_token,]; + } + my $query = <<" END"; + ["query", "$git_work_tree", {$last_update_line + "fields": ["name"], + "expression": ["not", ["dirname", ".git"]] + }] + END + + # Uncomment for debugging the watchman query + # open (my $fh, ">", ".git/watchman-query.json"); + # print $fh $query; + # close $fh; + + print CHLD_IN $query; + close CHLD_IN; + my $response = do {local $/; }; + + # Uncomment for debugging the watch response + # open ($fh, ">", ".git/watchman-response.json"); + # print $fh $response; + # close $fh; + + die "Watchman: command returned no output.\n" . + "Falling back to scanning...\n" if $response eq ""; + die "Watchman: command returned invalid output: $response\n" . + "Falling back to scanning...\n" unless $response =~ /^\{/; + + return $json_pkg->new->utf8->decode($response); +} + +sub is_work_tree_watched { + my ($output) = @_; + my $error = $output->{error}; + if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { + $retry--; + my $response = qx/watchman watch "$git_work_tree"/; + die "Failed to make watchman watch '$git_work_tree'.\n" . + "Falling back to scanning...\n" if $? != 0; + $output = $json_pkg->new->utf8->decode($response); + $error = $output->{error}; + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + # Uncomment for debugging watchman output + # open (my $fh, ">", ".git/watchman-output.out"); + # close $fh; + + # Watchman will always return all files on the first query so + # return the fast "everything is dirty" flag to git and do the + # Watchman query just to get it over with now so we won't pay + # the cost in git to look up each individual file. + my $o = watchman_clock(); + $error = $output->{error}; + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + output_result($o->{clock}, ("/")); + $last_update_token = $o->{clock}; + + eval { launch_watchman() }; + return 0; + } + + die "Watchman: $error.\n" . + "Falling back to scanning...\n" if $error; + + return 1; +} + +sub get_working_dir { + my $working_dir; + if ($^O =~ 'msys' || $^O =~ 'cygwin') { + $working_dir = Win32::GetCwd(); + $working_dir =~ tr/\\/\//; + } else { + require Cwd; + $working_dir = Cwd::cwd(); + } + + return $working_dir; +} diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/post-update.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/post-update.sample new file mode 100644 index 0000000000000000000000000000000000000000..ec17ec1939b7c3e86b7cb6c0c4de6b0818a7e75e --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-applypatch.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-applypatch.sample new file mode 100644 index 0000000000000000000000000000000000000000..4142082bcb939bbc17985a69ba748491ac6b62a5 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +precommit="$(git rev-parse --git-path hooks/pre-commit)" +test -x "$precommit" && exec "$precommit" ${1+"$@"} +: diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-commit.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-commit.sample new file mode 100644 index 0000000000000000000000000000000000000000..29ed5ee486a4f07c3f0558101ef8efc46f3d6ab7 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=$(git hash-object -t tree /dev/null) +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --type=bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff-index --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-merge-commit.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-merge-commit.sample new file mode 100644 index 0000000000000000000000000000000000000000..399eab1924e39da570b389b0bef1ca713b3b05c3 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-merge-commit.sample @@ -0,0 +1,13 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git merge" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message to +# stderr if it wants to stop the merge commit. +# +# To enable this hook, rename this file to "pre-merge-commit". + +. git-sh-setup +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" +: diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-push.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-push.sample new file mode 100644 index 0000000000000000000000000000000000000000..4ce688d32b7532862767345f2b991ae856f7d4a8 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-rebase.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-rebase.sample new file mode 100644 index 0000000000000000000000000000000000000000..6cbef5c370d8c3486ca85423dd70440c5e0a2aa2 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up to date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-receive.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-receive.sample new file mode 100644 index 0000000000000000000000000000000000000000..a1fd29ec14823d8bc4a8d1a2cfe35451580f5118 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to make use of push options. +# The example simply echoes all push options that start with 'echoback=' +# and rejects all pushes when the "reject" push option is used. +# +# To enable this hook, rename this file to "pre-receive". + +if test -n "$GIT_PUSH_OPTION_COUNT" +then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" + do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + esac + i=$((i + 1)) + done +fi diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/prepare-commit-msg.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/prepare-commit-msg.sample new file mode 100644 index 0000000000000000000000000000000000000000..10fa14c5ab0134436e2ae435138bf921eb477c60 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/prepare-commit-msg.sample @@ -0,0 +1,42 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first one removes the +# "# Please enter the commit message..." help message. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +COMMIT_MSG_FILE=$1 +COMMIT_SOURCE=$2 +SHA1=$3 + +/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" + +# case "$COMMIT_SOURCE,$SHA1" in +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; +# *) ;; +# esac + +# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" +# if test -z "$COMMIT_SOURCE" +# then +# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" +# fi diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/push-to-checkout.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/push-to-checkout.sample new file mode 100644 index 0000000000000000000000000000000000000000..af5a0c0018b5e9c04b56ac52f21b4d28f48d99ea --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/push-to-checkout.sample @@ -0,0 +1,78 @@ +#!/bin/sh + +# An example hook script to update a checked-out tree on a git push. +# +# This hook is invoked by git-receive-pack(1) when it reacts to git +# push and updates reference(s) in its repository, and when the push +# tries to update the branch that is currently checked out and the +# receive.denyCurrentBranch configuration variable is set to +# updateInstead. +# +# By default, such a push is refused if the working tree and the index +# of the remote repository has any difference from the currently +# checked out commit; when both the working tree and the index match +# the current commit, they are updated to match the newly pushed tip +# of the branch. This hook is to be used to override the default +# behaviour; however the code below reimplements the default behaviour +# as a starting point for convenient modification. +# +# The hook receives the commit with which the tip of the current +# branch is going to be updated: +commit=$1 + +# It can exit with a non-zero status to refuse the push (when it does +# so, it must not modify the index or the working tree). +die () { + echo >&2 "$*" + exit 1 +} + +# Or it can make any necessary changes to the working tree and to the +# index to bring them to the desired state when the tip of the current +# branch is updated to the new commit, and exit with a zero status. +# +# For example, the hook can simply run git read-tree -u -m HEAD "$1" +# in order to emulate git fetch that is run in the reverse direction +# with git push, as the two-tree form of git read-tree -u -m is +# essentially the same as git switch or git checkout that switches +# branches while keeping the local changes in the working tree that do +# not interfere with the difference between the branches. + +# The below is a more-or-less exact translation to shell of the C code +# for the default behaviour for git's push-to-checkout hook defined in +# the push_to_deploy() function in builtin/receive-pack.c. +# +# Note that the hook will be executed from the repository directory, +# not from the working tree, so if you want to perform operations on +# the working tree, you will have to adapt your code accordingly, e.g. +# by adding "cd .." or using relative paths. + +if ! git update-index -q --ignore-submodules --refresh +then + die "Up-to-date check failed" +fi + +if ! git diff-files --quiet --ignore-submodules -- +then + die "Working directory has unstaged changes" +fi + +# This is a rough translation of: +# +# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX +if git cat-file -e HEAD 2>/dev/null +then + head=HEAD +else + head=$(git hash-object -t tree --stdin &2 + exit 1 +} + +unset GIT_DIR GIT_WORK_TREE +cd "$worktree" && + +if grep -q "^diff --git " "$1" +then + validate_patch "$1" +else + validate_cover_letter "$1" +fi && + +if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL" +then + git config --unset-all sendemail.validateWorktree && + trap 'git worktree remove -ff "$worktree"' EXIT && + validate_series +fi diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/hooks/update.sample b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/update.sample new file mode 100644 index 0000000000000000000000000000000000000000..c4d426bc6ee9430ee7813263ce6d5da7ec78c3c6 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to block unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --type=bool hooks.allowunannotated) +allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) +denycreatebranch=$(git config --type=bool hooks.denycreatebranch) +allowdeletetag=$(git config --type=bool hooks.allowdeletetag) +allowmodifytag=$(git config --type=bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero=$(git hash-object --stdin &2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/index b/third_party/CityFlow/extern/pybind11/.git.bak/index new file mode 100644 index 0000000000000000000000000000000000000000..1c534c02f083f9f641ba6a43d3dd8f6828020c77 Binary files /dev/null and b/third_party/CityFlow/extern/pybind11/.git.bak/index differ diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/info/exclude b/third_party/CityFlow/extern/pybind11/.git.bak/info/exclude new file mode 100644 index 0000000000000000000000000000000000000000..a5196d1be8fb59edf8062bef36d3a602e0812139 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/logs/HEAD b/third_party/CityFlow/extern/pybind11/.git.bak/logs/HEAD new file mode 100644 index 0000000000000000000000000000000000000000..35ab6aac4b048589a5e1262d9c6553613ce30015 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/logs/HEAD @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 cd538ed1184d41cf685dd4da81c1eca80d24f353 Aditya Mangalampalli 1772762957 -0800 clone: from https://github.com/pybind/pybind11.git +cd538ed1184d41cf685dd4da81c1eca80d24f353 3e9dfa2866941655c56877882565e7577de6fc7b Aditya Mangalampalli 1772762967 -0800 checkout: moving from master to v2.12.0 diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/logs/refs/heads/master b/third_party/CityFlow/extern/pybind11/.git.bak/logs/refs/heads/master new file mode 100644 index 0000000000000000000000000000000000000000..1644cb8e322faf52e60342eef1c782ab59945050 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 cd538ed1184d41cf685dd4da81c1eca80d24f353 Aditya Mangalampalli 1772762957 -0800 clone: from https://github.com/pybind/pybind11.git diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/logs/refs/remotes/origin/HEAD b/third_party/CityFlow/extern/pybind11/.git.bak/logs/refs/remotes/origin/HEAD new file mode 100644 index 0000000000000000000000000000000000000000..1644cb8e322faf52e60342eef1c782ab59945050 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 cd538ed1184d41cf685dd4da81c1eca80d24f353 Aditya Mangalampalli 1772762957 -0800 clone: from https://github.com/pybind/pybind11.git diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.idx b/third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.idx new file mode 100644 index 0000000000000000000000000000000000000000..c79b0b8deed207ad303e3671e8ee9aea5ca72f2f --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.idx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8eab49c7458bf9eae31453436dd8d49970cbc64a1a689ab32954be72c5ce6984 +size 809012 diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.pack b/third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.pack new file mode 100644 index 0000000000000000000000000000000000000000..2c3ff0d82508529ac15249229db814568601e79e --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.pack @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d93641fa9d8f001d09b109375402759a5d87be76d98bffdbddb7aed726540c6b +size 13497843 diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.rev b/third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.rev new file mode 100644 index 0000000000000000000000000000000000000000..3bd3c6adb185988467d87f0c7c2d324cb1a750ef --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/objects/pack/pack-0b2353194187af7e228cfabd32025bb4d3af8551.rev @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e6cee1b9a115803ca23eaecb75e588c1ab1671657648c48bd4144289a9312eb +size 115472 diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/packed-refs b/third_party/CityFlow/extern/pybind11/.git.bak/packed-refs new file mode 100644 index 0000000000000000000000000000000000000000..75ccb1fe27f8270809dc66e8581e8ce3fada40d4 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/packed-refs @@ -0,0 +1,143 @@ +# pack-refs with: peeled fully-peeled sorted +68a11bb65b774df161c898204d08e85ac2cbac5f refs/remotes/origin/archive/smart_holder +619fb2305697c1eb4a6e248af03eab2c8c57237d refs/remotes/origin/array-sequence-fix +1423623205a5d656ec2f068b948dcf5f02146f2f refs/remotes/origin/cpp17-aligned-new +fd3a93c520a661b78e177280128a9c855d7f5be5 refs/remotes/origin/fold-expression-caster +9fa6acdf5bf53b6f26d6bf2f1bdab65da782ec08 refs/remotes/origin/henryiii-patch-1 +d8c30a8f2df87007ca2a5679119af50aff5c0695 refs/remotes/origin/henryiii-patch-2 +d7cc5b052d737de8478b536fee4a2075cedec866 refs/remotes/origin/henryiii-patch-3 +19ddbe5bc3eb3064201a914626ac642e1884e654 refs/remotes/origin/henryiii/revert/pycapsule +78e074b8bbda1073e60273620e084aac28b0740c refs/remotes/origin/internals_ptr +8986743b6daebfcb07428e921192ff77308db055 refs/remotes/origin/issue1561_fix +cd538ed1184d41cf685dd4da81c1eca80d24f353 refs/remotes/origin/master +45c45eefe9bb7ba37a7e71dcabff5e7b5ff4596c refs/remotes/origin/pre-commit-ci-update-config +dba00d7369677617d00974f5a00ebcd5e6288cdc refs/remotes/origin/revert-4220-fix-nvcc-11.4-11.8 +04cfb45b7998fe960a70743770b94bdb3a712f73 refs/remotes/origin/stable +e076c4513dc2c89c1e9b7cb716fb8e4588e8e067 refs/remotes/origin/undefined-macos +121360c6ae0fff0c97c64470508c11a0cc27bf94 refs/remotes/origin/v1.8 +07de0d8627101be53986e841cd4e21ee38c2498a refs/remotes/origin/v2.0 +1df91d36cfa997c8987889234304ea5e37cc3e68 refs/remotes/origin/v2.1 +5b0a6fc2017fcc176545afe3e09c9f9885283242 refs/remotes/origin/v2.10 +95d943ae0ebdf609bbd650d119fda539509929b6 refs/remotes/origin/v2.11 +2e0815278cb899b20870a67ca8205996ef47e70f refs/remotes/origin/v2.12 +a2e59f0e7065404b44dfe92a28aca47ba1378dc4 refs/remotes/origin/v2.13 +a23996fce38ff6ccfbcdc09f1e63f2c4be5ea2ef refs/remotes/origin/v2.2 +a1b71df137e015d44f7e31f7b6d4807253fb7871 refs/remotes/origin/v2.3 +80d452484c5409444b0ec19383faa84bb7a4d351 refs/remotes/origin/v2.4 +3b1dbebabc801c9cf6f0953a4c20b904d444f879 refs/remotes/origin/v2.5 +8de7772cc72daca8e947b79b83fea46214931604 refs/remotes/origin/v2.6 +5b4432439ed72417253f9eec99f2a014636c0362 refs/remotes/origin/v2.7 +f7b499615e14d70ab098a20deb0cdb3889998a1a refs/remotes/origin/v2.8 +914c06fb252b6cc3727d0eedab6736e88a3fcb01 refs/remotes/origin/v2.9 +45fab4087eaaff234227a10cf7845e8b07f28a98 refs/remotes/origin/v3.0 +0991e90375606254087f7bffe0dd15dd910ec62b refs/remotes/origin/void-caster-fix +8ae716ab79e0141537eff420cb7e79b06d14c402 refs/tags/v1.0 +^929fd7e6946255ed84c803d2993f48912de96e15 +1a25b3f8f7455246adf2930e4c857c128c71a240 refs/tags/v1.1 +^bda3b67dc5f9481857aa7a14478bab3293bb376f +ef4345f46c672a74e161f5a8955784658fb10ae8 refs/tags/v1.2 +^8ed2808239f3a6052e7789feeeab34eed39b5c62 +1c32fcbfba8849abedf2a50e675e5f847c20a42d refs/tags/v1.3 +^d2385e8fc6a3008cab96532c99db4c3d57541fc5 +0b8a0c621a2872312b477bed4f8b72a1a3a34d61 refs/tags/v1.4 +^0e6ca5916e2585ca9b778f8304c166b6a36b7e5a +dce23aeae9dcae322670073e6b5a7a22fb740c14 refs/tags/v1.5 +^bb79d7bdc0f48f1a9284af85bf36d392afc28307 +549781cb1c71a91b8bab23e452c5bfed413dee40 refs/tags/v1.6 +^e85e9d82824e88352c9389694ff2130e4a6c5d02 +f21d226f83c5c3db2f3f5c554c35fb8942fd6dcb refs/tags/v1.7 +^e70b2abb6dee27a2889b01f245a2a28e6fcd4b01 +8e8bd7090ba1197117560c7e7f46cd2e9d026424 refs/tags/v1.8 +^c0759976177b92f386856a5d9f2e8d63ef89293a +4da184714d7a3ee298edcabb51497c629108205b refs/tags/v1.8.1 +^121360c6ae0fff0c97c64470508c11a0cc27bf94 +40585804f4e9dbf45b277dd55c19a8026b356eef refs/tags/v2.0.0 +^e33ef9c20d36fe760792c61ccc95ecf1b42cf81d +12006926087bdd34dcbd4db40611be7d5b6ed830 refs/tags/v2.0.0-rc1 +^3c7967111280b0a796986ac2025d0ca201623656 +f74dd5d5a4033e68d9000d3c288d0b57a3fc0105 refs/tags/v2.0.1 +^07de0d8627101be53986e841cd4e21ee38c2498a +a2207c044fdffac6023975df015e73f161082b57 refs/tags/v2.1.0 +^ad9d574c85f1836c57f2f0727ffe997bb8cbfdd7 +cbf3c94e781074f2f094e9a39d7ea86304d69a1d refs/tags/v2.1.1 +^1df91d36cfa997c8987889234304ea5e37cc3e68 +8d298f32f3bf5c1854adeadf7f1ec1c236dd5221 refs/tags/v2.10.0 +^aa304c9c7d725ffb9d10af08a3b34cb372307020 +bcee506ac0b09ea13000484c08ab3e5a41ee0fb2 refs/tags/v2.10.1 +^80dc998efced8ceb2be59756668a7e90e8bef917 +76b3533f96774e555a6e10d6deb9bbafe4970011 refs/tags/v2.10.2 +^0694ec6a15863bff2e0ea5efe07c78de39b9a33c +70a09bf92bff267b3eceee51bee00741bc91367f refs/tags/v2.10.3 +^0bd8896a4010f2d91b2340570c24fa08606ec406 +95ddd6b61bbecd06d00eef8a0e72fa9ffd46631e refs/tags/v2.10.4 +^5b0a6fc2017fcc176545afe3e09c9f9885283242 +8d8aecf4a5579c0e51d07fb93411aa120ae0360c refs/tags/v2.11.0 +^1a917f1852eb7819b671fc3fa862840f4c491a07 +0630807c3070287c716f6be3eacb00b8816b4215 refs/tags/v2.11.1 +^8a099e44b3d5f85b20f05828d919d2332a8de841 +95d943ae0ebdf609bbd650d119fda539509929b6 refs/tags/v2.11.2 +3e9dfa2866941655c56877882565e7577de6fc7b refs/tags/v2.12.0 +2e0815278cb899b20870a67ca8205996ef47e70f refs/tags/v2.12.1 +0c69e1eb2177fa8f8580632c7b1f97fdb606ce8f refs/tags/v2.13.0 +941f45bcb51457884fa1afd6e24a67377d70f75c refs/tags/v2.13.1 +07f30430d4186c2712761f1ffaea50ede63f2b2b refs/tags/v2.13.2 +bd67643652d3800837f1f41549a2a5adbaa3fafe refs/tags/v2.13.3 +c6239a8a1b6871cc0fb5f7af885a02ffd1349f9d refs/tags/v2.13.4 +7c33cdc2d39c7b99a122579f53bc94c8eb3332ff refs/tags/v2.13.5 +a2e59f0e7065404b44dfe92a28aca47ba1378dc4 refs/tags/v2.13.6 +c36cf6254170aa8aef35b65854f518016551d5b8 refs/tags/v2.2.0 +^2a5a5ec0a47c245fbf1bb1a8a90b4c3278e01693 +9a9239eaa52e0e2a16c76894a7f30f19997f0167 refs/tags/v2.2.1 +^86e2ad4f77442c3350f9a2476650da6bee253c52 +8bd683141ccf900aafc3dc76e5efd86f1e8ac541 refs/tags/v2.2.2 +^f117a48ea2fd446d2865826a58d08027d4579cb3 +197ae8a04cec7bf9327d36c780d4fca2a6b51339 refs/tags/v2.2.3 +^8edc147d67ca85a93ed1f53628004528dc36a04d +e4637eb508aa3e41233875f6ce3891d96fbc5d33 refs/tags/v2.2.4 +^9a19306fbf30642ca331d0ec88e7da54a96860f9 +7107ada7cbbd01e76a2a9f3e2ec27b683dcec99b refs/tags/v2.3.0 +^e43e1cc01ae6d4e4e5ba10557a057d7f3d5ece0d +ca8264815ffcf8beda3b206405a92927c722027f refs/tags/v2.4.0 +^00a0aa992953d6482114a0f539a21bb535a16383 +8b7a01d0b8dddf9ff650a6511377cd32a4f1501a refs/tags/v2.4.1 +^e44fcc3c15b41f0720c72832c0b9cd07de819781 +6c383e01bbd4155a29ad280ad7ba7941e05675dd refs/tags/v2.4.2 +^7ec2ddfc95f65d1e986d359466a6c254aa514ef3 +aa56a0e4a40af9ff27dd5b4d283d29bc64c19088 refs/tags/v2.4.3 +^80d452484c5409444b0ec19383faa84bb7a4d351 +014cd12ec1a3258f3bfc6597f371ed46c8e89ccd refs/tags/v2.5.0 +^3b1dbebabc801c9cf6f0953a4c20b904d444f879 +78b2d1991b9e81bbc1a6670ab4af189094e952eb refs/tags/v2.6.0 +^59a2ac2745d8a57ac94c6accced73620d59fb844 +319b99648b94c37e16cec64e0aec6d80557de64f refs/tags/v2.6.0b1 +d46f3322a45cb907777f568bb1377ab1b9457ad8 refs/tags/v2.6.0rc1 +c4a8b5bb9140cdc8c214044d41e2593986f875d0 refs/tags/v2.6.0rc2 +c16da993094988141101ac4d96a9b2c92f9ac714 refs/tags/v2.6.0rc3 +f4bc37b3de4857b9d80c1d85ff9f9e5dceef3dd4 refs/tags/v2.6.1 +^f1abf5d9159b805674197f6bc443592e631c9130 +c7faa0f557df4ee266e6e6dca311cd1474ad2123 refs/tags/v2.6.2 +^8de7772cc72daca8e947b79b83fea46214931604 +40d14c37b4cb8488a241f837ea2e3eb60404f7b7 refs/tags/v2.7.0 +^65e95ea8675ea34bdd566d6461330f25c651e5a8 +c0e8a831c6023be719144e7d10c8ea7c9fb81a58 refs/tags/v2.7.1 +^787d2c88cafa4d07fb38c9519c485a86323cfcf4 +dc756043d5ed7654e48c41d97a64403a847214a7 refs/tags/v2.8.0 +^97976c16fb7652f7faf02d76756666ef87adbe7d +79dfe03e432e2af41bba00add596e6df92099b49 refs/tags/v2.8.1 +^f7b499615e14d70ab098a20deb0cdb3889998a1a +1dad2a58efb1eef1eb9f2e5532dedd3711924810 refs/tags/v2.9.0 +^45f792efdd92da094548e2095d6efdbfa7e536ee +35b51445ba2bf5e67137c04bc26ceaab33e4285f refs/tags/v2.9.1 +^ffa346860b306c9bbfb341aed9c14c067751feb8 +dd9ef9f901f3d49426f87a67666393970a6c9431 refs/tags/v2.9.2 +^914c06fb252b6cc3727d0eedab6736e88a3fcb01 +f0ecf21301c0c24bc78b8b310347c7507d9f41d0 refs/tags/v3.0.0 +^ed5057ded698e305210269dafa57574ecf964483 +fc888f758fde1c37d80f85666060d3f179f6c001 refs/tags/v3.0.0rc1 +df595b16579d847cd019072aa0daec1e566c7ba2 refs/tags/v3.0.0rc2 +5d32ed76c0ea53d689f9cec3d4c152d1b0738e8e refs/tags/v3.0.0rc3 +ea3e33e40dd1cbfa9f885e991386337a0e5b4b66 refs/tags/v3.0.0rc4 +e86205cb2ba070755d582856430c0f83c0af6694 refs/tags/v3.0.1 +^f5fbe867d2d26e4a0a9177a51f6e568868ad3dc8 +e6c503bb0b0c13f76ca0546eca7f8d986039517f refs/tags/v3.0.2 +^45fab4087eaaff234227a10cf7845e8b07f28a98 diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/refs/heads/master b/third_party/CityFlow/extern/pybind11/.git.bak/refs/heads/master new file mode 100644 index 0000000000000000000000000000000000000000..e4350af25558701727d657ff89436961e49c4bea --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/refs/heads/master @@ -0,0 +1 @@ +cd538ed1184d41cf685dd4da81c1eca80d24f353 diff --git a/third_party/CityFlow/extern/pybind11/.git.bak/refs/remotes/origin/HEAD b/third_party/CityFlow/extern/pybind11/.git.bak/refs/remotes/origin/HEAD new file mode 100644 index 0000000000000000000000000000000000000000..6efe28fff834a94fbc20cac51fe9cd65ecc78d43 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.git.bak/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +ref: refs/remotes/origin/master diff --git a/third_party/CityFlow/extern/pybind11/.gitattributes b/third_party/CityFlow/extern/pybind11/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..d611e1496de00063120fad2ef1e7891eca20f7b3 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.gitattributes @@ -0,0 +1 @@ +docs/*.svg binary diff --git a/third_party/CityFlow/extern/pybind11/.github/CODEOWNERS b/third_party/CityFlow/extern/pybind11/.github/CODEOWNERS new file mode 100644 index 0000000000000000000000000000000000000000..4e2c66902e5946dfd0eb8fc49d4d4190a620eee6 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/CODEOWNERS @@ -0,0 +1,9 @@ +*.cmake @henryiii +CMakeLists.txt @henryiii +*.yml @henryiii +*.yaml @henryiii +/tools/ @henryiii +/pybind11/ @henryiii +noxfile.py @henryiii +.clang-format @henryiii +.clang-tidy @henryiii diff --git a/third_party/CityFlow/extern/pybind11/.github/CONTRIBUTING.md b/third_party/CityFlow/extern/pybind11/.github/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..f5a08e2d787153809198a86d2a32687bbb7b69e1 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/CONTRIBUTING.md @@ -0,0 +1,388 @@ +Thank you for your interest in this project! Please refer to the following +sections on how to contribute code and bug reports. + +### Reporting bugs + +Before submitting a question or bug report, please take a moment of your time +and ensure that your issue isn't already discussed in the project documentation +provided at [pybind11.readthedocs.org][] or in the [issue tracker][]. You can +also check [gitter][] to see if it came up before. + +Assuming that you have identified a previously unknown problem or an important +question, it's essential that you submit a self-contained and minimal piece of +code that reproduces the problem. In other words: no external dependencies, +isolate the function(s) that cause breakage, submit matched and complete C++ +and Python snippets that can be easily compiled and run in isolation; or +ideally make a small PR with a failing test case that can be used as a starting +point. + +## Pull requests + +Contributions are submitted, reviewed, and accepted using GitHub pull requests. +Please refer to [this article][using pull requests] for details and adhere to +the following rules to make the process as smooth as possible: + +* Make a new branch for every feature you're working on. +* Make small and clean pull requests that are easy to review but make sure they + do add value by themselves. +* Add tests for any new functionality and run the test suite (`cmake --build + build --target pytest`) to ensure that no existing features break. +* Please run [`pre-commit`][pre-commit] to check your code matches the + project style. (Note that `gawk` is required.) Use `pre-commit run + --all-files` before committing (or use installed-mode, check pre-commit docs) + to verify your code passes before pushing to save time. +* This project has a strong focus on providing general solutions using a + minimal amount of code, thus small pull requests are greatly preferred. + +### Licensing of contributions + +pybind11 is provided under a BSD-style license that can be found in the +``LICENSE`` file. By using, distributing, or contributing to this project, you +agree to the terms and conditions of this license. + +You are under no obligation whatsoever to provide any bug fixes, patches, or +upgrades to the features, functionality or performance of the source code +("Enhancements") to anyone; however, if you choose to make your Enhancements +available either publicly, or directly to the author of this software, without +imposing a separate written license agreement for such Enhancements, then you +hereby grant the following license: a non-exclusive, royalty-free perpetual +license to install, use, modify, prepare derivative works, incorporate into +other computer software, distribute, and sublicense such enhancements or +derivative works thereof, in binary and source code form. + + +## Development of pybind11 + +### Quick setup + +To setup a quick development environment, use [`nox`](https://nox.thea.codes). +This will allow you to do some common tasks with minimal setup effort, but will +take more time to run and be less flexible than a full development environment. +If you use [`pipx run nox`](https://pipx.pypa.io), you don't even need to +install `nox`. Examples: + +```bash +# List all available sessions +nox -l + +# Run linters +nox -s lint + +# Run tests on Python 3.9 +nox -s tests-3.9 + +# Build and preview docs +nox -s docs -- serve + +# Build SDists and wheels +nox -s build +``` + +### Full setup + +To setup an ideal development environment, run the following commands on a +system with CMake 3.14+: + +```bash +python3 -m venv venv +source venv/bin/activate +pip install -r tests/requirements.txt +cmake -S . -B build -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON +cmake --build build -j4 +``` + +Tips: + +* You can use `virtualenv` (faster, from PyPI) instead of `venv`. +* You can select any name for your environment folder; if it contains "env" it + will be ignored by git. +* If you don't have CMake 3.14+, just add "cmake" to the pip install command. +* You can use `-DPYBIND11_FINDPYTHON=ON` to use FindPython on CMake 3.12+ +* In classic mode, you may need to set `-DPYTHON_EXECUTABLE=/path/to/python`. + FindPython uses `-DPython_ROOT_DIR=/path/to` or + `-DPython_EXECUTABLE=/path/to/python`. + +### Configuration options + +In CMake, configuration options are given with "-D". Options are stored in the +build directory, in the `CMakeCache.txt` file, so they are remembered for each +build directory. Two selections are special - the generator, given with `-G`, +and the compiler, which is selected based on environment variables `CXX` and +similar, or `-DCMAKE_CXX_COMPILER=`. Unlike the others, these cannot be changed +after the initial run. + +The valid options are: + +* `-DCMAKE_BUILD_TYPE`: Release, Debug, MinSizeRel, RelWithDebInfo +* `-DPYBIND11_FINDPYTHON=ON`: Use CMake 3.12+'s FindPython instead of the + classic, deprecated, custom FindPythonLibs +* `-DPYBIND11_NOPYTHON=ON`: Disable all Python searching (disables tests) +* `-DBUILD_TESTING=ON`: Enable the tests +* `-DDOWNLOAD_CATCH=ON`: Download catch to build the C++ tests +* `-DDOWNLOAD_EIGEN=ON`: Download Eigen for the NumPy tests +* `-DPYBIND11_INSTALL=ON/OFF`: Enable the install target (on by default for the + master project) +* `-DUSE_PYTHON_INSTALL_DIR=ON`: Try to install into the python dir + + +
A few standard CMake tricks: (click to expand)

+ +* Use `cmake --build build -v` to see the commands used to build the files. +* Use `cmake build -LH` to list the CMake options with help. +* Use `ccmake` if available to see a curses (terminal) gui, or `cmake-gui` for + a completely graphical interface (not present in the PyPI package). +* Use `cmake --build build -j12` to build with 12 cores (for example). +* Use `-G` and the name of a generator to use something different. `cmake + --help` lists the generators available. + - On Unix, setting `CMAKE_GENERATER=Ninja` in your environment will give + you automatic multithreading on all your CMake projects! +* Open the `CMakeLists.txt` with QtCreator to generate for that IDE. +* You can use `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to generate the `.json` file + that some tools expect. + +

+ + +To run the tests, you can "build" the check target: + +```bash +cmake --build build --target check +``` + +`--target` can be spelled `-t` in CMake 3.15+. You can also run individual +tests with these targets: + +* `pytest`: Python tests only, using the +[pytest](https://docs.pytest.org/en/stable/) framework +* `cpptest`: C++ tests only +* `test_cmake_build`: Install / subdirectory tests + +If you want to build just a subset of tests, use +`-DPYBIND11_TEST_OVERRIDE="test_callbacks;test_pickling"`. If this is +empty, all tests will be built. Tests are specified without an extension if they need both a .py and +.cpp file. + +You may also pass flags to the `pytest` target by editing `tests/pytest.ini` or +by using the `PYTEST_ADDOPTS` environment variable +(see [`pytest` docs](https://docs.pytest.org/en/2.7.3/customize.html#adding-default-options)). As an example: + +```bash +env PYTEST_ADDOPTS="--capture=no --exitfirst" \ + cmake --build build --target pytest +# Or using abbreviated flags +env PYTEST_ADDOPTS="-s -x" cmake --build build --target pytest +``` + +### Formatting + +All formatting is handled by pre-commit. + +Install with brew (macOS) or pip (any OS): + +```bash +# Any OS +python3 -m pip install pre-commit + +# OR macOS with homebrew: +brew install pre-commit +``` + +Then, you can run it on the items you've added to your staging area, or all +files: + +```bash +pre-commit run +# OR +pre-commit run --all-files +``` + +And, if you want to always use it, you can install it as a git hook (hence the +name, pre-commit): + +```bash +pre-commit install +``` + +### Clang-Format + +As of v2.6.2, pybind11 ships with a [`clang-format`][clang-format] +configuration file at the top level of the repo (the filename is +`.clang-format`). Currently, formatting is NOT applied automatically, but +manually using `clang-format` for newly developed files is highly encouraged. +To check if a file needs formatting: + +```bash +clang-format -style=file --dry-run some.cpp +``` + +The output will show things to be fixed, if any. To actually format the file: + +```bash +clang-format -style=file -i some.cpp +``` + +Note that the `-style-file` option searches the parent directories for the +`.clang-format` file, i.e. the commands above can be run in any subdirectory +of the pybind11 repo. + +### Clang-Tidy + +[`clang-tidy`][clang-tidy] performs deeper static code analyses and is +more complex to run, compared to `clang-format`, but support for `clang-tidy` +is built into the pybind11 CMake configuration. To run `clang-tidy`, the +following recipe should work. Run the `docker` command from the top-level +directory inside your pybind11 git clone. Files will be modified in place, +so you can use git to monitor the changes. + +```bash +docker run --rm -v $PWD:/mounted_pybind11 -it silkeh/clang:15-bullseye +apt-get update && apt-get install -y git python3-dev python3-pytest +cmake -S /mounted_pybind11/ -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--use-color" -DDOWNLOAD_EIGEN=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=17 +cmake --build build -j 2 +``` + +You can add `--fix` to the options list if you want. + +### Include what you use + +To run include what you use, install (`brew install include-what-you-use` on +macOS), then run: + +```bash +cmake -S . -B build-iwyu -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=$(which include-what-you-use) +cmake --build build +``` + +The report is sent to stderr; you can pipe it into a file if you wish. + +### Build recipes + +This builds with the Intel compiler (assuming it is in your path, along with a +recent CMake and Python): + +```bash +python3 -m venv venv +. venv/bin/activate +pip install pytest +cmake -S . -B build-intel -DCMAKE_CXX_COMPILER=$(which icpc) -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DPYBIND11_WERROR=ON +``` + +This will test the PGI compilers: + +```bash +docker run --rm -it -v $PWD:/pybind11 nvcr.io/hpc/pgi-compilers:ce +apt-get update && apt-get install -y python3-dev python3-pip python3-pytest +wget -qO- "https://cmake.org/files/v3.18/cmake-3.18.2-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local +cmake -S pybind11/ -B build +cmake --build build +``` + +### Explanation of the SDist/wheel building design + +> These details below are _only_ for packaging the Python sources from git. The +> SDists and wheels created do not have any extra requirements at all and are +> completely normal. + +The main objective of the packaging system is to create SDists (Python's source +distribution packages) and wheels (Python's binary distribution packages) that +include everything that is needed to work with pybind11, and which can be +installed without any additional dependencies. This is more complex than it +appears: in order to support CMake as a first class language even when using +the PyPI package, they must include the _generated_ CMake files (so as not to +require CMake when installing the `pybind11` package itself). They should also +provide the option to install to the "standard" location +(`/include/pybind11` and `/share/cmake/pybind11`) so they are +easy to find with CMake, but this can cause problems if you are not an +environment or using ``pyproject.toml`` requirements. This was solved by having +two packages; the "nice" pybind11 package that stores the includes and CMake +files inside the package, that you get access to via functions in the package, +and a `pybind11-global` package that can be included via `pybind11[global]` if +you want the more invasive but discoverable file locations. + +If you want to install or package the GitHub source, it is best to have Pip 10 +or newer on Windows, macOS, or Linux (manylinux1 compatible, includes most +distributions). You can then build the SDists, or run any procedure that makes +SDists internally, like making wheels or installing. + + +```bash +# Editable development install example +python3 -m pip install -e . +``` + +Since Pip itself does not have an `sdist` command (it does have `wheel` and +`install`), you may want to use the upcoming `build` package: + +```bash +python3 -m pip install build + +# Normal package +python3 -m build -s . + +# Global extra +PYBIND11_GLOBAL_SDIST=1 python3 -m build -s . +``` + +If you want to use the classic "direct" usage of `python setup.py`, you will +need CMake 3.15+ and either `make` or `ninja` preinstalled (possibly via `pip +install cmake ninja`), since directly running Python on `setup.py` cannot pick +up and install `pyproject.toml` requirements. As long as you have those two +things, though, everything works the way you would expect: + +```bash +# Normal package +python3 setup.py sdist + +# Global extra +PYBIND11_GLOBAL_SDIST=1 python3 setup.py sdist +``` + +A detailed explanation of the build procedure design for developers wanting to +work on or maintain the packaging system is as follows: + +#### 1. Building from the source directory + +When you invoke any `setup.py` command from the source directory, including +`pip wheel .` and `pip install .`, you will activate a full source build. This +is made of the following steps: + +1. If the tool is PEP 518 compliant, like Pip 10+, it will create a temporary + virtual environment and install the build requirements (mostly CMake) into + it. (if you are not on Windows, macOS, or a manylinux compliant system, you + can disable this with `--no-build-isolation` as long as you have CMake 3.15+ + installed) +2. The environment variable `PYBIND11_GLOBAL_SDIST` is checked - if it is set + and truthy, this will be make the accessory `pybind11-global` package, + instead of the normal `pybind11` package. This package is used for + installing the files directly to your environment root directory, using + `pybind11[global]`. +2. `setup.py` reads the version from `pybind11/_version.py` and verifies it + matches `includes/pybind11/detail/common.h`. +3. CMake is run with `-DCMAKE_INSTALL_PREIFX=pybind11`. Since the CMake install + procedure uses only relative paths and is identical on all platforms, these + files are valid as long as they stay in the correct relative position to the + includes. `pybind11/share/cmake/pybind11` has the CMake files, and + `pybind11/include` has the includes. The build directory is discarded. +4. Simpler files are placed in the SDist: `tools/setup_*.py.in`, + `tools/pyproject.toml` (`main` or `global`) +5. The package is created by running the setup function in the + `tools/setup_*.py`. `setup_main.py` fills in Python packages, and + `setup_global.py` fills in only the data/header slots. +6. A context manager cleans up the temporary CMake install directory (even if + an error is thrown). + +### 2. Building from SDist + +Since the SDist has the rendered template files in `tools` along with the +includes and CMake files in the correct locations, the builds are completely +trivial and simple. No extra requirements are required. You can even use Pip 9 +if you really want to. + + +[pre-commit]: https://pre-commit.com +[clang-format]: https://clang.llvm.org/docs/ClangFormat.html +[clang-tidy]: https://clang.llvm.org/extra/clang-tidy/ +[pybind11.readthedocs.org]: http://pybind11.readthedocs.org/en/latest +[issue tracker]: https://github.com/pybind/pybind11/issues +[gitter]: https://gitter.im/pybind/Lobby +[using pull requests]: https://help.github.com/articles/using-pull-requests diff --git a/third_party/CityFlow/extern/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml b/third_party/CityFlow/extern/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000000000000000000000000000000000000..4f1e78f33c6242d3159801ec988d4a4297d41d20 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,61 @@ +name: Bug Report +description: File an issue about a bug +title: "[BUG]: " +labels: [triage] +body: + - type: markdown + attributes: + value: | + Please do your best to make the issue as easy to act on as possible, and only submit here if there is clearly a problem with pybind11 (ask first if unsure). **Note that a reproducer in a PR is much more likely to get immediate attention.** + + - type: checkboxes + id: steps + attributes: + label: Required prerequisites + description: Make sure you've completed the following steps before submitting your issue -- thank you! + options: + - label: Make sure you've read the [documentation](https://pybind11.readthedocs.io). Your issue may be addressed there. + required: true + - label: Search the [issue tracker](https://github.com/pybind/pybind11/issues) and [Discussions](https:/pybind/pybind11/discussions) to verify that this hasn't already been reported. +1 or comment there if it has. + required: true + - label: Consider asking first in the [Gitter chat room](https://gitter.im/pybind/Lobby) or in a [Discussion](https:/pybind/pybind11/discussions/new). + required: false + + - type: input + id: version + attributes: + label: What version (or hash if on master) of pybind11 are you using? + validations: + required: true + + - type: textarea + id: description + attributes: + label: Problem description + placeholder: >- + Provide a short description, state the expected behavior and what + actually happens. Include relevant information like what version of + pybind11 you are using, what system you are on, and any useful commands + / output. + validations: + required: true + + - type: textarea + id: code + attributes: + label: Reproducible example code + placeholder: >- + The code should be minimal, have no external dependencies, isolate the + function(s) that cause breakage. Submit matched and complete C++ and + Python snippets that can be easily compiled and run to diagnose the + issue. — Note that a reproducer in a PR is much more likely to get + immediate attention: failing tests in the pybind11 CI are the best + starting point for working out fixes. + render: text + + - type: input + id: regression + attributes: + label: Is this a regression? Put the last known working version here if it is. + description: Put the last known working version here if this is a regression. + value: Not a regression diff --git a/third_party/CityFlow/extern/pybind11/.github/ISSUE_TEMPLATE/config.yml b/third_party/CityFlow/extern/pybind11/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..27f9a804415e88ada9c59a338a125df37069dd42 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Ask a question + url: https://github.com/pybind/pybind11/discussions/new + about: Please ask and answer questions here, or propose new ideas. + - name: Gitter room + url: https://gitter.im/pybind/Lobby + about: A room for discussing pybind11 with an active community diff --git a/third_party/CityFlow/extern/pybind11/.github/dependabot.yml b/third_party/CityFlow/extern/pybind11/.github/dependabot.yml new file mode 100644 index 0000000000000000000000000000000000000000..22c34bd74d4a0dff11e7e5d1e091a4b1e64aac18 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/dependabot.yml @@ -0,0 +1,15 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + actions: + patterns: + - "*" + ignore: + - dependency-name: actions/checkout + versions: + - "<5" diff --git a/third_party/CityFlow/extern/pybind11/.github/labeler.yml b/third_party/CityFlow/extern/pybind11/.github/labeler.yml new file mode 100644 index 0000000000000000000000000000000000000000..abb0d05aaa3f1ce86f027249b47ce2bc5f7f2e7b --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/labeler.yml @@ -0,0 +1,8 @@ +docs: +- any: + - 'docs/**/*.rst' + - '!docs/changelog.rst' + - '!docs/upgrade.rst' + +ci: +- '.github/workflows/*.yml' diff --git a/third_party/CityFlow/extern/pybind11/.github/labeler_merged.yml b/third_party/CityFlow/extern/pybind11/.github/labeler_merged.yml new file mode 100644 index 0000000000000000000000000000000000000000..2374ad42e4597965da5a0aecb2afeb213da10445 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/labeler_merged.yml @@ -0,0 +1,3 @@ +needs changelog: +- all: + - '!docs/changelog.rst' diff --git a/third_party/CityFlow/extern/pybind11/.github/matchers/pylint.json b/third_party/CityFlow/extern/pybind11/.github/matchers/pylint.json new file mode 100644 index 0000000000000000000000000000000000000000..e3a6bd16b0a02ead0bab71953de79cad3a7b2c71 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/matchers/pylint.json @@ -0,0 +1,32 @@ +{ + "problemMatcher": [ + { + "severity": "warning", + "pattern": [ + { + "regexp": "^([^:]+):(\\d+):(\\d+): ([A-DF-Z]\\d+): \\033\\[[\\d;]+m([^\\033]+).*$", + "file": 1, + "line": 2, + "column": 3, + "code": 4, + "message": 5 + } + ], + "owner": "pylint-warning" + }, + { + "severity": "error", + "pattern": [ + { + "regexp": "^([^:]+):(\\d+):(\\d+): (E\\d+): \\033\\[[\\d;]+m([^\\033]+).*$", + "file": 1, + "line": 2, + "column": 3, + "code": 4, + "message": 5 + } + ], + "owner": "pylint-error" + } + ] +} diff --git a/third_party/CityFlow/extern/pybind11/.github/pull_request_template.md b/third_party/CityFlow/extern/pybind11/.github/pull_request_template.md new file mode 100644 index 0000000000000000000000000000000000000000..54b7f5100d3bdfbf58a825347745ae24462c1a3c --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/pull_request_template.md @@ -0,0 +1,19 @@ + +## Description + + + + +## Suggested changelog entry: + + + +```rst + +``` + + diff --git a/third_party/CityFlow/extern/pybind11/.github/workflows/ci.yml b/third_party/CityFlow/extern/pybind11/.github/workflows/ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..5cc6c3515e73bd7241e5fa750320d2ea220a91d1 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/workflows/ci.yml @@ -0,0 +1,1202 @@ +name: CI + +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + - stable + - v* + +permissions: read-all + +concurrency: + group: test-${{ github.ref }} + cancel-in-progress: true + +env: + PIP_BREAK_SYSTEM_PACKAGES: 1 + PIP_ONLY_BINARY: numpy + FORCE_COLOR: 3 + PYTEST_TIMEOUT: 300 + # For cmake: + VERBOSE: 1 + +jobs: + # This is the "main" test suite, which tests a large number of different + # versions of default compilers and Python versions in GitHub Actions. + standard: + strategy: + fail-fast: false + matrix: + runs-on: [ubuntu-20.04, windows-2022, macos-latest] + python: + - '3.6' + - '3.9' + - '3.10' + - '3.11' + - '3.12' + - 'pypy-3.8' + - 'pypy-3.9' + - 'pypy-3.10' + + # Items in here will either be added to the build matrix (if not + # present), or add new keys to an existing matrix element if all the + # existing keys match. + # + # We support an optional key: args, for cmake args + include: + # Just add a key + - runs-on: ubuntu-20.04 + python: '3.6' + args: > + -DPYBIND11_FINDPYTHON=ON + -DCMAKE_CXX_FLAGS="-D_=1" + - runs-on: ubuntu-20.04 + python: 'pypy-3.8' + args: > + -DPYBIND11_FINDPYTHON=ON + - runs-on: windows-2019 + python: '3.6' + args: > + -DPYBIND11_FINDPYTHON=ON + # Inject a couple Windows 2019 runs + - runs-on: windows-2019 + python: '3.9' + + name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}" + runs-on: ${{ matrix.runs-on }} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Setup Boost (Linux) + # Can't use boost + define _ + if: runner.os == 'Linux' && matrix.python != '3.6' + run: sudo apt-get install libboost-dev + + - name: Setup Boost (macOS) + if: runner.os == 'macOS' + run: brew install boost + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Cache wheels + if: runner.os == 'macOS' + uses: actions/cache@v4 + with: + # This path is specific to macOS - we really only need it for PyPy NumPy wheels + # See https://github.com/actions/cache/blob/master/examples.md#python---pip + # for ways to do this more generally + path: ~/Library/Caches/pip + # Look to see if there is a cache hit for the corresponding requirements file + key: ${{ runner.os }}-pip-${{ matrix.python }}-x64-${{ hashFiles('tests/requirements.txt') }} + + - name: Prepare env + run: | + python -m pip install -r tests/requirements.txt + + - name: Setup annotations on Linux + if: runner.os == 'Linux' + run: python -m pip install pytest-github-actions-annotate-failures + + # First build - C++11 mode and inplace + # More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON here + # (same for PYBIND11_NUMPY_1_ONLY, but requires a NumPy 1.x at runtime). + - name: Configure C++11 ${{ matrix.args }} + run: > + cmake -S . -B . + -DPYBIND11_WERROR=ON + -DPYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION=ON + -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON + -DPYBIND11_NUMPY_1_ONLY=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=11 + ${{ matrix.args }} + + - name: Build C++11 + run: cmake --build . -j 2 + + - name: Python tests C++11 + run: cmake --build . --target pytest -j 2 + + - name: C++11 tests + # TODO: Figure out how to load the DLL on Python 3.8+ + if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10' || matrix.python == '3.11' || matrix.python == 'pypy-3.8'))" + run: cmake --build . --target cpptest -j 2 + + - name: Interface test C++11 + run: cmake --build . --target test_cmake_build + + - name: Clean directory + run: git clean -fdx + + # Second build - C++17 mode and in a build directory + # More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF here. + # (same for PYBIND11_NUMPY_1_ONLY, but requires a NumPy 1.x at runtime). + - name: Configure C++17 + run: > + cmake -S . -B build2 + -DPYBIND11_WERROR=ON + -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF + -DPYBIND11_NUMPY_1_ONLY=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + ${{ matrix.args }} + + - name: Build + run: cmake --build build2 -j 2 + + - name: Python tests + run: cmake --build build2 --target pytest + + - name: C++ tests + # TODO: Figure out how to load the DLL on Python 3.8+ + if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10' || matrix.python == '3.11' || matrix.python == 'pypy-3.8'))" + run: cmake --build build2 --target cpptest + + # Third build - C++17 mode with unstable ABI + - name: Configure (unstable ABI) + run: > + cmake -S . -B build3 + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + -DPYBIND11_INTERNALS_VERSION=10000000 + ${{ matrix.args }} + + - name: Build (unstable ABI) + run: cmake --build build3 -j 2 + + - name: Python tests (unstable ABI) + run: cmake --build build3 --target pytest + + - name: Interface test + run: cmake --build build2 --target test_cmake_build + + # This makes sure the setup_helpers module can build packages using + # setuptools + - name: Setuptools helpers test + run: | + pip install setuptools + pytest tests/extra_setuptools + if: "!(matrix.runs-on == 'windows-2022')" + + + deadsnakes: + strategy: + fail-fast: false + matrix: + include: + # TODO: Fails on 3.10, investigate + # JOB DISABLED (NEEDS WORK): https://github.com/pybind/pybind11/issues/4889 + # - python-version: "3.9" + # python-debug: true + # valgrind: true + - python-version: "3.11" + python-debug: false + + name: "🐍 ${{ matrix.python-version }}${{ matrix.python-debug && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' • Valgrind' || '' }} • x64" + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python ${{ matrix.python-version }} (deadsnakes) + uses: deadsnakes/action@v3.1.0 + with: + python-version: ${{ matrix.python-version }} + debug: ${{ matrix.python-debug }} + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Valgrind cache + if: matrix.valgrind + uses: actions/cache@v4 + id: cache-valgrind + with: + path: valgrind + key: 3.16.1 # Valgrind version + + - name: Compile Valgrind + if: matrix.valgrind && steps.cache-valgrind.outputs.cache-hit != 'true' + run: | + VALGRIND_VERSION=3.16.1 + curl https://sourceware.org/pub/valgrind/valgrind-$VALGRIND_VERSION.tar.bz2 -o - | tar xj + mv valgrind-$VALGRIND_VERSION valgrind + cd valgrind + ./configure + make -j 2 > /dev/null + + - name: Install Valgrind + if: matrix.valgrind + working-directory: valgrind + run: | + sudo make install + sudo apt-get update + sudo apt-get install libc6-dbg # Needed by Valgrind + + - name: Prepare env + run: | + python -m pip install -r tests/requirements.txt + + - name: Configure + run: > + cmake -S . -B build + -DCMAKE_BUILD_TYPE=Debug + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + + - name: Build + run: cmake --build build -j 2 + + - name: Python tests + run: cmake --build build --target pytest + + - name: C++ tests + run: cmake --build build --target cpptest + + - name: Run Valgrind on Python tests + if: matrix.valgrind + run: cmake --build build --target memcheck + + + # Testing on clang using the excellent silkeh clang docker images + clang: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + clang: + - 3.6 + - 3.7 + - 3.9 + - 7 + - 9 + - dev + std: + - 11 + container_suffix: + - "" + include: + - clang: 5 + std: 14 + - clang: 10 + std: 17 + - clang: 11 + std: 20 + - clang: 12 + std: 20 + - clang: 13 + std: 20 + - clang: 14 + std: 20 + - clang: 15 + std: 20 + container_suffix: "-bullseye" + - clang: 16 + std: 20 + container_suffix: "-bullseye" + + name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64" + container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}" + + steps: + - uses: actions/checkout@v4 + + - name: Add wget and python3 + run: apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev + + - name: Configure + shell: bash + run: > + cmake -S . -B build + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DCMAKE_CXX_STANDARD=${{ matrix.std }} + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + + - name: Build + run: cmake --build build -j 2 + + - name: Python tests + run: cmake --build build --target pytest + + - name: C++ tests + run: cmake --build build --target cpptest + + - name: Interface test + run: cmake --build build --target test_cmake_build + + + # Testing NVCC; forces sources to behave like .cu files + cuda: + runs-on: ubuntu-latest + name: "🐍 3.10 • CUDA 12.2 • Ubuntu 22.04" + container: nvidia/cuda:12.2.0-devel-ubuntu22.04 + + steps: + - uses: actions/checkout@v4 + + # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND + - name: Install 🐍 3 + run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy + + - name: Configure + run: cmake -S . -B build -DPYBIND11_CUDA_TESTS=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON + + - name: Build + run: cmake --build build -j2 --verbose + + - name: Python tests + run: cmake --build build --target pytest + + +# TODO: Internal compiler error - report to NVidia +# # Testing CentOS 8 + PGI compilers +# centos-nvhpc8: +# runs-on: ubuntu-latest +# name: "🐍 3 • CentOS8 / PGI 20.11 • x64" +# container: centos:8 +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Add Python 3 and a few requirements +# run: yum update -y && yum install -y git python3-devel python3-numpy python3-pytest make environment-modules +# +# - name: Install CMake with pip +# run: | +# python3 -m pip install --upgrade pip +# python3 -m pip install cmake --prefer-binary +# +# - name: Install NVidia HPC SDK +# run: > +# yum -y install +# https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-20-11-20.11-1.x86_64.rpm +# https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-2020-20.11-1.x86_64.rpm +# +# - name: Configure +# shell: bash +# run: | +# source /etc/profile.d/modules.sh +# module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.11 +# cmake -S . -B build -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=14 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") +# +# - name: Build +# run: cmake --build build -j 2 --verbose +# +# - name: Python tests +# run: cmake --build build --target pytest +# +# - name: C++ tests +# run: cmake --build build --target cpptest +# +# - name: Interface test +# run: cmake --build build --target test_cmake_build + + + # Testing on Ubuntu + NVHPC (previous PGI) compilers, which seems to require more workarounds + ubuntu-nvhpc7: + runs-on: ubuntu-20.04 + name: "🐍 3 • NVHPC 23.5 • C++17 • x64" + + env: + # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND + DEBIAN_FRONTEND: 'noninteractive' + steps: + - uses: actions/checkout@v4 + + - name: Add NVHPC Repo + run: | + echo 'deb [trusted=yes] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | \ + sudo tee /etc/apt/sources.list.d/nvhpc.list + + - name: Install 🐍 3 & NVHPC + run: | + sudo apt-get update -y && \ + sudo apt-get install -y cmake environment-modules git python3-dev python3-pip python3-numpy && \ + sudo apt-get install -y --no-install-recommends nvhpc-23-5 && \ + sudo rm -rf /var/lib/apt/lists/* + python3 -m pip install --upgrade pip + python3 -m pip install --upgrade pytest + + # On some systems, you many need further workarounds: + # https://github.com/pybind/pybind11/pull/2475 + - name: Configure + shell: bash + run: | + source /etc/profile.d/modules.sh + module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/23.5 + cmake -S . -B build -DDOWNLOAD_CATCH=ON \ + -DCMAKE_CXX_STANDARD=17 \ + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ + -DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \ + -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp" + + - name: Build + run: cmake --build build -j 2 --verbose + + - name: Python tests + run: cmake --build build --target pytest + + - name: C++ tests + run: cmake --build build --target cpptest + + - name: Interface test + run: cmake --build build --target test_cmake_build + + + # Testing on GCC using the GCC docker images (only recent images supported) + gcc: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - { gcc: 7, std: 11 } + - { gcc: 7, std: 17 } + - { gcc: 8, std: 14 } + - { gcc: 8, std: 17 } + - { gcc: 10, std: 17 } + - { gcc: 11, std: 20 } + - { gcc: 12, std: 20 } + - { gcc: 13, std: 20 } + + name: "🐍 3 • GCC ${{ matrix.gcc }} • C++${{ matrix.std }}• x64" + container: "gcc:${{ matrix.gcc }}" + + steps: + - uses: actions/checkout@v4 + + - name: Add Python 3 + run: apt-get update; apt-get install -y python3-dev python3-numpy python3-pytest python3-pip libeigen3-dev + + - name: Update pip + run: python3 -m pip install --upgrade pip + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Configure + shell: bash + run: > + cmake -S . -B build + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DCMAKE_CXX_STANDARD=${{ matrix.std }} + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + + - name: Build + run: cmake --build build -j 2 + + - name: Python tests + run: cmake --build build --target pytest + + - name: C++ tests + run: cmake --build build --target cpptest + + - name: Interface test + run: cmake --build build --target test_cmake_build + + - name: Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE + if: matrix.gcc == '12' + shell: bash + run: > + cmake -S . -B build_partial + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DCMAKE_CXX_STANDARD=${{ matrix.std }} + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" + + - name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE + if: matrix.gcc == '12' + run: cmake --build build_partial -j 2 + + - name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE + if: matrix.gcc == '12' + run: cmake --build build_partial --target pytest + + # Testing on ICC using the oneAPI apt repo + icc: + runs-on: ubuntu-20.04 + + name: "🐍 3 • ICC latest • x64" + + steps: + - uses: actions/checkout@v4 + + - name: Add apt repo + run: | + sudo apt-get update + sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + + - name: Add ICC & Python 3 + run: sudo apt-get update; sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic cmake python3-dev python3-numpy python3-pytest python3-pip + + - name: Update pip + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + python3 -m pip install --upgrade pip + + - name: Install dependencies + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + python3 -m pip install -r tests/requirements.txt + + - name: Configure C++11 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake -S . -B build-11 \ + -DPYBIND11_WERROR=ON \ + -DDOWNLOAD_CATCH=ON \ + -DDOWNLOAD_EIGEN=OFF \ + -DCMAKE_CXX_STANDARD=11 \ + -DCMAKE_CXX_COMPILER=$(which icpc) \ + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + + - name: Build C++11 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-11 -j 2 -v + + - name: Python tests C++11 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + sudo service apport stop + cmake --build build-11 --target check + + - name: C++ tests C++11 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-11 --target cpptest + + - name: Interface test C++11 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-11 --target test_cmake_build + + - name: Configure C++17 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake -S . -B build-17 \ + -DPYBIND11_WERROR=ON \ + -DDOWNLOAD_CATCH=ON \ + -DDOWNLOAD_EIGEN=OFF \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_CXX_COMPILER=$(which icpc) \ + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + + - name: Build C++17 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-17 -j 2 -v + + - name: Python tests C++17 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + sudo service apport stop + cmake --build build-17 --target check + + - name: C++ tests C++17 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-17 --target cpptest + + - name: Interface test C++17 + run: | + set +e; source /opt/intel/oneapi/setvars.sh; set -e + cmake --build build-17 --target test_cmake_build + + + # Testing on CentOS (manylinux uses a centos base, and this is an easy way + # to get GCC 4.8, which is the manylinux1 compiler). + centos: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + container: + - "centos:7" # GCC 4.8 + - "almalinux:8" + - "almalinux:9" + + name: "🐍 3 • ${{ matrix.container }} • x64" + container: "${{ matrix.container }}" + + steps: + - name: Latest actions/checkout + uses: actions/checkout@v4 + if: matrix.container != 'centos:7' + + - name: Pin actions/checkout as required for centos:7 + uses: actions/checkout@v3 + if: matrix.container == 'centos:7' + + - name: Add Python 3 (RHEL 7) + if: matrix.container == 'centos:7' + run: yum update -y && yum install -y python3-devel gcc-c++ make git + + - name: Add Python 3 (RHEL 8+) + if: matrix.container != 'centos:7' + run: dnf update -y && dnf install -y python3-devel gcc-c++ make git + + - name: Update pip + run: python3 -m pip install --upgrade pip + + - name: Install dependencies + run: | + python3 -m pip install cmake -r tests/requirements.txt + + - name: Ensure NumPy 2 is used (required Python >= 3.9) + if: matrix.container == 'almalinux:9' + run: | + python3 -m pip install 'numpy>=2.0.0b1' 'scipy>=1.13.0rc1' + + - name: Configure + shell: bash + run: > + cmake -S . -B build + -DCMAKE_BUILD_TYPE=MinSizeRel + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=11 + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + + - name: Build + run: cmake --build build -j 2 + + - name: Python tests + run: cmake --build build --target pytest + + - name: C++ tests + run: cmake --build build --target cpptest + + - name: Interface test + run: cmake --build build --target test_cmake_build + + + # This tests an "install" with the CMake tools + install-classic: + name: "🐍 3.7 • Debian • x86 • Install" + runs-on: ubuntu-latest + container: i386/debian:buster + + steps: + - uses: actions/checkout@v1 # v1 is required to run inside docker + + - name: Install requirements + run: | + apt-get update + apt-get install -y git make cmake g++ libeigen3-dev python3-dev python3-pip + pip3 install "pytest==6.*" + + - name: Configure for install + run: > + cmake . + -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + + - name: Make and install + run: make install + + - name: Copy tests to new directory + run: cp -a tests /pybind11-tests + + - name: Make a new test directory + run: mkdir /build-tests + + - name: Configure tests + run: > + cmake ../pybind11-tests + -DDOWNLOAD_CATCH=ON + -DPYBIND11_WERROR=ON + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + working-directory: /build-tests + + - name: Python tests + run: make pytest -j 2 + working-directory: /build-tests + + + # This verifies that the documentation is not horribly broken, and does a + # basic validation check on the SDist. + doxygen: + name: "Documentation build test" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install Doxygen + run: sudo apt-get install -y doxygen librsvg2-bin # Changed to rsvg-convert in 20.04 + + - name: Build docs + run: pipx run nox -s docs + + - name: Make SDist + run: pipx run nox -s build -- --sdist + + - run: git status --ignored + + - name: Check local include dir + run: > + ls pybind11; + python3 -c "import pybind11, pathlib; assert (a := pybind11.get_include()) == (b := str(pathlib.Path('include').resolve())), f'{a} != {b}'" + + - name: Compare Dists (headers only) + working-directory: include + run: | + python3 -m pip install --user -U ../dist/*.tar.gz + installed=$(python3 -c "import pybind11; print(pybind11.get_include() + '/pybind11')") + diff -rq $installed ./pybind11 + + win32: + strategy: + fail-fast: false + matrix: + python: + - 3.6 + - 3.7 + - 3.8 + - 3.9 + + include: + - python: 3.9 + args: -DCMAKE_CXX_STANDARD=20 + - python: 3.8 + args: -DCMAKE_CXX_STANDARD=17 + - python: 3.7 + args: -DCMAKE_CXX_STANDARD=14 + + + name: "🐍 ${{ matrix.python }} • MSVC 2019 • x86 ${{ matrix.args }}" + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + architecture: x86 + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Prepare MSVC + uses: ilammy/msvc-dev-cmd@v1.13.0 + with: + arch: x86 + + - name: Prepare env + run: | + python -m pip install -r tests/requirements.txt + + # First build - C++11 mode and inplace + - name: Configure ${{ matrix.args }} + run: > + cmake -S . -B build + -G "Visual Studio 16 2019" -A Win32 + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + ${{ matrix.args }} + - name: Build C++11 + run: cmake --build build -j 2 + + - name: Python tests + run: cmake --build build -t pytest + + win32-debug: + strategy: + fail-fast: false + matrix: + python: + - 3.8 + - 3.9 + + include: + - python: 3.9 + args: -DCMAKE_CXX_STANDARD=20 + - python: 3.8 + args: -DCMAKE_CXX_STANDARD=17 + + name: "🐍 ${{ matrix.python }} • MSVC 2019 (Debug) • x86 ${{ matrix.args }}" + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + architecture: x86 + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Prepare MSVC + uses: ilammy/msvc-dev-cmd@v1.13.0 + with: + arch: x86 + + - name: Prepare env + run: | + python -m pip install -r tests/requirements.txt + + # First build - C++11 mode and inplace + - name: Configure ${{ matrix.args }} + run: > + cmake -S . -B build + -G "Visual Studio 16 2019" -A Win32 + -DCMAKE_BUILD_TYPE=Debug + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + ${{ matrix.args }} + - name: Build C++11 + run: cmake --build build --config Debug -j 2 + + - name: Python tests + run: cmake --build build --config Debug -t pytest + + + windows-2022: + strategy: + fail-fast: false + matrix: + python: + - 3.9 + + name: "🐍 ${{ matrix.python }} • MSVC 2022 C++20 • x64" + runs-on: windows-2022 + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Prepare env + # Ensure use of NumPy 2 (via NumPy nightlies but can be changed soon) + run: | + python3 -m pip install -r tests/requirements.txt + python3 -m pip install 'numpy>=2.0.0b1' 'scipy>=1.13.0rc1' + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Configure C++20 + run: > + cmake -S . -B build + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=20 + + - name: Build C++20 + run: cmake --build build -j 2 + + - name: Python tests + run: cmake --build build --target pytest + + - name: C++20 tests + run: cmake --build build --target cpptest -j 2 + + - name: Interface test C++20 + run: cmake --build build --target test_cmake_build + + - name: Configure C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: > + cmake -S . -B build_partial + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=20 + "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" + + - name: Build C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: cmake --build build_partial -j 2 + + - name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: cmake --build build_partial --target pytest + + mingw: + name: "🐍 3 • windows-latest • ${{ matrix.sys }}" + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + strategy: + fail-fast: false + matrix: + include: + - { sys: mingw64, env: x86_64 } + - { sys: mingw32, env: i686 } + steps: + - uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.sys}} + install: >- + git + mingw-w64-${{matrix.env}}-gcc + mingw-w64-${{matrix.env}}-python-pip + mingw-w64-${{matrix.env}}-python-numpy + mingw-w64-${{matrix.env}}-cmake + mingw-w64-${{matrix.env}}-make + mingw-w64-${{matrix.env}}-python-pytest + mingw-w64-${{matrix.env}}-eigen3 + mingw-w64-${{matrix.env}}-boost + mingw-w64-${{matrix.env}}-catch + + - uses: msys2/setup-msys2@v2 + if: matrix.sys == 'mingw64' + with: + msystem: ${{matrix.sys}} + install: >- + git + mingw-w64-${{matrix.env}}-python-scipy + + - uses: actions/checkout@v4 + + - name: Configure C++11 + # LTO leads to many undefined reference like + # `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&) + run: >- + cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON + -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") + -S . -B build + + - name: Build C++11 + run: cmake --build build -j 2 + + - name: Python tests C++11 + run: cmake --build build --target pytest -j 2 + + - name: C++11 tests + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target cpptest -j 2 + + - name: Interface test C++11 + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target test_cmake_build + + - name: Clean directory + run: git clean -fdx + + - name: Configure C++14 + run: >- + cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON + -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") + -S . -B build2 + + - name: Build C++14 + run: cmake --build build2 -j 2 + + - name: Python tests C++14 + run: cmake --build build2 --target pytest -j 2 + + - name: C++14 tests + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target cpptest -j 2 + + - name: Interface test C++14 + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target test_cmake_build + + - name: Clean directory + run: git clean -fdx + + - name: Configure C++17 + run: >- + cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON + -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") + -S . -B build3 + + - name: Build C++17 + run: cmake --build build3 -j 2 + + - name: Python tests C++17 + run: cmake --build build3 --target pytest -j 2 + + - name: C++17 tests + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target cpptest -j 2 + + - name: Interface test C++17 + run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target test_cmake_build + + windows_clang: + + strategy: + matrix: + os: [windows-latest] + python: ['3.10'] + + runs-on: "${{ matrix.os }}" + + name: "🐍 ${{ matrix.python }} • ${{ matrix.os }} • clang-latest" + + steps: + - name: Show env + run: env + + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Clang + uses: egor-tensin/setup-clang@v1 + + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Install ninja-build tool + uses: seanmiddleditch/gha-setup-ninja@v4 + + - name: Run pip installs + run: | + python -m pip install --upgrade pip + python -m pip install -r tests/requirements.txt + + - name: Show Clang++ version + run: clang++ --version + + - name: Show CMake version + run: cmake --version + + # TODO: WERROR=ON + - name: Configure Clang + run: > + cmake -G Ninja -S . -B . + -DPYBIND11_WERROR=OFF + -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_COMPILER=clang++ + -DCMAKE_CXX_STANDARD=17 + + - name: Build + run: cmake --build . -j 2 + + - name: Python tests + run: cmake --build . --target pytest -j 2 + + - name: C++ tests + run: cmake --build . --target cpptest -j 2 + + - name: Interface test + run: cmake --build . --target test_cmake_build -j 2 + + - name: Clean directory + run: git clean -fdx + + macos_brew_install_llvm: + name: "macos-latest • brew install llvm" + runs-on: macos-latest + + env: + # https://apple.stackexchange.com/questions/227026/how-to-install-recent-clang-with-homebrew + LDFLAGS: '-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib' + + steps: + - name: Update PATH + run: echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH + + - name: Show env + run: env + + - name: Checkout + uses: actions/checkout@v4 + + - name: Show Clang++ version before brew install llvm + run: clang++ --version + + - name: brew install llvm + run: brew install llvm + + - name: Show Clang++ version after brew install llvm + run: clang++ --version + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Run pip installs + run: | + python3 -m pip install --upgrade pip + python3 -m pip install -r tests/requirements.txt + python3 -m pip install numpy + python3 -m pip install scipy + + - name: Show CMake version + run: cmake --version + + - name: CMake Configure + run: > + cmake -S . -B . + -DPYBIND11_WERROR=ON + -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_COMPILER=clang++ + -DCMAKE_CXX_STANDARD=17 + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + + - name: Build + run: cmake --build . -j 2 + + - name: Python tests + run: cmake --build . --target pytest -j 2 + + - name: C++ tests + run: cmake --build . --target cpptest -j 2 + + - name: Interface test + run: cmake --build . --target test_cmake_build -j 2 + + - name: CMake Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: > + cmake -S . -B build_partial + -DPYBIND11_WERROR=ON + -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_COMPILER=clang++ + -DCMAKE_CXX_STANDARD=17 + -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") + "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" + + - name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: cmake --build build_partial -j 2 + + - name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE + run: cmake --build build_partial --target pytest -j 2 + + - name: Clean directory + run: git clean -fdx diff --git a/third_party/CityFlow/extern/pybind11/.github/workflows/configure.yml b/third_party/CityFlow/extern/pybind11/.github/workflows/configure.yml new file mode 100644 index 0000000000000000000000000000000000000000..dca37864cf0601111d0ac9751aa75abcad31d19d --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/workflows/configure.yml @@ -0,0 +1,92 @@ +name: Config + +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + - stable + - v* + +permissions: + contents: read + +env: + PIP_BREAK_SYSTEM_PACKAGES: 1 + # For cmake: + VERBOSE: 1 + +jobs: + # This tests various versions of CMake in various combinations, to make sure + # the configure step passes. + cmake: + strategy: + fail-fast: false + matrix: + runs-on: [ubuntu-20.04, macos-latest, windows-latest] + arch: [x64] + cmake: ["3.26"] + + include: + - runs-on: ubuntu-20.04 + arch: x64 + cmake: "3.5" + + - runs-on: ubuntu-20.04 + arch: x64 + cmake: "3.27" + + - runs-on: macos-latest + arch: x64 + cmake: "3.7" + + - runs-on: windows-2019 + arch: x64 # x86 compilers seem to be missing on 2019 image + cmake: "3.18" + + name: 🐍 3.7 • CMake ${{ matrix.cmake }} • ${{ matrix.runs-on }} + runs-on: ${{ matrix.runs-on }} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python 3.7 + uses: actions/setup-python@v5 + with: + python-version: 3.7 + architecture: ${{ matrix.arch }} + + - name: Prepare env + run: python -m pip install -r tests/requirements.txt + + # An action for adding a specific version of CMake: + # https://github.com/jwlawson/actions-setup-cmake + - name: Setup CMake ${{ matrix.cmake }} + uses: jwlawson/actions-setup-cmake@v2.0 + with: + cmake-version: ${{ matrix.cmake }} + + # These steps use a directory with a space in it intentionally + - name: Make build directories + run: mkdir "build dir" + + - name: Configure + working-directory: build dir + shell: bash + run: > + cmake .. + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") + + # Only build and test if this was manually triggered in the GitHub UI + - name: Build + working-directory: build dir + if: github.event_name == 'workflow_dispatch' + run: cmake --build . --config Release + + - name: Test + working-directory: build dir + if: github.event_name == 'workflow_dispatch' + run: cmake --build . --config Release --target check diff --git a/third_party/CityFlow/extern/pybind11/.github/workflows/format.yml b/third_party/CityFlow/extern/pybind11/.github/workflows/format.yml new file mode 100644 index 0000000000000000000000000000000000000000..1eaa56e1c812fd20785fa6b43a1cec80848ab9a1 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/workflows/format.yml @@ -0,0 +1,60 @@ +# This is a format job. Pre-commit has a first-party GitHub action, so we use +# that: https://github.com/pre-commit/action + +name: Format + +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + - stable + - "v*" + +permissions: + contents: read + +env: + FORCE_COLOR: 3 + # For cmake: + VERBOSE: 1 + +jobs: + pre-commit: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + - name: Add matchers + run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json" + - uses: pre-commit/action@v3.0.1 + with: + # Slow hooks are marked with manual - slow is okay here, run them too + extra_args: --hook-stage manual --all-files + + clang-tidy: + # When making changes here, please also review the "Clang-Tidy" section + # in .github/CONTRIBUTING.md and update as needed. + name: Clang-Tidy + runs-on: ubuntu-latest + container: silkeh/clang:15-bullseye + steps: + - uses: actions/checkout@v4 + + - name: Install requirements + run: apt-get update && apt-get install -y git python3-dev python3-pytest + + - name: Configure + run: > + cmake -S . -B build + -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--use-color;--warnings-as-errors=*" + -DDOWNLOAD_EIGEN=ON + -DDOWNLOAD_CATCH=ON + -DCMAKE_CXX_STANDARD=17 + + - name: Build + run: cmake --build build -j 2 -- --keep-going diff --git a/third_party/CityFlow/extern/pybind11/.github/workflows/labeler.yml b/third_party/CityFlow/extern/pybind11/.github/workflows/labeler.yml new file mode 100644 index 0000000000000000000000000000000000000000..dd7105662bf2070718b3b5620ec65d040b1a24d9 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/workflows/labeler.yml @@ -0,0 +1,25 @@ +name: Labeler +on: + pull_request_target: + types: [closed] + +permissions: {} + +jobs: + label: + name: Labeler + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + + - uses: actions/labeler@v4 + if: > + github.event.pull_request.merged == true && + !startsWith(github.event.pull_request.title, 'chore(deps):') && + !startsWith(github.event.pull_request.title, 'ci(fix):') && + !startsWith(github.event.pull_request.title, 'docs(changelog):') + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/labeler_merged.yml diff --git a/third_party/CityFlow/extern/pybind11/.github/workflows/pip.yml b/third_party/CityFlow/extern/pybind11/.github/workflows/pip.yml new file mode 100644 index 0000000000000000000000000000000000000000..19baf57d92e874ca4f6a36c503725d7cb3ed8a7c --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/workflows/pip.yml @@ -0,0 +1,114 @@ +name: Pip + +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + - stable + - v* + release: + types: + - published + +permissions: + contents: read + +env: + PIP_BREAK_SYSTEM_PACKAGES: 1 + PIP_ONLY_BINARY: numpy + +jobs: + # This builds the sdists and wheels and makes sure the files are exactly as + # expected. Using Windows and Python 3.6, since that is often the most + # challenging matrix element. + test-packaging: + name: 🐍 3.6 • 📦 tests • windows-latest + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup 🐍 3.6 + uses: actions/setup-python@v5 + with: + python-version: 3.6 + + - name: Prepare env + run: | + python -m pip install -r tests/requirements.txt + + - name: Python Packaging tests + run: pytest tests/extra_python_package/ + + + # This runs the packaging tests and also builds and saves the packages as + # artifacts. + packaging: + name: 🐍 3.8 • 📦 & 📦 tests • ubuntu-latest + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup 🐍 3.8 + uses: actions/setup-python@v5 + with: + python-version: 3.8 + + - name: Prepare env + run: | + python -m pip install -r tests/requirements.txt build twine + + - name: Python Packaging tests + run: pytest tests/extra_python_package/ + + - name: Build SDist and wheels + run: | + python -m build + PYBIND11_GLOBAL_SDIST=1 python -m build + + - name: Check metadata + run: twine check dist/* + + - name: Save standard package + uses: actions/upload-artifact@v4 + with: + name: standard + path: dist/pybind11-* + + - name: Save global package + uses: actions/upload-artifact@v4 + with: + name: global + path: dist/pybind11_global-* + + + + # When a GitHub release is made, upload the artifacts to PyPI + upload: + name: Upload to PyPI + runs-on: ubuntu-latest + if: github.event_name == 'release' && github.event.action == 'published' + needs: [packaging] + + steps: + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + # Downloads all to directories matching the artifact names + - uses: actions/download-artifact@v4 + + - name: Publish standard package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.pypi_password }} + packages-dir: standard/ + + - name: Publish global package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.pypi_password_global }} + packages-dir: global/ diff --git a/third_party/CityFlow/extern/pybind11/.github/workflows/upstream.yml b/third_party/CityFlow/extern/pybind11/.github/workflows/upstream.yml new file mode 100644 index 0000000000000000000000000000000000000000..3892600381a228c21f703370ab4fbc2c217d2bb1 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.github/workflows/upstream.yml @@ -0,0 +1,116 @@ +name: Upstream + +on: + workflow_dispatch: + pull_request: + +permissions: + contents: read + +concurrency: + group: upstream-${{ github.ref }} + cancel-in-progress: true + +env: + PIP_BREAK_SYSTEM_PACKAGES: 1 + # For cmake: + VERBOSE: 1 + +jobs: + standard: + name: "🐍 3.13 latest • ubuntu-latest • x64" + runs-on: ubuntu-latest + # Only runs when the 'python dev' label is selected + if: "contains(github.event.pull_request.labels.*.name, 'python dev')" + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python 3.13 + uses: actions/setup-python@v5 + with: + python-version: "3.13" + allow-prereleases: true + + - name: Setup Boost + run: sudo apt-get install libboost-dev + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v2.0 + + - name: Run pip installs + run: | + python -m pip install --upgrade pip + python -m pip install -r tests/requirements.txt + + - name: Show platform info + run: | + python -m platform + cmake --version + pip list + + # First build - C++11 mode and inplace + - name: Configure C++11 + run: > + cmake -S . -B build11 + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=11 + -DCMAKE_BUILD_TYPE=Debug + + - name: Build C++11 + run: cmake --build build11 -j 2 + + - name: Python tests C++11 + run: cmake --build build11 --target pytest -j 2 + + - name: C++11 tests + run: cmake --build build11 --target cpptest -j 2 + + - name: Interface test C++11 + run: cmake --build build11 --target test_cmake_build + + # Second build - C++17 mode and in a build directory + - name: Configure C++17 + run: > + cmake -S . -B build17 + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + + - name: Build C++17 + run: cmake --build build17 -j 2 + + - name: Python tests C++17 + run: cmake --build build17 --target pytest + + - name: C++17 tests + run: cmake --build build17 --target cpptest + + # Third build - C++17 mode with unstable ABI + - name: Configure (unstable ABI) + run: > + cmake -S . -B build17max + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + -DPYBIND11_INTERNALS_VERSION=10000000 + + - name: Build (unstable ABI) + run: cmake --build build17max -j 2 + + - name: Python tests (unstable ABI) + run: cmake --build build17max --target pytest + + - name: Interface test (unstable ABI) + run: cmake --build build17max --target test_cmake_build + + # This makes sure the setup_helpers module can build packages using + # setuptools + - name: Setuptools helpers test + run: | + pip install setuptools + pytest tests/extra_setuptools diff --git a/third_party/CityFlow/extern/pybind11/.gitignore b/third_party/CityFlow/extern/pybind11/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..43d5094c967f4f839be18e71cc398f6af50722ae --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.gitignore @@ -0,0 +1,46 @@ +CMakeCache.txt +CMakeFiles +Makefile +cmake_install.cmake +cmake_uninstall.cmake +.DS_Store +*.so +*.pyd +*.dll +*.sln +*.sdf +*.opensdf +*.vcxproj +*.vcxproj.user +*.filters +example.dir +Win32 +x64 +Release +Debug +.vs +CTestTestfile.cmake +Testing +autogen +MANIFEST +/.ninja_* +/*.ninja +/docs/.build +*.py[co] +*.egg-info +*~ +.*.swp +.DS_Store +/dist +/*build* +.cache/ +sosize-*.txt +pybind11Config*.cmake +pybind11Targets.cmake +/*env* +/.vscode +/pybind11/include/* +/pybind11/share/* +/docs/_build/* +.ipynb_checkpoints/ +tests/main.cpp diff --git a/third_party/CityFlow/extern/pybind11/.pre-commit-config.yaml b/third_party/CityFlow/extern/pybind11/.pre-commit-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2bb47b21cb82b191440a8f5163c1d701fc889857 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.pre-commit-config.yaml @@ -0,0 +1,155 @@ +# To use: +# +# pre-commit run -a +# +# Or: +# +# pre-commit install # (runs every time you commit in git) +# +# To update this file: +# +# pre-commit autoupdate +# +# See https://github.com/pre-commit/pre-commit + + +ci: + autoupdate_commit_msg: "chore(deps): update pre-commit hooks" + autofix_commit_msg: "style: pre-commit fixes" + autoupdate_schedule: monthly + +# third-party content +exclude: ^tools/JoinPaths.cmake$ + +repos: + +# Clang format the codebase automatically +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: "v17.0.6" + hooks: + - id: clang-format + types_or: [c++, c, cuda] + +# Ruff, the Python auto-correcting linter/formatter written in Rust +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.2.0 + hooks: + - id: ruff + args: ["--fix", "--show-fixes"] + - id: ruff-format + +# Check static types with mypy +- repo: https://github.com/pre-commit/mirrors-mypy + rev: "v1.8.0" + hooks: + - id: mypy + args: [] + exclude: ^(tests|docs)/ + additional_dependencies: + - markdown-it-py<3 # Drop this together with dropping Python 3.7 support. + - nox + - rich + - types-setuptools + +# CMake formatting +- repo: https://github.com/cheshirekow/cmake-format-precommit + rev: "v0.6.13" + hooks: + - id: cmake-format + additional_dependencies: [pyyaml] + types: [file] + files: (\.cmake|CMakeLists.txt)(.in)?$ + +# Standard hooks +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: "v4.5.0" + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-docstring-first + - id: check-merge-conflict + - id: check-symlinks + - id: check-toml + - id: check-yaml + - id: debug-statements + - id: end-of-file-fixer + - id: mixed-line-ending + - id: requirements-txt-fixer + - id: trailing-whitespace + +# Also code format the docs +- repo: https://github.com/asottile/blacken-docs + rev: "1.16.0" + hooks: + - id: blacken-docs + additional_dependencies: + - black==23.* + +# Changes tabs to spaces +- repo: https://github.com/Lucas-C/pre-commit-hooks + rev: "v1.5.4" + hooks: + - id: remove-tabs + +# Avoid directional quotes +- repo: https://github.com/sirosen/texthooks + rev: "0.6.4" + hooks: + - id: fix-ligatures + - id: fix-smartquotes + +# Checking for common mistakes +- repo: https://github.com/pre-commit/pygrep-hooks + rev: "v1.10.0" + hooks: + - id: rst-backticks + - id: rst-directive-colons + - id: rst-inline-touching-normal + +# Checks the manifest for missing files (native support) +- repo: https://github.com/mgedmin/check-manifest + rev: "0.49" + hooks: + - id: check-manifest + # This is a slow hook, so only run this if --hook-stage manual is passed + stages: [manual] + additional_dependencies: [cmake, ninja] + +# Check for spelling +# Use tools/codespell_ignore_lines_from_errors.py +# to rebuild .codespell-ignore-lines +- repo: https://github.com/codespell-project/codespell + rev: "v2.2.6" + hooks: + - id: codespell + exclude: ".supp$" + args: ["-x.codespell-ignore-lines", "-Lccompiler"] + +# Check for common shell mistakes +- repo: https://github.com/shellcheck-py/shellcheck-py + rev: "v0.9.0.6" + hooks: + - id: shellcheck + +# Disallow some common capitalization mistakes +- repo: local + hooks: + - id: disallow-caps + name: Disallow improper capitalization + language: pygrep + entry: PyBind|\bNumpy\b|Cmake|CCache|PyTest + exclude: ^\.pre-commit-config.yaml$ + +# PyLint has native support - not always usable, but works for us +- repo: https://github.com/PyCQA/pylint + rev: "v3.0.3" + hooks: + - id: pylint + files: ^pybind11 + +- repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.28.0 + hooks: + - id: check-readthedocs + - id: check-github-workflows + - id: check-dependabot diff --git a/third_party/CityFlow/extern/pybind11/.readthedocs.yml b/third_party/CityFlow/extern/pybind11/.readthedocs.yml new file mode 100644 index 0000000000000000000000000000000000000000..a2b802f73d46da4df9699053db6fe33d317313f5 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/.readthedocs.yml @@ -0,0 +1,20 @@ +# https://blog.readthedocs.com/migrate-configuration-v2/ + +version: 2 + +build: + os: ubuntu-22.04 + apt_packages: + - librsvg2-bin + tools: + python: "3.11" + +sphinx: + configuration: docs/conf.py + +python: + install: + - requirements: docs/requirements.txt + +formats: + - pdf diff --git a/third_party/CityFlow/extern/pybind11/CMakeLists.txt b/third_party/CityFlow/extern/pybind11/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..7db1bf668f765865f244f16f50fe65d2783379e9 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/CMakeLists.txt @@ -0,0 +1,373 @@ +# CMakeLists.txt -- Build system for the pybind11 modules +# +# Copyright (c) 2015 Wenzel Jakob +# +# All rights reserved. Use of this source code is governed by a +# BSD-style license that can be found in the LICENSE file. + +# Propagate this policy (FindPythonInterp removal) so it can be detected later +if(NOT CMAKE_VERSION VERSION_LESS "3.27") + cmake_policy(GET CMP0148 _pybind11_cmp0148) +endif() + +cmake_minimum_required(VERSION 3.5) + +# The `cmake_minimum_required(VERSION 3.5...3.27)` syntax does not work with +# some versions of VS that have a patched CMake 3.11. This forces us to emulate +# the behavior using the following workaround: +if(${CMAKE_VERSION} VERSION_LESS 3.27) + cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +else() + cmake_policy(VERSION 3.27) +endif() + +if(_pybind11_cmp0148) + cmake_policy(SET CMP0148 ${_pybind11_cmp0148}) + unset(_pybind11_cmp0148) +endif() + +# Avoid infinite recursion if tests include this as a subdirectory +if(DEFINED PYBIND11_MASTER_PROJECT) + return() +endif() + +# Extract project version from source +file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/pybind11/detail/common.h" + pybind11_version_defines REGEX "#define PYBIND11_VERSION_(MAJOR|MINOR|PATCH) ") + +foreach(ver ${pybind11_version_defines}) + if(ver MATCHES [[#define PYBIND11_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$]]) + set(PYBIND11_VERSION_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}") + endif() +endforeach() + +if(PYBIND11_VERSION_PATCH MATCHES [[\.([a-zA-Z0-9]+)$]]) + set(pybind11_VERSION_TYPE "${CMAKE_MATCH_1}") +endif() +string(REGEX MATCH "^[0-9]+" PYBIND11_VERSION_PATCH "${PYBIND11_VERSION_PATCH}") + +project( + pybind11 + LANGUAGES CXX + VERSION "${PYBIND11_VERSION_MAJOR}.${PYBIND11_VERSION_MINOR}.${PYBIND11_VERSION_PATCH}") + +# Standard includes +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) +include(CMakeDependentOption) + +if(NOT pybind11_FIND_QUIETLY) + message(STATUS "pybind11 v${pybind11_VERSION} ${pybind11_VERSION_TYPE}") +endif() + +# Check if pybind11 is being used directly or via add_subdirectory +if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) + ### Warn if not an out-of-source builds + if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) + set(lines + "You are building in-place. If that is not what you intended to " + "do, you can clean the source directory with:\n" + "rm -r CMakeCache.txt CMakeFiles/ cmake_uninstall.cmake pybind11Config.cmake " + "pybind11ConfigVersion.cmake tests/CMakeFiles/\n") + message(AUTHOR_WARNING ${lines}) + endif() + + set(PYBIND11_MASTER_PROJECT ON) + + if(OSX AND CMAKE_VERSION VERSION_LESS 3.7) + # Bug in macOS CMake < 3.7 is unable to download catch + message(WARNING "CMAKE 3.7+ needed on macOS to download catch, and newer HIGHLY recommended") + elseif(WINDOWS AND CMAKE_VERSION VERSION_LESS 3.8) + # Only tested with 3.8+ in CI. + message(WARNING "CMAKE 3.8+ tested on Windows, previous versions untested") + endif() + + message(STATUS "CMake ${CMAKE_VERSION}") + + if(CMAKE_CXX_STANDARD) + set(CMAKE_CXX_EXTENSIONS OFF) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + endif() + + set(pybind11_system "") + + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + if(CMAKE_VERSION VERSION_LESS "3.18") + set(_pybind11_findpython_default OFF) + else() + set(_pybind11_findpython_default ON) + endif() +else() + set(PYBIND11_MASTER_PROJECT OFF) + set(pybind11_system SYSTEM) + set(_pybind11_findpython_default OFF) +endif() + +# Options +option(PYBIND11_INSTALL "Install pybind11 header files?" ${PYBIND11_MASTER_PROJECT}) +option(PYBIND11_TEST "Build pybind11 test suite?" ${PYBIND11_MASTER_PROJECT}) +option(PYBIND11_NOPYTHON "Disable search for Python" OFF) +option(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION + "To enforce that a handle_type_name<> specialization exists" OFF) +option(PYBIND11_SIMPLE_GIL_MANAGEMENT + "Use simpler GIL management logic that does not support disassociation" OFF) +option(PYBIND11_NUMPY_1_ONLY + "Disable NumPy 2 support to avoid changes to previous pybind11 versions." OFF) +set(PYBIND11_INTERNALS_VERSION + "" + CACHE STRING "Override the ABI version, may be used to enable the unstable ABI.") + +if(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION) + add_compile_definitions(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION) +endif() +if(PYBIND11_SIMPLE_GIL_MANAGEMENT) + add_compile_definitions(PYBIND11_SIMPLE_GIL_MANAGEMENT) +endif() +if(PYBIND11_NUMPY_1_ONLY) + add_compile_definitions(PYBIND11_NUMPY_1_ONLY) +endif() + +cmake_dependent_option( + USE_PYTHON_INCLUDE_DIR + "Install pybind11 headers in Python include directory instead of default installation prefix" + OFF "PYBIND11_INSTALL" OFF) + +cmake_dependent_option(PYBIND11_FINDPYTHON "Force new FindPython" ${_pybind11_findpython_default} + "NOT CMAKE_VERSION VERSION_LESS 3.12" OFF) + +# Allow PYTHON_EXECUTABLE if in FINDPYTHON mode and building pybind11's tests +# (makes transition easier while we support both modes). +if(PYBIND11_MASTER_PROJECT + AND PYBIND11_FINDPYTHON + AND DEFINED PYTHON_EXECUTABLE + AND NOT DEFINED Python_EXECUTABLE) + set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}") +endif() + +# NB: when adding a header don't forget to also add it to setup.py +set(PYBIND11_HEADERS + include/pybind11/detail/class.h + include/pybind11/detail/common.h + include/pybind11/detail/descr.h + include/pybind11/detail/init.h + include/pybind11/detail/internals.h + include/pybind11/detail/type_caster_base.h + include/pybind11/detail/typeid.h + include/pybind11/attr.h + include/pybind11/buffer_info.h + include/pybind11/cast.h + include/pybind11/chrono.h + include/pybind11/common.h + include/pybind11/complex.h + include/pybind11/options.h + include/pybind11/eigen.h + include/pybind11/eigen/common.h + include/pybind11/eigen/matrix.h + include/pybind11/eigen/tensor.h + include/pybind11/embed.h + include/pybind11/eval.h + include/pybind11/gil.h + include/pybind11/gil_safe_call_once.h + include/pybind11/iostream.h + include/pybind11/functional.h + include/pybind11/numpy.h + include/pybind11/operators.h + include/pybind11/pybind11.h + include/pybind11/pytypes.h + include/pybind11/stl.h + include/pybind11/stl_bind.h + include/pybind11/stl/filesystem.h + include/pybind11/type_caster_pyobject_ptr.h + include/pybind11/typing.h) + +# Compare with grep and warn if mismatched +if(PYBIND11_MASTER_PROJECT AND NOT CMAKE_VERSION VERSION_LESS 3.12) + file( + GLOB_RECURSE _pybind11_header_check + LIST_DIRECTORIES false + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + CONFIGURE_DEPENDS "include/pybind11/*.h") + set(_pybind11_here_only ${PYBIND11_HEADERS}) + set(_pybind11_disk_only ${_pybind11_header_check}) + list(REMOVE_ITEM _pybind11_here_only ${_pybind11_header_check}) + list(REMOVE_ITEM _pybind11_disk_only ${PYBIND11_HEADERS}) + if(_pybind11_here_only) + message(AUTHOR_WARNING "PYBIND11_HEADERS has extra files:" ${_pybind11_here_only}) + endif() + if(_pybind11_disk_only) + message(AUTHOR_WARNING "PYBIND11_HEADERS is missing files:" ${_pybind11_disk_only}) + endif() +endif() + +# CMake 3.12 added list(TRANSFORM PREPEND +# But we can't use it yet +string(REPLACE "include/" "${CMAKE_CURRENT_SOURCE_DIR}/include/" PYBIND11_HEADERS + "${PYBIND11_HEADERS}") + +# Cache variable so this can be used in parent projects +set(pybind11_INCLUDE_DIR + "${CMAKE_CURRENT_LIST_DIR}/include" + CACHE INTERNAL "Directory where pybind11 headers are located") + +# Backward compatible variable for add_subdirectory mode +if(NOT PYBIND11_MASTER_PROJECT) + set(PYBIND11_INCLUDE_DIR + "${pybind11_INCLUDE_DIR}" + CACHE INTERNAL "") +endif() + +# Note: when creating targets, you cannot use if statements at configure time - +# you need generator expressions, because those will be placed in the target file. +# You can also place ifs *in* the Config.in, but not here. + +# This section builds targets, but does *not* touch Python +# Non-IMPORT targets cannot be defined twice +if(NOT TARGET pybind11_headers) + # Build the headers-only target (no Python included): + # (long name used here to keep this from clashing in subdirectory mode) + add_library(pybind11_headers INTERFACE) + add_library(pybind11::pybind11_headers ALIAS pybind11_headers) # to match exported target + add_library(pybind11::headers ALIAS pybind11_headers) # easier to use/remember + + target_include_directories( + pybind11_headers ${pybind11_system} INTERFACE $ + $) + + target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals + cxx_right_angle_brackets) + if(NOT "${PYBIND11_INTERNALS_VERSION}" STREQUAL "") + target_compile_definitions( + pybind11_headers INTERFACE "PYBIND11_INTERNALS_VERSION=${PYBIND11_INTERNALS_VERSION}") + endif() +else() + # It is invalid to install a target twice, too. + set(PYBIND11_INSTALL OFF) +endif() + +include("${CMAKE_CURRENT_SOURCE_DIR}/tools/pybind11Common.cmake") +# https://github.com/jtojnar/cmake-snips/#concatenating-paths-when-building-pkg-config-files +# TODO: cmake 3.20 adds the cmake_path() function, which obsoletes this snippet +include("${CMAKE_CURRENT_SOURCE_DIR}/tools/JoinPaths.cmake") + +# Relative directory setting +if(USE_PYTHON_INCLUDE_DIR AND DEFINED Python_INCLUDE_DIRS) + file(RELATIVE_PATH CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX} ${Python_INCLUDE_DIRS}) +elseif(USE_PYTHON_INCLUDE_DIR AND DEFINED PYTHON_INCLUDE_DIR) + file(RELATIVE_PATH CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX} ${PYTHON_INCLUDE_DIRS}) +endif() + +if(PYBIND11_INSTALL) + install(DIRECTORY ${pybind11_INCLUDE_DIR}/pybind11 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + set(PYBIND11_CMAKECONFIG_INSTALL_DIR + "${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME}" + CACHE STRING "install path for pybind11Config.cmake") + + if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}") + set(pybind11_INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + else() + set(pybind11_INCLUDEDIR "\$\{PACKAGE_PREFIX_DIR\}/${CMAKE_INSTALL_INCLUDEDIR}") + endif() + + configure_package_config_file( + tools/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" + INSTALL_DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR}) + + if(CMAKE_VERSION VERSION_LESS 3.14) + # Remove CMAKE_SIZEOF_VOID_P from ConfigVersion.cmake since the library does + # not depend on architecture specific settings or libraries. + set(_PYBIND11_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P}) + unset(CMAKE_SIZEOF_VOID_P) + + write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake + VERSION ${PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion) + + set(CMAKE_SIZEOF_VOID_P ${_PYBIND11_CMAKE_SIZEOF_VOID_P}) + else() + # CMake 3.14+ natively supports header-only libraries + write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake + VERSION ${PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT) + endif() + + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake + tools/FindPythonLibsNew.cmake + tools/pybind11Common.cmake + tools/pybind11Tools.cmake + tools/pybind11NewTools.cmake + DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR}) + + if(NOT PYBIND11_EXPORT_NAME) + set(PYBIND11_EXPORT_NAME "${PROJECT_NAME}Targets") + endif() + + install(TARGETS pybind11_headers EXPORT "${PYBIND11_EXPORT_NAME}") + + install( + EXPORT "${PYBIND11_EXPORT_NAME}" + NAMESPACE "pybind11::" + DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR}) + + # pkg-config support + if(NOT prefix_for_pc_file) + if(IS_ABSOLUTE "${CMAKE_INSTALL_DATAROOTDIR}") + set(prefix_for_pc_file "${CMAKE_INSTALL_PREFIX}") + else() + set(pc_datarootdir "${CMAKE_INSTALL_DATAROOTDIR}") + if(CMAKE_VERSION VERSION_LESS 3.20) + set(prefix_for_pc_file "\${pcfiledir}/..") + while(pc_datarootdir) + get_filename_component(pc_datarootdir "${pc_datarootdir}" DIRECTORY) + string(APPEND prefix_for_pc_file "/..") + endwhile() + else() + cmake_path(RELATIVE_PATH CMAKE_INSTALL_PREFIX BASE_DIRECTORY CMAKE_INSTALL_DATAROOTDIR + OUTPUT_VARIABLE prefix_for_pc_file) + endif() + endif() + endif() + join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tools/pybind11.pc.in" + "${CMAKE_CURRENT_BINARY_DIR}/pybind11.pc" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pybind11.pc" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig/") + + # Uninstall target + if(PYBIND11_MASTER_PROJECT) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) + + add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P + ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + endif() +endif() + +# BUILD_TESTING takes priority, but only if this is the master project +if(PYBIND11_MASTER_PROJECT AND DEFINED BUILD_TESTING) + if(BUILD_TESTING) + if(_pybind11_nopython) + message(FATAL_ERROR "Cannot activate tests in NOPYTHON mode") + else() + add_subdirectory(tests) + endif() + endif() +else() + if(PYBIND11_TEST) + if(_pybind11_nopython) + message(FATAL_ERROR "Cannot activate tests in NOPYTHON mode") + else() + add_subdirectory(tests) + endif() + endif() +endif() + +# Better symmetry with find_package(pybind11 CONFIG) mode. +if(NOT PYBIND11_MASTER_PROJECT) + set(pybind11_FOUND + TRUE + CACHE INTERNAL "True if pybind11 and all required components found on the system") +endif() diff --git a/third_party/CityFlow/extern/pybind11/LICENSE b/third_party/CityFlow/extern/pybind11/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..e466b0dfda14f3a7c8ece512937eb99c8b7b6d68 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/LICENSE @@ -0,0 +1,29 @@ +Copyright (c) 2016 Wenzel Jakob , All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Please also refer to the file .github/CONTRIBUTING.md, which clarifies licensing of +external contributions to this project including patches, pull requests, etc. diff --git a/third_party/CityFlow/extern/pybind11/MANIFEST.in b/third_party/CityFlow/extern/pybind11/MANIFEST.in new file mode 100644 index 0000000000000000000000000000000000000000..7ce83c5527ccd0685ac8238c083972533872a062 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/MANIFEST.in @@ -0,0 +1,6 @@ +prune tests +recursive-include pybind11/include/pybind11 *.h +recursive-include pybind11 *.py +recursive-include pybind11 py.typed +include pybind11/share/cmake/pybind11/*.cmake +include LICENSE README.rst SECURITY.md pyproject.toml setup.py setup.cfg diff --git a/third_party/CityFlow/extern/pybind11/README.rst b/third_party/CityFlow/extern/pybind11/README.rst new file mode 100644 index 0000000000000000000000000000000000000000..4032f97a57c3bf17d49fe8e60b82f22a9ccacc4f --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/README.rst @@ -0,0 +1,181 @@ +.. figure:: https://github.com/pybind/pybind11/raw/master/docs/pybind11-logo.png + :alt: pybind11 logo + +**pybind11 — Seamless operability between C++11 and Python** + +|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |GitHub Discussions| |CI| |Build status| + +|Repology| |PyPI package| |Conda-forge| |Python Versions| + +`Setuptools example `_ +• `Scikit-build example `_ +• `CMake example `_ + +.. start + + +**pybind11** is a lightweight header-only library that exposes C++ types +in Python and vice versa, mainly to create Python bindings of existing +C++ code. Its goals and syntax are similar to the excellent +`Boost.Python `_ +library by David Abrahams: to minimize boilerplate code in traditional +extension modules by inferring type information using compile-time +introspection. + +The main issue with Boost.Python—and the reason for creating such a +similar project—is Boost. Boost is an enormously large and complex suite +of utility libraries that works with almost every C++ compiler in +existence. This compatibility has its cost: arcane template tricks and +workarounds are necessary to support the oldest and buggiest of compiler +specimens. Now that C++11-compatible compilers are widely available, +this heavy machinery has become an excessively large and unnecessary +dependency. + +Think of this library as a tiny self-contained version of Boost.Python +with everything stripped away that isn't relevant for binding +generation. Without comments, the core header files only require ~4K +lines of code and depend on Python (3.6+, or PyPy) and the C++ +standard library. This compact implementation was possible thanks to +some C++11 language features (specifically: tuples, lambda functions and +variadic templates). Since its creation, this library has grown beyond +Boost.Python in many ways, leading to dramatically simpler binding code in many +common situations. + +Tutorial and reference documentation is provided at +`pybind11.readthedocs.io `_. +A PDF version of the manual is available +`here `_. +And the source code is always available at +`github.com/pybind/pybind11 `_. + + +Core features +------------- + + +pybind11 can map the following core C++ features to Python: + +- Functions accepting and returning custom data structures per value, + reference, or pointer +- Instance methods and static methods +- Overloaded functions +- Instance attributes and static attributes +- Arbitrary exception types +- Enumerations +- Callbacks +- Iterators and ranges +- Custom operators +- Single and multiple inheritance +- STL data structures +- Smart pointers with reference counting like ``std::shared_ptr`` +- Internal references with correct reference counting +- C++ classes with virtual (and pure virtual) methods can be extended + in Python +- Integrated NumPy support (NumPy 2 requires pybind11 2.12+) + +Goodies +------- + +In addition to the core functionality, pybind11 provides some extra +goodies: + +- Python 3.6+, and PyPy3 7.3 are supported with an implementation-agnostic + interface (pybind11 2.9 was the last version to support Python 2 and 3.5). + +- It is possible to bind C++11 lambda functions with captured + variables. The lambda capture data is stored inside the resulting + Python function object. + +- pybind11 uses C++11 move constructors and move assignment operators + whenever possible to efficiently transfer custom data types. + +- It's easy to expose the internal storage of custom data types through + Pythons' buffer protocols. This is handy e.g. for fast conversion + between C++ matrix classes like Eigen and NumPy without expensive + copy operations. + +- pybind11 can automatically vectorize functions so that they are + transparently applied to all entries of one or more NumPy array + arguments. + +- Python's slice-based access and assignment operations can be + supported with just a few lines of code. + +- Everything is contained in just a few header files; there is no need + to link against any additional libraries. + +- Binaries are generally smaller by a factor of at least 2 compared to + equivalent bindings generated by Boost.Python. A recent pybind11 + conversion of PyRosetta, an enormous Boost.Python binding project, + `reported `_ + a binary size reduction of **5.4x** and compile time reduction by + **5.8x**. + +- Function signatures are precomputed at compile time (using + ``constexpr``), leading to smaller binaries. + +- With little extra effort, C++ types can be pickled and unpickled + similar to regular Python objects. + +Supported compilers +------------------- + +1. Clang/LLVM 3.3 or newer (for Apple Xcode's clang, this is 5.0.0 or + newer) +2. GCC 4.8 or newer +3. Microsoft Visual Studio 2017 or newer +4. Intel classic C++ compiler 18 or newer (ICC 20.2 tested in CI) +5. Cygwin/GCC (previously tested on 2.5.1) +6. NVCC (CUDA 11.0 tested in CI) +7. NVIDIA PGI (20.9 tested in CI) + +About +----- + +This project was created by `Wenzel +Jakob `_. Significant features and/or +improvements to the code were contributed by Jonas Adler, Lori A. Burns, +Sylvain Corlay, Eric Cousineau, Aaron Gokaslan, Ralf Grosse-Kunstleve, Trent Houliston, Axel +Huebl, @hulucc, Yannick Jadoul, Sergey Lyskov, Johan Mabille, Tomasz Miąsko, +Dean Moldovan, Ben Pritchard, Jason Rhinelander, Boris Schäling, Pim +Schellart, Henry Schreiner, Ivan Smirnov, Boris Staletic, and Patrick Stewart. + +We thank Google for a generous financial contribution to the continuous +integration infrastructure used by this project. + + +Contributing +~~~~~~~~~~~~ + +See the `contributing +guide `_ +for information on building and contributing to pybind11. + +License +~~~~~~~ + +pybind11 is provided under a BSD-style license that can be found in the +`LICENSE `_ +file. By using, distributing, or contributing to this project, you agree +to the terms and conditions of this license. + +.. |Latest Documentation Status| image:: https://readthedocs.org/projects/pybind11/badge?version=latest + :target: http://pybind11.readthedocs.org/en/latest +.. |Stable Documentation Status| image:: https://img.shields.io/badge/docs-stable-blue.svg + :target: http://pybind11.readthedocs.org/en/stable +.. |Gitter chat| image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg + :target: https://gitter.im/pybind/Lobby +.. |CI| image:: https://github.com/pybind/pybind11/workflows/CI/badge.svg + :target: https://github.com/pybind/pybind11/actions +.. |Build status| image:: https://ci.appveyor.com/api/projects/status/riaj54pn4h08xy40?svg=true + :target: https://ci.appveyor.com/project/wjakob/pybind11 +.. |PyPI package| image:: https://img.shields.io/pypi/v/pybind11.svg + :target: https://pypi.org/project/pybind11/ +.. |Conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pybind11.svg + :target: https://github.com/conda-forge/pybind11-feedstock +.. |Repology| image:: https://repology.org/badge/latest-versions/python:pybind11.svg + :target: https://repology.org/project/python:pybind11/versions +.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/pybind11.svg + :target: https://pypi.org/project/pybind11/ +.. |GitHub Discussions| image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github + :target: https://github.com/pybind/pybind11/discussions diff --git a/third_party/CityFlow/extern/pybind11/SECURITY.md b/third_party/CityFlow/extern/pybind11/SECURITY.md new file mode 100644 index 0000000000000000000000000000000000000000..3d74611f2db85d7981287ad4314e2a868a1280d5 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/SECURITY.md @@ -0,0 +1,13 @@ +# Security Policy + +## Supported Versions + +Security updates are applied only to the latest release. + +## Reporting a Vulnerability + +If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released. + +Please disclose it at [security advisory](https://github.com/pybind/pybind11/security/advisories/new). + +This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure. diff --git a/third_party/CityFlow/extern/pybind11/docs/Doxyfile b/third_party/CityFlow/extern/pybind11/docs/Doxyfile new file mode 100644 index 0000000000000000000000000000000000000000..09138db364a83888b793dafd7bcc680458e6570f --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/Doxyfile @@ -0,0 +1,21 @@ +PROJECT_NAME = pybind11 +INPUT = ../include/pybind11/ +RECURSIVE = YES + +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_XML = YES +XML_OUTPUT = .build/doxygenxml +XML_PROGRAMLISTING = YES + +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +EXPAND_AS_DEFINED = PYBIND11_RUNTIME_EXCEPTION + +ALIASES = "rst=\verbatim embed:rst" +ALIASES += "endrst=\endverbatim" + +QUIET = YES +WARNINGS = YES +WARN_IF_UNDOCUMENTED = NO +PREDEFINED = PYBIND11_NOINLINE diff --git a/third_party/CityFlow/extern/pybind11/docs/Makefile b/third_party/CityFlow/extern/pybind11/docs/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..511b47c2d5434ced54ed49ac35d33df80afc684a --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/Makefile @@ -0,0 +1,192 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = .build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pybind11.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pybind11.qhc" + +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/pybind11" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pybind11" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/third_party/CityFlow/extern/pybind11/docs/_static/css/custom.css b/third_party/CityFlow/extern/pybind11/docs/_static/css/custom.css new file mode 100644 index 0000000000000000000000000000000000000000..7a49a6ac4ff10b15083f12e819854e293e44cb20 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/_static/css/custom.css @@ -0,0 +1,3 @@ +.highlight .go { + color: #707070; +} diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/cast/chrono.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/chrono.rst new file mode 100644 index 0000000000000000000000000000000000000000..fbd46057aa392c86ae3747c2b21768367205ea49 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/chrono.rst @@ -0,0 +1,81 @@ +Chrono +====== + +When including the additional header file :file:`pybind11/chrono.h` conversions +from C++11 chrono datatypes to python datetime objects are automatically enabled. +This header also enables conversions of python floats (often from sources such +as ``time.monotonic()``, ``time.perf_counter()`` and ``time.process_time()``) +into durations. + +An overview of clocks in C++11 +------------------------------ + +A point of confusion when using these conversions is the differences between +clocks provided in C++11. There are three clock types defined by the C++11 +standard and users can define their own if needed. Each of these clocks have +different properties and when converting to and from python will give different +results. + +The first clock defined by the standard is ``std::chrono::system_clock``. This +clock measures the current date and time. However, this clock changes with to +updates to the operating system time. For example, if your time is synchronised +with a time server this clock will change. This makes this clock a poor choice +for timing purposes but good for measuring the wall time. + +The second clock defined in the standard is ``std::chrono::steady_clock``. +This clock ticks at a steady rate and is never adjusted. This makes it excellent +for timing purposes, however the value in this clock does not correspond to the +current date and time. Often this clock will be the amount of time your system +has been on, although it does not have to be. This clock will never be the same +clock as the system clock as the system clock can change but steady clocks +cannot. + +The third clock defined in the standard is ``std::chrono::high_resolution_clock``. +This clock is the clock that has the highest resolution out of the clocks in the +system. It is normally a typedef to either the system clock or the steady clock +but can be its own independent clock. This is important as when using these +conversions as the types you get in python for this clock might be different +depending on the system. +If it is a typedef of the system clock, python will get datetime objects, but if +it is a different clock they will be timedelta objects. + +Provided conversions +-------------------- + +.. rubric:: C++ to Python + +- ``std::chrono::system_clock::time_point`` → ``datetime.datetime`` + System clock times are converted to python datetime instances. They are + in the local timezone, but do not have any timezone information attached + to them (they are naive datetime objects). + +- ``std::chrono::duration`` → ``datetime.timedelta`` + Durations are converted to timedeltas, any precision in the duration + greater than microseconds is lost by rounding towards zero. + +- ``std::chrono::[other_clocks]::time_point`` → ``datetime.timedelta`` + Any clock time that is not the system clock is converted to a time delta. + This timedelta measures the time from the clocks epoch to now. + +.. rubric:: Python to C++ + +- ``datetime.datetime`` or ``datetime.date`` or ``datetime.time`` → ``std::chrono::system_clock::time_point`` + Date/time objects are converted into system clock timepoints. Any + timezone information is ignored and the type is treated as a naive + object. + +- ``datetime.timedelta`` → ``std::chrono::duration`` + Time delta are converted into durations with microsecond precision. + +- ``datetime.timedelta`` → ``std::chrono::[other_clocks]::time_point`` + Time deltas that are converted into clock timepoints are treated as + the amount of time from the start of the clocks epoch. + +- ``float`` → ``std::chrono::duration`` + Floats that are passed to C++ as durations be interpreted as a number of + seconds. These will be converted to the duration using ``duration_cast`` + from the float. + +- ``float`` → ``std::chrono::[other_clocks]::time_point`` + Floats that are passed to C++ as time points will be interpreted as the + number of seconds from the start of the clocks epoch. diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/cast/custom.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/custom.rst new file mode 100644 index 0000000000000000000000000000000000000000..8138cac61996d3cc008b4d7c582d553dbd0cc5dd --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/custom.rst @@ -0,0 +1,93 @@ +Custom type casters +=================== + +In very rare cases, applications may require custom type casters that cannot be +expressed using the abstractions provided by pybind11, thus requiring raw +Python C API calls. This is fairly advanced usage and should only be pursued by +experts who are familiar with the intricacies of Python reference counting. + +The following snippets demonstrate how this works for a very simple ``inty`` +type that that should be convertible from Python types that provide a +``__int__(self)`` method. + +.. code-block:: cpp + + struct inty { long long_value; }; + + void print(inty s) { + std::cout << s.long_value << std::endl; + } + +The following Python snippet demonstrates the intended usage from the Python side: + +.. code-block:: python + + class A: + def __int__(self): + return 123 + + + from example import print + + print(A()) + +To register the necessary conversion routines, it is necessary to add an +instantiation of the ``pybind11::detail::type_caster`` template. +Although this is an implementation detail, adding an instantiation of this +type is explicitly allowed. + +.. code-block:: cpp + + namespace PYBIND11_NAMESPACE { namespace detail { + template <> struct type_caster { + public: + /** + * This macro establishes the name 'inty' in + * function signatures and declares a local variable + * 'value' of type inty + */ + PYBIND11_TYPE_CASTER(inty, const_name("inty")); + + /** + * Conversion part 1 (Python->C++): convert a PyObject into a inty + * instance or return false upon failure. The second argument + * indicates whether implicit conversions should be applied. + */ + bool load(handle src, bool) { + /* Extract PyObject from handle */ + PyObject *source = src.ptr(); + /* Try converting into a Python integer value */ + PyObject *tmp = PyNumber_Long(source); + if (!tmp) + return false; + /* Now try to convert into a C++ int */ + value.long_value = PyLong_AsLong(tmp); + Py_DECREF(tmp); + /* Ensure return code was OK (to avoid out-of-range errors etc) */ + return !(value.long_value == -1 && !PyErr_Occurred()); + } + + /** + * Conversion part 2 (C++ -> Python): convert an inty instance into + * a Python object. The second and third arguments are used to + * indicate the return value policy and parent object (for + * ``return_value_policy::reference_internal``) and are generally + * ignored by implicit casters. + */ + static handle cast(inty src, return_value_policy /* policy */, handle /* parent */) { + return PyLong_FromLong(src.long_value); + } + }; + }} // namespace PYBIND11_NAMESPACE::detail + +.. note:: + + A ``type_caster`` defined with ``PYBIND11_TYPE_CASTER(T, ...)`` requires + that ``T`` is default-constructible (``value`` is first default constructed + and then ``load()`` assigns to it). + +.. warning:: + + When using custom type casters, it's important to declare them consistently + in every compilation unit of the Python extension module. Otherwise, + undefined behavior can ensue. diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/cast/eigen.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/eigen.rst new file mode 100644 index 0000000000000000000000000000000000000000..a5c11a3f149347213362e9691c1572b852b4eb4d --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/eigen.rst @@ -0,0 +1,310 @@ +Eigen +##### + +`Eigen `_ is C++ header-based library for dense and +sparse linear algebra. Due to its popularity and widespread adoption, pybind11 +provides transparent conversion and limited mapping support between Eigen and +Scientific Python linear algebra data types. + +To enable the built-in Eigen support you must include the optional header file +:file:`pybind11/eigen.h`. + +Pass-by-value +============= + +When binding a function with ordinary Eigen dense object arguments (for +example, ``Eigen::MatrixXd``), pybind11 will accept any input value that is +already (or convertible to) a ``numpy.ndarray`` with dimensions compatible with +the Eigen type, copy its values into a temporary Eigen variable of the +appropriate type, then call the function with this temporary variable. + +Sparse matrices are similarly copied to or from +``scipy.sparse.csr_matrix``/``scipy.sparse.csc_matrix`` objects. + +Pass-by-reference +================= + +One major limitation of the above is that every data conversion implicitly +involves a copy, which can be both expensive (for large matrices) and disallows +binding functions that change their (Matrix) arguments. Pybind11 allows you to +work around this by using Eigen's ``Eigen::Ref`` class much as you +would when writing a function taking a generic type in Eigen itself (subject to +some limitations discussed below). + +When calling a bound function accepting a ``Eigen::Ref`` +type, pybind11 will attempt to avoid copying by using an ``Eigen::Map`` object +that maps into the source ``numpy.ndarray`` data: this requires both that the +data types are the same (e.g. ``dtype='float64'`` and ``MatrixType::Scalar`` is +``double``); and that the storage is layout compatible. The latter limitation +is discussed in detail in the section below, and requires careful +consideration: by default, numpy matrices and Eigen matrices are *not* storage +compatible. + +If the numpy matrix cannot be used as is (either because its types differ, e.g. +passing an array of integers to an Eigen parameter requiring doubles, or +because the storage is incompatible), pybind11 makes a temporary copy and +passes the copy instead. + +When a bound function parameter is instead ``Eigen::Ref`` (note the +lack of ``const``), pybind11 will only allow the function to be called if it +can be mapped *and* if the numpy array is writeable (that is +``a.flags.writeable`` is true). Any access (including modification) made to +the passed variable will be transparently carried out directly on the +``numpy.ndarray``. + +This means you can write code such as the following and have it work as +expected: + +.. code-block:: cpp + + void scale_by_2(Eigen::Ref v) { + v *= 2; + } + +Note, however, that you will likely run into limitations due to numpy and +Eigen's difference default storage order for data; see the below section on +:ref:`storage_orders` for details on how to bind code that won't run into such +limitations. + +.. note:: + + Passing by reference is not supported for sparse types. + +Returning values to Python +========================== + +When returning an ordinary dense Eigen matrix type to numpy (e.g. +``Eigen::MatrixXd`` or ``Eigen::RowVectorXf``) pybind11 keeps the matrix and +returns a numpy array that directly references the Eigen matrix: no copy of the +data is performed. The numpy array will have ``array.flags.owndata`` set to +``False`` to indicate that it does not own the data, and the lifetime of the +stored Eigen matrix will be tied to the returned ``array``. + +If you bind a function with a non-reference, ``const`` return type (e.g. +``const Eigen::MatrixXd``), the same thing happens except that pybind11 also +sets the numpy array's ``writeable`` flag to false. + +If you return an lvalue reference or pointer, the usual pybind11 rules apply, +as dictated by the binding function's return value policy (see the +documentation on :ref:`return_value_policies` for full details). That means, +without an explicit return value policy, lvalue references will be copied and +pointers will be managed by pybind11. In order to avoid copying, you should +explicitly specify an appropriate return value policy, as in the following +example: + +.. code-block:: cpp + + class MyClass { + Eigen::MatrixXd big_mat = Eigen::MatrixXd::Zero(10000, 10000); + public: + Eigen::MatrixXd &getMatrix() { return big_mat; } + const Eigen::MatrixXd &viewMatrix() { return big_mat; } + }; + + // Later, in binding code: + py::class_(m, "MyClass") + .def(py::init<>()) + .def("copy_matrix", &MyClass::getMatrix) // Makes a copy! + .def("get_matrix", &MyClass::getMatrix, py::return_value_policy::reference_internal) + .def("view_matrix", &MyClass::viewMatrix, py::return_value_policy::reference_internal) + ; + +.. code-block:: python + + a = MyClass() + m = a.get_matrix() # flags.writeable = True, flags.owndata = False + v = a.view_matrix() # flags.writeable = False, flags.owndata = False + c = a.copy_matrix() # flags.writeable = True, flags.owndata = True + # m[5,6] and v[5,6] refer to the same element, c[5,6] does not. + +Note in this example that ``py::return_value_policy::reference_internal`` is +used to tie the life of the MyClass object to the life of the returned arrays. + +You may also return an ``Eigen::Ref``, ``Eigen::Map`` or other map-like Eigen +object (for example, the return value of ``matrix.block()`` and related +methods) that map into a dense Eigen type. When doing so, the default +behaviour of pybind11 is to simply reference the returned data: you must take +care to ensure that this data remains valid! You may ask pybind11 to +explicitly *copy* such a return value by using the +``py::return_value_policy::copy`` policy when binding the function. You may +also use ``py::return_value_policy::reference_internal`` or a +``py::keep_alive`` to ensure the data stays valid as long as the returned numpy +array does. + +When returning such a reference of map, pybind11 additionally respects the +readonly-status of the returned value, marking the numpy array as non-writeable +if the reference or map was itself read-only. + +.. note:: + + Sparse types are always copied when returned. + +.. _storage_orders: + +Storage orders +============== + +Passing arguments via ``Eigen::Ref`` has some limitations that you must be +aware of in order to effectively pass matrices by reference. First and +foremost is that the default ``Eigen::Ref`` class requires +contiguous storage along columns (for column-major types, the default in Eigen) +or rows if ``MatrixType`` is specifically an ``Eigen::RowMajor`` storage type. +The former, Eigen's default, is incompatible with ``numpy``'s default row-major +storage, and so you will not be able to pass numpy arrays to Eigen by reference +without making one of two changes. + +(Note that this does not apply to vectors (or column or row matrices): for such +types the "row-major" and "column-major" distinction is meaningless). + +The first approach is to change the use of ``Eigen::Ref`` to the +more general ``Eigen::Ref>`` (or similar type with a fully dynamic stride type in the +third template argument). Since this is a rather cumbersome type, pybind11 +provides a ``py::EigenDRef`` type alias for your convenience (along +with EigenDMap for the equivalent Map, and EigenDStride for just the stride +type). + +This type allows Eigen to map into any arbitrary storage order. This is not +the default in Eigen for performance reasons: contiguous storage allows +vectorization that cannot be done when storage is not known to be contiguous at +compile time. The default ``Eigen::Ref`` stride type allows non-contiguous +storage along the outer dimension (that is, the rows of a column-major matrix +or columns of a row-major matrix), but not along the inner dimension. + +This type, however, has the added benefit of also being able to map numpy array +slices. For example, the following (contrived) example uses Eigen with a numpy +slice to multiply by 2 all coefficients that are both on even rows (0, 2, 4, +...) and in columns 2, 5, or 8: + +.. code-block:: cpp + + m.def("scale", [](py::EigenDRef m, double c) { m *= c; }); + +.. code-block:: python + + # a = np.array(...) + scale_by_2(myarray[0::2, 2:9:3]) + +The second approach to avoid copying is more intrusive: rearranging the +underlying data types to not run into the non-contiguous storage problem in the +first place. In particular, that means using matrices with ``Eigen::RowMajor`` +storage, where appropriate, such as: + +.. code-block:: cpp + + using RowMatrixXd = Eigen::Matrix; + // Use RowMatrixXd instead of MatrixXd + +Now bound functions accepting ``Eigen::Ref`` arguments will be +callable with numpy's (default) arrays without involving a copying. + +You can, alternatively, change the storage order that numpy arrays use by +adding the ``order='F'`` option when creating an array: + +.. code-block:: python + + myarray = np.array(source, order="F") + +Such an object will be passable to a bound function accepting an +``Eigen::Ref`` (or similar column-major Eigen type). + +One major caveat with this approach, however, is that it is not entirely as +easy as simply flipping all Eigen or numpy usage from one to the other: some +operations may alter the storage order of a numpy array. For example, ``a2 = +array.transpose()`` results in ``a2`` being a view of ``array`` that references +the same data, but in the opposite storage order! + +While this approach allows fully optimized vectorized calculations in Eigen, it +cannot be used with array slices, unlike the first approach. + +When *returning* a matrix to Python (either a regular matrix, a reference via +``Eigen::Ref<>``, or a map/block into a matrix), no special storage +consideration is required: the created numpy array will have the required +stride that allows numpy to properly interpret the array, whatever its storage +order. + +Failing rather than copying +=========================== + +The default behaviour when binding ``Eigen::Ref`` Eigen +references is to copy matrix values when passed a numpy array that does not +conform to the element type of ``MatrixType`` or does not have a compatible +stride layout. If you want to explicitly avoid copying in such a case, you +should bind arguments using the ``py::arg().noconvert()`` annotation (as +described in the :ref:`nonconverting_arguments` documentation). + +The following example shows an example of arguments that don't allow data +copying to take place: + +.. code-block:: cpp + + // The method and function to be bound: + class MyClass { + // ... + double some_method(const Eigen::Ref &matrix) { /* ... */ } + }; + float some_function(const Eigen::Ref &big, + const Eigen::Ref &small) { + // ... + } + + // The associated binding code: + using namespace pybind11::literals; // for "arg"_a + py::class_(m, "MyClass") + // ... other class definitions + .def("some_method", &MyClass::some_method, py::arg().noconvert()); + + m.def("some_function", &some_function, + "big"_a.noconvert(), // <- Don't allow copying for this arg + "small"_a // <- This one can be copied if needed + ); + +With the above binding code, attempting to call the the ``some_method(m)`` +method on a ``MyClass`` object, or attempting to call ``some_function(m, m2)`` +will raise a ``RuntimeError`` rather than making a temporary copy of the array. +It will, however, allow the ``m2`` argument to be copied into a temporary if +necessary. + +Note that explicitly specifying ``.noconvert()`` is not required for *mutable* +Eigen references (e.g. ``Eigen::Ref`` without ``const`` on the +``MatrixXd``): mutable references will never be called with a temporary copy. + +Vectors versus column/row matrices +================================== + +Eigen and numpy have fundamentally different notions of a vector. In Eigen, a +vector is simply a matrix with the number of columns or rows set to 1 at +compile time (for a column vector or row vector, respectively). NumPy, in +contrast, has comparable 2-dimensional 1xN and Nx1 arrays, but *also* has +1-dimensional arrays of size N. + +When passing a 2-dimensional 1xN or Nx1 array to Eigen, the Eigen type must +have matching dimensions: That is, you cannot pass a 2-dimensional Nx1 numpy +array to an Eigen value expecting a row vector, or a 1xN numpy array as a +column vector argument. + +On the other hand, pybind11 allows you to pass 1-dimensional arrays of length N +as Eigen parameters. If the Eigen type can hold a column vector of length N it +will be passed as such a column vector. If not, but the Eigen type constraints +will accept a row vector, it will be passed as a row vector. (The column +vector takes precedence when both are supported, for example, when passing a +1D numpy array to a MatrixXd argument). Note that the type need not be +explicitly a vector: it is permitted to pass a 1D numpy array of size 5 to an +Eigen ``Matrix``: you would end up with a 1x5 Eigen matrix. +Passing the same to an ``Eigen::MatrixXd`` would result in a 5x1 Eigen matrix. + +When returning an Eigen vector to numpy, the conversion is ambiguous: a row +vector of length 4 could be returned as either a 1D array of length 4, or as a +2D array of size 1x4. When encountering such a situation, pybind11 compromises +by considering the returned Eigen type: if it is a compile-time vector--that +is, the type has either the number of rows or columns set to 1 at compile +time--pybind11 converts to a 1D numpy array when returning the value. For +instances that are a vector only at run-time (e.g. ``MatrixXd``, +``Matrix``), pybind11 returns the vector as a 2D array to +numpy. If this isn't want you want, you can use ``array.reshape(...)`` to get +a view of the same data in the desired dimensions. + +.. seealso:: + + The file :file:`tests/test_eigen.cpp` contains a complete example that + shows how to pass Eigen sparse and dense data types in more detail. diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/cast/functional.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/functional.rst new file mode 100644 index 0000000000000000000000000000000000000000..d9b46057598f0d182422accd088fbff9785b0b53 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/functional.rst @@ -0,0 +1,109 @@ +Functional +########## + +The following features must be enabled by including :file:`pybind11/functional.h`. + + +Callbacks and passing anonymous functions +========================================= + +The C++11 standard brought lambda functions and the generic polymorphic +function wrapper ``std::function<>`` to the C++ programming language, which +enable powerful new ways of working with functions. Lambda functions come in +two flavors: stateless lambda function resemble classic function pointers that +link to an anonymous piece of code, while stateful lambda functions +additionally depend on captured variables that are stored in an anonymous +*lambda closure object*. + +Here is a simple example of a C++ function that takes an arbitrary function +(stateful or stateless) with signature ``int -> int`` as an argument and runs +it with the value 10. + +.. code-block:: cpp + + int func_arg(const std::function &f) { + return f(10); + } + +The example below is more involved: it takes a function of signature ``int -> int`` +and returns another function of the same kind. The return value is a stateful +lambda function, which stores the value ``f`` in the capture object and adds 1 to +its return value upon execution. + +.. code-block:: cpp + + std::function func_ret(const std::function &f) { + return [f](int i) { + return f(i) + 1; + }; + } + +This example demonstrates using python named parameters in C++ callbacks which +requires using ``py::cpp_function`` as a wrapper. Usage is similar to defining +methods of classes: + +.. code-block:: cpp + + py::cpp_function func_cpp() { + return py::cpp_function([](int i) { return i+1; }, + py::arg("number")); + } + +After including the extra header file :file:`pybind11/functional.h`, it is almost +trivial to generate binding code for all of these functions. + +.. code-block:: cpp + + #include + + PYBIND11_MODULE(example, m) { + m.def("func_arg", &func_arg); + m.def("func_ret", &func_ret); + m.def("func_cpp", &func_cpp); + } + +The following interactive session shows how to call them from Python. + +.. code-block:: pycon + + $ python + >>> import example + >>> def square(i): + ... return i * i + ... + >>> example.func_arg(square) + 100L + >>> square_plus_1 = example.func_ret(square) + >>> square_plus_1(4) + 17L + >>> plus_1 = func_cpp() + >>> plus_1(number=43) + 44L + +.. warning:: + + Keep in mind that passing a function from C++ to Python (or vice versa) + will instantiate a piece of wrapper code that translates function + invocations between the two languages. Naturally, this translation + increases the computational cost of each function call somewhat. A + problematic situation can arise when a function is copied back and forth + between Python and C++ many times in a row, in which case the underlying + wrappers will accumulate correspondingly. The resulting long sequence of + C++ -> Python -> C++ -> ... roundtrips can significantly decrease + performance. + + There is one exception: pybind11 detects case where a stateless function + (i.e. a function pointer or a lambda function without captured variables) + is passed as an argument to another C++ function exposed in Python. In this + case, there is no overhead. Pybind11 will extract the underlying C++ + function pointer from the wrapped function to sidestep a potential C++ -> + Python -> C++ roundtrip. This is demonstrated in :file:`tests/test_callbacks.cpp`. + +.. note:: + + This functionality is very useful when generating bindings for callbacks in + C++ libraries (e.g. GUI libraries, asynchronous networking libraries, etc.). + + The file :file:`tests/test_callbacks.cpp` contains a complete example + that demonstrates how to work with callbacks and anonymous functions in + more detail. diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/cast/index.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..3ce9ea0286e9dbd5fc795e60ae77a3c9afa356b8 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/index.rst @@ -0,0 +1,43 @@ +.. _type-conversions: + +Type conversions +################ + +Apart from enabling cross-language function calls, a fundamental problem +that a binding tool like pybind11 must address is to provide access to +native Python types in C++ and vice versa. There are three fundamentally +different ways to do this—which approach is preferable for a particular type +depends on the situation at hand. + +1. Use a native C++ type everywhere. In this case, the type must be wrapped + using pybind11-generated bindings so that Python can interact with it. + +2. Use a native Python type everywhere. It will need to be wrapped so that + C++ functions can interact with it. + +3. Use a native C++ type on the C++ side and a native Python type on the + Python side. pybind11 refers to this as a *type conversion*. + + Type conversions are the most "natural" option in the sense that native + (non-wrapped) types are used everywhere. The main downside is that a copy + of the data must be made on every Python ↔ C++ transition: this is + needed since the C++ and Python versions of the same type generally won't + have the same memory layout. + + pybind11 can perform many kinds of conversions automatically. An overview + is provided in the table ":ref:`conversion_table`". + +The following subsections discuss the differences between these options in more +detail. The main focus in this section is on type conversions, which represent +the last case of the above list. + +.. toctree:: + :maxdepth: 1 + + overview + strings + stl + functional + chrono + eigen + custom diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/cast/overview.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/overview.rst new file mode 100644 index 0000000000000000000000000000000000000000..011bd4c7a3345b00d0115ddda66cdd46de2a2bbf --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/overview.rst @@ -0,0 +1,170 @@ +Overview +######## + +.. rubric:: 1. Native type in C++, wrapper in Python + +Exposing a custom C++ type using :class:`py::class_` was covered in detail +in the :doc:`/classes` section. There, the underlying data structure is +always the original C++ class while the :class:`py::class_` wrapper provides +a Python interface. Internally, when an object like this is sent from C++ to +Python, pybind11 will just add the outer wrapper layer over the native C++ +object. Getting it back from Python is just a matter of peeling off the +wrapper. + +.. rubric:: 2. Wrapper in C++, native type in Python + +This is the exact opposite situation. Now, we have a type which is native to +Python, like a ``tuple`` or a ``list``. One way to get this data into C++ is +with the :class:`py::object` family of wrappers. These are explained in more +detail in the :doc:`/advanced/pycpp/object` section. We'll just give a quick +example here: + +.. code-block:: cpp + + void print_list(py::list my_list) { + for (auto item : my_list) + std::cout << item << " "; + } + +.. code-block:: pycon + + >>> print_list([1, 2, 3]) + 1 2 3 + +The Python ``list`` is not converted in any way -- it's just wrapped in a C++ +:class:`py::list` class. At its core it's still a Python object. Copying a +:class:`py::list` will do the usual reference-counting like in Python. +Returning the object to Python will just remove the thin wrapper. + +.. rubric:: 3. Converting between native C++ and Python types + +In the previous two cases we had a native type in one language and a wrapper in +the other. Now, we have native types on both sides and we convert between them. + +.. code-block:: cpp + + void print_vector(const std::vector &v) { + for (auto item : v) + std::cout << item << "\n"; + } + +.. code-block:: pycon + + >>> print_vector([1, 2, 3]) + 1 2 3 + +In this case, pybind11 will construct a new ``std::vector`` and copy each +element from the Python ``list``. The newly constructed object will be passed +to ``print_vector``. The same thing happens in the other direction: a new +``list`` is made to match the value returned from C++. + +Lots of these conversions are supported out of the box, as shown in the table +below. They are very convenient, but keep in mind that these conversions are +fundamentally based on copying data. This is perfectly fine for small immutable +types but it may become quite expensive for large data structures. This can be +avoided by overriding the automatic conversion with a custom wrapper (i.e. the +above-mentioned approach 1). This requires some manual effort and more details +are available in the :ref:`opaque` section. + +.. _conversion_table: + +List of all builtin conversions +------------------------------- + +The following basic data types are supported out of the box (some may require +an additional extension header to be included). To pass other data structures +as arguments and return values, refer to the section on binding :ref:`classes`. + ++------------------------------------+---------------------------+-----------------------------------+ +| Data type | Description | Header file | ++====================================+===========================+===================================+ +| ``int8_t``, ``uint8_t`` | 8-bit integers | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``int16_t``, ``uint16_t`` | 16-bit integers | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``int32_t``, ``uint32_t`` | 32-bit integers | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``int64_t``, ``uint64_t`` | 64-bit integers | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``ssize_t``, ``size_t`` | Platform-dependent size | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``float``, ``double`` | Floating point types | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``bool`` | Two-state Boolean type | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``char`` | Character literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``char16_t`` | UTF-16 character literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``char32_t`` | UTF-32 character literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``wchar_t`` | Wide character literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``const char *`` | UTF-8 string literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``const char16_t *`` | UTF-16 string literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``const char32_t *`` | UTF-32 string literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``const wchar_t *`` | Wide string literal | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::string`` | STL dynamic UTF-8 string | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::u16string`` | STL dynamic UTF-16 string | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::u32string`` | STL dynamic UTF-32 string | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::wstring`` | STL dynamic wide string | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::string_view``, | STL C++17 string views | :file:`pybind11/pybind11.h` | +| ``std::u16string_view``, etc. | | | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::pair`` | Pair of two custom types | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::tuple<...>`` | Arbitrary tuple of types | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::reference_wrapper<...>`` | Reference type wrapper | :file:`pybind11/pybind11.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::complex`` | Complex numbers | :file:`pybind11/complex.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::array`` | STL static array | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::vector`` | STL dynamic array | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::deque`` | STL double-ended queue | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::valarray`` | STL value array | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::list`` | STL linked list | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::map`` | STL ordered map | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::unordered_map`` | STL unordered map | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::set`` | STL ordered set | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::unordered_set`` | STL unordered set | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::optional`` | STL optional type (C++17) | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::experimental::optional`` | STL optional type (exp.) | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::variant<...>`` | Type-safe union (C++17) | :file:`pybind11/stl.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::filesystem::path`` | STL path (C++17) [#]_ | :file:`pybind11/stl/filesystem.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::function<...>`` | STL polymorphic function | :file:`pybind11/functional.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::chrono::duration<...>`` | STL time duration | :file:`pybind11/chrono.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``std::chrono::time_point<...>`` | STL date/time | :file:`pybind11/chrono.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``Eigen::Matrix<...>`` | Eigen: dense matrix | :file:`pybind11/eigen.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``Eigen::Map<...>`` | Eigen: mapped memory | :file:`pybind11/eigen.h` | ++------------------------------------+---------------------------+-----------------------------------+ +| ``Eigen::SparseMatrix<...>`` | Eigen: sparse matrix | :file:`pybind11/eigen.h` | ++------------------------------------+---------------------------+-----------------------------------+ + +.. [#] ``std::filesystem::path`` is converted to ``pathlib.Path`` and + ``os.PathLike`` is converted to ``std::filesystem::path``. diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/cast/stl.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/stl.rst new file mode 100644 index 0000000000000000000000000000000000000000..03d49b2950488305a2f9c2749f756c9fa1d7e34a --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/stl.rst @@ -0,0 +1,249 @@ +STL containers +############## + +Automatic conversion +==================== + +When including the additional header file :file:`pybind11/stl.h`, conversions +between ``std::vector<>``/``std::deque<>``/``std::list<>``/``std::array<>``/``std::valarray<>``, +``std::set<>``/``std::unordered_set<>``, and +``std::map<>``/``std::unordered_map<>`` and the Python ``list``, ``set`` and +``dict`` data structures are automatically enabled. The types ``std::pair<>`` +and ``std::tuple<>`` are already supported out of the box with just the core +:file:`pybind11/pybind11.h` header. + +The major downside of these implicit conversions is that containers must be +converted (i.e. copied) on every Python->C++ and C++->Python transition, which +can have implications on the program semantics and performance. Please read the +next sections for more details and alternative approaches that avoid this. + +.. note:: + + Arbitrary nesting of any of these types is possible. + +.. seealso:: + + The file :file:`tests/test_stl.cpp` contains a complete + example that demonstrates how to pass STL data types in more detail. + +.. _cpp17_container_casters: + +C++17 library containers +======================== + +The :file:`pybind11/stl.h` header also includes support for ``std::optional<>`` +and ``std::variant<>``. These require a C++17 compiler and standard library. +In C++14 mode, ``std::experimental::optional<>`` is supported if available. + +Various versions of these containers also exist for C++11 (e.g. in Boost). +pybind11 provides an easy way to specialize the ``type_caster`` for such +types: + +.. code-block:: cpp + + // `boost::optional` as an example -- can be any `std::optional`-like container + namespace PYBIND11_NAMESPACE { namespace detail { + template + struct type_caster> : optional_caster> {}; + }} + +The above should be placed in a header file and included in all translation units +where automatic conversion is needed. Similarly, a specialization can be provided +for custom variant types: + +.. code-block:: cpp + + // `boost::variant` as an example -- can be any `std::variant`-like container + namespace PYBIND11_NAMESPACE { namespace detail { + template + struct type_caster> : variant_caster> {}; + + // Specifies the function used to visit the variant -- `apply_visitor` instead of `visit` + template <> + struct visit_helper { + template + static auto call(Args &&...args) -> decltype(boost::apply_visitor(args...)) { + return boost::apply_visitor(args...); + } + }; + }} // namespace PYBIND11_NAMESPACE::detail + +The ``visit_helper`` specialization is not required if your ``name::variant`` provides +a ``name::visit()`` function. For any other function name, the specialization must be +included to tell pybind11 how to visit the variant. + +.. warning:: + + When converting a ``variant`` type, pybind11 follows the same rules as when + determining which function overload to call (:ref:`overload_resolution`), and + so the same caveats hold. In particular, the order in which the ``variant``'s + alternatives are listed is important, since pybind11 will try conversions in + this order. This means that, for example, when converting ``variant``, + the ``bool`` variant will never be selected, as any Python ``bool`` is already + an ``int`` and is convertible to a C++ ``int``. Changing the order of alternatives + (and using ``variant``, in this example) provides a solution. + +.. note:: + + pybind11 only supports the modern implementation of ``boost::variant`` + which makes use of variadic templates. This requires Boost 1.56 or newer. + +.. _opaque: + +Making opaque types +=================== + +pybind11 heavily relies on a template matching mechanism to convert parameters +and return values that are constructed from STL data types such as vectors, +linked lists, hash tables, etc. This even works in a recursive manner, for +instance to deal with lists of hash maps of pairs of elementary and custom +types, etc. + +However, a fundamental limitation of this approach is that internal conversions +between Python and C++ types involve a copy operation that prevents +pass-by-reference semantics. What does this mean? + +Suppose we bind the following function + +.. code-block:: cpp + + void append_1(std::vector &v) { + v.push_back(1); + } + +and call it from Python, the following happens: + +.. code-block:: pycon + + >>> v = [5, 6] + >>> append_1(v) + >>> print(v) + [5, 6] + +As you can see, when passing STL data structures by reference, modifications +are not propagated back the Python side. A similar situation arises when +exposing STL data structures using the ``def_readwrite`` or ``def_readonly`` +functions: + +.. code-block:: cpp + + /* ... definition ... */ + + class MyClass { + std::vector contents; + }; + + /* ... binding code ... */ + + py::class_(m, "MyClass") + .def(py::init<>()) + .def_readwrite("contents", &MyClass::contents); + +In this case, properties can be read and written in their entirety. However, an +``append`` operation involving such a list type has no effect: + +.. code-block:: pycon + + >>> m = MyClass() + >>> m.contents = [5, 6] + >>> print(m.contents) + [5, 6] + >>> m.contents.append(7) + >>> print(m.contents) + [5, 6] + +Finally, the involved copy operations can be costly when dealing with very +large lists. To deal with all of the above situations, pybind11 provides a +macro named ``PYBIND11_MAKE_OPAQUE(T)`` that disables the template-based +conversion machinery of types, thus rendering them *opaque*. The contents of +opaque objects are never inspected or extracted, hence they *can* be passed by +reference. For instance, to turn ``std::vector`` into an opaque type, add +the declaration + +.. code-block:: cpp + + PYBIND11_MAKE_OPAQUE(std::vector); + +before any binding code (e.g. invocations to ``class_::def()``, etc.). This +macro must be specified at the top level (and outside of any namespaces), since +it adds a template instantiation of ``type_caster``. If your binding code consists of +multiple compilation units, it must be present in every file (typically via a +common header) preceding any usage of ``std::vector``. Opaque types must +also have a corresponding ``class_`` declaration to associate them with a name +in Python, and to define a set of available operations, e.g.: + +.. code-block:: cpp + + py::class_>(m, "IntVector") + .def(py::init<>()) + .def("clear", &std::vector::clear) + .def("pop_back", &std::vector::pop_back) + .def("__len__", [](const std::vector &v) { return v.size(); }) + .def("__iter__", [](std::vector &v) { + return py::make_iterator(v.begin(), v.end()); + }, py::keep_alive<0, 1>()) /* Keep vector alive while iterator is used */ + // .... + +.. seealso:: + + The file :file:`tests/test_opaque_types.cpp` contains a complete + example that demonstrates how to create and expose opaque types using + pybind11 in more detail. + +.. _stl_bind: + +Binding STL containers +====================== + +The ability to expose STL containers as native Python objects is a fairly +common request, hence pybind11 also provides an optional header file named +:file:`pybind11/stl_bind.h` that does exactly this. The mapped containers try +to match the behavior of their native Python counterparts as much as possible. + +The following example showcases usage of :file:`pybind11/stl_bind.h`: + +.. code-block:: cpp + + // Don't forget this + #include + + PYBIND11_MAKE_OPAQUE(std::vector); + PYBIND11_MAKE_OPAQUE(std::map); + + // ... + + // later in binding code: + py::bind_vector>(m, "VectorInt"); + py::bind_map>(m, "MapStringDouble"); + +When binding STL containers pybind11 considers the types of the container's +elements to decide whether the container should be confined to the local module +(via the :ref:`module_local` feature). If the container element types are +anything other than already-bound custom types bound without +``py::module_local()`` the container binding will have ``py::module_local()`` +applied. This includes converting types such as numeric types, strings, Eigen +types; and types that have not yet been bound at the time of the stl container +binding. This module-local binding is designed to avoid potential conflicts +between module bindings (for example, from two separate modules each attempting +to bind ``std::vector`` as a python type). + +It is possible to override this behavior to force a definition to be either +module-local or global. To do so, you can pass the attributes +``py::module_local()`` (to make the binding module-local) or +``py::module_local(false)`` (to make the binding global) into the +``py::bind_vector`` or ``py::bind_map`` arguments: + +.. code-block:: cpp + + py::bind_vector>(m, "VectorInt", py::module_local(false)); + +Note, however, that such a global binding would make it impossible to load this +module at the same time as any other pybind module that also attempts to bind +the same container type (``std::vector`` in the above example). + +See :ref:`module_local` for more details on module-local bindings. + +.. seealso:: + + The file :file:`tests/test_stl_binders.cpp` shows how to use the + convenience STL container wrappers. diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/cast/strings.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/strings.rst new file mode 100644 index 0000000000000000000000000000000000000000..271716b4b300a076be22cf005d004f615f0d0470 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/cast/strings.rst @@ -0,0 +1,296 @@ +Strings, bytes and Unicode conversions +###################################### + +Passing Python strings to C++ +============================= + +When a Python ``str`` is passed from Python to a C++ function that accepts +``std::string`` or ``char *`` as arguments, pybind11 will encode the Python +string to UTF-8. All Python ``str`` can be encoded in UTF-8, so this operation +does not fail. + +The C++ language is encoding agnostic. It is the responsibility of the +programmer to track encodings. It's often easiest to simply `use UTF-8 +everywhere `_. + +.. code-block:: c++ + + m.def("utf8_test", + [](const std::string &s) { + cout << "utf-8 is icing on the cake.\n"; + cout << s; + } + ); + m.def("utf8_charptr", + [](const char *s) { + cout << "My favorite food is\n"; + cout << s; + } + ); + +.. code-block:: pycon + + >>> utf8_test("🎂") + utf-8 is icing on the cake. + 🎂 + + >>> utf8_charptr("🍕") + My favorite food is + 🍕 + +.. note:: + + Some terminal emulators do not support UTF-8 or emoji fonts and may not + display the example above correctly. + +The results are the same whether the C++ function accepts arguments by value or +reference, and whether or not ``const`` is used. + +Passing bytes to C++ +-------------------- + +A Python ``bytes`` object will be passed to C++ functions that accept +``std::string`` or ``char*`` *without* conversion. In order to make a function +*only* accept ``bytes`` (and not ``str``), declare it as taking a ``py::bytes`` +argument. + + +Returning C++ strings to Python +=============================== + +When a C++ function returns a ``std::string`` or ``char*`` to a Python caller, +**pybind11 will assume that the string is valid UTF-8** and will decode it to a +native Python ``str``, using the same API as Python uses to perform +``bytes.decode('utf-8')``. If this implicit conversion fails, pybind11 will +raise a ``UnicodeDecodeError``. + +.. code-block:: c++ + + m.def("std_string_return", + []() { + return std::string("This string needs to be UTF-8 encoded"); + } + ); + +.. code-block:: pycon + + >>> isinstance(example.std_string_return(), str) + True + + +Because UTF-8 is inclusive of pure ASCII, there is never any issue with +returning a pure ASCII string to Python. If there is any possibility that the +string is not pure ASCII, it is necessary to ensure the encoding is valid +UTF-8. + +.. warning:: + + Implicit conversion assumes that a returned ``char *`` is null-terminated. + If there is no null terminator a buffer overrun will occur. + +Explicit conversions +-------------------- + +If some C++ code constructs a ``std::string`` that is not a UTF-8 string, one +can perform a explicit conversion and return a ``py::str`` object. Explicit +conversion has the same overhead as implicit conversion. + +.. code-block:: c++ + + // This uses the Python C API to convert Latin-1 to Unicode + m.def("str_output", + []() { + std::string s = "Send your r\xe9sum\xe9 to Alice in HR"; // Latin-1 + py::handle py_s = PyUnicode_DecodeLatin1(s.data(), s.length(), nullptr); + if (!py_s) { + throw py::error_already_set(); + } + return py::reinterpret_steal(py_s); + } + ); + +.. code-block:: pycon + + >>> str_output() + 'Send your résumé to Alice in HR' + +The `Python C API +`_ provides +several built-in codecs. Note that these all return *new* references, so +use :cpp:func:`reinterpret_steal` when converting them to a :cpp:class:`str`. + + +One could also use a third party encoding library such as libiconv to transcode +to UTF-8. + +Return C++ strings without conversion +------------------------------------- + +If the data in a C++ ``std::string`` does not represent text and should be +returned to Python as ``bytes``, then one can return the data as a +``py::bytes`` object. + +.. code-block:: c++ + + m.def("return_bytes", + []() { + std::string s("\xba\xd0\xba\xd0"); // Not valid UTF-8 + return py::bytes(s); // Return the data without transcoding + } + ); + +.. code-block:: pycon + + >>> example.return_bytes() + b'\xba\xd0\xba\xd0' + + +Note the asymmetry: pybind11 will convert ``bytes`` to ``std::string`` without +encoding, but cannot convert ``std::string`` back to ``bytes`` implicitly. + +.. code-block:: c++ + + m.def("asymmetry", + [](std::string s) { // Accepts str or bytes from Python + return s; // Looks harmless, but implicitly converts to str + } + ); + +.. code-block:: pycon + + >>> isinstance(example.asymmetry(b"have some bytes"), str) + True + + >>> example.asymmetry(b"\xba\xd0\xba\xd0") # invalid utf-8 as bytes + UnicodeDecodeError: 'utf-8' codec can't decode byte 0xba in position 0: invalid start byte + + +Wide character strings +====================== + +When a Python ``str`` is passed to a C++ function expecting ``std::wstring``, +``wchar_t*``, ``std::u16string`` or ``std::u32string``, the ``str`` will be +encoded to UTF-16 or UTF-32 depending on how the C++ compiler implements each +type, in the platform's native endianness. When strings of these types are +returned, they are assumed to contain valid UTF-16 or UTF-32, and will be +decoded to Python ``str``. + +.. code-block:: c++ + + #define UNICODE + #include + + m.def("set_window_text", + [](HWND hwnd, std::wstring s) { + // Call SetWindowText with null-terminated UTF-16 string + ::SetWindowText(hwnd, s.c_str()); + } + ); + m.def("get_window_text", + [](HWND hwnd) { + const int buffer_size = ::GetWindowTextLength(hwnd) + 1; + auto buffer = std::make_unique< wchar_t[] >(buffer_size); + + ::GetWindowText(hwnd, buffer.data(), buffer_size); + + std::wstring text(buffer.get()); + + // wstring will be converted to Python str + return text; + } + ); + +Strings in multibyte encodings such as Shift-JIS must transcoded to a +UTF-8/16/32 before being returned to Python. + + +Character literals +================== + +C++ functions that accept character literals as input will receive the first +character of a Python ``str`` as their input. If the string is longer than one +Unicode character, trailing characters will be ignored. + +When a character literal is returned from C++ (such as a ``char`` or a +``wchar_t``), it will be converted to a ``str`` that represents the single +character. + +.. code-block:: c++ + + m.def("pass_char", [](char c) { return c; }); + m.def("pass_wchar", [](wchar_t w) { return w; }); + +.. code-block:: pycon + + >>> example.pass_char("A") + 'A' + +While C++ will cast integers to character types (``char c = 0x65;``), pybind11 +does not convert Python integers to characters implicitly. The Python function +``chr()`` can be used to convert integers to characters. + +.. code-block:: pycon + + >>> example.pass_char(0x65) + TypeError + + >>> example.pass_char(chr(0x65)) + 'A' + +If the desire is to work with an 8-bit integer, use ``int8_t`` or ``uint8_t`` +as the argument type. + +Grapheme clusters +----------------- + +A single grapheme may be represented by two or more Unicode characters. For +example 'é' is usually represented as U+00E9 but can also be expressed as the +combining character sequence U+0065 U+0301 (that is, the letter 'e' followed by +a combining acute accent). The combining character will be lost if the +two-character sequence is passed as an argument, even though it renders as a +single grapheme. + +.. code-block:: pycon + + >>> example.pass_wchar("é") + 'é' + + >>> combining_e_acute = "e" + "\u0301" + + >>> combining_e_acute + 'é' + + >>> combining_e_acute == "é" + False + + >>> example.pass_wchar(combining_e_acute) + 'e' + +Normalizing combining characters before passing the character literal to C++ +may resolve *some* of these issues: + +.. code-block:: pycon + + >>> example.pass_wchar(unicodedata.normalize("NFC", combining_e_acute)) + 'é' + +In some languages (Thai for example), there are `graphemes that cannot be +expressed as a single Unicode code point +`_, so there is +no way to capture them in a C++ character type. + + +C++17 string views +================== + +C++17 string views are automatically supported when compiling in C++17 mode. +They follow the same rules for encoding and decoding as the corresponding STL +string type (for example, a ``std::u16string_view`` argument will be passed +UTF-16-encoded data, and a returned ``std::string_view`` will be decoded as +UTF-8). + +References +========== + +* `The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) `_ +* `C++ - Using STL Strings at Win32 API Boundaries `_ diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/classes.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/classes.rst new file mode 100644 index 0000000000000000000000000000000000000000..01a490b7219e8a7d5ebbbf8c9c5101ef5ae16f79 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/classes.rst @@ -0,0 +1,1335 @@ +Classes +####### + +This section presents advanced binding code for classes and it is assumed +that you are already familiar with the basics from :doc:`/classes`. + +.. _overriding_virtuals: + +Overriding virtual functions in Python +====================================== + +Suppose that a C++ class or interface has a virtual function that we'd like +to override from within Python (we'll focus on the class ``Animal``; ``Dog`` is +given as a specific example of how one would do this with traditional C++ +code). + +.. code-block:: cpp + + class Animal { + public: + virtual ~Animal() { } + virtual std::string go(int n_times) = 0; + }; + + class Dog : public Animal { + public: + std::string go(int n_times) override { + std::string result; + for (int i=0; igo(3); + } + +Normally, the binding code for these classes would look as follows: + +.. code-block:: cpp + + PYBIND11_MODULE(example, m) { + py::class_(m, "Animal") + .def("go", &Animal::go); + + py::class_(m, "Dog") + .def(py::init<>()); + + m.def("call_go", &call_go); + } + +However, these bindings are impossible to extend: ``Animal`` is not +constructible, and we clearly require some kind of "trampoline" that +redirects virtual calls back to Python. + +Defining a new type of ``Animal`` from within Python is possible but requires a +helper class that is defined as follows: + +.. code-block:: cpp + + class PyAnimal : public Animal { + public: + /* Inherit the constructors */ + using Animal::Animal; + + /* Trampoline (need one for each virtual function) */ + std::string go(int n_times) override { + PYBIND11_OVERRIDE_PURE( + std::string, /* Return type */ + Animal, /* Parent class */ + go, /* Name of function in C++ (must match Python name) */ + n_times /* Argument(s) */ + ); + } + }; + +The macro :c:macro:`PYBIND11_OVERRIDE_PURE` should be used for pure virtual +functions, and :c:macro:`PYBIND11_OVERRIDE` should be used for functions which have +a default implementation. There are also two alternate macros +:c:macro:`PYBIND11_OVERRIDE_PURE_NAME` and :c:macro:`PYBIND11_OVERRIDE_NAME` which +take a string-valued name argument between the *Parent class* and *Name of the +function* slots, which defines the name of function in Python. This is required +when the C++ and Python versions of the +function have different names, e.g. ``operator()`` vs ``__call__``. + +The binding code also needs a few minor adaptations (highlighted): + +.. code-block:: cpp + :emphasize-lines: 2,3 + + PYBIND11_MODULE(example, m) { + py::class_(m, "Animal") + .def(py::init<>()) + .def("go", &Animal::go); + + py::class_(m, "Dog") + .def(py::init<>()); + + m.def("call_go", &call_go); + } + +Importantly, pybind11 is made aware of the trampoline helper class by +specifying it as an extra template argument to :class:`class_`. (This can also +be combined with other template arguments such as a custom holder type; the +order of template types does not matter). Following this, we are able to +define a constructor as usual. + +Bindings should be made against the actual class, not the trampoline helper class. + +.. code-block:: cpp + :emphasize-lines: 3 + + py::class_(m, "Animal"); + .def(py::init<>()) + .def("go", &PyAnimal::go); /* <--- THIS IS WRONG, use &Animal::go */ + +Note, however, that the above is sufficient for allowing python classes to +extend ``Animal``, but not ``Dog``: see :ref:`virtual_and_inheritance` for the +necessary steps required to providing proper overriding support for inherited +classes. + +The Python session below shows how to override ``Animal::go`` and invoke it via +a virtual method call. + +.. code-block:: pycon + + >>> from example import * + >>> d = Dog() + >>> call_go(d) + 'woof! woof! woof! ' + >>> class Cat(Animal): + ... def go(self, n_times): + ... return "meow! " * n_times + ... + >>> c = Cat() + >>> call_go(c) + 'meow! meow! meow! ' + +If you are defining a custom constructor in a derived Python class, you *must* +ensure that you explicitly call the bound C++ constructor using ``__init__``, +*regardless* of whether it is a default constructor or not. Otherwise, the +memory for the C++ portion of the instance will be left uninitialized, which +will generally leave the C++ instance in an invalid state and cause undefined +behavior if the C++ instance is subsequently used. + +.. versionchanged:: 2.6 + The default pybind11 metaclass will throw a ``TypeError`` when it detects + that ``__init__`` was not called by a derived class. + +Here is an example: + +.. code-block:: python + + class Dachshund(Dog): + def __init__(self, name): + Dog.__init__(self) # Without this, a TypeError is raised. + self.name = name + + def bark(self): + return "yap!" + +Note that a direct ``__init__`` constructor *should be called*, and ``super()`` +should not be used. For simple cases of linear inheritance, ``super()`` +may work, but once you begin mixing Python and C++ multiple inheritance, +things will fall apart due to differences between Python's MRO and C++'s +mechanisms. + +Please take a look at the :ref:`macro_notes` before using this feature. + +.. note:: + + When the overridden type returns a reference or pointer to a type that + pybind11 converts from Python (for example, numeric values, std::string, + and other built-in value-converting types), there are some limitations to + be aware of: + + - because in these cases there is no C++ variable to reference (the value + is stored in the referenced Python variable), pybind11 provides one in + the PYBIND11_OVERRIDE macros (when needed) with static storage duration. + Note that this means that invoking the overridden method on *any* + instance will change the referenced value stored in *all* instances of + that type. + + - Attempts to modify a non-const reference will not have the desired + effect: it will change only the static cache variable, but this change + will not propagate to underlying Python instance, and the change will be + replaced the next time the override is invoked. + +.. warning:: + + The :c:macro:`PYBIND11_OVERRIDE` and accompanying macros used to be called + ``PYBIND11_OVERLOAD`` up until pybind11 v2.5.0, and :func:`get_override` + used to be called ``get_overload``. This naming was corrected and the older + macro and function names may soon be deprecated, in order to reduce + confusion with overloaded functions and methods and ``py::overload_cast`` + (see :ref:`classes`). + +.. seealso:: + + The file :file:`tests/test_virtual_functions.cpp` contains a complete + example that demonstrates how to override virtual functions using pybind11 + in more detail. + +.. _virtual_and_inheritance: + +Combining virtual functions and inheritance +=========================================== + +When combining virtual methods with inheritance, you need to be sure to provide +an override for each method for which you want to allow overrides from derived +python classes. For example, suppose we extend the above ``Animal``/``Dog`` +example as follows: + +.. code-block:: cpp + + class Animal { + public: + virtual std::string go(int n_times) = 0; + virtual std::string name() { return "unknown"; } + }; + class Dog : public Animal { + public: + std::string go(int n_times) override { + std::string result; + for (int i=0; i class PyAnimal : public AnimalBase { + public: + using AnimalBase::AnimalBase; // Inherit constructors + std::string go(int n_times) override { PYBIND11_OVERRIDE_PURE(std::string, AnimalBase, go, n_times); } + std::string name() override { PYBIND11_OVERRIDE(std::string, AnimalBase, name, ); } + }; + template class PyDog : public PyAnimal { + public: + using PyAnimal::PyAnimal; // Inherit constructors + // Override PyAnimal's pure virtual go() with a non-pure one: + std::string go(int n_times) override { PYBIND11_OVERRIDE(std::string, DogBase, go, n_times); } + std::string bark() override { PYBIND11_OVERRIDE(std::string, DogBase, bark, ); } + }; + +This technique has the advantage of requiring just one trampoline method to be +declared per virtual method and pure virtual method override. It does, +however, require the compiler to generate at least as many methods (and +possibly more, if both pure virtual and overridden pure virtual methods are +exposed, as above). + +The classes are then registered with pybind11 using: + +.. code-block:: cpp + + py::class_> animal(m, "Animal"); + py::class_> dog(m, "Dog"); + py::class_> husky(m, "Husky"); + // ... add animal, dog, husky definitions + +Note that ``Husky`` did not require a dedicated trampoline template class at +all, since it neither declares any new virtual methods nor provides any pure +virtual method implementations. + +With either the repeated-virtuals or templated trampoline methods in place, you +can now create a python class that inherits from ``Dog``: + +.. code-block:: python + + class ShihTzu(Dog): + def bark(self): + return "yip!" + +.. seealso:: + + See the file :file:`tests/test_virtual_functions.cpp` for complete examples + using both the duplication and templated trampoline approaches. + +.. _extended_aliases: + +Extended trampoline class functionality +======================================= + +.. _extended_class_functionality_forced_trampoline: + +Forced trampoline class initialisation +-------------------------------------- +The trampoline classes described in the previous sections are, by default, only +initialized when needed. More specifically, they are initialized when a python +class actually inherits from a registered type (instead of merely creating an +instance of the registered type), or when a registered constructor is only +valid for the trampoline class but not the registered class. This is primarily +for performance reasons: when the trampoline class is not needed for anything +except virtual method dispatching, not initializing the trampoline class +improves performance by avoiding needing to do a run-time check to see if the +inheriting python instance has an overridden method. + +Sometimes, however, it is useful to always initialize a trampoline class as an +intermediate class that does more than just handle virtual method dispatching. +For example, such a class might perform extra class initialization, extra +destruction operations, and might define new members and methods to enable a +more python-like interface to a class. + +In order to tell pybind11 that it should *always* initialize the trampoline +class when creating new instances of a type, the class constructors should be +declared using ``py::init_alias()`` instead of the usual +``py::init()``. This forces construction via the trampoline class, +ensuring member initialization and (eventual) destruction. + +.. seealso:: + + See the file :file:`tests/test_virtual_functions.cpp` for complete examples + showing both normal and forced trampoline instantiation. + +Different method signatures +--------------------------- +The macro's introduced in :ref:`overriding_virtuals` cover most of the standard +use cases when exposing C++ classes to Python. Sometimes it is hard or unwieldy +to create a direct one-on-one mapping between the arguments and method return +type. + +An example would be when the C++ signature contains output arguments using +references (See also :ref:`faq_reference_arguments`). Another way of solving +this is to use the method body of the trampoline class to do conversions to the +input and return of the Python method. + +The main building block to do so is the :func:`get_override`, this function +allows retrieving a method implemented in Python from within the trampoline's +methods. Consider for example a C++ method which has the signature +``bool myMethod(int32_t& value)``, where the return indicates whether +something should be done with the ``value``. This can be made convenient on the +Python side by allowing the Python function to return ``None`` or an ``int``: + +.. code-block:: cpp + + bool MyClass::myMethod(int32_t& value) + { + pybind11::gil_scoped_acquire gil; // Acquire the GIL while in this scope. + // Try to look up the overridden method on the Python side. + pybind11::function override = pybind11::get_override(this, "myMethod"); + if (override) { // method is found + auto obj = override(value); // Call the Python function. + if (py::isinstance(obj)) { // check if it returned a Python integer type + value = obj.cast(); // Cast it and assign it to the value. + return true; // Return true; value should be used. + } else { + return false; // Python returned none, return false. + } + } + return false; // Alternatively return MyClass::myMethod(value); + } + + +.. _custom_constructors: + +Custom constructors +=================== + +The syntax for binding constructors was previously introduced, but it only +works when a constructor of the appropriate arguments actually exists on the +C++ side. To extend this to more general cases, pybind11 makes it possible +to bind factory functions as constructors. For example, suppose you have a +class like this: + +.. code-block:: cpp + + class Example { + private: + Example(int); // private constructor + public: + // Factory function: + static Example create(int a) { return Example(a); } + }; + + py::class_(m, "Example") + .def(py::init(&Example::create)); + +While it is possible to create a straightforward binding of the static +``create`` method, it may sometimes be preferable to expose it as a constructor +on the Python side. This can be accomplished by calling ``.def(py::init(...))`` +with the function reference returning the new instance passed as an argument. +It is also possible to use this approach to bind a function returning a new +instance by raw pointer or by the holder (e.g. ``std::unique_ptr``). + +The following example shows the different approaches: + +.. code-block:: cpp + + class Example { + private: + Example(int); // private constructor + public: + // Factory function - returned by value: + static Example create(int a) { return Example(a); } + + // These constructors are publicly callable: + Example(double); + Example(int, int); + Example(std::string); + }; + + py::class_(m, "Example") + // Bind the factory function as a constructor: + .def(py::init(&Example::create)) + // Bind a lambda function returning a pointer wrapped in a holder: + .def(py::init([](std::string arg) { + return std::unique_ptr(new Example(arg)); + })) + // Return a raw pointer: + .def(py::init([](int a, int b) { return new Example(a, b); })) + // You can mix the above with regular C++ constructor bindings as well: + .def(py::init()) + ; + +When the constructor is invoked from Python, pybind11 will call the factory +function and store the resulting C++ instance in the Python instance. + +When combining factory functions constructors with :ref:`virtual function +trampolines ` there are two approaches. The first is to +add a constructor to the alias class that takes a base value by +rvalue-reference. If such a constructor is available, it will be used to +construct an alias instance from the value returned by the factory function. +The second option is to provide two factory functions to ``py::init()``: the +first will be invoked when no alias class is required (i.e. when the class is +being used but not inherited from in Python), and the second will be invoked +when an alias is required. + +You can also specify a single factory function that always returns an alias +instance: this will result in behaviour similar to ``py::init_alias<...>()``, +as described in the :ref:`extended trampoline class documentation +`. + +The following example shows the different factory approaches for a class with +an alias: + +.. code-block:: cpp + + #include + class Example { + public: + // ... + virtual ~Example() = default; + }; + class PyExample : public Example { + public: + using Example::Example; + PyExample(Example &&base) : Example(std::move(base)) {} + }; + py::class_(m, "Example") + // Returns an Example pointer. If a PyExample is needed, the Example + // instance will be moved via the extra constructor in PyExample, above. + .def(py::init([]() { return new Example(); })) + // Two callbacks: + .def(py::init([]() { return new Example(); } /* no alias needed */, + []() { return new PyExample(); } /* alias needed */)) + // *Always* returns an alias instance (like py::init_alias<>()) + .def(py::init([]() { return new PyExample(); })) + ; + +Brace initialization +-------------------- + +``pybind11::init<>`` internally uses C++11 brace initialization to call the +constructor of the target class. This means that it can be used to bind +*implicit* constructors as well: + +.. code-block:: cpp + + struct Aggregate { + int a; + std::string b; + }; + + py::class_(m, "Aggregate") + .def(py::init()); + +.. note:: + + Note that brace initialization preferentially invokes constructor overloads + taking a ``std::initializer_list``. In the rare event that this causes an + issue, you can work around it by using ``py::init(...)`` with a lambda + function that constructs the new object as desired. + +.. _classes_with_non_public_destructors: + +Non-public destructors +====================== + +If a class has a private or protected destructor (as might e.g. be the case in +a singleton pattern), a compile error will occur when creating bindings via +pybind11. The underlying issue is that the ``std::unique_ptr`` holder type that +is responsible for managing the lifetime of instances will reference the +destructor even if no deallocations ever take place. In order to expose classes +with private or protected destructors, it is possible to override the holder +type via a holder type argument to ``class_``. Pybind11 provides a helper class +``py::nodelete`` that disables any destructor invocations. In this case, it is +crucial that instances are deallocated on the C++ side to avoid memory leaks. + +.. code-block:: cpp + + /* ... definition ... */ + + class MyClass { + private: + ~MyClass() { } + }; + + /* ... binding code ... */ + + py::class_>(m, "MyClass") + .def(py::init<>()) + +.. _destructors_that_call_python: + +Destructors that call Python +============================ + +If a Python function is invoked from a C++ destructor, an exception may be thrown +of type :class:`error_already_set`. If this error is thrown out of a class destructor, +``std::terminate()`` will be called, terminating the process. Class destructors +must catch all exceptions of type :class:`error_already_set` to discard the Python +exception using :func:`error_already_set::discard_as_unraisable`. + +Every Python function should be treated as *possibly throwing*. When a Python generator +stops yielding items, Python will throw a ``StopIteration`` exception, which can pass +though C++ destructors if the generator's stack frame holds the last reference to C++ +objects. + +For more information, see :ref:`the documentation on exceptions `. + +.. code-block:: cpp + + class MyClass { + public: + ~MyClass() { + try { + py::print("Even printing is dangerous in a destructor"); + py::exec("raise ValueError('This is an unraisable exception')"); + } catch (py::error_already_set &e) { + // error_context should be information about where/why the occurred, + // e.g. use __func__ to get the name of the current function + e.discard_as_unraisable(__func__); + } + } + }; + +.. note:: + + pybind11 does not support C++ destructors marked ``noexcept(false)``. + +.. versionadded:: 2.6 + +.. _implicit_conversions: + +Implicit conversions +==================== + +Suppose that instances of two types ``A`` and ``B`` are used in a project, and +that an ``A`` can easily be converted into an instance of type ``B`` (examples of this +could be a fixed and an arbitrary precision number type). + +.. code-block:: cpp + + py::class_(m, "A") + /// ... members ... + + py::class_(m, "B") + .def(py::init()) + /// ... members ... + + m.def("func", + [](const B &) { /* .... */ } + ); + +To invoke the function ``func`` using a variable ``a`` containing an ``A`` +instance, we'd have to write ``func(B(a))`` in Python. On the other hand, C++ +will automatically apply an implicit type conversion, which makes it possible +to directly write ``func(a)``. + +In this situation (i.e. where ``B`` has a constructor that converts from +``A``), the following statement enables similar implicit conversions on the +Python side: + +.. code-block:: cpp + + py::implicitly_convertible(); + +.. note:: + + Implicit conversions from ``A`` to ``B`` only work when ``B`` is a custom + data type that is exposed to Python via pybind11. + + To prevent runaway recursion, implicit conversions are non-reentrant: an + implicit conversion invoked as part of another implicit conversion of the + same type (i.e. from ``A`` to ``B``) will fail. + +.. _static_properties: + +Static properties +================= + +The section on :ref:`properties` discussed the creation of instance properties +that are implemented in terms of C++ getters and setters. + +Static properties can also be created in a similar way to expose getters and +setters of static class attributes. Note that the implicit ``self`` argument +also exists in this case and is used to pass the Python ``type`` subclass +instance. This parameter will often not be needed by the C++ side, and the +following example illustrates how to instantiate a lambda getter function +that ignores it: + +.. code-block:: cpp + + py::class_(m, "Foo") + .def_property_readonly_static("foo", [](py::object /* self */) { return Foo(); }); + +Operator overloading +==================== + +Suppose that we're given the following ``Vector2`` class with a vector addition +and scalar multiplication operation, all implemented using overloaded operators +in C++. + +.. code-block:: cpp + + class Vector2 { + public: + Vector2(float x, float y) : x(x), y(y) { } + + Vector2 operator+(const Vector2 &v) const { return Vector2(x + v.x, y + v.y); } + Vector2 operator*(float value) const { return Vector2(x * value, y * value); } + Vector2& operator+=(const Vector2 &v) { x += v.x; y += v.y; return *this; } + Vector2& operator*=(float v) { x *= v; y *= v; return *this; } + + friend Vector2 operator*(float f, const Vector2 &v) { + return Vector2(f * v.x, f * v.y); + } + + std::string toString() const { + return "[" + std::to_string(x) + ", " + std::to_string(y) + "]"; + } + private: + float x, y; + }; + +The following snippet shows how the above operators can be conveniently exposed +to Python. + +.. code-block:: cpp + + #include + + PYBIND11_MODULE(example, m) { + py::class_(m, "Vector2") + .def(py::init()) + .def(py::self + py::self) + .def(py::self += py::self) + .def(py::self *= float()) + .def(float() * py::self) + .def(py::self * float()) + .def(-py::self) + .def("__repr__", &Vector2::toString); + } + +Note that a line like + +.. code-block:: cpp + + .def(py::self * float()) + +is really just short hand notation for + +.. code-block:: cpp + + .def("__mul__", [](const Vector2 &a, float b) { + return a * b; + }, py::is_operator()) + +This can be useful for exposing additional operators that don't exist on the +C++ side, or to perform other types of customization. The ``py::is_operator`` +flag marker is needed to inform pybind11 that this is an operator, which +returns ``NotImplemented`` when invoked with incompatible arguments rather than +throwing a type error. + +.. note:: + + To use the more convenient ``py::self`` notation, the additional + header file :file:`pybind11/operators.h` must be included. + +.. seealso:: + + The file :file:`tests/test_operator_overloading.cpp` contains a + complete example that demonstrates how to work with overloaded operators in + more detail. + +.. _pickling: + +Pickling support +================ + +Python's ``pickle`` module provides a powerful facility to serialize and +de-serialize a Python object graph into a binary data stream. To pickle and +unpickle C++ classes using pybind11, a ``py::pickle()`` definition must be +provided. Suppose the class in question has the following signature: + +.. code-block:: cpp + + class Pickleable { + public: + Pickleable(const std::string &value) : m_value(value) { } + const std::string &value() const { return m_value; } + + void setExtra(int extra) { m_extra = extra; } + int extra() const { return m_extra; } + private: + std::string m_value; + int m_extra = 0; + }; + +Pickling support in Python is enabled by defining the ``__setstate__`` and +``__getstate__`` methods [#f3]_. For pybind11 classes, use ``py::pickle()`` +to bind these two functions: + +.. code-block:: cpp + + py::class_(m, "Pickleable") + .def(py::init()) + .def("value", &Pickleable::value) + .def("extra", &Pickleable::extra) + .def("setExtra", &Pickleable::setExtra) + .def(py::pickle( + [](const Pickleable &p) { // __getstate__ + /* Return a tuple that fully encodes the state of the object */ + return py::make_tuple(p.value(), p.extra()); + }, + [](py::tuple t) { // __setstate__ + if (t.size() != 2) + throw std::runtime_error("Invalid state!"); + + /* Create a new C++ instance */ + Pickleable p(t[0].cast()); + + /* Assign any additional state */ + p.setExtra(t[1].cast()); + + return p; + } + )); + +The ``__setstate__`` part of the ``py::pickle()`` definition follows the same +rules as the single-argument version of ``py::init()``. The return type can be +a value, pointer or holder type. See :ref:`custom_constructors` for details. + +An instance can now be pickled as follows: + +.. code-block:: python + + import pickle + + p = Pickleable("test_value") + p.setExtra(15) + data = pickle.dumps(p) + + +.. note:: + If given, the second argument to ``dumps`` must be 2 or larger - 0 and 1 are + not supported. Newer versions are also fine; for instance, specify ``-1`` to + always use the latest available version. Beware: failure to follow these + instructions will cause important pybind11 memory allocation routines to be + skipped during unpickling, which will likely lead to memory corruption + and/or segmentation faults. Python defaults to version 3 (Python 3-3.7) and + version 4 for Python 3.8+. + +.. seealso:: + + The file :file:`tests/test_pickling.cpp` contains a complete example + that demonstrates how to pickle and unpickle types using pybind11 in more + detail. + +.. [#f3] http://docs.python.org/3/library/pickle.html#pickling-class-instances + +Deepcopy support +================ + +Python normally uses references in assignments. Sometimes a real copy is needed +to prevent changing all copies. The ``copy`` module [#f5]_ provides these +capabilities. + +A class with pickle support is automatically also (deep)copy +compatible. However, performance can be improved by adding custom +``__copy__`` and ``__deepcopy__`` methods. + +For simple classes (deep)copy can be enabled by using the copy constructor, +which should look as follows: + +.. code-block:: cpp + + py::class_(m, "Copyable") + .def("__copy__", [](const Copyable &self) { + return Copyable(self); + }) + .def("__deepcopy__", [](const Copyable &self, py::dict) { + return Copyable(self); + }, "memo"_a); + +.. note:: + + Dynamic attributes will not be copied in this example. + +.. [#f5] https://docs.python.org/3/library/copy.html + +Multiple Inheritance +==================== + +pybind11 can create bindings for types that derive from multiple base types +(aka. *multiple inheritance*). To do so, specify all bases in the template +arguments of the ``class_`` declaration: + +.. code-block:: cpp + + py::class_(m, "MyType") + ... + +The base types can be specified in arbitrary order, and they can even be +interspersed with alias types and holder types (discussed earlier in this +document)---pybind11 will automatically find out which is which. The only +requirement is that the first template argument is the type to be declared. + +It is also permitted to inherit multiply from exported C++ classes in Python, +as well as inheriting from multiple Python and/or pybind11-exported classes. + +There is one caveat regarding the implementation of this feature: + +When only one base type is specified for a C++ type that actually has multiple +bases, pybind11 will assume that it does not participate in multiple +inheritance, which can lead to undefined behavior. In such cases, add the tag +``multiple_inheritance`` to the class constructor: + +.. code-block:: cpp + + py::class_(m, "MyType", py::multiple_inheritance()); + +The tag is redundant and does not need to be specified when multiple base types +are listed. + +.. _module_local: + +Module-local class bindings +=========================== + +When creating a binding for a class, pybind11 by default makes that binding +"global" across modules. What this means is that a type defined in one module +can be returned from any module resulting in the same Python type. For +example, this allows the following: + +.. code-block:: cpp + + // In the module1.cpp binding code for module1: + py::class_(m, "Pet") + .def(py::init()) + .def_readonly("name", &Pet::name); + +.. code-block:: cpp + + // In the module2.cpp binding code for module2: + m.def("create_pet", [](std::string name) { return new Pet(name); }); + +.. code-block:: pycon + + >>> from module1 import Pet + >>> from module2 import create_pet + >>> pet1 = Pet("Kitty") + >>> pet2 = create_pet("Doggy") + >>> pet2.name() + 'Doggy' + +When writing binding code for a library, this is usually desirable: this +allows, for example, splitting up a complex library into multiple Python +modules. + +In some cases, however, this can cause conflicts. For example, suppose two +unrelated modules make use of an external C++ library and each provide custom +bindings for one of that library's classes. This will result in an error when +a Python program attempts to import both modules (directly or indirectly) +because of conflicting definitions on the external type: + +.. code-block:: cpp + + // dogs.cpp + + // Binding for external library class: + py::class(m, "Pet") + .def("name", &pets::Pet::name); + + // Binding for local extension class: + py::class(m, "Dog") + .def(py::init()); + +.. code-block:: cpp + + // cats.cpp, in a completely separate project from the above dogs.cpp. + + // Binding for external library class: + py::class(m, "Pet") + .def("get_name", &pets::Pet::name); + + // Binding for local extending class: + py::class(m, "Cat") + .def(py::init()); + +.. code-block:: pycon + + >>> import cats + >>> import dogs + Traceback (most recent call last): + File "", line 1, in + ImportError: generic_type: type "Pet" is already registered! + +To get around this, you can tell pybind11 to keep the external class binding +localized to the module by passing the ``py::module_local()`` attribute into +the ``py::class_`` constructor: + +.. code-block:: cpp + + // Pet binding in dogs.cpp: + py::class(m, "Pet", py::module_local()) + .def("name", &pets::Pet::name); + +.. code-block:: cpp + + // Pet binding in cats.cpp: + py::class(m, "Pet", py::module_local()) + .def("get_name", &pets::Pet::name); + +This makes the Python-side ``dogs.Pet`` and ``cats.Pet`` into distinct classes, +avoiding the conflict and allowing both modules to be loaded. C++ code in the +``dogs`` module that casts or returns a ``Pet`` instance will result in a +``dogs.Pet`` Python instance, while C++ code in the ``cats`` module will result +in a ``cats.Pet`` Python instance. + +This does come with two caveats, however: First, external modules cannot return +or cast a ``Pet`` instance to Python (unless they also provide their own local +bindings). Second, from the Python point of view they are two distinct classes. + +Note that the locality only applies in the C++ -> Python direction. When +passing such a ``py::module_local`` type into a C++ function, the module-local +classes are still considered. This means that if the following function is +added to any module (including but not limited to the ``cats`` and ``dogs`` +modules above) it will be callable with either a ``dogs.Pet`` or ``cats.Pet`` +argument: + +.. code-block:: cpp + + m.def("pet_name", [](const pets::Pet &pet) { return pet.name(); }); + +For example, suppose the above function is added to each of ``cats.cpp``, +``dogs.cpp`` and ``frogs.cpp`` (where ``frogs.cpp`` is some other module that +does *not* bind ``Pets`` at all). + +.. code-block:: pycon + + >>> import cats, dogs, frogs # No error because of the added py::module_local() + >>> mycat, mydog = cats.Cat("Fluffy"), dogs.Dog("Rover") + >>> (cats.pet_name(mycat), dogs.pet_name(mydog)) + ('Fluffy', 'Rover') + >>> (cats.pet_name(mydog), dogs.pet_name(mycat), frogs.pet_name(mycat)) + ('Rover', 'Fluffy', 'Fluffy') + +It is possible to use ``py::module_local()`` registrations in one module even +if another module registers the same type globally: within the module with the +module-local definition, all C++ instances will be cast to the associated bound +Python type. In other modules any such values are converted to the global +Python type created elsewhere. + +.. note:: + + STL bindings (as provided via the optional :file:`pybind11/stl_bind.h` + header) apply ``py::module_local`` by default when the bound type might + conflict with other modules; see :ref:`stl_bind` for details. + +.. note:: + + The localization of the bound types is actually tied to the shared object + or binary generated by the compiler/linker. For typical modules created + with ``PYBIND11_MODULE()``, this distinction is not significant. It is + possible, however, when :ref:`embedding` to embed multiple modules in the + same binary (see :ref:`embedding_modules`). In such a case, the + localization will apply across all embedded modules within the same binary. + +.. seealso:: + + The file :file:`tests/test_local_bindings.cpp` contains additional examples + that demonstrate how ``py::module_local()`` works. + +Binding protected member functions +================================== + +It's normally not possible to expose ``protected`` member functions to Python: + +.. code-block:: cpp + + class A { + protected: + int foo() const { return 42; } + }; + + py::class_(m, "A") + .def("foo", &A::foo); // error: 'foo' is a protected member of 'A' + +On one hand, this is good because non-``public`` members aren't meant to be +accessed from the outside. But we may want to make use of ``protected`` +functions in derived Python classes. + +The following pattern makes this possible: + +.. code-block:: cpp + + class A { + protected: + int foo() const { return 42; } + }; + + class Publicist : public A { // helper type for exposing protected functions + public: + using A::foo; // inherited with different access modifier + }; + + py::class_(m, "A") // bind the primary class + .def("foo", &Publicist::foo); // expose protected methods via the publicist + +This works because ``&Publicist::foo`` is exactly the same function as +``&A::foo`` (same signature and address), just with a different access +modifier. The only purpose of the ``Publicist`` helper class is to make +the function name ``public``. + +If the intent is to expose ``protected`` ``virtual`` functions which can be +overridden in Python, the publicist pattern can be combined with the previously +described trampoline: + +.. code-block:: cpp + + class A { + public: + virtual ~A() = default; + + protected: + virtual int foo() const { return 42; } + }; + + class Trampoline : public A { + public: + int foo() const override { PYBIND11_OVERRIDE(int, A, foo, ); } + }; + + class Publicist : public A { + public: + using A::foo; + }; + + py::class_(m, "A") // <-- `Trampoline` here + .def("foo", &Publicist::foo); // <-- `Publicist` here, not `Trampoline`! + +Binding final classes +===================== + +Some classes may not be appropriate to inherit from. In C++11, classes can +use the ``final`` specifier to ensure that a class cannot be inherited from. +The ``py::is_final`` attribute can be used to ensure that Python classes +cannot inherit from a specified type. The underlying C++ type does not need +to be declared final. + +.. code-block:: cpp + + class IsFinal final {}; + + py::class_(m, "IsFinal", py::is_final()); + +When you try to inherit from such a class in Python, you will now get this +error: + +.. code-block:: pycon + + >>> class PyFinalChild(IsFinal): + ... pass + ... + TypeError: type 'IsFinal' is not an acceptable base type + +.. note:: This attribute is currently ignored on PyPy + +.. versionadded:: 2.6 + +Binding classes with template parameters +======================================== + +pybind11 can also wrap classes that have template parameters. Consider these classes: + +.. code-block:: cpp + + struct Cat {}; + struct Dog {}; + + template + struct Cage { + Cage(PetType& pet); + PetType& get(); + }; + +C++ templates may only be instantiated at compile time, so pybind11 can only +wrap instantiated templated classes. You cannot wrap a non-instantiated template: + +.. code-block:: cpp + + // BROKEN (this will not compile) + py::class_(m, "Cage"); + .def("get", &Cage::get); + +You must explicitly specify each template/type combination that you want to +wrap separately. + +.. code-block:: cpp + + // ok + py::class_>(m, "CatCage") + .def("get", &Cage::get); + + // ok + py::class_>(m, "DogCage") + .def("get", &Cage::get); + +If your class methods have template parameters you can wrap those as well, +but once again each instantiation must be explicitly specified: + +.. code-block:: cpp + + typename + struct MyClass { + template + T fn(V v); + }; + + py::class>(m, "MyClassT") + .def("fn", &MyClass::fn); + +Custom automatic downcasters +============================ + +As explained in :ref:`inheritance`, pybind11 comes with built-in +understanding of the dynamic type of polymorphic objects in C++; that +is, returning a Pet to Python produces a Python object that knows it's +wrapping a Dog, if Pet has virtual methods and pybind11 knows about +Dog and this Pet is in fact a Dog. Sometimes, you might want to +provide this automatic downcasting behavior when creating bindings for +a class hierarchy that does not use standard C++ polymorphism, such as +LLVM [#f4]_. As long as there's some way to determine at runtime +whether a downcast is safe, you can proceed by specializing the +``pybind11::polymorphic_type_hook`` template: + +.. code-block:: cpp + + enum class PetKind { Cat, Dog, Zebra }; + struct Pet { // Not polymorphic: has no virtual methods + const PetKind kind; + int age = 0; + protected: + Pet(PetKind _kind) : kind(_kind) {} + }; + struct Dog : Pet { + Dog() : Pet(PetKind::Dog) {} + std::string sound = "woof!"; + std::string bark() const { return sound; } + }; + + namespace PYBIND11_NAMESPACE { + template<> struct polymorphic_type_hook { + static const void *get(const Pet *src, const std::type_info*& type) { + // note that src may be nullptr + if (src && src->kind == PetKind::Dog) { + type = &typeid(Dog); + return static_cast(src); + } + return src; + } + }; + } // namespace PYBIND11_NAMESPACE + +When pybind11 wants to convert a C++ pointer of type ``Base*`` to a +Python object, it calls ``polymorphic_type_hook::get()`` to +determine if a downcast is possible. The ``get()`` function should use +whatever runtime information is available to determine if its ``src`` +parameter is in fact an instance of some class ``Derived`` that +inherits from ``Base``. If it finds such a ``Derived``, it sets ``type += &typeid(Derived)`` and returns a pointer to the ``Derived`` object +that contains ``src``. Otherwise, it just returns ``src``, leaving +``type`` at its default value of nullptr. If you set ``type`` to a +type that pybind11 doesn't know about, no downcasting will occur, and +the original ``src`` pointer will be used with its static type +``Base*``. + +It is critical that the returned pointer and ``type`` argument of +``get()`` agree with each other: if ``type`` is set to something +non-null, the returned pointer must point to the start of an object +whose type is ``type``. If the hierarchy being exposed uses only +single inheritance, a simple ``return src;`` will achieve this just +fine, but in the general case, you must cast ``src`` to the +appropriate derived-class pointer (e.g. using +``static_cast(src)``) before allowing it to be returned as a +``void*``. + +.. [#f4] https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html + +.. note:: + + pybind11's standard support for downcasting objects whose types + have virtual methods is implemented using + ``polymorphic_type_hook`` too, using the standard C++ ability to + determine the most-derived type of a polymorphic object using + ``typeid()`` and to cast a base pointer to that most-derived type + (even if you don't know what it is) using ``dynamic_cast``. + +.. seealso:: + + The file :file:`tests/test_tagbased_polymorphic.cpp` contains a + more complete example, including a demonstration of how to provide + automatic downcasting for an entire class hierarchy without + writing one get() function for each class. + +Accessing the type object +========================= + +You can get the type object from a C++ class that has already been registered using: + +.. code-block:: cpp + + py::type T_py = py::type::of(); + +You can directly use ``py::type::of(ob)`` to get the type object from any python +object, just like ``type(ob)`` in Python. + +.. note:: + + Other types, like ``py::type::of()``, do not work, see :ref:`type-conversions`. + +.. versionadded:: 2.6 + +Custom type setup +================= + +For advanced use cases, such as enabling garbage collection support, you may +wish to directly manipulate the ``PyHeapTypeObject`` corresponding to a +``py::class_`` definition. + +You can do that using ``py::custom_type_setup``: + +.. code-block:: cpp + + struct OwnsPythonObjects { + py::object value = py::none(); + }; + py::class_ cls( + m, "OwnsPythonObjects", py::custom_type_setup([](PyHeapTypeObject *heap_type) { + auto *type = &heap_type->ht_type; + type->tp_flags |= Py_TPFLAGS_HAVE_GC; + type->tp_traverse = [](PyObject *self_base, visitproc visit, void *arg) { + auto &self = py::cast(py::handle(self_base)); + Py_VISIT(self.value.ptr()); + return 0; + }; + type->tp_clear = [](PyObject *self_base) { + auto &self = py::cast(py::handle(self_base)); + self.value = py::none(); + return 0; + }; + })); + cls.def(py::init<>()); + cls.def_readwrite("value", &OwnsPythonObjects::value); + +.. versionadded:: 2.8 diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/embedding.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/embedding.rst new file mode 100644 index 0000000000000000000000000000000000000000..4cb6ebc68aea8d8a47924768e606aa5b59e4154b --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/embedding.rst @@ -0,0 +1,262 @@ +.. _embedding: + +Embedding the interpreter +######################### + +While pybind11 is mainly focused on extending Python using C++, it's also +possible to do the reverse: embed the Python interpreter into a C++ program. +All of the other documentation pages still apply here, so refer to them for +general pybind11 usage. This section will cover a few extra things required +for embedding. + +Getting started +=============== + +A basic executable with an embedded interpreter can be created with just a few +lines of CMake and the ``pybind11::embed`` target, as shown below. For more +information, see :doc:`/compiling`. + +.. code-block:: cmake + + cmake_minimum_required(VERSION 3.5...3.27) + project(example) + + find_package(pybind11 REQUIRED) # or `add_subdirectory(pybind11)` + + add_executable(example main.cpp) + target_link_libraries(example PRIVATE pybind11::embed) + +The essential structure of the ``main.cpp`` file looks like this: + +.. code-block:: cpp + + #include // everything needed for embedding + namespace py = pybind11; + + int main() { + py::scoped_interpreter guard{}; // start the interpreter and keep it alive + + py::print("Hello, World!"); // use the Python API + } + +The interpreter must be initialized before using any Python API, which includes +all the functions and classes in pybind11. The RAII guard class ``scoped_interpreter`` +takes care of the interpreter lifetime. After the guard is destroyed, the interpreter +shuts down and clears its memory. No Python functions can be called after this. + +Executing Python code +===================== + +There are a few different ways to run Python code. One option is to use ``eval``, +``exec`` or ``eval_file``, as explained in :ref:`eval`. Here is a quick example in +the context of an executable with an embedded interpreter: + +.. code-block:: cpp + + #include + namespace py = pybind11; + + int main() { + py::scoped_interpreter guard{}; + + py::exec(R"( + kwargs = dict(name="World", number=42) + message = "Hello, {name}! The answer is {number}".format(**kwargs) + print(message) + )"); + } + +Alternatively, similar results can be achieved using pybind11's API (see +:doc:`/advanced/pycpp/index` for more details). + +.. code-block:: cpp + + #include + namespace py = pybind11; + using namespace py::literals; + + int main() { + py::scoped_interpreter guard{}; + + auto kwargs = py::dict("name"_a="World", "number"_a=42); + auto message = "Hello, {name}! The answer is {number}"_s.format(**kwargs); + py::print(message); + } + +The two approaches can also be combined: + +.. code-block:: cpp + + #include + #include + + namespace py = pybind11; + using namespace py::literals; + + int main() { + py::scoped_interpreter guard{}; + + auto locals = py::dict("name"_a="World", "number"_a=42); + py::exec(R"( + message = "Hello, {name}! The answer is {number}".format(**locals()) + )", py::globals(), locals); + + auto message = locals["message"].cast(); + std::cout << message; + } + +Importing modules +================= + +Python modules can be imported using ``module_::import()``: + +.. code-block:: cpp + + py::module_ sys = py::module_::import("sys"); + py::print(sys.attr("path")); + +For convenience, the current working directory is included in ``sys.path`` when +embedding the interpreter. This makes it easy to import local Python files: + +.. code-block:: python + + """calc.py located in the working directory""" + + + def add(i, j): + return i + j + + +.. code-block:: cpp + + py::module_ calc = py::module_::import("calc"); + py::object result = calc.attr("add")(1, 2); + int n = result.cast(); + assert(n == 3); + +Modules can be reloaded using ``module_::reload()`` if the source is modified e.g. +by an external process. This can be useful in scenarios where the application +imports a user defined data processing script which needs to be updated after +changes by the user. Note that this function does not reload modules recursively. + +.. _embedding_modules: + +Adding embedded modules +======================= + +Embedded binary modules can be added using the ``PYBIND11_EMBEDDED_MODULE`` macro. +Note that the definition must be placed at global scope. They can be imported +like any other module. + +.. code-block:: cpp + + #include + namespace py = pybind11; + + PYBIND11_EMBEDDED_MODULE(fast_calc, m) { + // `m` is a `py::module_` which is used to bind functions and classes + m.def("add", [](int i, int j) { + return i + j; + }); + } + + int main() { + py::scoped_interpreter guard{}; + + auto fast_calc = py::module_::import("fast_calc"); + auto result = fast_calc.attr("add")(1, 2).cast(); + assert(result == 3); + } + +Unlike extension modules where only a single binary module can be created, on +the embedded side an unlimited number of modules can be added using multiple +``PYBIND11_EMBEDDED_MODULE`` definitions (as long as they have unique names). + +These modules are added to Python's list of builtins, so they can also be +imported in pure Python files loaded by the interpreter. Everything interacts +naturally: + +.. code-block:: python + + """py_module.py located in the working directory""" + import cpp_module + + a = cpp_module.a + b = a + 1 + + +.. code-block:: cpp + + #include + namespace py = pybind11; + + PYBIND11_EMBEDDED_MODULE(cpp_module, m) { + m.attr("a") = 1; + } + + int main() { + py::scoped_interpreter guard{}; + + auto py_module = py::module_::import("py_module"); + + auto locals = py::dict("fmt"_a="{} + {} = {}", **py_module.attr("__dict__")); + assert(locals["a"].cast() == 1); + assert(locals["b"].cast() == 2); + + py::exec(R"( + c = a + b + message = fmt.format(a, b, c) + )", py::globals(), locals); + + assert(locals["c"].cast() == 3); + assert(locals["message"].cast() == "1 + 2 = 3"); + } + + +Interpreter lifetime +==================== + +The Python interpreter shuts down when ``scoped_interpreter`` is destroyed. After +this, creating a new instance will restart the interpreter. Alternatively, the +``initialize_interpreter`` / ``finalize_interpreter`` pair of functions can be used +to directly set the state at any time. + +Modules created with pybind11 can be safely re-initialized after the interpreter +has been restarted. However, this may not apply to third-party extension modules. +The issue is that Python itself cannot completely unload extension modules and +there are several caveats with regard to interpreter restarting. In short, not +all memory may be freed, either due to Python reference cycles or user-created +global data. All the details can be found in the CPython documentation. + +.. warning:: + + Creating two concurrent ``scoped_interpreter`` guards is a fatal error. So is + calling ``initialize_interpreter`` for a second time after the interpreter + has already been initialized. + + Do not use the raw CPython API functions ``Py_Initialize`` and + ``Py_Finalize`` as these do not properly handle the lifetime of + pybind11's internal data. + + +Sub-interpreter support +======================= + +Creating multiple copies of ``scoped_interpreter`` is not possible because it +represents the main Python interpreter. Sub-interpreters are something different +and they do permit the existence of multiple interpreters. This is an advanced +feature of the CPython API and should be handled with care. pybind11 does not +currently offer a C++ interface for sub-interpreters, so refer to the CPython +documentation for all the details regarding this feature. + +We'll just mention a couple of caveats the sub-interpreters support in pybind11: + + 1. Sub-interpreters will not receive independent copies of embedded modules. + Instead, these are shared and modifications in one interpreter may be + reflected in another. + + 2. Managing multiple threads, multiple interpreters and the GIL can be + challenging and there are several caveats here, even within the pure + CPython API (please refer to the Python docs for details). As for + pybind11, keep in mind that ``gil_scoped_release`` and ``gil_scoped_acquire`` + do not take sub-interpreters into account. diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/exceptions.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/exceptions.rst new file mode 100644 index 0000000000000000000000000000000000000000..e20f42b5fea061fb68685275d6781d77c6772821 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/exceptions.rst @@ -0,0 +1,401 @@ +Exceptions +########## + +Built-in C++ to Python exception translation +============================================ + +When Python calls C++ code through pybind11, pybind11 provides a C++ exception handler +that will trap C++ exceptions, translate them to the corresponding Python exception, +and raise them so that Python code can handle them. + +pybind11 defines translations for ``std::exception`` and its standard +subclasses, and several special exception classes that translate to specific +Python exceptions. Note that these are not actually Python exceptions, so they +cannot be examined using the Python C API. Instead, they are pure C++ objects +that pybind11 will translate the corresponding Python exception when they arrive +at its exception handler. + +.. tabularcolumns:: |p{0.5\textwidth}|p{0.45\textwidth}| + ++--------------------------------------+--------------------------------------+ +| Exception thrown by C++ | Translated to Python exception type | ++======================================+======================================+ +| :class:`std::exception` | ``RuntimeError`` | ++--------------------------------------+--------------------------------------+ +| :class:`std::bad_alloc` | ``MemoryError`` | ++--------------------------------------+--------------------------------------+ +| :class:`std::domain_error` | ``ValueError`` | ++--------------------------------------+--------------------------------------+ +| :class:`std::invalid_argument` | ``ValueError`` | ++--------------------------------------+--------------------------------------+ +| :class:`std::length_error` | ``ValueError`` | ++--------------------------------------+--------------------------------------+ +| :class:`std::out_of_range` | ``IndexError`` | ++--------------------------------------+--------------------------------------+ +| :class:`std::range_error` | ``ValueError`` | ++--------------------------------------+--------------------------------------+ +| :class:`std::overflow_error` | ``OverflowError`` | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::stop_iteration` | ``StopIteration`` (used to implement | +| | custom iterators) | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::index_error` | ``IndexError`` (used to indicate out | +| | of bounds access in ``__getitem__``, | +| | ``__setitem__``, etc.) | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::key_error` | ``KeyError`` (used to indicate out | +| | of bounds access in ``__getitem__``, | +| | ``__setitem__`` in dict-like | +| | objects, etc.) | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::value_error` | ``ValueError`` (used to indicate | +| | wrong value passed in | +| | ``container.remove(...)``) | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::type_error` | ``TypeError`` | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::buffer_error` | ``BufferError`` | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::import_error` | ``ImportError`` | ++--------------------------------------+--------------------------------------+ +| :class:`pybind11::attribute_error` | ``AttributeError`` | ++--------------------------------------+--------------------------------------+ +| Any other exception | ``RuntimeError`` | ++--------------------------------------+--------------------------------------+ + +Exception translation is not bidirectional. That is, *catching* the C++ +exceptions defined above will not trap exceptions that originate from +Python. For that, catch :class:`pybind11::error_already_set`. See :ref:`below +` for further details. + +There is also a special exception :class:`cast_error` that is thrown by +:func:`handle::call` when the input arguments cannot be converted to Python +objects. + +Registering custom translators +============================== + +If the default exception conversion policy described above is insufficient, +pybind11 also provides support for registering custom exception translators. +Similar to pybind11 classes, exception translators can be local to the module +they are defined in or global to the entire python session. To register a simple +exception conversion that translates a C++ exception into a new Python exception +using the C++ exception's ``what()`` method, a helper function is available: + +.. code-block:: cpp + + py::register_exception(module, "PyExp"); + +This call creates a Python exception class with the name ``PyExp`` in the given +module and automatically converts any encountered exceptions of type ``CppExp`` +into Python exceptions of type ``PyExp``. + +A matching function is available for registering a local exception translator: + +.. code-block:: cpp + + py::register_local_exception(module, "PyExp"); + + +It is possible to specify base class for the exception using the third +parameter, a ``handle``: + +.. code-block:: cpp + + py::register_exception(module, "PyExp", PyExc_RuntimeError); + py::register_local_exception(module, "PyExp", PyExc_RuntimeError); + +Then ``PyExp`` can be caught both as ``PyExp`` and ``RuntimeError``. + +The class objects of the built-in Python exceptions are listed in the Python +documentation on `Standard Exceptions `_. +The default base class is ``PyExc_Exception``. + +When more advanced exception translation is needed, the functions +``py::register_exception_translator(translator)`` and +``py::register_local_exception_translator(translator)`` can be used to register +functions that can translate arbitrary exception types (and which may include +additional logic to do so). The functions takes a stateless callable (e.g. a +function pointer or a lambda function without captured variables) with the call +signature ``void(std::exception_ptr)``. + +When a C++ exception is thrown, the registered exception translators are tried +in reverse order of registration (i.e. the last registered translator gets the +first shot at handling the exception). All local translators will be tried +before a global translator is tried. + +Inside the translator, ``std::rethrow_exception`` should be used within +a try block to re-throw the exception. One or more catch clauses to catch +the appropriate exceptions should then be used with each clause using +``py::set_error()`` (see below). + +To declare a custom Python exception type, declare a ``py::exception`` variable +and use this in the associated exception translator (note: it is often useful +to make this a static declaration when using it inside a lambda expression +without requiring capturing). + +The following example demonstrates this for a hypothetical exception classes +``MyCustomException`` and ``OtherException``: the first is translated to a +custom python exception ``MyCustomError``, while the second is translated to a +standard python RuntimeError: + +.. code-block:: cpp + + PYBIND11_CONSTINIT static py::gil_safe_call_once_and_store exc_storage; + exc_storage.call_once_and_store_result( + [&]() { return py::exception(m, "MyCustomError"); }); + py::register_exception_translator([](std::exception_ptr p) { + try { + if (p) std::rethrow_exception(p); + } catch (const MyCustomException &e) { + py::set_error(exc_storage.get_stored(), e.what()); + } catch (const OtherException &e) { + py::set_error(PyExc_RuntimeError, e.what()); + } + }); + +Multiple exceptions can be handled by a single translator, as shown in the +example above. If the exception is not caught by the current translator, the +previously registered one gets a chance. + +If none of the registered exception translators is able to handle the +exception, it is handled by the default converter as described in the previous +section. + +.. seealso:: + + The file :file:`tests/test_exceptions.cpp` contains examples + of various custom exception translators and custom exception types. + +.. note:: + + Call ``py::set_error()`` for every exception caught in a custom exception + translator. Failure to do so will cause Python to crash with ``SystemError: + error return without exception set``. + + Exceptions that you do not plan to handle should simply not be caught, or + may be explicitly (re-)thrown to delegate it to the other, + previously-declared existing exception translators. + + Note that ``libc++`` and ``libstdc++`` `behave differently under macOS + `_ + with ``-fvisibility=hidden``. Therefore exceptions that are used across ABI + boundaries need to be explicitly exported, as exercised in + ``tests/test_exceptions.h``. See also: + "Problems with C++ exceptions" under `GCC Wiki `_. + + +Local vs Global Exception Translators +===================================== + +When a global exception translator is registered, it will be applied across all +modules in the reverse order of registration. This can create behavior where the +order of module import influences how exceptions are translated. + +If module1 has the following translator: + +.. code-block:: cpp + + py::register_exception_translator([](std::exception_ptr p) { + try { + if (p) std::rethrow_exception(p); + } catch (const std::invalid_argument &e) { + py::set_error(PyExc_ArgumentError, "module1 handled this"); + } + } + +and module2 has the following similar translator: + +.. code-block:: cpp + + py::register_exception_translator([](std::exception_ptr p) { + try { + if (p) std::rethrow_exception(p); + } catch (const std::invalid_argument &e) { + py::set_error(PyExc_ArgumentError, "module2 handled this"); + } + } + +then which translator handles the invalid_argument will be determined by the +order that module1 and module2 are imported. Since exception translators are +applied in the reverse order of registration, which ever module was imported +last will "win" and that translator will be applied. + +If there are multiple pybind11 modules that share exception types (either +standard built-in or custom) loaded into a single python instance and +consistent error handling behavior is needed, then local translators should be +used. + +Changing the previous example to use ``register_local_exception_translator`` +would mean that when invalid_argument is thrown in the module2 code, the +module2 translator will always handle it, while in module1, the module1 +translator will do the same. + +.. _handling_python_exceptions_cpp: + +Handling exceptions from Python in C++ +====================================== + +When C++ calls Python functions, such as in a callback function or when +manipulating Python objects, and Python raises an ``Exception``, pybind11 +converts the Python exception into a C++ exception of type +:class:`pybind11::error_already_set` whose payload contains a C++ string textual +summary and the actual Python exception. ``error_already_set`` is used to +propagate Python exception back to Python (or possibly, handle them in C++). + +.. tabularcolumns:: |p{0.5\textwidth}|p{0.45\textwidth}| + ++--------------------------------------+--------------------------------------+ +| Exception raised in Python | Thrown as C++ exception type | ++======================================+======================================+ +| Any Python ``Exception`` | :class:`pybind11::error_already_set` | ++--------------------------------------+--------------------------------------+ + +For example: + +.. code-block:: cpp + + try { + // open("missing.txt", "r") + auto file = py::module_::import("io").attr("open")("missing.txt", "r"); + auto text = file.attr("read")(); + file.attr("close")(); + } catch (py::error_already_set &e) { + if (e.matches(PyExc_FileNotFoundError)) { + py::print("missing.txt not found"); + } else if (e.matches(PyExc_PermissionError)) { + py::print("missing.txt found but not accessible"); + } else { + throw; + } + } + +Note that C++ to Python exception translation does not apply here, since that is +a method for translating C++ exceptions to Python, not vice versa. The error raised +from Python is always ``error_already_set``. + +This example illustrates this behavior: + +.. code-block:: cpp + + try { + py::eval("raise ValueError('The Ring')"); + } catch (py::value_error &boromir) { + // Boromir never gets the ring + assert(false); + } catch (py::error_already_set &frodo) { + // Frodo gets the ring + py::print("I will take the ring"); + } + + try { + // py::value_error is a request for pybind11 to raise a Python exception + throw py::value_error("The ball"); + } catch (py::error_already_set &cat) { + // cat won't catch the ball since + // py::value_error is not a Python exception + assert(false); + } catch (py::value_error &dog) { + // dog will catch the ball + py::print("Run Spot run"); + throw; // Throw it again (pybind11 will raise ValueError) + } + +Handling errors from the Python C API +===================================== + +Where possible, use :ref:`pybind11 wrappers ` instead of calling +the Python C API directly. When calling the Python C API directly, in +addition to manually managing reference counts, one must follow the pybind11 +error protocol, which is outlined here. + +After calling the Python C API, if Python returns an error, +``throw py::error_already_set();``, which allows pybind11 to deal with the +exception and pass it back to the Python interpreter. This includes calls to +the error setting functions such as ``py::set_error()``. + +.. code-block:: cpp + + py::set_error(PyExc_TypeError, "C API type error demo"); + throw py::error_already_set(); + + // But it would be easier to simply... + throw py::type_error("pybind11 wrapper type error"); + +Alternately, to ignore the error, call `PyErr_Clear +`_. + +Any Python error must be thrown or cleared, or Python/pybind11 will be left in +an invalid state. + +Chaining exceptions ('raise from') +================================== + +Python has a mechanism for indicating that exceptions were caused by other +exceptions: + +.. code-block:: py + + try: + print(1 / 0) + except Exception as exc: + raise RuntimeError("could not divide by zero") from exc + +To do a similar thing in pybind11, you can use the ``py::raise_from`` function. It +sets the current python error indicator, so to continue propagating the exception +you should ``throw py::error_already_set()``. + +.. code-block:: cpp + + try { + py::eval("print(1 / 0")); + } catch (py::error_already_set &e) { + py::raise_from(e, PyExc_RuntimeError, "could not divide by zero"); + throw py::error_already_set(); + } + +.. versionadded:: 2.8 + +.. _unraisable_exceptions: + +Handling unraisable exceptions +============================== + +If a Python function invoked from a C++ destructor or any function marked +``noexcept(true)`` (collectively, "noexcept functions") throws an exception, there +is no way to propagate the exception, as such functions may not throw. +Should they throw or fail to catch any exceptions in their call graph, +the C++ runtime calls ``std::terminate()`` to abort immediately. + +Similarly, Python exceptions raised in a class's ``__del__`` method do not +propagate, but are logged by Python as an unraisable error. In Python 3.8+, a +`system hook is triggered +`_ +and an auditing event is logged. + +Any noexcept function should have a try-catch block that traps +class:`error_already_set` (or any other exception that can occur). Note that +pybind11 wrappers around Python exceptions such as +:class:`pybind11::value_error` are *not* Python exceptions; they are C++ +exceptions that pybind11 catches and converts to Python exceptions. Noexcept +functions cannot propagate these exceptions either. A useful approach is to +convert them to Python exceptions and then ``discard_as_unraisable`` as shown +below. + +.. code-block:: cpp + + void nonthrowing_func() noexcept(true) { + try { + // ... + } catch (py::error_already_set &eas) { + // Discard the Python error using Python APIs, using the C++ magic + // variable __func__. Python already knows the type and value and of the + // exception object. + eas.discard_as_unraisable(__func__); + } catch (const std::exception &e) { + // Log and discard C++ exceptions. + third_party::log(e); + } + } + +.. versionadded:: 2.6 diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/functions.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/functions.rst new file mode 100644 index 0000000000000000000000000000000000000000..372934b099af1bd8d557e4c65a0a6c0181971175 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/functions.rst @@ -0,0 +1,614 @@ +Functions +######### + +Before proceeding with this section, make sure that you are already familiar +with the basics of binding functions and classes, as explained in :doc:`/basics` +and :doc:`/classes`. The following guide is applicable to both free and member +functions, i.e. *methods* in Python. + +.. _return_value_policies: + +Return value policies +===================== + +Python and C++ use fundamentally different ways of managing the memory and +lifetime of objects managed by them. This can lead to issues when creating +bindings for functions that return a non-trivial type. Just by looking at the +type information, it is not clear whether Python should take charge of the +returned value and eventually free its resources, or if this is handled on the +C++ side. For this reason, pybind11 provides several *return value policy* +annotations that can be passed to the :func:`module_::def` and +:func:`class_::def` functions. The default policy is +:enum:`return_value_policy::automatic`. + +Return value policies are tricky, and it's very important to get them right. +Just to illustrate what can go wrong, consider the following simple example: + +.. code-block:: cpp + + /* Function declaration */ + Data *get_data() { return _data; /* (pointer to a static data structure) */ } + ... + + /* Binding code */ + m.def("get_data", &get_data); // <-- KABOOM, will cause crash when called from Python + +What's going on here? When ``get_data()`` is called from Python, the return +value (a native C++ type) must be wrapped to turn it into a usable Python type. +In this case, the default return value policy (:enum:`return_value_policy::automatic`) +causes pybind11 to assume ownership of the static ``_data`` instance. + +When Python's garbage collector eventually deletes the Python +wrapper, pybind11 will also attempt to delete the C++ instance (via ``operator +delete()``) due to the implied ownership. At this point, the entire application +will come crashing down, though errors could also be more subtle and involve +silent data corruption. + +In the above example, the policy :enum:`return_value_policy::reference` should have +been specified so that the global data instance is only *referenced* without any +implied transfer of ownership, i.e.: + +.. code-block:: cpp + + m.def("get_data", &get_data, py::return_value_policy::reference); + +On the other hand, this is not the right policy for many other situations, +where ignoring ownership could lead to resource leaks. +As a developer using pybind11, it's important to be familiar with the different +return value policies, including which situation calls for which one of them. +The following table provides an overview of available policies: + +.. tabularcolumns:: |p{0.5\textwidth}|p{0.45\textwidth}| + ++--------------------------------------------------+----------------------------------------------------------------------------+ +| Return value policy | Description | ++==================================================+============================================================================+ +| :enum:`return_value_policy::take_ownership` | Reference an existing object (i.e. do not create a new copy) and take | +| | ownership. Python will call the destructor and delete operator when the | +| | object's reference count reaches zero. Undefined behavior ensues when the | +| | C++ side does the same, or when the data was not dynamically allocated. | ++--------------------------------------------------+----------------------------------------------------------------------------+ +| :enum:`return_value_policy::copy` | Create a new copy of the returned object, which will be owned by Python. | +| | This policy is comparably safe because the lifetimes of the two instances | +| | are decoupled. | ++--------------------------------------------------+----------------------------------------------------------------------------+ +| :enum:`return_value_policy::move` | Use ``std::move`` to move the return value contents into a new instance | +| | that will be owned by Python. This policy is comparably safe because the | +| | lifetimes of the two instances (move source and destination) are decoupled.| ++--------------------------------------------------+----------------------------------------------------------------------------+ +| :enum:`return_value_policy::reference` | Reference an existing object, but do not take ownership. The C++ side is | +| | responsible for managing the object's lifetime and deallocating it when | +| | it is no longer used. Warning: undefined behavior will ensue when the C++ | +| | side deletes an object that is still referenced and used by Python. | ++--------------------------------------------------+----------------------------------------------------------------------------+ +| :enum:`return_value_policy::reference_internal` | Indicates that the lifetime of the return value is tied to the lifetime | +| | of a parent object, namely the implicit ``this``, or ``self`` argument of | +| | the called method or property. Internally, this policy works just like | +| | :enum:`return_value_policy::reference` but additionally applies a | +| | ``keep_alive<0, 1>`` *call policy* (described in the next section) that | +| | prevents the parent object from being garbage collected as long as the | +| | return value is referenced by Python. This is the default policy for | +| | property getters created via ``def_property``, ``def_readwrite``, etc. | ++--------------------------------------------------+----------------------------------------------------------------------------+ +| :enum:`return_value_policy::automatic` | This policy falls back to the policy | +| | :enum:`return_value_policy::take_ownership` when the return value is a | +| | pointer. Otherwise, it uses :enum:`return_value_policy::move` or | +| | :enum:`return_value_policy::copy` for rvalue and lvalue references, | +| | respectively. See above for a description of what all of these different | +| | policies do. This is the default policy for ``py::class_``-wrapped types. | ++--------------------------------------------------+----------------------------------------------------------------------------+ +| :enum:`return_value_policy::automatic_reference` | As above, but use policy :enum:`return_value_policy::reference` when the | +| | return value is a pointer. This is the default conversion policy for | +| | function arguments when calling Python functions manually from C++ code | +| | (i.e. via ``handle::operator()``) and the casters in ``pybind11/stl.h``. | +| | You probably won't need to use this explicitly. | ++--------------------------------------------------+----------------------------------------------------------------------------+ + +Return value policies can also be applied to properties: + +.. code-block:: cpp + + class_(m, "MyClass") + .def_property("data", &MyClass::getData, &MyClass::setData, + py::return_value_policy::copy); + +Technically, the code above applies the policy to both the getter and the +setter function, however, the setter doesn't really care about *return* +value policies which makes this a convenient terse syntax. Alternatively, +targeted arguments can be passed through the :class:`cpp_function` constructor: + +.. code-block:: cpp + + class_(m, "MyClass") + .def_property("data", + py::cpp_function(&MyClass::getData, py::return_value_policy::copy), + py::cpp_function(&MyClass::setData) + ); + +.. warning:: + + Code with invalid return value policies might access uninitialized memory or + free data structures multiple times, which can lead to hard-to-debug + non-determinism and segmentation faults, hence it is worth spending the + time to understand all the different options in the table above. + +.. note:: + + One important aspect of the above policies is that they only apply to + instances which pybind11 has *not* seen before, in which case the policy + clarifies essential questions about the return value's lifetime and + ownership. When pybind11 knows the instance already (as identified by its + type and address in memory), it will return the existing Python object + wrapper rather than creating a new copy. + +.. note:: + + The next section on :ref:`call_policies` discusses *call policies* that can be + specified *in addition* to a return value policy from the list above. Call + policies indicate reference relationships that can involve both return values + and parameters of functions. + +.. note:: + + As an alternative to elaborate call policies and lifetime management logic, + consider using smart pointers (see the section on :ref:`smart_pointers` for + details). Smart pointers can tell whether an object is still referenced from + C++ or Python, which generally eliminates the kinds of inconsistencies that + can lead to crashes or undefined behavior. For functions returning smart + pointers, it is not necessary to specify a return value policy. + +.. _call_policies: + +Additional call policies +======================== + +In addition to the above return value policies, further *call policies* can be +specified to indicate dependencies between parameters or ensure a certain state +for the function call. + +Keep alive +---------- + +In general, this policy is required when the C++ object is any kind of container +and another object is being added to the container. ``keep_alive`` +indicates that the argument with index ``Patient`` should be kept alive at least +until the argument with index ``Nurse`` is freed by the garbage collector. Argument +indices start at one, while zero refers to the return value. For methods, index +``1`` refers to the implicit ``this`` pointer, while regular arguments begin at +index ``2``. Arbitrarily many call policies can be specified. When a ``Nurse`` +with value ``None`` is detected at runtime, the call policy does nothing. + +When the nurse is not a pybind11-registered type, the implementation internally +relies on the ability to create a *weak reference* to the nurse object. When +the nurse object is not a pybind11-registered type and does not support weak +references, an exception will be thrown. + +If you use an incorrect argument index, you will get a ``RuntimeError`` saying +``Could not activate keep_alive!``. You should review the indices you're using. + +Consider the following example: here, the binding code for a list append +operation ties the lifetime of the newly added element to the underlying +container: + +.. code-block:: cpp + + py::class_(m, "List") + .def("append", &List::append, py::keep_alive<1, 2>()); + +For consistency, the argument indexing is identical for constructors. Index +``1`` still refers to the implicit ``this`` pointer, i.e. the object which is +being constructed. Index ``0`` refers to the return type which is presumed to +be ``void`` when a constructor is viewed like a function. The following example +ties the lifetime of the constructor element to the constructed object: + +.. code-block:: cpp + + py::class_(m, "Nurse") + .def(py::init(), py::keep_alive<1, 2>()); + +.. note:: + + ``keep_alive`` is analogous to the ``with_custodian_and_ward`` (if Nurse, + Patient != 0) and ``with_custodian_and_ward_postcall`` (if Nurse/Patient == + 0) policies from Boost.Python. + +Call guard +---------- + +The ``call_guard`` policy allows any scope guard type ``T`` to be placed +around the function call. For example, this definition: + +.. code-block:: cpp + + m.def("foo", foo, py::call_guard()); + +is equivalent to the following pseudocode: + +.. code-block:: cpp + + m.def("foo", [](args...) { + T scope_guard; + return foo(args...); // forwarded arguments + }); + +The only requirement is that ``T`` is default-constructible, but otherwise any +scope guard will work. This is very useful in combination with ``gil_scoped_release``. +See :ref:`gil`. + +Multiple guards can also be specified as ``py::call_guard``. The +constructor order is left to right and destruction happens in reverse. + +.. seealso:: + + The file :file:`tests/test_call_policies.cpp` contains a complete example + that demonstrates using `keep_alive` and `call_guard` in more detail. + +.. _python_objects_as_args: + +Python objects as arguments +=========================== + +pybind11 exposes all major Python types using thin C++ wrapper classes. These +wrapper classes can also be used as parameters of functions in bindings, which +makes it possible to directly work with native Python types on the C++ side. +For instance, the following statement iterates over a Python ``dict``: + +.. code-block:: cpp + + void print_dict(const py::dict& dict) { + /* Easily interact with Python types */ + for (auto item : dict) + std::cout << "key=" << std::string(py::str(item.first)) << ", " + << "value=" << std::string(py::str(item.second)) << std::endl; + } + +It can be exported: + +.. code-block:: cpp + + m.def("print_dict", &print_dict); + +And used in Python as usual: + +.. code-block:: pycon + + >>> print_dict({"foo": 123, "bar": "hello"}) + key=foo, value=123 + key=bar, value=hello + +For more information on using Python objects in C++, see :doc:`/advanced/pycpp/index`. + +Accepting \*args and \*\*kwargs +=============================== + +Python provides a useful mechanism to define functions that accept arbitrary +numbers of arguments and keyword arguments: + +.. code-block:: python + + def generic(*args, **kwargs): + ... # do something with args and kwargs + +Such functions can also be created using pybind11: + +.. code-block:: cpp + + void generic(py::args args, const py::kwargs& kwargs) { + /// .. do something with args + if (kwargs) + /// .. do something with kwargs + } + + /// Binding code + m.def("generic", &generic); + +The class ``py::args`` derives from ``py::tuple`` and ``py::kwargs`` derives +from ``py::dict``. + +You may also use just one or the other, and may combine these with other +arguments. Note, however, that ``py::kwargs`` must always be the last argument +of the function, and ``py::args`` implies that any further arguments are +keyword-only (see :ref:`keyword_only_arguments`). + +Please refer to the other examples for details on how to iterate over these, +and on how to cast their entries into C++ objects. A demonstration is also +available in ``tests/test_kwargs_and_defaults.cpp``. + +.. note:: + + When combining \*args or \*\*kwargs with :ref:`keyword_args` you should + *not* include ``py::arg`` tags for the ``py::args`` and ``py::kwargs`` + arguments. + +Default arguments revisited +=========================== + +The section on :ref:`default_args` previously discussed basic usage of default +arguments using pybind11. One noteworthy aspect of their implementation is that +default arguments are converted to Python objects right at declaration time. +Consider the following example: + +.. code-block:: cpp + + py::class_("MyClass") + .def("myFunction", py::arg("arg") = SomeType(123)); + +In this case, pybind11 must already be set up to deal with values of the type +``SomeType`` (via a prior instantiation of ``py::class_``), or an +exception will be thrown. + +Another aspect worth highlighting is that the "preview" of the default argument +in the function signature is generated using the object's ``__repr__`` method. +If not available, the signature may not be very helpful, e.g.: + +.. code-block:: pycon + + FUNCTIONS + ... + | myFunction(...) + | Signature : (MyClass, arg : SomeType = ) -> NoneType + ... + +The first way of addressing this is by defining ``SomeType.__repr__``. +Alternatively, it is possible to specify the human-readable preview of the +default argument manually using the ``arg_v`` notation: + +.. code-block:: cpp + + py::class_("MyClass") + .def("myFunction", py::arg_v("arg", SomeType(123), "SomeType(123)")); + +Sometimes it may be necessary to pass a null pointer value as a default +argument. In this case, remember to cast it to the underlying type in question, +like so: + +.. code-block:: cpp + + py::class_("MyClass") + .def("myFunction", py::arg("arg") = static_cast(nullptr)); + +.. _keyword_only_arguments: + +Keyword-only arguments +====================== + +Python implements keyword-only arguments by specifying an unnamed ``*`` +argument in a function definition: + +.. code-block:: python + + def f(a, *, b): # a can be positional or via keyword; b must be via keyword + pass + + + f(a=1, b=2) # good + f(b=2, a=1) # good + f(1, b=2) # good + f(1, 2) # TypeError: f() takes 1 positional argument but 2 were given + +Pybind11 provides a ``py::kw_only`` object that allows you to implement +the same behaviour by specifying the object between positional and keyword-only +argument annotations when registering the function: + +.. code-block:: cpp + + m.def("f", [](int a, int b) { /* ... */ }, + py::arg("a"), py::kw_only(), py::arg("b")); + +.. versionadded:: 2.6 + +A ``py::args`` argument implies that any following arguments are keyword-only, +as if ``py::kw_only()`` had been specified in the same relative location of the +argument list as the ``py::args`` argument. The ``py::kw_only()`` may be +included to be explicit about this, but is not required. + +.. versionchanged:: 2.9 + This can now be combined with ``py::args``. Before, ``py::args`` could only + occur at the end of the argument list, or immediately before a ``py::kwargs`` + argument at the end. + + +Positional-only arguments +========================= + +Python 3.8 introduced a new positional-only argument syntax, using ``/`` in the +function definition (note that this has been a convention for CPython +positional arguments, such as in ``pow()``, since Python 2). You can +do the same thing in any version of Python using ``py::pos_only()``: + +.. code-block:: cpp + + m.def("f", [](int a, int b) { /* ... */ }, + py::arg("a"), py::pos_only(), py::arg("b")); + +You now cannot give argument ``a`` by keyword. This can be combined with +keyword-only arguments, as well. + +.. versionadded:: 2.6 + +.. _nonconverting_arguments: + +Non-converting arguments +======================== + +Certain argument types may support conversion from one type to another. Some +examples of conversions are: + +* :ref:`implicit_conversions` declared using ``py::implicitly_convertible()`` +* Calling a method accepting a double with an integer argument +* Calling a ``std::complex`` argument with a non-complex python type + (for example, with a float). (Requires the optional ``pybind11/complex.h`` + header). +* Calling a function taking an Eigen matrix reference with a numpy array of the + wrong type or of an incompatible data layout. (Requires the optional + ``pybind11/eigen.h`` header). + +This behaviour is sometimes undesirable: the binding code may prefer to raise +an error rather than convert the argument. This behaviour can be obtained +through ``py::arg`` by calling the ``.noconvert()`` method of the ``py::arg`` +object, such as: + +.. code-block:: cpp + + m.def("floats_only", [](double f) { return 0.5 * f; }, py::arg("f").noconvert()); + m.def("floats_preferred", [](double f) { return 0.5 * f; }, py::arg("f")); + +Attempting the call the second function (the one without ``.noconvert()``) with +an integer will succeed, but attempting to call the ``.noconvert()`` version +will fail with a ``TypeError``: + +.. code-block:: pycon + + >>> floats_preferred(4) + 2.0 + >>> floats_only(4) + Traceback (most recent call last): + File "", line 1, in + TypeError: floats_only(): incompatible function arguments. The following argument types are supported: + 1. (f: float) -> float + + Invoked with: 4 + +You may, of course, combine this with the :var:`_a` shorthand notation (see +:ref:`keyword_args`) and/or :ref:`default_args`. It is also permitted to omit +the argument name by using the ``py::arg()`` constructor without an argument +name, i.e. by specifying ``py::arg().noconvert()``. + +.. note:: + + When specifying ``py::arg`` options it is necessary to provide the same + number of options as the bound function has arguments. Thus if you want to + enable no-convert behaviour for just one of several arguments, you will + need to specify a ``py::arg()`` annotation for each argument with the + no-convert argument modified to ``py::arg().noconvert()``. + +.. _none_arguments: + +Allow/Prohibiting None arguments +================================ + +When a C++ type registered with :class:`py::class_` is passed as an argument to +a function taking the instance as pointer or shared holder (e.g. ``shared_ptr`` +or a custom, copyable holder as described in :ref:`smart_pointers`), pybind +allows ``None`` to be passed from Python which results in calling the C++ +function with ``nullptr`` (or an empty holder) for the argument. + +To explicitly enable or disable this behaviour, using the +``.none`` method of the :class:`py::arg` object: + +.. code-block:: cpp + + py::class_(m, "Dog").def(py::init<>()); + py::class_(m, "Cat").def(py::init<>()); + m.def("bark", [](Dog *dog) -> std::string { + if (dog) return "woof!"; /* Called with a Dog instance */ + else return "(no dog)"; /* Called with None, dog == nullptr */ + }, py::arg("dog").none(true)); + m.def("meow", [](Cat *cat) -> std::string { + // Can't be called with None argument + return "meow"; + }, py::arg("cat").none(false)); + +With the above, the Python call ``bark(None)`` will return the string ``"(no +dog)"``, while attempting to call ``meow(None)`` will raise a ``TypeError``: + +.. code-block:: pycon + + >>> from animals import Dog, Cat, bark, meow + >>> bark(Dog()) + 'woof!' + >>> meow(Cat()) + 'meow' + >>> bark(None) + '(no dog)' + >>> meow(None) + Traceback (most recent call last): + File "", line 1, in + TypeError: meow(): incompatible function arguments. The following argument types are supported: + 1. (cat: animals.Cat) -> str + + Invoked with: None + +The default behaviour when the tag is unspecified is to allow ``None``. + +.. note:: + + Even when ``.none(true)`` is specified for an argument, ``None`` will be converted to a + ``nullptr`` *only* for custom and :ref:`opaque ` types. Pointers to built-in types + (``double *``, ``int *``, ...) and STL types (``std::vector *``, ...; if ``pybind11/stl.h`` + is included) are copied when converted to C++ (see :doc:`/advanced/cast/overview`) and will + not allow ``None`` as argument. To pass optional argument of these copied types consider + using ``std::optional`` + +.. _overload_resolution: + +Overload resolution order +========================= + +When a function or method with multiple overloads is called from Python, +pybind11 determines which overload to call in two passes. The first pass +attempts to call each overload without allowing argument conversion (as if +every argument had been specified as ``py::arg().noconvert()`` as described +above). + +If no overload succeeds in the no-conversion first pass, a second pass is +attempted in which argument conversion is allowed (except where prohibited via +an explicit ``py::arg().noconvert()`` attribute in the function definition). + +If the second pass also fails a ``TypeError`` is raised. + +Within each pass, overloads are tried in the order they were registered with +pybind11. If the ``py::prepend()`` tag is added to the definition, a function +can be placed at the beginning of the overload sequence instead, allowing user +overloads to proceed built in functions. + +What this means in practice is that pybind11 will prefer any overload that does +not require conversion of arguments to an overload that does, but otherwise +prefers earlier-defined overloads to later-defined ones. + +.. note:: + + pybind11 does *not* further prioritize based on the number/pattern of + overloaded arguments. That is, pybind11 does not prioritize a function + requiring one conversion over one requiring three, but only prioritizes + overloads requiring no conversion at all to overloads that require + conversion of at least one argument. + +.. versionadded:: 2.6 + + The ``py::prepend()`` tag. + +Binding functions with template parameters +========================================== + +You can bind functions that have template parameters. Here's a function: + +.. code-block:: cpp + + template + void set(T t); + +C++ templates cannot be instantiated at runtime, so you cannot bind the +non-instantiated function: + +.. code-block:: cpp + + // BROKEN (this will not compile) + m.def("set", &set); + +You must bind each instantiated function template separately. You may bind +each instantiation with the same name, which will be treated the same as +an overloaded function: + +.. code-block:: cpp + + m.def("set", &set); + m.def("set", &set); + +Sometimes it's more clear to bind them with separate names, which is also +an option: + +.. code-block:: cpp + + m.def("setInt", &set); + m.def("setString", &set); diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/misc.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/misc.rst new file mode 100644 index 0000000000000000000000000000000000000000..ddd7f3937044d9dc23a7c69044c3ad8f06e20fcd --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/misc.rst @@ -0,0 +1,429 @@ +Miscellaneous +############# + +.. _macro_notes: + +General notes regarding convenience macros +========================================== + +pybind11 provides a few convenience macros such as +:func:`PYBIND11_DECLARE_HOLDER_TYPE` and ``PYBIND11_OVERRIDE_*``. Since these +are "just" macros that are evaluated in the preprocessor (which has no concept +of types), they *will* get confused by commas in a template argument; for +example, consider: + +.. code-block:: cpp + + PYBIND11_OVERRIDE(MyReturnType, Class, func) + +The limitation of the C preprocessor interprets this as five arguments (with new +arguments beginning after each comma) rather than three. To get around this, +there are two alternatives: you can use a type alias, or you can wrap the type +using the ``PYBIND11_TYPE`` macro: + +.. code-block:: cpp + + // Version 1: using a type alias + using ReturnType = MyReturnType; + using ClassType = Class; + PYBIND11_OVERRIDE(ReturnType, ClassType, func); + + // Version 2: using the PYBIND11_TYPE macro: + PYBIND11_OVERRIDE(PYBIND11_TYPE(MyReturnType), + PYBIND11_TYPE(Class), func) + +The ``PYBIND11_MAKE_OPAQUE`` macro does *not* require the above workarounds. + +.. _gil: + +Global Interpreter Lock (GIL) +============================= + +The Python C API dictates that the Global Interpreter Lock (GIL) must always +be held by the current thread to safely access Python objects. As a result, +when Python calls into C++ via pybind11 the GIL must be held, and pybind11 +will never implicitly release the GIL. + +.. code-block:: cpp + + void my_function() { + /* GIL is held when this function is called from Python */ + } + + PYBIND11_MODULE(example, m) { + m.def("my_function", &my_function); + } + +pybind11 will ensure that the GIL is held when it knows that it is calling +Python code. For example, if a Python callback is passed to C++ code via +``std::function``, when C++ code calls the function the built-in wrapper +will acquire the GIL before calling the Python callback. Similarly, the +``PYBIND11_OVERRIDE`` family of macros will acquire the GIL before calling +back into Python. + +When writing C++ code that is called from other C++ code, if that code accesses +Python state, it must explicitly acquire and release the GIL. + +The classes :class:`gil_scoped_release` and :class:`gil_scoped_acquire` can be +used to acquire and release the global interpreter lock in the body of a C++ +function call. In this way, long-running C++ code can be parallelized using +multiple Python threads, **but great care must be taken** when any +:class:`gil_scoped_release` appear: if there is any way that the C++ code +can access Python objects, :class:`gil_scoped_acquire` should be used to +reacquire the GIL. Taking :ref:`overriding_virtuals` as an example, this +could be realized as follows (important changes highlighted): + +.. code-block:: cpp + :emphasize-lines: 8,30,31 + + class PyAnimal : public Animal { + public: + /* Inherit the constructors */ + using Animal::Animal; + + /* Trampoline (need one for each virtual function) */ + std::string go(int n_times) { + /* PYBIND11_OVERRIDE_PURE will acquire the GIL before accessing Python state */ + PYBIND11_OVERRIDE_PURE( + std::string, /* Return type */ + Animal, /* Parent class */ + go, /* Name of function */ + n_times /* Argument(s) */ + ); + } + }; + + PYBIND11_MODULE(example, m) { + py::class_ animal(m, "Animal"); + animal + .def(py::init<>()) + .def("go", &Animal::go); + + py::class_(m, "Dog", animal) + .def(py::init<>()); + + m.def("call_go", [](Animal *animal) -> std::string { + // GIL is held when called from Python code. Release GIL before + // calling into (potentially long-running) C++ code + py::gil_scoped_release release; + return call_go(animal); + }); + } + +The ``call_go`` wrapper can also be simplified using the ``call_guard`` policy +(see :ref:`call_policies`) which yields the same result: + +.. code-block:: cpp + + m.def("call_go", &call_go, py::call_guard()); + + +Common Sources Of Global Interpreter Lock Errors +================================================================== + +Failing to properly hold the Global Interpreter Lock (GIL) is one of the +more common sources of bugs within code that uses pybind11. If you are +running into GIL related errors, we highly recommend you consult the +following checklist. + +- Do you have any global variables that are pybind11 objects or invoke + pybind11 functions in either their constructor or destructor? You are generally + not allowed to invoke any Python function in a global static context. We recommend + using lazy initialization and then intentionally leaking at the end of the program. + +- Do you have any pybind11 objects that are members of other C++ structures? One + commonly overlooked requirement is that pybind11 objects have to increase their reference count + whenever their copy constructor is called. Thus, you need to be holding the GIL to invoke + the copy constructor of any C++ class that has a pybind11 member. This can sometimes be very + tricky to track for complicated programs Think carefully when you make a pybind11 object + a member in another struct. + +- C++ destructors that invoke Python functions can be particularly troublesome as + destructors can sometimes get invoked in weird and unexpected circumstances as a result + of exceptions. + +- You should try running your code in a debug build. That will enable additional assertions + within pybind11 that will throw exceptions on certain GIL handling errors + (reference counting operations). + +Binding sequence data types, iterators, the slicing protocol, etc. +================================================================== + +Please refer to the supplemental example for details. + +.. seealso:: + + The file :file:`tests/test_sequences_and_iterators.cpp` contains a + complete example that shows how to bind a sequence data type, including + length queries (``__len__``), iterators (``__iter__``), the slicing + protocol and other kinds of useful operations. + + +Partitioning code over multiple extension modules +================================================= + +It's straightforward to split binding code over multiple extension modules, +while referencing types that are declared elsewhere. Everything "just" works +without any special precautions. One exception to this rule occurs when +extending a type declared in another extension module. Recall the basic example +from Section :ref:`inheritance`. + +.. code-block:: cpp + + py::class_ pet(m, "Pet"); + pet.def(py::init()) + .def_readwrite("name", &Pet::name); + + py::class_(m, "Dog", pet /* <- specify parent */) + .def(py::init()) + .def("bark", &Dog::bark); + +Suppose now that ``Pet`` bindings are defined in a module named ``basic``, +whereas the ``Dog`` bindings are defined somewhere else. The challenge is of +course that the variable ``pet`` is not available anymore though it is needed +to indicate the inheritance relationship to the constructor of ``class_``. +However, it can be acquired as follows: + +.. code-block:: cpp + + py::object pet = (py::object) py::module_::import("basic").attr("Pet"); + + py::class_(m, "Dog", pet) + .def(py::init()) + .def("bark", &Dog::bark); + +Alternatively, you can specify the base class as a template parameter option to +``class_``, which performs an automated lookup of the corresponding Python +type. Like the above code, however, this also requires invoking the ``import`` +function once to ensure that the pybind11 binding code of the module ``basic`` +has been executed: + +.. code-block:: cpp + + py::module_::import("basic"); + + py::class_(m, "Dog") + .def(py::init()) + .def("bark", &Dog::bark); + +Naturally, both methods will fail when there are cyclic dependencies. + +Note that pybind11 code compiled with hidden-by-default symbol visibility (e.g. +via the command line flag ``-fvisibility=hidden`` on GCC/Clang), which is +required for proper pybind11 functionality, can interfere with the ability to +access types defined in another extension module. Working around this requires +manually exporting types that are accessed by multiple extension modules; +pybind11 provides a macro to do just this: + +.. code-block:: cpp + + class PYBIND11_EXPORT Dog : public Animal { + ... + }; + +Note also that it is possible (although would rarely be required) to share arbitrary +C++ objects between extension modules at runtime. Internal library data is shared +between modules using capsule machinery [#f6]_ which can be also utilized for +storing, modifying and accessing user-defined data. Note that an extension module +will "see" other extensions' data if and only if they were built with the same +pybind11 version. Consider the following example: + +.. code-block:: cpp + + auto data = reinterpret_cast(py::get_shared_data("mydata")); + if (!data) + data = static_cast(py::set_shared_data("mydata", new MyData(42))); + +If the above snippet was used in several separately compiled extension modules, +the first one to be imported would create a ``MyData`` instance and associate +a ``"mydata"`` key with a pointer to it. Extensions that are imported later +would be then able to access the data behind the same pointer. + +.. [#f6] https://docs.python.org/3/extending/extending.html#using-capsules + +Module Destructors +================== + +pybind11 does not provide an explicit mechanism to invoke cleanup code at +module destruction time. In rare cases where such functionality is required, it +is possible to emulate it using Python capsules or weak references with a +destruction callback. + +.. code-block:: cpp + + auto cleanup_callback = []() { + // perform cleanup here -- this function is called with the GIL held + }; + + m.add_object("_cleanup", py::capsule(cleanup_callback)); + +This approach has the potential downside that instances of classes exposed +within the module may still be alive when the cleanup callback is invoked +(whether this is acceptable will generally depend on the application). + +Alternatively, the capsule may also be stashed within a type object, which +ensures that it not called before all instances of that type have been +collected: + +.. code-block:: cpp + + auto cleanup_callback = []() { /* ... */ }; + m.attr("BaseClass").attr("_cleanup") = py::capsule(cleanup_callback); + +Both approaches also expose a potentially dangerous ``_cleanup`` attribute in +Python, which may be undesirable from an API standpoint (a premature explicit +call from Python might lead to undefined behavior). Yet another approach that +avoids this issue involves weak reference with a cleanup callback: + +.. code-block:: cpp + + // Register a callback function that is invoked when the BaseClass object is collected + py::cpp_function cleanup_callback( + [](py::handle weakref) { + // perform cleanup here -- this function is called with the GIL held + + weakref.dec_ref(); // release weak reference + } + ); + + // Create a weak reference with a cleanup callback and initially leak it + (void) py::weakref(m.attr("BaseClass"), cleanup_callback).release(); + +.. note:: + + PyPy does not garbage collect objects when the interpreter exits. An alternative + approach (which also works on CPython) is to use the :py:mod:`atexit` module [#f7]_, + for example: + + .. code-block:: cpp + + auto atexit = py::module_::import("atexit"); + atexit.attr("register")(py::cpp_function([]() { + // perform cleanup here -- this function is called with the GIL held + })); + + .. [#f7] https://docs.python.org/3/library/atexit.html + + +Generating documentation using Sphinx +===================================== + +Sphinx [#f4]_ has the ability to inspect the signatures and documentation +strings in pybind11-based extension modules to automatically generate beautiful +documentation in a variety formats. The python_example repository [#f5]_ contains a +simple example repository which uses this approach. + +There are two potential gotchas when using this approach: first, make sure that +the resulting strings do not contain any :kbd:`TAB` characters, which break the +docstring parsing routines. You may want to use C++11 raw string literals, +which are convenient for multi-line comments. Conveniently, any excess +indentation will be automatically be removed by Sphinx. However, for this to +work, it is important that all lines are indented consistently, i.e.: + +.. code-block:: cpp + + // ok + m.def("foo", &foo, R"mydelimiter( + The foo function + + Parameters + ---------- + )mydelimiter"); + + // *not ok* + m.def("foo", &foo, R"mydelimiter(The foo function + + Parameters + ---------- + )mydelimiter"); + +By default, pybind11 automatically generates and prepends a signature to the docstring of a function +registered with ``module_::def()`` and ``class_::def()``. Sometimes this +behavior is not desirable, because you want to provide your own signature or remove +the docstring completely to exclude the function from the Sphinx documentation. +The class ``options`` allows you to selectively suppress auto-generated signatures: + +.. code-block:: cpp + + PYBIND11_MODULE(example, m) { + py::options options; + options.disable_function_signatures(); + + m.def("add", [](int a, int b) { return a + b; }, "A function which adds two numbers"); + } + +pybind11 also appends all members of an enum to the resulting enum docstring. +This default behavior can be disabled by using the ``disable_enum_members_docstring()`` +function of the ``options`` class. + +With ``disable_user_defined_docstrings()`` all user defined docstrings of +``module_::def()``, ``class_::def()`` and ``enum_()`` are disabled, but the +function signatures and enum members are included in the docstring, unless they +are disabled separately. + +Note that changes to the settings affect only function bindings created during the +lifetime of the ``options`` instance. When it goes out of scope at the end of the module's init function, +the default settings are restored to prevent unwanted side effects. + +.. [#f4] http://www.sphinx-doc.org +.. [#f5] http://github.com/pybind/python_example + +.. _avoiding-cpp-types-in-docstrings: + +Avoiding C++ types in docstrings +================================ + +Docstrings are generated at the time of the declaration, e.g. when ``.def(...)`` is called. +At this point parameter and return types should be known to pybind11. +If a custom type is not exposed yet through a ``py::class_`` constructor or a custom type caster, +its C++ type name will be used instead to generate the signature in the docstring: + +.. code-block:: text + + | __init__(...) + | __init__(self: example.Foo, arg0: ns::Bar) -> None + ^^^^^^^ + + +This limitation can be circumvented by ensuring that C++ classes are registered with pybind11 +before they are used as a parameter or return type of a function: + +.. code-block:: cpp + + PYBIND11_MODULE(example, m) { + + auto pyFoo = py::class_(m, "Foo"); + auto pyBar = py::class_(m, "Bar"); + + pyFoo.def(py::init()); + pyBar.def(py::init()); + } + +Setting inner type hints in docstrings +====================================== + +When you use pybind11 wrappers for ``list``, ``dict``, and other generic python +types, the docstring will just display the generic type. You can convey the +inner types in the docstring by using a special 'typed' version of the generic +type. + +.. code-block:: cpp + + PYBIND11_MODULE(example, m) { + m.def("pass_list_of_str", [](py::typing::List arg) { + // arg can be used just like py::list + )); + } + +The resulting docstring will be ``pass_list_of_str(arg0: list[str]) -> None``. + +The following special types are available in ``pybind11/typing.h``: + +* ``py::Tuple`` +* ``py::Dict`` +* ``py::List`` +* ``py::Set`` +* ``py::Callable`` + +.. warning:: Just like in python, these are merely hints. They don't actually + enforce the types of their contents at runtime or compile time. diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/index.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..6885bdcff1b56bbab5605873ccb1e0676864bb03 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/index.rst @@ -0,0 +1,13 @@ +Python C++ interface +#################### + +pybind11 exposes Python types and functions using thin C++ wrappers, which +makes it possible to conveniently call Python code from C++ without resorting +to Python's C API. + +.. toctree:: + :maxdepth: 2 + + object + numpy + utilities diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/numpy.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/numpy.rst new file mode 100644 index 0000000000000000000000000000000000000000..07c969305d23accc63109adab4367ec016b93a75 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/numpy.rst @@ -0,0 +1,455 @@ +.. _numpy: + +NumPy +##### + +Buffer protocol +=============== + +Python supports an extremely general and convenient approach for exchanging +data between plugin libraries. Types can expose a buffer view [#f2]_, which +provides fast direct access to the raw internal data representation. Suppose we +want to bind the following simplistic Matrix class: + +.. code-block:: cpp + + class Matrix { + public: + Matrix(size_t rows, size_t cols) : m_rows(rows), m_cols(cols) { + m_data = new float[rows*cols]; + } + float *data() { return m_data; } + size_t rows() const { return m_rows; } + size_t cols() const { return m_cols; } + private: + size_t m_rows, m_cols; + float *m_data; + }; + +The following binding code exposes the ``Matrix`` contents as a buffer object, +making it possible to cast Matrices into NumPy arrays. It is even possible to +completely avoid copy operations with Python expressions like +``np.array(matrix_instance, copy = False)``. + +.. code-block:: cpp + + py::class_(m, "Matrix", py::buffer_protocol()) + .def_buffer([](Matrix &m) -> py::buffer_info { + return py::buffer_info( + m.data(), /* Pointer to buffer */ + sizeof(float), /* Size of one scalar */ + py::format_descriptor::format(), /* Python struct-style format descriptor */ + 2, /* Number of dimensions */ + { m.rows(), m.cols() }, /* Buffer dimensions */ + { sizeof(float) * m.cols(), /* Strides (in bytes) for each index */ + sizeof(float) } + ); + }); + +Supporting the buffer protocol in a new type involves specifying the special +``py::buffer_protocol()`` tag in the ``py::class_`` constructor and calling the +``def_buffer()`` method with a lambda function that creates a +``py::buffer_info`` description record on demand describing a given matrix +instance. The contents of ``py::buffer_info`` mirror the Python buffer protocol +specification. + +.. code-block:: cpp + + struct buffer_info { + void *ptr; + py::ssize_t itemsize; + std::string format; + py::ssize_t ndim; + std::vector shape; + std::vector strides; + }; + +To create a C++ function that can take a Python buffer object as an argument, +simply use the type ``py::buffer`` as one of its arguments. Buffers can exist +in a great variety of configurations, hence some safety checks are usually +necessary in the function body. Below, you can see a basic example on how to +define a custom constructor for the Eigen double precision matrix +(``Eigen::MatrixXd``) type, which supports initialization from compatible +buffer objects (e.g. a NumPy matrix). + +.. code-block:: cpp + + /* Bind MatrixXd (or some other Eigen type) to Python */ + typedef Eigen::MatrixXd Matrix; + + typedef Matrix::Scalar Scalar; + constexpr bool rowMajor = Matrix::Flags & Eigen::RowMajorBit; + + py::class_(m, "Matrix", py::buffer_protocol()) + .def(py::init([](py::buffer b) { + typedef Eigen::Stride Strides; + + /* Request a buffer descriptor from Python */ + py::buffer_info info = b.request(); + + /* Some basic validation checks ... */ + if (info.format != py::format_descriptor::format()) + throw std::runtime_error("Incompatible format: expected a double array!"); + + if (info.ndim != 2) + throw std::runtime_error("Incompatible buffer dimension!"); + + auto strides = Strides( + info.strides[rowMajor ? 0 : 1] / (py::ssize_t)sizeof(Scalar), + info.strides[rowMajor ? 1 : 0] / (py::ssize_t)sizeof(Scalar)); + + auto map = Eigen::Map( + static_cast(info.ptr), info.shape[0], info.shape[1], strides); + + return Matrix(map); + })); + +For reference, the ``def_buffer()`` call for this Eigen data type should look +as follows: + +.. code-block:: cpp + + .def_buffer([](Matrix &m) -> py::buffer_info { + return py::buffer_info( + m.data(), /* Pointer to buffer */ + sizeof(Scalar), /* Size of one scalar */ + py::format_descriptor::format(), /* Python struct-style format descriptor */ + 2, /* Number of dimensions */ + { m.rows(), m.cols() }, /* Buffer dimensions */ + { sizeof(Scalar) * (rowMajor ? m.cols() : 1), + sizeof(Scalar) * (rowMajor ? 1 : m.rows()) } + /* Strides (in bytes) for each index */ + ); + }) + +For a much easier approach of binding Eigen types (although with some +limitations), refer to the section on :doc:`/advanced/cast/eigen`. + +.. seealso:: + + The file :file:`tests/test_buffers.cpp` contains a complete example + that demonstrates using the buffer protocol with pybind11 in more detail. + +.. [#f2] http://docs.python.org/3/c-api/buffer.html + +Arrays +====== + +By exchanging ``py::buffer`` with ``py::array`` in the above snippet, we can +restrict the function so that it only accepts NumPy arrays (rather than any +type of Python object satisfying the buffer protocol). + +In many situations, we want to define a function which only accepts a NumPy +array of a certain data type. This is possible via the ``py::array_t`` +template. For instance, the following function requires the argument to be a +NumPy array containing double precision values. + +.. code-block:: cpp + + void f(py::array_t array); + +When it is invoked with a different type (e.g. an integer or a list of +integers), the binding code will attempt to cast the input into a NumPy array +of the requested type. This feature requires the :file:`pybind11/numpy.h` +header to be included. Note that :file:`pybind11/numpy.h` does not depend on +the NumPy headers, and thus can be used without declaring a build-time +dependency on NumPy; NumPy>=1.7.0 is a runtime dependency. + +Data in NumPy arrays is not guaranteed to packed in a dense manner; +furthermore, entries can be separated by arbitrary column and row strides. +Sometimes, it can be useful to require a function to only accept dense arrays +using either the C (row-major) or Fortran (column-major) ordering. This can be +accomplished via a second template argument with values ``py::array::c_style`` +or ``py::array::f_style``. + +.. code-block:: cpp + + void f(py::array_t array); + +The ``py::array::forcecast`` argument is the default value of the second +template parameter, and it ensures that non-conforming arguments are converted +into an array satisfying the specified requirements instead of trying the next +function overload. + +There are several methods on arrays; the methods listed below under references +work, as well as the following functions based on the NumPy API: + +- ``.dtype()`` returns the type of the contained values. + +- ``.strides()`` returns a pointer to the strides of the array (optionally pass + an integer axis to get a number). + +- ``.flags()`` returns the flag settings. ``.writable()`` and ``.owndata()`` + are directly available. + +- ``.offset_at()`` returns the offset (optionally pass indices). + +- ``.squeeze()`` returns a view with length-1 axes removed. + +- ``.view(dtype)`` returns a view of the array with a different dtype. + +- ``.reshape({i, j, ...})`` returns a view of the array with a different shape. + ``.resize({...})`` is also available. + +- ``.index_at(i, j, ...)`` gets the count from the beginning to a given index. + + +There are also several methods for getting references (described below). + +Structured types +================ + +In order for ``py::array_t`` to work with structured (record) types, we first +need to register the memory layout of the type. This can be done via +``PYBIND11_NUMPY_DTYPE`` macro, called in the plugin definition code, which +expects the type followed by field names: + +.. code-block:: cpp + + struct A { + int x; + double y; + }; + + struct B { + int z; + A a; + }; + + // ... + PYBIND11_MODULE(test, m) { + // ... + + PYBIND11_NUMPY_DTYPE(A, x, y); + PYBIND11_NUMPY_DTYPE(B, z, a); + /* now both A and B can be used as template arguments to py::array_t */ + } + +The structure should consist of fundamental arithmetic types, ``std::complex``, +previously registered substructures, and arrays of any of the above. Both C++ +arrays and ``std::array`` are supported. While there is a static assertion to +prevent many types of unsupported structures, it is still the user's +responsibility to use only "plain" structures that can be safely manipulated as +raw memory without violating invariants. + +Vectorizing functions +===================== + +Suppose we want to bind a function with the following signature to Python so +that it can process arbitrary NumPy array arguments (vectors, matrices, general +N-D arrays) in addition to its normal arguments: + +.. code-block:: cpp + + double my_func(int x, float y, double z); + +After including the ``pybind11/numpy.h`` header, this is extremely simple: + +.. code-block:: cpp + + m.def("vectorized_func", py::vectorize(my_func)); + +Invoking the function like below causes 4 calls to be made to ``my_func`` with +each of the array elements. The significant advantage of this compared to +solutions like ``numpy.vectorize()`` is that the loop over the elements runs +entirely on the C++ side and can be crunched down into a tight, optimized loop +by the compiler. The result is returned as a NumPy array of type +``numpy.dtype.float64``. + +.. code-block:: pycon + + >>> x = np.array([[1, 3], [5, 7]]) + >>> y = np.array([[2, 4], [6, 8]]) + >>> z = 3 + >>> result = vectorized_func(x, y, z) + +The scalar argument ``z`` is transparently replicated 4 times. The input +arrays ``x`` and ``y`` are automatically converted into the right types (they +are of type ``numpy.dtype.int64`` but need to be ``numpy.dtype.int32`` and +``numpy.dtype.float32``, respectively). + +.. note:: + + Only arithmetic, complex, and POD types passed by value or by ``const &`` + reference are vectorized; all other arguments are passed through as-is. + Functions taking rvalue reference arguments cannot be vectorized. + +In cases where the computation is too complicated to be reduced to +``vectorize``, it will be necessary to create and access the buffer contents +manually. The following snippet contains a complete example that shows how this +works (the code is somewhat contrived, since it could have been done more +simply using ``vectorize``). + +.. code-block:: cpp + + #include + #include + + namespace py = pybind11; + + py::array_t add_arrays(py::array_t input1, py::array_t input2) { + py::buffer_info buf1 = input1.request(), buf2 = input2.request(); + + if (buf1.ndim != 1 || buf2.ndim != 1) + throw std::runtime_error("Number of dimensions must be one"); + + if (buf1.size != buf2.size) + throw std::runtime_error("Input shapes must match"); + + /* No pointer is passed, so NumPy will allocate the buffer */ + auto result = py::array_t(buf1.size); + + py::buffer_info buf3 = result.request(); + + double *ptr1 = static_cast(buf1.ptr); + double *ptr2 = static_cast(buf2.ptr); + double *ptr3 = static_cast(buf3.ptr); + + for (size_t idx = 0; idx < buf1.shape[0]; idx++) + ptr3[idx] = ptr1[idx] + ptr2[idx]; + + return result; + } + + PYBIND11_MODULE(test, m) { + m.def("add_arrays", &add_arrays, "Add two NumPy arrays"); + } + +.. seealso:: + + The file :file:`tests/test_numpy_vectorize.cpp` contains a complete + example that demonstrates using :func:`vectorize` in more detail. + +Direct access +============= + +For performance reasons, particularly when dealing with very large arrays, it +is often desirable to directly access array elements without internal checking +of dimensions and bounds on every access when indices are known to be already +valid. To avoid such checks, the ``array`` class and ``array_t`` template +class offer an unchecked proxy object that can be used for this unchecked +access through the ``unchecked`` and ``mutable_unchecked`` methods, +where ``N`` gives the required dimensionality of the array: + +.. code-block:: cpp + + m.def("sum_3d", [](py::array_t x) { + auto r = x.unchecked<3>(); // x must have ndim = 3; can be non-writeable + double sum = 0; + for (py::ssize_t i = 0; i < r.shape(0); i++) + for (py::ssize_t j = 0; j < r.shape(1); j++) + for (py::ssize_t k = 0; k < r.shape(2); k++) + sum += r(i, j, k); + return sum; + }); + m.def("increment_3d", [](py::array_t x) { + auto r = x.mutable_unchecked<3>(); // Will throw if ndim != 3 or flags.writeable is false + for (py::ssize_t i = 0; i < r.shape(0); i++) + for (py::ssize_t j = 0; j < r.shape(1); j++) + for (py::ssize_t k = 0; k < r.shape(2); k++) + r(i, j, k) += 1.0; + }, py::arg().noconvert()); + +To obtain the proxy from an ``array`` object, you must specify both the data +type and number of dimensions as template arguments, such as ``auto r = +myarray.mutable_unchecked()``. + +If the number of dimensions is not known at compile time, you can omit the +dimensions template parameter (i.e. calling ``arr_t.unchecked()`` or +``arr.unchecked()``. This will give you a proxy object that works in the +same way, but results in less optimizable code and thus a small efficiency +loss in tight loops. + +Note that the returned proxy object directly references the array's data, and +only reads its shape, strides, and writeable flag when constructed. You must +take care to ensure that the referenced array is not destroyed or reshaped for +the duration of the returned object, typically by limiting the scope of the +returned instance. + +The returned proxy object supports some of the same methods as ``py::array`` so +that it can be used as a drop-in replacement for some existing, index-checked +uses of ``py::array``: + +- ``.ndim()`` returns the number of dimensions + +- ``.data(1, 2, ...)`` and ``r.mutable_data(1, 2, ...)``` returns a pointer to + the ``const T`` or ``T`` data, respectively, at the given indices. The + latter is only available to proxies obtained via ``a.mutable_unchecked()``. + +- ``.itemsize()`` returns the size of an item in bytes, i.e. ``sizeof(T)``. + +- ``.ndim()`` returns the number of dimensions. + +- ``.shape(n)`` returns the size of dimension ``n`` + +- ``.size()`` returns the total number of elements (i.e. the product of the shapes). + +- ``.nbytes()`` returns the number of bytes used by the referenced elements + (i.e. ``itemsize()`` times ``size()``). + +.. seealso:: + + The file :file:`tests/test_numpy_array.cpp` contains additional examples + demonstrating the use of this feature. + +Ellipsis +======== + +Python provides a convenient ``...`` ellipsis notation that is often used to +slice multidimensional arrays. For instance, the following snippet extracts the +middle dimensions of a tensor with the first and last index set to zero. + +.. code-block:: python + + a = ... # a NumPy array + b = a[0, ..., 0] + +The function ``py::ellipsis()`` function can be used to perform the same +operation on the C++ side: + +.. code-block:: cpp + + py::array a = /* A NumPy array */; + py::array b = a[py::make_tuple(0, py::ellipsis(), 0)]; + + +Memory view +=========== + +For a case when we simply want to provide a direct accessor to C/C++ buffer +without a concrete class object, we can return a ``memoryview`` object. Suppose +we wish to expose a ``memoryview`` for 2x4 uint8_t array, we can do the +following: + +.. code-block:: cpp + + const uint8_t buffer[] = { + 0, 1, 2, 3, + 4, 5, 6, 7 + }; + m.def("get_memoryview2d", []() { + return py::memoryview::from_buffer( + buffer, // buffer pointer + { 2, 4 }, // shape (rows, cols) + { sizeof(uint8_t) * 4, sizeof(uint8_t) } // strides in bytes + ); + }); + +This approach is meant for providing a ``memoryview`` for a C/C++ buffer not +managed by Python. The user is responsible for managing the lifetime of the +buffer. Using a ``memoryview`` created in this way after deleting the buffer in +C++ side results in undefined behavior. + +We can also use ``memoryview::from_memory`` for a simple 1D contiguous buffer: + +.. code-block:: cpp + + m.def("get_memoryview1d", []() { + return py::memoryview::from_memory( + buffer, // buffer pointer + sizeof(uint8_t) * 8 // buffer size + ); + }); + +.. versionchanged:: 2.6 + ``memoryview::from_memory`` added. diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/object.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/object.rst new file mode 100644 index 0000000000000000000000000000000000000000..93e1a94d8fbb987d15558d71c919fa1b3d033345 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/object.rst @@ -0,0 +1,286 @@ +Python types +############ + +.. _wrappers: + +Available wrappers +================== + +All major Python types are available as thin C++ wrapper classes. These +can also be used as function parameters -- see :ref:`python_objects_as_args`. + +Available types include :class:`handle`, :class:`object`, :class:`bool_`, +:class:`int_`, :class:`float_`, :class:`str`, :class:`bytes`, :class:`tuple`, +:class:`list`, :class:`dict`, :class:`slice`, :class:`none`, :class:`capsule`, +:class:`iterable`, :class:`iterator`, :class:`function`, :class:`buffer`, +:class:`array`, and :class:`array_t`. + +.. warning:: + + Be sure to review the :ref:`pytypes_gotchas` before using this heavily in + your C++ API. + +.. _instantiating_compound_types: + +Instantiating compound Python types from C++ +============================================ + +Dictionaries can be initialized in the :class:`dict` constructor: + +.. code-block:: cpp + + using namespace pybind11::literals; // to bring in the `_a` literal + py::dict d("spam"_a=py::none(), "eggs"_a=42); + +A tuple of python objects can be instantiated using :func:`py::make_tuple`: + +.. code-block:: cpp + + py::tuple tup = py::make_tuple(42, py::none(), "spam"); + +Each element is converted to a supported Python type. + +A `simple namespace`_ can be instantiated using + +.. code-block:: cpp + + using namespace pybind11::literals; // to bring in the `_a` literal + py::object SimpleNamespace = py::module_::import("types").attr("SimpleNamespace"); + py::object ns = SimpleNamespace("spam"_a=py::none(), "eggs"_a=42); + +Attributes on a namespace can be modified with the :func:`py::delattr`, +:func:`py::getattr`, and :func:`py::setattr` functions. Simple namespaces can +be useful as lightweight stand-ins for class instances. + +.. _simple namespace: https://docs.python.org/3/library/types.html#types.SimpleNamespace + +.. _casting_back_and_forth: + +Casting back and forth +====================== + +In this kind of mixed code, it is often necessary to convert arbitrary C++ +types to Python, which can be done using :func:`py::cast`: + +.. code-block:: cpp + + MyClass *cls = ...; + py::object obj = py::cast(cls); + +The reverse direction uses the following syntax: + +.. code-block:: cpp + + py::object obj = ...; + MyClass *cls = obj.cast(); + +When conversion fails, both directions throw the exception :class:`cast_error`. + +.. _python_libs: + +Accessing Python libraries from C++ +=================================== + +It is also possible to import objects defined in the Python standard +library or available in the current Python environment (``sys.path``) and work +with these in C++. + +This example obtains a reference to the Python ``Decimal`` class. + +.. code-block:: cpp + + // Equivalent to "from decimal import Decimal" + py::object Decimal = py::module_::import("decimal").attr("Decimal"); + +.. code-block:: cpp + + // Try to import scipy + py::object scipy = py::module_::import("scipy"); + return scipy.attr("__version__"); + + +.. _calling_python_functions: + +Calling Python functions +======================== + +It is also possible to call Python classes, functions and methods +via ``operator()``. + +.. code-block:: cpp + + // Construct a Python object of class Decimal + py::object pi = Decimal("3.14159"); + +.. code-block:: cpp + + // Use Python to make our directories + py::object os = py::module_::import("os"); + py::object makedirs = os.attr("makedirs"); + makedirs("/tmp/path/to/somewhere"); + +One can convert the result obtained from Python to a pure C++ version +if a ``py::class_`` or type conversion is defined. + +.. code-block:: cpp + + py::function f = <...>; + py::object result_py = f(1234, "hello", some_instance); + MyClass &result = result_py.cast(); + +.. _calling_python_methods: + +Calling Python methods +======================== + +To call an object's method, one can again use ``.attr`` to obtain access to the +Python method. + +.. code-block:: cpp + + // Calculate e^π in decimal + py::object exp_pi = pi.attr("exp")(); + py::print(py::str(exp_pi)); + +In the example above ``pi.attr("exp")`` is a *bound method*: it will always call +the method for that same instance of the class. Alternately one can create an +*unbound method* via the Python class (instead of instance) and pass the ``self`` +object explicitly, followed by other arguments. + +.. code-block:: cpp + + py::object decimal_exp = Decimal.attr("exp"); + + // Compute the e^n for n=0..4 + for (int n = 0; n < 5; n++) { + py::print(decimal_exp(Decimal(n)); + } + +Keyword arguments +================= + +Keyword arguments are also supported. In Python, there is the usual call syntax: + +.. code-block:: python + + def f(number, say, to): + ... # function code + + + f(1234, say="hello", to=some_instance) # keyword call in Python + +In C++, the same call can be made using: + +.. code-block:: cpp + + using namespace pybind11::literals; // to bring in the `_a` literal + f(1234, "say"_a="hello", "to"_a=some_instance); // keyword call in C++ + +Unpacking arguments +=================== + +Unpacking of ``*args`` and ``**kwargs`` is also possible and can be mixed with +other arguments: + +.. code-block:: cpp + + // * unpacking + py::tuple args = py::make_tuple(1234, "hello", some_instance); + f(*args); + + // ** unpacking + py::dict kwargs = py::dict("number"_a=1234, "say"_a="hello", "to"_a=some_instance); + f(**kwargs); + + // mixed keywords, * and ** unpacking + py::tuple args = py::make_tuple(1234); + py::dict kwargs = py::dict("to"_a=some_instance); + f(*args, "say"_a="hello", **kwargs); + +Generalized unpacking according to PEP448_ is also supported: + +.. code-block:: cpp + + py::dict kwargs1 = py::dict("number"_a=1234); + py::dict kwargs2 = py::dict("to"_a=some_instance); + f(**kwargs1, "say"_a="hello", **kwargs2); + +.. seealso:: + + The file :file:`tests/test_pytypes.cpp` contains a complete + example that demonstrates passing native Python types in more detail. The + file :file:`tests/test_callbacks.cpp` presents a few examples of calling + Python functions from C++, including keywords arguments and unpacking. + +.. _PEP448: https://www.python.org/dev/peps/pep-0448/ + +.. _implicit_casting: + +Implicit casting +================ + +When using the C++ interface for Python types, or calling Python functions, +objects of type :class:`object` are returned. It is possible to invoke implicit +conversions to subclasses like :class:`dict`. The same holds for the proxy objects +returned by ``operator[]`` or ``obj.attr()``. +Casting to subtypes improves code readability and allows values to be passed to +C++ functions that require a specific subtype rather than a generic :class:`object`. + +.. code-block:: cpp + + #include + using namespace pybind11::literals; + + py::module_ os = py::module_::import("os"); + py::module_ path = py::module_::import("os.path"); // like 'import os.path as path' + py::module_ np = py::module_::import("numpy"); // like 'import numpy as np' + + py::str curdir_abs = path.attr("abspath")(path.attr("curdir")); + py::print(py::str("Current directory: ") + curdir_abs); + py::dict environ = os.attr("environ"); + py::print(environ["HOME"]); + py::array_t arr = np.attr("ones")(3, "dtype"_a="float32"); + py::print(py::repr(arr + py::int_(1))); + +These implicit conversions are available for subclasses of :class:`object`; there +is no need to call ``obj.cast()`` explicitly as for custom classes, see +:ref:`casting_back_and_forth`. + +.. note:: + If a trivial conversion via move constructor is not possible, both implicit and + explicit casting (calling ``obj.cast()``) will attempt a "rich" conversion. + For instance, ``py::list env = os.attr("environ");`` will succeed and is + equivalent to the Python code ``env = list(os.environ)`` that produces a + list of the dict keys. + +.. TODO: Adapt text once PR #2349 has landed + +Handling exceptions +=================== + +Python exceptions from wrapper classes will be thrown as a ``py::error_already_set``. +See :ref:`Handling exceptions from Python in C++ +` for more information on handling exceptions +raised when calling C++ wrapper classes. + +.. _pytypes_gotchas: + +Gotchas +======= + +Default-Constructed Wrappers +---------------------------- + +When a wrapper type is default-constructed, it is **not** a valid Python object (i.e. it is not ``py::none()``). It is simply the same as +``PyObject*`` null pointer. To check for this, use +``static_cast(my_wrapper)``. + +Assigning py::none() to wrappers +-------------------------------- + +You may be tempted to use types like ``py::str`` and ``py::dict`` in C++ +signatures (either pure C++, or in bound signatures), and assign them default +values of ``py::none()``. However, in a best case scenario, it will fail fast +because ``None`` is not convertible to that type (e.g. ``py::dict``), or in a +worse case scenario, it will silently work but corrupt the types you want to +work with (e.g. ``py::str(py::none())`` will yield ``"None"`` in Python). diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/utilities.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/utilities.rst new file mode 100644 index 0000000000000000000000000000000000000000..af0f9cb2b0c1a96aaec43a7570ee9636056b258e --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/pycpp/utilities.rst @@ -0,0 +1,155 @@ +Utilities +######### + +Using Python's print function in C++ +==================================== + +The usual way to write output in C++ is using ``std::cout`` while in Python one +would use ``print``. Since these methods use different buffers, mixing them can +lead to output order issues. To resolve this, pybind11 modules can use the +:func:`py::print` function which writes to Python's ``sys.stdout`` for consistency. + +Python's ``print`` function is replicated in the C++ API including optional +keyword arguments ``sep``, ``end``, ``file``, ``flush``. Everything works as +expected in Python: + +.. code-block:: cpp + + py::print(1, 2.0, "three"); // 1 2.0 three + py::print(1, 2.0, "three", "sep"_a="-"); // 1-2.0-three + + auto args = py::make_tuple("unpacked", true); + py::print("->", *args, "end"_a="<-"); // -> unpacked True <- + +.. _ostream_redirect: + +Capturing standard output from ostream +====================================== + +Often, a library will use the streams ``std::cout`` and ``std::cerr`` to print, +but this does not play well with Python's standard ``sys.stdout`` and ``sys.stderr`` +redirection. Replacing a library's printing with ``py::print `` may not +be feasible. This can be fixed using a guard around the library function that +redirects output to the corresponding Python streams: + +.. code-block:: cpp + + #include + + ... + + // Add a scoped redirect for your noisy code + m.def("noisy_func", []() { + py::scoped_ostream_redirect stream( + std::cout, // std::ostream& + py::module_::import("sys").attr("stdout") // Python output + ); + call_noisy_func(); + }); + +.. warning:: + + The implementation in ``pybind11/iostream.h`` is NOT thread safe. Multiple + threads writing to a redirected ostream concurrently cause data races + and potentially buffer overflows. Therefore it is currently a requirement + that all (possibly) concurrent redirected ostream writes are protected by + a mutex. #HelpAppreciated: Work on iostream.h thread safety. For more + background see the discussions under + `PR #2982 `_ and + `PR #2995 `_. + +This method respects flushes on the output streams and will flush if needed +when the scoped guard is destroyed. This allows the output to be redirected in +real time, such as to a Jupyter notebook. The two arguments, the C++ stream and +the Python output, are optional, and default to standard output if not given. An +extra type, ``py::scoped_estream_redirect ``, is identical +except for defaulting to ``std::cerr`` and ``sys.stderr``; this can be useful with +``py::call_guard``, which allows multiple items, but uses the default constructor: + +.. code-block:: cpp + + // Alternative: Call single function using call guard + m.def("noisy_func", &call_noisy_function, + py::call_guard()); + +The redirection can also be done in Python with the addition of a context +manager, using the ``py::add_ostream_redirect() `` function: + +.. code-block:: cpp + + py::add_ostream_redirect(m, "ostream_redirect"); + +The name in Python defaults to ``ostream_redirect`` if no name is passed. This +creates the following context manager in Python: + +.. code-block:: python + + with ostream_redirect(stdout=True, stderr=True): + noisy_function() + +It defaults to redirecting both streams, though you can use the keyword +arguments to disable one of the streams if needed. + +.. note:: + + The above methods will not redirect C-level output to file descriptors, such + as ``fprintf``. For those cases, you'll need to redirect the file + descriptors either directly in C or with Python's ``os.dup2`` function + in an operating-system dependent way. + +.. _eval: + +Evaluating Python expressions from strings and files +==================================================== + +pybind11 provides the ``eval``, ``exec`` and ``eval_file`` functions to evaluate +Python expressions and statements. The following example illustrates how they +can be used. + +.. code-block:: cpp + + // At beginning of file + #include + + ... + + // Evaluate in scope of main module + py::object scope = py::module_::import("__main__").attr("__dict__"); + + // Evaluate an isolated expression + int result = py::eval("my_variable + 10", scope).cast(); + + // Evaluate a sequence of statements + py::exec( + "print('Hello')\n" + "print('world!');", + scope); + + // Evaluate the statements in an separate Python file on disk + py::eval_file("script.py", scope); + +C++11 raw string literals are also supported and quite handy for this purpose. +The only requirement is that the first statement must be on a new line following +the raw string delimiter ``R"(``, ensuring all lines have common leading indent: + +.. code-block:: cpp + + py::exec(R"( + x = get_answer() + if x == 42: + print('Hello World!') + else: + print('Bye!') + )", scope + ); + +.. note:: + + `eval` and `eval_file` accept a template parameter that describes how the + string/file should be interpreted. Possible choices include ``eval_expr`` + (isolated expression), ``eval_single_statement`` (a single statement, return + value is always ``none``), and ``eval_statements`` (sequence of statements, + return value is always ``none``). `eval` defaults to ``eval_expr``, + `eval_file` defaults to ``eval_statements`` and `exec` is just a shortcut + for ``eval``. diff --git a/third_party/CityFlow/extern/pybind11/docs/advanced/smart_ptrs.rst b/third_party/CityFlow/extern/pybind11/docs/advanced/smart_ptrs.rst new file mode 100644 index 0000000000000000000000000000000000000000..3c40ce12379b7fbe5bee0f92305bcbbd748832cd --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/advanced/smart_ptrs.rst @@ -0,0 +1,174 @@ +Smart pointers +############## + +std::unique_ptr +=============== + +Given a class ``Example`` with Python bindings, it's possible to return +instances wrapped in C++11 unique pointers, like so + +.. code-block:: cpp + + std::unique_ptr create_example() { return std::unique_ptr(new Example()); } + +.. code-block:: cpp + + m.def("create_example", &create_example); + +In other words, there is nothing special that needs to be done. While returning +unique pointers in this way is allowed, it is *illegal* to use them as function +arguments. For instance, the following function signature cannot be processed +by pybind11. + +.. code-block:: cpp + + void do_something_with_example(std::unique_ptr ex) { ... } + +The above signature would imply that Python needs to give up ownership of an +object that is passed to this function, which is generally not possible (for +instance, the object might be referenced elsewhere). + +std::shared_ptr +=============== + +The binding generator for classes, :class:`class_`, can be passed a template +type that denotes a special *holder* type that is used to manage references to +the object. If no such holder type template argument is given, the default for +a type named ``Type`` is ``std::unique_ptr``, which means that the object +is deallocated when Python's reference count goes to zero. + +It is possible to switch to other types of reference counting wrappers or smart +pointers, which is useful in codebases that rely on them. For instance, the +following snippet causes ``std::shared_ptr`` to be used instead. + +.. code-block:: cpp + + py::class_ /* <- holder type */> obj(m, "Example"); + +Note that any particular class can only be associated with a single holder type. + +One potential stumbling block when using holder types is that they need to be +applied consistently. Can you guess what's broken about the following binding +code? + +.. code-block:: cpp + + class Child { }; + + class Parent { + public: + Parent() : child(std::make_shared()) { } + Child *get_child() { return child.get(); } /* Hint: ** DON'T DO THIS ** */ + private: + std::shared_ptr child; + }; + + PYBIND11_MODULE(example, m) { + py::class_>(m, "Child"); + + py::class_>(m, "Parent") + .def(py::init<>()) + .def("get_child", &Parent::get_child); + } + +The following Python code will cause undefined behavior (and likely a +segmentation fault). + +.. code-block:: python + + from example import Parent + + print(Parent().get_child()) + +The problem is that ``Parent::get_child()`` returns a pointer to an instance of +``Child``, but the fact that this instance is already managed by +``std::shared_ptr<...>`` is lost when passing raw pointers. In this case, +pybind11 will create a second independent ``std::shared_ptr<...>`` that also +claims ownership of the pointer. In the end, the object will be freed **twice** +since these shared pointers have no way of knowing about each other. + +There are two ways to resolve this issue: + +1. For types that are managed by a smart pointer class, never use raw pointers + in function arguments or return values. In other words: always consistently + wrap pointers into their designated holder types (such as + ``std::shared_ptr<...>``). In this case, the signature of ``get_child()`` + should be modified as follows: + +.. code-block:: cpp + + std::shared_ptr get_child() { return child; } + +2. Adjust the definition of ``Child`` by specifying + ``std::enable_shared_from_this`` (see cppreference_ for details) as a + base class. This adds a small bit of information to ``Child`` that allows + pybind11 to realize that there is already an existing + ``std::shared_ptr<...>`` and communicate with it. In this case, the + declaration of ``Child`` should look as follows: + +.. _cppreference: http://en.cppreference.com/w/cpp/memory/enable_shared_from_this + +.. code-block:: cpp + + class Child : public std::enable_shared_from_this { }; + +.. _smart_pointers: + +Custom smart pointers +===================== + +pybind11 supports ``std::unique_ptr`` and ``std::shared_ptr`` right out of the +box. For any other custom smart pointer, transparent conversions can be enabled +using a macro invocation similar to the following. It must be declared at the +top namespace level before any binding code: + +.. code-block:: cpp + + PYBIND11_DECLARE_HOLDER_TYPE(T, SmartPtr); + +The first argument of :func:`PYBIND11_DECLARE_HOLDER_TYPE` should be a +placeholder name that is used as a template parameter of the second argument. +Thus, feel free to use any identifier, but use it consistently on both sides; +also, don't use the name of a type that already exists in your codebase. + +The macro also accepts a third optional boolean parameter that is set to false +by default. Specify + +.. code-block:: cpp + + PYBIND11_DECLARE_HOLDER_TYPE(T, SmartPtr, true); + +if ``SmartPtr`` can always be initialized from a ``T*`` pointer without the +risk of inconsistencies (such as multiple independent ``SmartPtr`` instances +believing that they are the sole owner of the ``T*`` pointer). A common +situation where ``true`` should be passed is when the ``T`` instances use +*intrusive* reference counting. + +Please take a look at the :ref:`macro_notes` before using this feature. + +By default, pybind11 assumes that your custom smart pointer has a standard +interface, i.e. provides a ``.get()`` member function to access the underlying +raw pointer. If this is not the case, pybind11's ``holder_helper`` must be +specialized: + +.. code-block:: cpp + + // Always needed for custom holder types + PYBIND11_DECLARE_HOLDER_TYPE(T, SmartPtr); + + // Only needed if the type's `.get()` goes by another name + namespace PYBIND11_NAMESPACE { namespace detail { + template + struct holder_helper> { // <-- specialization + static const T *get(const SmartPtr &p) { return p.getPointer(); } + }; + }} + +The above specialization informs pybind11 that the custom ``SmartPtr`` class +provides ``.get()`` functionality via ``.getPointer()``. + +.. seealso:: + + The file :file:`tests/test_smart_ptr.cpp` contains a complete example + that demonstrates how to work with custom reference-counting holder types + in more detail. diff --git a/third_party/CityFlow/extern/pybind11/docs/basics.rst b/third_party/CityFlow/extern/pybind11/docs/basics.rst new file mode 100644 index 0000000000000000000000000000000000000000..e9b24c7fa72bf51de10d991e988e12632038a3a2 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/basics.rst @@ -0,0 +1,307 @@ +.. _basics: + +First steps +########### + +This sections demonstrates the basic features of pybind11. Before getting +started, make sure that development environment is set up to compile the +included set of test cases. + + +Compiling the test cases +======================== + +Linux/macOS +----------- + +On Linux you'll need to install the **python-dev** or **python3-dev** packages as +well as **cmake**. On macOS, the included python version works out of the box, +but **cmake** must still be installed. + +After installing the prerequisites, run + +.. code-block:: bash + + mkdir build + cd build + cmake .. + make check -j 4 + +The last line will both compile and run the tests. + +Windows +------- + +On Windows, only **Visual Studio 2017** and newer are supported. + +.. Note:: + + To use the C++17 in Visual Studio 2017 (MSVC 14.1), pybind11 requires the flag + ``/permissive-`` to be passed to the compiler `to enforce standard conformance`_. When + building with Visual Studio 2019, this is not strictly necessary, but still advised. + +.. _`to enforce standard conformance`: https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=vs-2017 + +To compile and run the tests: + +.. code-block:: batch + + mkdir build + cd build + cmake .. + cmake --build . --config Release --target check + +This will create a Visual Studio project, compile and run the target, all from the +command line. + +.. Note:: + + If all tests fail, make sure that the Python binary and the testcases are compiled + for the same processor type and bitness (i.e. either **i386** or **x86_64**). You + can specify **x86_64** as the target architecture for the generated Visual Studio + project using ``cmake -A x64 ..``. + +.. seealso:: + + Advanced users who are already familiar with Boost.Python may want to skip + the tutorial and look at the test cases in the :file:`tests` directory, + which exercise all features of pybind11. + +Header and namespace conventions +================================ + +For brevity, all code examples assume that the following two lines are present: + +.. code-block:: cpp + + #include + + namespace py = pybind11; + +Some features may require additional headers, but those will be specified as needed. + +.. _simple_example: + +Creating bindings for a simple function +======================================= + +Let's start by creating Python bindings for an extremely simple function, which +adds two numbers and returns their result: + +.. code-block:: cpp + + int add(int i, int j) { + return i + j; + } + +For simplicity [#f1]_, we'll put both this function and the binding code into +a file named :file:`example.cpp` with the following contents: + +.. code-block:: cpp + + #include + + int add(int i, int j) { + return i + j; + } + + PYBIND11_MODULE(example, m) { + m.doc() = "pybind11 example plugin"; // optional module docstring + + m.def("add", &add, "A function that adds two numbers"); + } + +.. [#f1] In practice, implementation and binding code will generally be located + in separate files. + +The :func:`PYBIND11_MODULE` macro creates a function that will be called when an +``import`` statement is issued from within Python. The module name (``example``) +is given as the first macro argument (it should not be in quotes). The second +argument (``m``) defines a variable of type :class:`py::module_ ` which +is the main interface for creating bindings. The method :func:`module_::def` +generates binding code that exposes the ``add()`` function to Python. + +.. note:: + + Notice how little code was needed to expose our function to Python: all + details regarding the function's parameters and return value were + automatically inferred using template metaprogramming. This overall + approach and the used syntax are borrowed from Boost.Python, though the + underlying implementation is very different. + +pybind11 is a header-only library, hence it is not necessary to link against +any special libraries and there are no intermediate (magic) translation steps. +On Linux, the above example can be compiled using the following command: + +.. code-block:: bash + + $ c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) example.cpp -o example$(python3-config --extension-suffix) + +.. note:: + + If you used :ref:`include_as_a_submodule` to get the pybind11 source, then + use ``$(python3-config --includes) -Iextern/pybind11/include`` instead of + ``$(python3 -m pybind11 --includes)`` in the above compilation, as + explained in :ref:`building_manually`. + +For more details on the required compiler flags on Linux and macOS, see +:ref:`building_manually`. For complete cross-platform compilation instructions, +refer to the :ref:`compiling` page. + +The `python_example`_ and `cmake_example`_ repositories are also a good place +to start. They are both complete project examples with cross-platform build +systems. The only difference between the two is that `python_example`_ uses +Python's ``setuptools`` to build the module, while `cmake_example`_ uses CMake +(which may be preferable for existing C++ projects). + +.. _python_example: https://github.com/pybind/python_example +.. _cmake_example: https://github.com/pybind/cmake_example + +Building the above C++ code will produce a binary module file that can be +imported to Python. Assuming that the compiled module is located in the +current directory, the following interactive Python session shows how to +load and execute the example: + +.. code-block:: pycon + + $ python + Python 3.9.10 (main, Jan 15 2022, 11:48:04) + [Clang 13.0.0 (clang-1300.0.29.3)] on darwin + Type "help", "copyright", "credits" or "license" for more information. + >>> import example + >>> example.add(1, 2) + 3 + >>> + +.. _keyword_args: + +Keyword arguments +================= + +With a simple code modification, it is possible to inform Python about the +names of the arguments ("i" and "j" in this case). + +.. code-block:: cpp + + m.def("add", &add, "A function which adds two numbers", + py::arg("i"), py::arg("j")); + +:class:`arg` is one of several special tag classes which can be used to pass +metadata into :func:`module_::def`. With this modified binding code, we can now +call the function using keyword arguments, which is a more readable alternative +particularly for functions taking many parameters: + +.. code-block:: pycon + + >>> import example + >>> example.add(i=1, j=2) + 3L + +The keyword names also appear in the function signatures within the documentation. + +.. code-block:: pycon + + >>> help(example) + + .... + + FUNCTIONS + add(...) + Signature : (i: int, j: int) -> int + + A function which adds two numbers + +A shorter notation for named arguments is also available: + +.. code-block:: cpp + + // regular notation + m.def("add1", &add, py::arg("i"), py::arg("j")); + // shorthand + using namespace pybind11::literals; + m.def("add2", &add, "i"_a, "j"_a); + +The :var:`_a` suffix forms a C++11 literal which is equivalent to :class:`arg`. +Note that the literal operator must first be made visible with the directive +``using namespace pybind11::literals``. This does not bring in anything else +from the ``pybind11`` namespace except for literals. + +.. _default_args: + +Default arguments +================= + +Suppose now that the function to be bound has default arguments, e.g.: + +.. code-block:: cpp + + int add(int i = 1, int j = 2) { + return i + j; + } + +Unfortunately, pybind11 cannot automatically extract these parameters, since they +are not part of the function's type information. However, they are simple to specify +using an extension of :class:`arg`: + +.. code-block:: cpp + + m.def("add", &add, "A function which adds two numbers", + py::arg("i") = 1, py::arg("j") = 2); + +The default values also appear within the documentation. + +.. code-block:: pycon + + >>> help(example) + + .... + + FUNCTIONS + add(...) + Signature : (i: int = 1, j: int = 2) -> int + + A function which adds two numbers + +The shorthand notation is also available for default arguments: + +.. code-block:: cpp + + // regular notation + m.def("add1", &add, py::arg("i") = 1, py::arg("j") = 2); + // shorthand + m.def("add2", &add, "i"_a=1, "j"_a=2); + +Exporting variables +=================== + +To expose a value from C++, use the ``attr`` function to register it in a +module as shown below. Built-in types and general objects (more on that later) +are automatically converted when assigned as attributes, and can be explicitly +converted using the function ``py::cast``. + +.. code-block:: cpp + + PYBIND11_MODULE(example, m) { + m.attr("the_answer") = 42; + py::object world = py::cast("World"); + m.attr("what") = world; + } + +These are then accessible from Python: + +.. code-block:: pycon + + >>> import example + >>> example.the_answer + 42 + >>> example.what + 'World' + +.. _supported_types: + +Supported data types +==================== + +A large number of data types are supported out of the box and can be used +seamlessly as functions arguments, return values or with ``py::cast`` in general. +For a full overview, see the :doc:`advanced/cast/index` section. diff --git a/third_party/CityFlow/extern/pybind11/docs/benchmark.py b/third_party/CityFlow/extern/pybind11/docs/benchmark.py new file mode 100644 index 0000000000000000000000000000000000000000..fb49fd04882996f0cd6838ef91edeb72d7d85b6b --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/benchmark.py @@ -0,0 +1,87 @@ +import datetime as dt +import os +import random + +nfns = 4 # Functions per class +nargs = 4 # Arguments per function + + +def generate_dummy_code_pybind11(nclasses=10): + decl = "" + bindings = "" + + for cl in range(nclasses): + decl += f"class cl{cl:03};\n" + decl += "\n" + + for cl in range(nclasses): + decl += f"class {cl:03} {{\n" + decl += "public:\n" + bindings += f' py::class_(m, "cl{cl:03}")\n' + for fn in range(nfns): + ret = random.randint(0, nclasses - 1) + params = [random.randint(0, nclasses - 1) for i in range(nargs)] + decl += f" cl{ret:03} *fn_{fn:03}(" + decl += ", ".join(f"cl{p:03} *" for p in params) + decl += ");\n" + bindings += f' .def("fn_{fn:03}", &cl{cl:03}::fn_{fn:03})\n' + decl += "};\n\n" + bindings += " ;\n" + + result = "#include \n\n" + result += "namespace py = pybind11;\n\n" + result += decl + "\n" + result += "PYBIND11_MODULE(example, m) {\n" + result += bindings + result += "}" + return result + + +def generate_dummy_code_boost(nclasses=10): + decl = "" + bindings = "" + + for cl in range(nclasses): + decl += f"class cl{cl:03};\n" + decl += "\n" + + for cl in range(nclasses): + decl += "class cl%03i {\n" % cl + decl += "public:\n" + bindings += f' py::class_("cl{cl:03}")\n' + for fn in range(nfns): + ret = random.randint(0, nclasses - 1) + params = [random.randint(0, nclasses - 1) for i in range(nargs)] + decl += f" cl{ret:03} *fn_{fn:03}(" + decl += ", ".join(f"cl{p:03} *" for p in params) + decl += ");\n" + bindings += f' .def("fn_{fn:03}", &cl{cl:03}::fn_{fn:03}, py::return_value_policy())\n' + decl += "};\n\n" + bindings += " ;\n" + + result = "#include \n\n" + result += "namespace py = boost::python;\n\n" + result += decl + "\n" + result += "BOOST_PYTHON_MODULE(example) {\n" + result += bindings + result += "}" + return result + + +for codegen in [generate_dummy_code_pybind11, generate_dummy_code_boost]: + print("{") + for i in range(10): + nclasses = 2**i + with open("test.cpp", "w") as f: + f.write(codegen(nclasses)) + n1 = dt.datetime.now() + os.system( + "g++ -Os -shared -rdynamic -undefined dynamic_lookup " + "-fvisibility=hidden -std=c++14 test.cpp -I include " + "-I /System/Library/Frameworks/Python.framework/Headers -o test.so" + ) + n2 = dt.datetime.now() + elapsed = (n2 - n1).total_seconds() + size = os.stat("test.so").st_size + print(" {%i, %f, %i}," % (nclasses * nfns, elapsed, size)) + print("}") diff --git a/third_party/CityFlow/extern/pybind11/docs/benchmark.rst b/third_party/CityFlow/extern/pybind11/docs/benchmark.rst new file mode 100644 index 0000000000000000000000000000000000000000..02c2ccde7dc00db1e57b73a7523521f9c39a5639 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/benchmark.rst @@ -0,0 +1,95 @@ +Benchmark +========= + +The following is the result of a synthetic benchmark comparing both compilation +time and module size of pybind11 against Boost.Python. A detailed report about a +Boost.Python to pybind11 conversion of a real project is available here: [#f1]_. + +.. [#f1] http://graylab.jhu.edu/RosettaCon2016/PyRosetta-4.pdf + +Setup +----- + +A python script (see the ``docs/benchmark.py`` file) was used to generate a set +of files with dummy classes whose count increases for each successive benchmark +(between 1 and 2048 classes in powers of two). Each class has four methods with +a randomly generated signature with a return value and four arguments. (There +was no particular reason for this setup other than the desire to generate many +unique function signatures whose count could be controlled in a simple way.) + +Here is an example of the binding code for one class: + +.. code-block:: cpp + + ... + class cl034 { + public: + cl279 *fn_000(cl084 *, cl057 *, cl065 *, cl042 *); + cl025 *fn_001(cl098 *, cl262 *, cl414 *, cl121 *); + cl085 *fn_002(cl445 *, cl297 *, cl145 *, cl421 *); + cl470 *fn_003(cl200 *, cl323 *, cl332 *, cl492 *); + }; + ... + + PYBIND11_MODULE(example, m) { + ... + py::class_(m, "cl034") + .def("fn_000", &cl034::fn_000) + .def("fn_001", &cl034::fn_001) + .def("fn_002", &cl034::fn_002) + .def("fn_003", &cl034::fn_003) + ... + } + +The Boost.Python version looks almost identical except that a return value +policy had to be specified as an argument to ``def()``. For both libraries, +compilation was done with + +.. code-block:: bash + + Apple LLVM version 7.0.2 (clang-700.1.81) + +and the following compilation flags + +.. code-block:: bash + + g++ -Os -shared -rdynamic -undefined dynamic_lookup -fvisibility=hidden -std=c++14 + +Compilation time +---------------- + +The following log-log plot shows how the compilation time grows for an +increasing number of class and function declarations. pybind11 includes many +fewer headers, which initially leads to shorter compilation times, but the +performance is ultimately fairly similar (pybind11 is 19.8 seconds faster for +the largest largest file with 2048 classes and a total of 8192 methods -- a +modest **1.2x** speedup relative to Boost.Python, which required 116.35 +seconds). + +.. only:: not latex + + .. image:: pybind11_vs_boost_python1.svg + +.. only:: latex + + .. image:: pybind11_vs_boost_python1.png + +Module size +----------- + +Differences between the two libraries become much more pronounced when +considering the file size of the generated Python plugin: for the largest file, +the binary generated by Boost.Python required 16.8 MiB, which was **2.17 +times** / **9.1 megabytes** larger than the output generated by pybind11. For +very small inputs, Boost.Python has an edge in the plot below -- however, note +that it stores many definitions in an external library, whose size was not +included here, hence the comparison is slightly shifted in Boost.Python's +favor. + +.. only:: not latex + + .. image:: pybind11_vs_boost_python2.svg + +.. only:: latex + + .. image:: pybind11_vs_boost_python2.png diff --git a/third_party/CityFlow/extern/pybind11/docs/changelog.rst b/third_party/CityFlow/extern/pybind11/docs/changelog.rst new file mode 100644 index 0000000000000000000000000000000000000000..d2285f237e0774e0db5a1365939a25d363cfe950 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/changelog.rst @@ -0,0 +1,3006 @@ +.. _changelog: + +Changelog +######### + +Starting with version 1.8.0, pybind11 releases use a `semantic versioning +`_ policy. + +Changes will be added here periodically from the "Suggested changelog entry" +block in pull request descriptions. + + +IN DEVELOPMENT +-------------- + +Changes will be summarized here periodically. + +Version 2.12.0 (March 27, 2025) +------------------------------- + +New Features: + +* ``pybind11`` now supports compiling for + `NumPy 2 `_. Most + code shouldn't change (see :ref:`upgrade-guide-2.12` for details). However, + if you experience issues you can define ``PYBIND11_NUMPY_1_ONLY`` to disable + the new support for now, but this will be removed in the future. + `#5050 `_ + +* ``pybind11/gil_safe_call_once.h`` was added (it needs to be included + explicitly). The primary use case is GIL-safe initialization of C++ + ``static`` variables. + `#4877 `_ + +* Support move-only iterators in ``py::make_iterator``, + ``py::make_key_iterator``, ``py::make_value_iterator``. + `#4834 `_ + +* Two simple ``py::set_error()`` functions were added and the documentation was + updated accordingly. In particular, ``py::exception<>::operator()`` was + deprecated (use one of the new functions instead). The documentation for + ``py::exception<>`` was further updated to not suggest code that may result + in undefined behavior. + `#4772 `_ + +Bug fixes: + +* Removes potential for Undefined Behavior during process teardown. + `#4897 `_ + +* Improve compatibility with the nvcc compiler (especially CUDA 12.1/12.2). + `#4893 `_ + +* ``pybind11/numpy.h`` now imports NumPy's ``multiarray`` and ``_internal`` + submodules with paths depending on the installed version of NumPy (for + compatibility with NumPy 2). + `#4857 `_ + +* Builtins collections names in docstrings are now consistently rendered in + lowercase (list, set, dict, tuple), in accordance with PEP 585. + `#4833 `_ + +* Added ``py::typing::Iterator``, ``py::typing::Iterable``. + `#4832 `_ + +* Render ``py::function`` as ``Callable`` in docstring. + `#4829 `_ + +* Also bump ``PYBIND11_INTERNALS_VERSION`` for MSVC, which unlocks two new + features without creating additional incompatibilities. + `#4819 `_ + +* Guard against crashes/corruptions caused by modules built with different MSVC + versions. + `#4779 `_ + +* A long-standing bug in the handling of Python multiple inheritance was fixed. + See PR #4762 for the rather complex details. + `#4762 `_ + +* Fix ``bind_map`` with ``using`` declarations. + `#4952 `_ + +* Qualify ``py::detail::concat`` usage to avoid ADL selecting one from + somewhere else, such as modernjson's concat. + `#4955 `_ + +* Use new PyCode API on Python 3.12+. + `#4916 `_ + +* Minor cleanup from warnings reported by Clazy. + `#4988 `_ + +* Remove typing and duplicate ``class_`` for ``KeysView``/``ValuesView``/``ItemsView``. + `#4985 `_ + +* Use ``PyObject_VisitManagedDict()`` and ``PyObject_ClearManagedDict()`` on Python 3.13 and newer. + `#4973 `_ + +* Update ``make_static_property_type()`` to make it compatible with Python 3.13. + `#4971 `_ + +.. fix(types) + +* Render typed iterators for ``make_iterator``, ``make_key_iterator``, + ``make_value_iterator``. + `#4876 `_ + +* Add several missing type name specializations. + `#5073 `_ + +* Change docstring render for ``py::buffer``, ``py::sequence`` and + ``py::handle`` (to ``Buffer``, ``Sequence``, ``Any``). + `#4831 `_ + +* Fixed ``base_enum.__str__`` docstring. + `#4827 `_ + +* Enforce single line docstring signatures. + `#4735 `_ + +* Special 'typed' wrappers now available in ``typing.h`` to annotate tuple, dict, + list, set, and function. + `#4259 `_ + +* Create ``handle_type_name`` specialization to type-hint variable length tuples. + `#5051 `_ + +.. fix(build) + +* Setting ``PYBIND11_FINDPYTHON`` to OFF will force the old FindPythonLibs mechanism to be used. + `#5042 `_ + +* Skip empty ``PYBIND11_PYTHON_EXECUTABLE_LAST`` for the first cmake run. + `#4856 `_ + +* Fix FindPython mode exports & avoid ``pkg_resources`` if + ``importlib.metadata`` available. + `#4941 `_ + +* ``Python_ADDITIONAL_VERSIONS`` (classic search) now includes 3.12. + `#4909 `_ + +* ``pybind11.pc`` is now relocatable by default as long as install destinations + are not absolute paths. + `#4830 `_ + +* Correctly detect CMake FindPython removal when used as a subdirectory. + `#4806 `_ + +* Don't require the libs component on CMake 3.18+ when using + PYBIND11_FINDPYTHON (fixes manylinux builds). + `#4805 `_ + +* ``pybind11_strip`` is no longer automatically applied when + ``CMAKE_BUILD_TYPE`` is unset. + `#4780 `_ + +* Support ``DEBUG_POSFIX`` correctly for debug builds. + `#4761 `_ + +* Hardcode lto/thin lto for Emscripten cross-compiles. + `#4642 `_ + +* Upgrade maximum supported CMake version to 3.27 to fix CMP0148 warnings. + `#4786 `_ + +Documentation: + +* Small fix to grammar in ``functions.rst``. + `#4791 `_ + +* Remove upper bound in example pyproject.toml for setuptools. + `#4774 `_ + +CI: + +* CI: Update NVHPC to 23.5 and Ubuntu 20.04. + `#4764 `_ + +* Test on PyPy 3.10. + `#4714 `_ + +Other: + +* Use Ruff formatter instead of Black. + `#4912 `_ + +* An ``assert()`` was added to help Coverty avoid generating a false positive. + `#4817 `_ + + +Version 2.11.1 (July 17, 2023) +------------------------------ + +Changes: + +* ``PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF`` is now provided as an option + for disabling the default-on ``PyGILState_Check()``'s in + ``pybind11::handle``'s ``inc_ref()`` & ``dec_ref()``. + `#4753 `_ + +* ``PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF`` was disabled for PyPy in general + (not just PyPy Windows). + `#4751 `_ + + +Version 2.11.0 (July 14, 2023) +------------------------------ + +New features: + +* The newly added ``pybind11::detail::is_move_constructible`` trait can be + specialized for cases in which ``std::is_move_constructible`` does not work + as needed. This is very similar to the long-established + ``pybind11::detail::is_copy_constructible``. + `#4631 `_ + +* Introduce ``recursive_container_traits``. + `#4623 `_ + +* ``pybind11/type_caster_pyobject_ptr.h`` was added to support automatic + wrapping of APIs that make use of ``PyObject *``. This header needs to + included explicitly (i.e. it is not included implicitly + with ``pybind/pybind11.h``). + `#4601 `_ + +* ``format_descriptor<>`` & ``npy_format_descriptor<>`` ``PyObject *`` + specializations were added. The latter enables ``py::array_t`` + to/from-python conversions. + `#4674 `_ + +* ``buffer_info`` gained an ``item_type_is_equivalent_to()`` member + function. + `#4674 `_ + +* The ``capsule`` API gained a user-friendly constructor + (``py::capsule(ptr, "name", dtor)``). + `#4720 `_ + +Changes: + +* ``PyGILState_Check()``'s in ``pybind11::handle``'s ``inc_ref()`` & + ``dec_ref()`` are now enabled by default again. + `#4246 `_ + +* ``py::initialize_interpreter()`` using ``PyConfig_InitPythonConfig()`` + instead of ``PyConfig_InitIsolatedConfig()``, to obtain complete + ``sys.path``. + `#4473 `_ + +* Cast errors now always include Python type information, even if + ``PYBIND11_DETAILED_ERROR_MESSAGES`` is not defined. This increases binary + sizes slightly (~1.5%) but the error messages are much more informative. + `#4463 `_ + +* The docstring generation for the ``std::array``-list caster was fixed. + Previously, signatures included the size of the list in a non-standard, + non-spec compliant way. The new format conforms to PEP 593. + **Tooling for processing the docstrings may need to be updated accordingly.** + `#4679 `_ + +* Setter return values (which are inaccessible for all practical purposes) are + no longer converted to Python (only to be discarded). + `#4621 `_ + +* Allow lambda specified to function definition to be ``noexcept(true)`` + in C++17. + `#4593 `_ + +* Get rid of recursive template instantiations for concatenating type + signatures on C++17 and higher. + `#4587 `_ + +* Compatibility with Python 3.12 (beta). Note that the minimum pybind11 + ABI version for Python 3.12 is version 5. (The default ABI version + for Python versions up to and including 3.11 is still version 4.). + `#4570 `_ + +* With ``PYBIND11_INTERNALS_VERSION 5`` (default for Python 3.12+), MSVC builds + use ``std::hash`` and ``std::equal_to`` + instead of string-based type comparisons. This resolves issues when binding + types defined in the unnamed namespace. + `#4319 `_ + +* Python exception ``__notes__`` (introduced with Python 3.11) are now added to + the ``error_already_set::what()`` output. + `#4678 `_ + +Build system improvements: + +* CMake 3.27 support was added, CMake 3.4 support was dropped. + FindPython will be used if ``FindPythonInterp`` is not present. + `#4719 `_ + +* Update clang-tidy to 15 in CI. + `#4387 `_ + +* Moved the linting framework over to Ruff. + `#4483 `_ + +* Skip ``lto`` checks and target generation when + ``CMAKE_INTERPROCEDURAL_OPTIMIZATION`` is defined. + `#4643 `_ + +* No longer inject ``-stdlib=libc++``, not needed for modern Pythons + (macOS 10.9+). + `#4639 `_ + +* PyPy 3.10 support was added, PyPy 3.7 support was dropped. + `#4728 `_ + +* Testing with Python 3.12 beta releases was added. + `#4713 `_ + + +Version 2.10.4 (Mar 16, 2023) +----------------------------- + +Changes: + +* ``python3 -m pybind11`` gained a ``--version`` option (prints the version and + exits). + `#4526 `_ + +Bug Fixes: + +* Fix a warning when pydebug is enabled on Python 3.11. + `#4461 `_ + +* Ensure ``gil_scoped_release`` RAII is non-copyable. + `#4490 `_ + +* Ensure the tests dir does not show up with new versions of setuptools. + `#4510 `_ + +* Better stacklevel for a warning in setuptools helpers. + `#4516 `_ + +Version 2.10.3 (Jan 3, 2023) +---------------------------- + +Changes: + +* Temporarily made our GIL status assertions (added in 2.10.2) disabled by + default (re-enable manually by defining + ``PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF``, will be enabled in 2.11). + `#4432 `_ + +* Improved error messages when ``inc_ref``/``dec_ref`` are called with an + invalid GIL state. + `#4427 `_ + `#4436 `_ + +Bug Fixes: + +* Some minor touchups found by static analyzers. + `#4440 `_ + + +Version 2.10.2 (Dec 20, 2022) +----------------------------- + +Changes: + +* ``scoped_interpreter`` constructor taking ``PyConfig``. + `#4330 `_ + +* ``pybind11/eigen/tensor.h`` adds converters to and from ``Eigen::Tensor`` and + ``Eigen::TensorMap``. + `#4201 `_ + +* ``PyGILState_Check()``'s were integrated to ``pybind11::handle`` + ``inc_ref()`` & ``dec_ref()``. The added GIL checks are guarded by + ``PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF``, which is the default only if + ``NDEBUG`` is not defined. (Made non-default in 2.10.3, will be active in 2.11) + `#4246 `_ + +* Add option for enable/disable enum members in docstring. + `#2768 `_ + +* Fixed typing of ``KeysView``, ``ValuesView`` and ``ItemsView`` in ``bind_map``. + `#4353 `_ + +Bug fixes: + +* Bug fix affecting only Python 3.6 under very specific, uncommon conditions: + move ``PyEval_InitThreads()`` call to the correct location. + `#4350 `_ + +* Fix segfault bug when passing foreign native functions to functional.h. + `#4254 `_ + +Build system improvements: + +* Support setting PYTHON_LIBRARIES manually for Windows ARM cross-compilation + (classic mode). + `#4406 `_ + +* Extend IPO/LTO detection for ICX (a.k.a IntelLLVM) compiler. + `#4402 `_ + +* Allow calling ``find_package(pybind11 CONFIG)`` multiple times from separate + directories in the same CMake project and properly link Python (new mode). + `#4401 `_ + +* ``multiprocessing_set_spawn`` in pytest fixture for added safety. + `#4377 `_ + +* Fixed a bug in two pybind11/tools cmake scripts causing "Unknown arguments specified" errors. + `#4327 `_ + + + +Version 2.10.1 (Oct 31, 2022) +----------------------------- + +This is the first version to fully support embedding the newly released Python 3.11. + +Changes: + +* Allow ``pybind11::capsule`` constructor to take null destructor pointers. + `#4221 `_ + +* ``embed.h`` was changed so that ``PYTHONPATH`` is used also with Python 3.11 + (established behavior). + `#4119 `_ + +* A ``PYBIND11_SIMPLE_GIL_MANAGEMENT`` option was added (cmake, C++ define), + along with many additional tests in ``test_gil_scoped.py``. The option may be + useful to try when debugging GIL-related issues, to determine if the more + complex default implementation is or is not to blame. See #4216 for + background. WARNING: Please be careful to not create ODR violations when + using the option: everything that is linked together with mutual symbol + visibility needs to be rebuilt. + `#4216 `_ + +* ``PYBIND11_EXPORT_EXCEPTION`` was made non-empty only under macOS. This makes + Linux builds safer, and enables the removal of warning suppression pragmas for + Windows. + `#4298 `_ + +Bug fixes: + +* Fixed a bug where ``UnicodeDecodeError`` was not propagated from various + ``py::str`` ctors when decoding surrogate utf characters. + `#4294 `_ + +* Revert perfect forwarding for ``make_iterator``. This broke at least one + valid use case. May revisit later. + `#4234 `_ + +* Fix support for safe casts to ``void*`` (regression in 2.10.0). + `#4275 `_ + +* Fix ``char8_t`` support (regression in 2.9). + `#4278 `_ + +* Unicode surrogate character in Python exception message leads to process + termination in ``error_already_set::what()``. + `#4297 `_ + +* Fix MSVC 2019 v.1924 & C++14 mode error for ``overload_cast``. + `#4188 `_ + +* Make augmented assignment operators non-const for the object-api. Behavior + was previously broken for augmented assignment operators. + `#4065 `_ + +* Add proper error checking to C++ bindings for Python list append and insert. + `#4208 `_ + +* Work-around for Nvidia's CUDA nvcc compiler in versions 11.4.0 - 11.8.0. + `#4220 `_ + +* A workaround for PyPy was added in the ``py::error_already_set`` + implementation, related to PR `#1895 `_ + released with v2.10.0. + `#4079 `_ + +* Fixed compiler errors when C++23 ``std::forward_like`` is available. + `#4136 `_ + +* Properly raise exceptions in contains methods (like when an object in unhashable). + `#4209 `_ + +* Further improve another error in exception handling. + `#4232 `_ + +* ``get_local_internals()`` was made compatible with + ``finalize_interpreter()``, fixing potential freezes during interpreter + finalization. + `#4192 `_ + +Performance and style: + +* Reserve space in set and STL map casters if possible. This will prevent + unnecessary rehashing / resizing by knowing the number of keys ahead of time + for Python to C++ casting. This improvement will greatly speed up the casting + of large unordered maps and sets. + `#4194 `_ + +* GIL RAII scopes are non-copyable to avoid potential bugs. + `#4183 `_ + +* Explicitly default all relevant ctors for pytypes in the ``PYBIND11_OBJECT`` + macros and enforce the clang-tidy checks ``modernize-use-equals-default`` in + macros as well. + `#4017 `_ + +* Optimize iterator advancement in C++ bindings. + `#4237 `_ + +* Use the modern ``PyObject_GenericGetDict`` and ``PyObject_GenericSetDict`` + for handling dynamic attribute dictionaries. + `#4106 `_ + +* Document that users should use ``PYBIND11_NAMESPACE`` instead of using ``pybind11`` when + opening namespaces. Using namespace declarations and namespace qualification + remain the same as ``pybind11``. This is done to ensure consistent symbol + visibility. + `#4098 `_ + +* Mark ``detail::forward_like`` as constexpr. + `#4147 `_ + +* Optimize unpacking_collector when processing ``arg_v`` arguments. + `#4219 `_ + +* Optimize casting C++ object to ``None``. + `#4269 `_ + + +Build system improvements: + +* CMake: revert overwrite behavior, now opt-in with ``PYBIND11_PYTHONLIBS_OVERRWRITE OFF``. + `#4195 `_ + +* Include a pkg-config file when installing pybind11, such as in the Python + package. + `#4077 `_ + +* Avoid stripping debug symbols when ``CMAKE_BUILD_TYPE`` is set to ``DEBUG`` + instead of ``Debug``. + `#4078 `_ + +* Followup to `#3948 `_, fixing vcpkg again. + `#4123 `_ + +Version 2.10.0 (Jul 15, 2022) +----------------------------- + +Removed support for Python 2.7, Python 3.5, and MSVC 2015. Support for MSVC +2017 is limited due to availability of CI runners; we highly recommend MSVC +2019 or 2022 be used. Initial support added for Python 3.11. + +New features: + +* ``py::anyset`` & ``py::frozenset`` were added, with copying (cast) to + ``std::set`` (similar to ``set``). + `#3901 `_ + +* Support bytearray casting to string. + `#3707 `_ + +* ``type_caster`` was added. ``std::monostate`` is a tag type + that allows ``std::variant`` to act as an optional, or allows default + construction of a ``std::variant`` holding a non-default constructible type. + `#3818 `_ + +* ``pybind11::capsule::set_name`` added to mutate the name of the capsule instance. + `#3866 `_ + +* NumPy: dtype constructor from type number added, accessors corresponding to + Python API ``dtype.num``, ``dtype.byteorder``, ``dtype.flags`` and + ``dtype.alignment`` added. + `#3868 `_ + + +Changes: + +* Python 3.6 is now the minimum supported version. + `#3688 `_ + `#3719 `_ + +* The minimum version for MSVC is now 2017. + `#3722 `_ + +* Fix issues with CPython 3.11 betas and add to supported test matrix. + `#3923 `_ + +* ``error_already_set`` is now safer and more performant, especially for + exceptions with long tracebacks, by delaying computation. + `#1895 `_ + +* Improve exception handling in python ``str`` bindings. + `#3826 `_ + +* The bindings for capsules now have more consistent exception handling. + `#3825 `_ + +* ``PYBIND11_OBJECT_CVT`` and ``PYBIND11_OBJECT_CVT_DEFAULT`` macro can now be + used to define classes in namespaces other than pybind11. + `#3797 `_ + +* Error printing code now uses ``PYBIND11_DETAILED_ERROR_MESSAGES`` instead of + requiring ``NDEBUG``, allowing use with release builds if desired. + `#3913 `_ + +* Implicit conversion of the literal ``0`` to ``pybind11::handle`` is now disabled. + `#4008 `_ + + +Bug fixes: + +* Fix exception handling when ``pybind11::weakref()`` fails. + `#3739 `_ + +* ``module_::def_submodule`` was missing proper error handling. This is fixed now. + `#3973 `_ + +* The behavior or ``error_already_set`` was made safer and the highly opaque + "Unknown internal error occurred" message was replaced with a more helpful + message. + `#3982 `_ + +* ``error_already_set::what()`` now handles non-normalized exceptions correctly. + `#3971 `_ + +* Support older C++ compilers where filesystem is not yet part of the standard + library and is instead included in ``std::experimental::filesystem``. + `#3840 `_ + +* Fix ``-Wfree-nonheap-object`` warnings produced by GCC by avoiding returning + pointers to static objects with ``return_value_policy::take_ownership``. + `#3946 `_ + +* Fix cast from pytype rvalue to another pytype. + `#3949 `_ + +* Ensure proper behavior when garbage collecting classes with dynamic attributes in Python >=3.9. + `#4051 `_ + +* A couple long-standing ``PYBIND11_NAMESPACE`` + ``__attribute__((visibility("hidden")))`` inconsistencies are now fixed + (affects only unusual environments). + `#4043 `_ + +* ``pybind11::detail::get_internals()`` is now resilient to in-flight Python + exceptions. + `#3981 `_ + +* Arrays with a dimension of size 0 are now properly converted to dynamic Eigen + matrices (more common in NumPy 1.23). + `#4038 `_ + +* Avoid catching unrelated errors when importing NumPy. + `#3974 `_ + +Performance and style: + +* Added an accessor overload of ``(object &&key)`` to reference steal the + object when using python types as keys. This prevents unnecessary reference + count overhead for attr, dictionary, tuple, and sequence look ups. Added + additional regression tests. Fixed a performance bug the caused accessor + assignments to potentially perform unnecessary copies. + `#3970 `_ + +* Perfect forward all args of ``make_iterator``. + `#3980 `_ + +* Avoid potential bug in pycapsule destructor by adding an ``error_guard`` to + one of the dtors. + `#3958 `_ + +* Optimize dictionary access in ``strip_padding`` for numpy. + `#3994 `_ + +* ``stl_bind.h`` bindings now take slice args as a const-ref. + `#3852 `_ + +* Made slice constructor more consistent, and improve performance of some + casters by allowing reference stealing. + `#3845 `_ + +* Change numpy dtype from_args method to use const ref. + `#3878 `_ + +* Follow rule of three to ensure ``PyErr_Restore`` is called only once. + `#3872 `_ + +* Added missing perfect forwarding for ``make_iterator`` functions. + `#3860 `_ + +* Optimize c++ to python function casting by using the rvalue caster. + `#3966 `_ + +* Optimize Eigen sparse matrix casting by removing unnecessary temporary. + `#4064 `_ + +* Avoid potential implicit copy/assignment constructors causing double free in + ``strdup_gaurd``. + `#3905 `_ + +* Enable clang-tidy checks ``misc-definitions-in-headers``, + ``modernize-loop-convert``, and ``modernize-use-nullptr``. + `#3881 `_ + `#3988 `_ + + +Build system improvements: + +* CMake: Fix file extension on Windows with cp36 and cp37 using FindPython. + `#3919 `_ + +* CMake: Support multiple Python targets (such as on vcpkg). + `#3948 `_ + +* CMake: Fix issue with NVCC on Windows. + `#3947 `_ + +* CMake: Drop the bitness check on cross compiles (like targeting WebAssembly + via Emscripten). + `#3959 `_ + +* Add MSVC builds in debug mode to CI. + `#3784 `_ + +* MSVC 2022 C++20 coverage was added to GitHub Actions, including Eigen. + `#3732 `_, + `#3741 `_ + + +Backend and tidying up: + +* New theme for the documentation. + `#3109 `_ + +* Remove idioms in code comments. Use more inclusive language. + `#3809 `_ + +* ``#include `` was removed from the ``pybind11/stl.h`` header. Your + project may break if it has a transitive dependency on this include. The fix + is to "Include What You Use". + `#3928 `_ + +* Avoid ``setup.py `` usage in internal tests. + `#3734 `_ + + +Version 2.9.2 (Mar 29, 2022) +---------------------------- + +Changes: + +* Enum now has an ``__index__`` method on Python <3.8 too. + `#3700 `_ + +* Local internals are now cleared after finalizing the interpreter. + `#3744 `_ + +Bug fixes: + +* Better support for Python 3.11 alphas. + `#3694 `_ + +* ``PYBIND11_TYPE_CASTER`` now uses fully qualified symbols, so it can be used + outside of ``pybind11::detail``. + `#3758 `_ + +* Some fixes for PyPy 3.9. + `#3768 `_ + +* Fixed a potential memleak in PyPy in ``get_type_override``. + `#3774 `_ + +* Fix usage of ``VISIBILITY_INLINES_HIDDEN``. + `#3721 `_ + + +Build system improvements: + +* Uses ``sysconfig`` module to determine installation locations on Python >= + 3.10, instead of ``distutils`` which has been deprecated. + `#3764 `_ + +* Support Catch 2.13.5+ (supporting GLIBC 2.34+). + `#3679 `_ + +* Fix test failures with numpy 1.22 by ignoring whitespace when comparing + ``str()`` of dtypes. + `#3682 `_ + + +Backend and tidying up: + +* clang-tidy: added ``readability-qualified-auto``, + ``readability-braces-around-statements``, + ``cppcoreguidelines-prefer-member-initializer``, + ``clang-analyzer-optin.performance.Padding``, + ``cppcoreguidelines-pro-type-static-cast-downcast``, and + ``readability-inconsistent-declaration-parameter-name``. + `#3702 `_, + `#3699 `_, + `#3716 `_, + `#3709 `_ + +* clang-format was added to the pre-commit actions, and the entire code base + automatically reformatted (after several iterations preparing for this leap). + `#3713 `_ + + +Version 2.9.1 (Feb 2, 2022) +--------------------------- + +Changes: + +* If possible, attach Python exception with ``py::raise_from`` to ``TypeError`` + when casting from C++ to Python. This will give additional info if Python + exceptions occur in the caster. Adds a test case of trying to convert a set + from C++ to Python when the hash function is not defined in Python. + `#3605 `_ + +* Add a mapping of C++11 nested exceptions to their Python exception + equivalent using ``py::raise_from``. This attaches the nested exceptions in + Python using the ``__cause__`` field. + `#3608 `_ + +* Propagate Python exception traceback using ``raise_from`` if a pybind11 + function runs out of overloads. + `#3671 `_ + +* ``py::multiple_inheritance`` is now only needed when C++ bases are hidden + from pybind11. + `#3650 `_ and + `#3659 `_ + + +Bug fixes: + +* Remove a boolean cast in ``numpy.h`` that causes MSVC C4800 warnings when + compiling against Python 3.10 or newer. + `#3669 `_ + +* Render ``py::bool_`` and ``py::float_`` as ``bool`` and ``float`` + respectively. + `#3622 `_ + +Build system improvements: + +* Fix CMake extension suffix computation on Python 3.10+. + `#3663 `_ + +* Allow ``CMAKE_ARGS`` to override CMake args in pybind11's own ``setup.py``. + `#3577 `_ + +* Remove a few deprecated c-headers. + `#3610 `_ + +* More uniform handling of test targets. + `#3590 `_ + +* Add clang-tidy readability check to catch potentially swapped function args. + `#3611 `_ + + +Version 2.9.0 (Dec 28, 2021) +---------------------------- + +This is the last version to support Python 2.7 and 3.5. + +New Features: + +* Allow ``py::args`` to be followed by other arguments; the remaining arguments + are implicitly keyword-only, as if a ``py::kw_only{}`` annotation had been + used. + `#3402 `_ + +Changes: + +* Make str/bytes/memoryview more interoperable with ``std::string_view``. + `#3521 `_ + +* Replace ``_`` with ``const_name`` in internals, avoid defining ``pybind::_`` + if ``_`` defined as macro (common gettext usage) + `#3423 `_ + + +Bug fixes: + +* Fix a rare warning about extra copy in an Eigen constructor. + `#3486 `_ + +* Fix caching of the C++ overrides. + `#3465 `_ + +* Add missing ``std::forward`` calls to some ``cpp_function`` overloads. + `#3443 `_ + +* Support PyPy 7.3.7 and the PyPy3.8 beta. Test python-3.11 on PRs with the + ``python dev`` label. + `#3419 `_ + +* Replace usage of deprecated ``Eigen::MappedSparseMatrix`` with + ``Eigen::Map>`` for Eigen 3.3+. + `#3499 `_ + +* Tweaks to support Microsoft Visual Studio 2022. + `#3497 `_ + +Build system improvements: + +* Nicer CMake printout and IDE organisation for pybind11's own tests. + `#3479 `_ + +* CMake: report version type as part of the version string to avoid a spurious + space in the package status message. + `#3472 `_ + +* Flags starting with ``-g`` in ``$CFLAGS`` and ``$CPPFLAGS`` are no longer + overridden by ``.Pybind11Extension``. + `#3436 `_ + +* Ensure ThreadPool is closed in ``setup_helpers``. + `#3548 `_ + +* Avoid LTS on ``mips64`` and ``ppc64le`` (reported broken). + `#3557 `_ + + +v2.8.1 (Oct 27, 2021) +--------------------- + +Changes and additions: + +* The simple namespace creation shortcut added in 2.8.0 was deprecated due to + usage of CPython internal API, and will be removed soon. Use + ``py::module_::import("types").attr("SimpleNamespace")``. + `#3374 `_ + +* Add C++ Exception type to throw and catch ``AttributeError``. Useful for + defining custom ``__setattr__`` and ``__getattr__`` methods. + `#3387 `_ + +Fixes: + +* Fixed the potential for dangling references when using properties with + ``std::optional`` types. + `#3376 `_ + +* Modernize usage of ``PyCodeObject`` on Python 3.9+ (moving toward support for + Python 3.11a1) + `#3368 `_ + +* A long-standing bug in ``eigen.h`` was fixed (originally PR #3343). The bug + was unmasked by newly added ``static_assert``'s in the Eigen 3.4.0 release. + `#3352 `_ + +* Support multiple raw inclusion of CMake helper files (Conan.io does this for + multi-config generators). + `#3420 `_ + +* Fix harmless warning on upcoming CMake 3.22. + `#3368 `_ + +* Fix 2.8.0 regression with MSVC 2017 + C++17 mode + Python 3. + `#3407 `_ + +* Fix 2.8.0 regression that caused undefined behavior (typically + segfaults) in ``make_key_iterator``/``make_value_iterator`` if dereferencing + the iterator returned a temporary value instead of a reference. + `#3348 `_ + + +v2.8.0 (Oct 4, 2021) +-------------------- + +New features: + +* Added ``py::raise_from`` to enable chaining exceptions. + `#3215 `_ + +* Allow exception translators to be optionally registered local to a module + instead of applying globally across all pybind11 modules. Use + ``register_local_exception_translator(ExceptionTranslator&& translator)`` + instead of ``register_exception_translator(ExceptionTranslator&& + translator)`` to keep your exception remapping code local to the module. + `#2650 `_ + +* Add ``make_simple_namespace`` function for instantiating Python + ``SimpleNamespace`` objects. **Deprecated in 2.8.1.** + `#2840 `_ + +* ``pybind11::scoped_interpreter`` and ``initialize_interpreter`` have new + arguments to allow ``sys.argv`` initialization. + `#2341 `_ + +* Allow Python builtins to be used as callbacks in CPython. + `#1413 `_ + +* Added ``view`` to view arrays with a different datatype. + `#987 `_ + +* Implemented ``reshape`` on arrays. + `#984 `_ + +* Enable defining custom ``__new__`` methods on classes by fixing bug + preventing overriding methods if they have non-pybind11 siblings. + `#3265 `_ + +* Add ``make_value_iterator()``, and fix ``make_key_iterator()`` to return + references instead of copies. + `#3293 `_ + +* Improve the classes generated by ``bind_map``: `#3310 `_ + + * Change ``.items`` from an iterator to a dictionary view. + * Add ``.keys`` and ``.values`` (both dictionary views). + * Allow ``__contains__`` to take any object. + +* ``pybind11::custom_type_setup`` was added, for customizing the + ``PyHeapTypeObject`` corresponding to a class, which may be useful for + enabling garbage collection support, among other things. + `#3287 `_ + + +Changes: + +* Set ``__file__`` constant when running ``eval_file`` in an embedded interpreter. + `#3233 `_ + +* Python objects and (C++17) ``std::optional`` now accepted in ``py::slice`` + constructor. + `#1101 `_ + +* The pybind11 proxy types ``str``, ``bytes``, ``bytearray``, ``tuple``, + ``list`` now consistently support passing ``ssize_t`` values for sizes and + indexes. Previously, only ``size_t`` was accepted in several interfaces. + `#3219 `_ + +* Avoid evaluating ``PYBIND11_TLS_REPLACE_VALUE`` arguments more than once. + `#3290 `_ + +Fixes: + +* Bug fix: enum value's ``__int__`` returning non-int when underlying type is + bool or of char type. + `#1334 `_ + +* Fixes bug in setting error state in Capsule's pointer methods. + `#3261 `_ + +* A long-standing memory leak in ``py::cpp_function::initialize`` was fixed. + `#3229 `_ + +* Fixes thread safety for some ``pybind11::type_caster`` which require lifetime + extension, such as for ``std::string_view``. + `#3237 `_ + +* Restore compatibility with gcc 4.8.4 as distributed by ubuntu-trusty, linuxmint-17. + `#3270 `_ + + +Build system improvements: + +* Fix regression in CMake Python package config: improper use of absolute path. + `#3144 `_ + +* Cached Python version information could become stale when CMake was re-run + with a different Python version. The build system now detects this and + updates this information. + `#3299 `_ + +* Specified UTF8-encoding in setup.py calls of open(). + `#3137 `_ + +* Fix a harmless warning from CMake 3.21 with the classic Python discovery. + `#3220 `_ + +* Eigen repo and version can now be specified as cmake options. + `#3324 `_ + + +Backend and tidying up: + +* Reduced thread-local storage required for keeping alive temporary data for + type conversion to one key per ABI version, rather than one key per extension + module. This makes the total thread-local storage required by pybind11 2 + keys per ABI version. + `#3275 `_ + +* Optimize NumPy array construction with additional moves. + `#3183 `_ + +* Conversion to ``std::string`` and ``std::string_view`` now avoids making an + extra copy of the data on Python >= 3.3. + `#3257 `_ + +* Remove const modifier from certain C++ methods on Python collections + (``list``, ``set``, ``dict``) such as (``clear()``, ``append()``, + ``insert()``, etc...) and annotated them with ``py-non-const``. + +* Enable readability ``clang-tidy-const-return`` and remove useless consts. + `#3254 `_ + `#3194 `_ + +* The clang-tidy ``google-explicit-constructor`` option was enabled. + `#3250 `_ + +* Mark a pytype move constructor as noexcept (perf). + `#3236 `_ + +* Enable clang-tidy check to guard against inheritance slicing. + `#3210 `_ + +* Legacy warning suppression pragma were removed from eigen.h. On Unix + platforms, please use -isystem for Eigen include directories, to suppress + compiler warnings originating from Eigen headers. Note that CMake does this + by default. No adjustments are needed for Windows. + `#3198 `_ + +* Format pybind11 with isort consistent ordering of imports + `#3195 `_ + +* The warnings-suppression "pragma clamp" at the top/bottom of pybind11 was + removed, clearing the path to refactoring and IWYU cleanup. + `#3186 `_ + +* Enable most bugprone checks in clang-tidy and fix the found potential bugs + and poor coding styles. + `#3166 `_ + +* Add ``clang-tidy-readability`` rules to make boolean casts explicit improving + code readability. Also enabled other misc and readability clang-tidy checks. + `#3148 `_ + +* Move object in ``.pop()`` for list. + `#3116 `_ + + + + +v2.7.1 (Aug 3, 2021) +--------------------- + +Minor missing functionality added: + +* Allow Python builtins to be used as callbacks in CPython. + `#1413 `_ + +Bug fixes: + +* Fix regression in CMake Python package config: improper use of absolute path. + `#3144 `_ + +* Fix Mingw64 and add to the CI testing matrix. + `#3132 `_ + +* Specified UTF8-encoding in setup.py calls of open(). + `#3137 `_ + +* Add clang-tidy-readability rules to make boolean casts explicit improving + code readability. Also enabled other misc and readability clang-tidy checks. + `#3148 `_ + +* Move object in ``.pop()`` for list. + `#3116 `_ + +Backend and tidying up: + +* Removed and fixed warning suppressions. + `#3127 `_ + `#3129 `_ + `#3135 `_ + `#3141 `_ + `#3142 `_ + `#3150 `_ + `#3152 `_ + `#3160 `_ + `#3161 `_ + + +v2.7.0 (Jul 16, 2021) +--------------------- + +New features: + +* Enable ``py::implicitly_convertible`` for + ``py::class_``-wrapped types. + `#3059 `_ + +* Allow function pointer extraction from overloaded functions. + `#2944 `_ + +* NumPy: added ``.char_()`` to type which gives the NumPy public ``char`` + result, which also distinguishes types by bit length (unlike ``.kind()``). + `#2864 `_ + +* Add ``pybind11::bytearray`` to manipulate ``bytearray`` similar to ``bytes``. + `#2799 `_ + +* ``pybind11/stl/filesystem.h`` registers a type caster that, on C++17/Python + 3.6+, converts ``std::filesystem::path`` to ``pathlib.Path`` and any + ``os.PathLike`` to ``std::filesystem::path``. + `#2730 `_ + +* A ``PYBIND11_VERSION_HEX`` define was added, similar to ``PY_VERSION_HEX``. + `#3120 `_ + + + +Changes: + +* ``py::str`` changed to exclusively hold ``PyUnicodeObject``. Previously + ``py::str`` could also hold ``bytes``, which is probably surprising, was + never documented, and can mask bugs (e.g. accidental use of ``py::str`` + instead of ``py::bytes``). + `#2409 `_ + +* Add a safety guard to ensure that the Python GIL is held when C++ calls back + into Python via ``object_api<>::operator()`` (e.g. ``py::function`` + ``__call__``). (This feature is available for Python 3.6+ only.) + `#2919 `_ + +* Catch a missing ``self`` argument in calls to ``__init__()``. + `#2914 `_ + +* Use ``std::string_view`` if available to avoid a copy when passing an object + to a ``std::ostream``. + `#3042 `_ + +* An important warning about thread safety was added to the ``iostream.h`` + documentation; attempts to make ``py::scoped_ostream_redirect`` thread safe + have been removed, as it was only partially effective. + `#2995 `_ + + +Fixes: + +* Performance: avoid unnecessary strlen calls. + `#3058 `_ + +* Fix auto-generated documentation string when using ``const T`` in + ``pyarray_t``. + `#3020 `_ + +* Unify error messages thrown by ``simple_collector``/``unpacking_collector``. + `#3013 `_ + +* ``pybind11::builtin_exception`` is now explicitly exported, which means the + types included/defined in different modules are identical, and exceptions + raised in different modules can be caught correctly. The documentation was + updated to explain that custom exceptions that are used across module + boundaries need to be explicitly exported as well. + `#2999 `_ + +* Fixed exception when printing UTF-8 to a ``scoped_ostream_redirect``. + `#2982 `_ + +* Pickle support enhancement: ``setstate`` implementation will attempt to + ``setattr`` ``__dict__`` only if the unpickled ``dict`` object is not empty, + to not force use of ``py::dynamic_attr()`` unnecessarily. + `#2972 `_ + +* Allow negative timedelta values to roundtrip. + `#2870 `_ + +* Fix unchecked errors could potentially swallow signals/other exceptions. + `#2863 `_ + +* Add null pointer check with ``std::localtime``. + `#2846 `_ + +* Fix the ``weakref`` constructor from ``py::object`` to create a new + ``weakref`` on conversion. + `#2832 `_ + +* Avoid relying on exceptions in C++17 when getting a ``shared_ptr`` holder + from a ``shared_from_this`` class. + `#2819 `_ + +* Allow the codec's exception to be raised instead of :code:`RuntimeError` when + casting from :code:`py::str` to :code:`std::string`. + `#2903 `_ + + +Build system improvements: + +* In ``setup_helpers.py``, test for platforms that have some multiprocessing + features but lack semaphores, which ``ParallelCompile`` requires. + `#3043 `_ + +* Fix ``pybind11_INCLUDE_DIR`` in case ``CMAKE_INSTALL_INCLUDEDIR`` is + absolute. + `#3005 `_ + +* Fix bug not respecting ``WITH_SOABI`` or ``WITHOUT_SOABI`` to CMake. + `#2938 `_ + +* Fix the default ``Pybind11Extension`` compilation flags with a Mingw64 python. + `#2921 `_ + +* Clang on Windows: do not pass ``/MP`` (ignored flag). + `#2824 `_ + +* ``pybind11.setup_helpers.intree_extensions`` can be used to generate + ``Pybind11Extension`` instances from cpp files placed in the Python package + source tree. + `#2831 `_ + +Backend and tidying up: + +* Enable clang-tidy performance, readability, and modernization checks + throughout the codebase to enforce best coding practices. + `#3046 `_, + `#3049 `_, + `#3051 `_, + `#3052 `_, + `#3080 `_, and + `#3094 `_ + + +* Checks for common misspellings were added to the pre-commit hooks. + `#3076 `_ + +* Changed ``Werror`` to stricter ``Werror-all`` for Intel compiler and fixed + minor issues. + `#2948 `_ + +* Fixed compilation with GCC < 5 when the user defines ``_GLIBCXX_USE_CXX11_ABI``. + `#2956 `_ + +* Added nox support for easier local testing and linting of contributions. + `#3101 `_ and + `#3121 `_ + +* Avoid RTD style issue with docutils 0.17+. + `#3119 `_ + +* Support pipx run, such as ``pipx run pybind11 --include`` for a quick compile. + `#3117 `_ + + + +v2.6.2 (Jan 26, 2021) +--------------------- + +Minor missing functionality added: + +* enum: add missing Enum.value property. + `#2739 `_ + +* Allow thread termination to be avoided during shutdown for CPython 3.7+ via + ``.disarm`` for ``gil_scoped_acquire``/``gil_scoped_release``. + `#2657 `_ + +Fixed or improved behavior in a few special cases: + +* Fix bug where the constructor of ``object`` subclasses would not throw on + being passed a Python object of the wrong type. + `#2701 `_ + +* The ``type_caster`` for integers does not convert Python objects with + ``__int__`` anymore with ``noconvert`` or during the first round of trying + overloads. + `#2698 `_ + +* When casting to a C++ integer, ``__index__`` is always called and not + considered as conversion, consistent with Python 3.8+. + `#2801 `_ + +Build improvements: + +* Setup helpers: ``extra_compile_args`` and ``extra_link_args`` automatically set by + Pybind11Extension are now prepended, which allows them to be overridden + by user-set ``extra_compile_args`` and ``extra_link_args``. + `#2808 `_ + +* Setup helpers: Don't trigger unused parameter warning. + `#2735 `_ + +* CMake: Support running with ``--warn-uninitialized`` active. + `#2806 `_ + +* CMake: Avoid error if included from two submodule directories. + `#2804 `_ + +* CMake: Fix ``STATIC`` / ``SHARED`` being ignored in FindPython mode. + `#2796 `_ + +* CMake: Respect the setting for ``CMAKE_CXX_VISIBILITY_PRESET`` if defined. + `#2793 `_ + +* CMake: Fix issue with FindPython2/FindPython3 not working with ``pybind11::embed``. + `#2662 `_ + +* CMake: mixing local and installed pybind11's would prioritize the installed + one over the local one (regression in 2.6.0). + `#2716 `_ + + +Bug fixes: + +* Fixed segfault in multithreaded environments when using + ``scoped_ostream_redirect``. + `#2675 `_ + +* Leave docstring unset when all docstring-related options are disabled, rather + than set an empty string. + `#2745 `_ + +* The module key in builtins that pybind11 uses to store its internals changed + from std::string to a python str type (more natural on Python 2, no change on + Python 3). + `#2814 `_ + +* Fixed assertion error related to unhandled (later overwritten) exception in + CPython 3.8 and 3.9 debug builds. + `#2685 `_ + +* Fix ``py::gil_scoped_acquire`` assert with CPython 3.9 debug build. + `#2683 `_ + +* Fix issue with a test failing on pytest 6.2. + `#2741 `_ + +Warning fixes: + +* Fix warning modifying constructor parameter 'flag' that shadows a field of + 'set_flag' ``[-Wshadow-field-in-constructor-modified]``. + `#2780 `_ + +* Suppressed some deprecation warnings about old-style + ``__init__``/``__setstate__`` in the tests. + `#2759 `_ + +Valgrind work: + +* Fix invalid access when calling a pybind11 ``__init__`` on a non-pybind11 + class instance. + `#2755 `_ + +* Fixed various minor memory leaks in pybind11's test suite. + `#2758 `_ + +* Resolved memory leak in cpp_function initialization when exceptions occurred. + `#2756 `_ + +* Added a Valgrind build, checking for leaks and memory-related UB, to CI. + `#2746 `_ + +Compiler support: + +* Intel compiler was not activating C++14 support due to a broken define. + `#2679 `_ + +* Support ICC and NVIDIA HPC SDK in C++17 mode. + `#2729 `_ + +* Support Intel OneAPI compiler (ICC 20.2) and add to CI. + `#2573 `_ + + + +v2.6.1 (Nov 11, 2020) +--------------------- + +* ``py::exec``, ``py::eval``, and ``py::eval_file`` now add the builtins module + as ``"__builtins__"`` to their ``globals`` argument, better matching ``exec`` + and ``eval`` in pure Python. + `#2616 `_ + +* ``setup_helpers`` will no longer set a minimum macOS version higher than the + current version. + `#2622 `_ + +* Allow deleting static properties. + `#2629 `_ + +* Seal a leak in ``def_buffer``, cleaning up the ``capture`` object after the + ``class_`` object goes out of scope. + `#2634 `_ + +* ``pybind11_INCLUDE_DIRS`` was incorrect, potentially causing a regression if + it was expected to include ``PYTHON_INCLUDE_DIRS`` (please use targets + instead). + `#2636 `_ + +* Added parameter names to the ``py::enum_`` constructor and methods, avoiding + ``arg0`` in the generated docstrings. + `#2637 `_ + +* Added ``needs_recompile`` optional function to the ``ParallelCompiler`` + helper, to allow a recompile to be skipped based on a user-defined function. + `#2643 `_ + + +v2.6.0 (Oct 21, 2020) +--------------------- + +See :ref:`upgrade-guide-2.6` for help upgrading to the new version. + +New features: + +* Keyword-only arguments supported in Python 2 or 3 with ``py::kw_only()``. + `#2100 `_ + +* Positional-only arguments supported in Python 2 or 3 with ``py::pos_only()``. + `#2459 `_ + +* ``py::is_final()`` class modifier to block subclassing (CPython only). + `#2151 `_ + +* Added ``py::prepend()``, allowing a function to be placed at the beginning of + the overload chain. + `#1131 `_ + +* Access to the type object now provided with ``py::type::of()`` and + ``py::type::of(h)``. + `#2364 `_ + +* Perfect forwarding support for methods. + `#2048 `_ + +* Added ``py::error_already_set::discard_as_unraisable()``. + `#2372 `_ + +* ``py::hash`` is now public. + `#2217 `_ + +* ``py::class_`` is now supported. Note that writing to one data + member of the union and reading another (type punning) is UB in C++. Thus + pybind11-bound enums should never be used for such conversions. + `#2320 `_. + +* Classes now check local scope when registering members, allowing a subclass + to have a member with the same name as a parent (such as an enum). + `#2335 `_ + +Code correctness features: + +* Error now thrown when ``__init__`` is forgotten on subclasses. + `#2152 `_ + +* Throw error if conversion to a pybind11 type if the Python object isn't a + valid instance of that type, such as ``py::bytes(o)`` when ``py::object o`` + isn't a bytes instance. + `#2349 `_ + +* Throw if conversion to ``str`` fails. + `#2477 `_ + + +API changes: + +* ``py::module`` was renamed ``py::module_`` to avoid issues with C++20 when + used unqualified, but an alias ``py::module`` is provided for backward + compatibility. + `#2489 `_ + +* Public constructors for ``py::module_`` have been deprecated; please use + ``pybind11::module_::create_extension_module`` if you were using the public + constructor (fairly rare after ``PYBIND11_MODULE`` was introduced). + `#2552 `_ + +* ``PYBIND11_OVERLOAD*`` macros and ``get_overload`` function replaced by + correctly-named ``PYBIND11_OVERRIDE*`` and ``get_override``, fixing + inconsistencies in the presence of a closing ``;`` in these macros. + ``get_type_overload`` is deprecated. + `#2325 `_ + +Packaging / building improvements: + +* The Python package was reworked to be more powerful and useful. + `#2433 `_ + + * :ref:`build-setuptools` is easier thanks to a new + ``pybind11.setup_helpers`` module, which provides utilities to use + setuptools with pybind11. It can be used via PEP 518, ``setup_requires``, + or by directly importing or copying ``setup_helpers.py`` into your project. + + * CMake configuration files are now included in the Python package. Use + ``pybind11.get_cmake_dir()`` or ``python -m pybind11 --cmakedir`` to get + the directory with the CMake configuration files, or include the + site-packages location in your ``CMAKE_MODULE_PATH``. Or you can use the + new ``pybind11[global]`` extra when you install ``pybind11``, which + installs the CMake files and headers into your base environment in the + standard location. + + * ``pybind11-config`` is another way to write ``python -m pybind11`` if you + have your PATH set up. + + * Added external typing support to the helper module, code from + ``import pybind11`` can now be type checked. + `#2588 `_ + +* Minimum CMake required increased to 3.4. + `#2338 `_ and + `#2370 `_ + + * Full integration with CMake's C++ standard system and compile features + replaces ``PYBIND11_CPP_STANDARD``. + + * Generated config file is now portable to different Python/compiler/CMake + versions. + + * Virtual environments prioritized if ``PYTHON_EXECUTABLE`` is not set + (``venv``, ``virtualenv``, and ``conda``) (similar to the new FindPython + mode). + + * Other CMake features now natively supported, like + ``CMAKE_INTERPROCEDURAL_OPTIMIZATION``, ``set(CMAKE_CXX_VISIBILITY_PRESET + hidden)``. + + * ``CUDA`` as a language is now supported. + + * Helper functions ``pybind11_strip``, ``pybind11_extension``, + ``pybind11_find_import`` added, see :doc:`cmake/index`. + + * Optional :ref:`find-python-mode` and :ref:`nopython-mode` with CMake. + `#2370 `_ + +* Uninstall target added. + `#2265 `_ and + `#2346 `_ + +* ``pybind11_add_module()`` now accepts an optional ``OPT_SIZE`` flag that + switches the binding target to size-based optimization if the global build + type can not always be fixed to ``MinSizeRel`` (except in debug mode, where + optimizations remain disabled). ``MinSizeRel`` or this flag reduces binary + size quite substantially (~25% on some platforms). + `#2463 `_ + +Smaller or developer focused features and fixes: + +* Moved ``mkdoc.py`` to a new repo, `pybind11-mkdoc`_. There are no longer + submodules in the main repo. + +* ``py::memoryview`` segfault fix and update, with new + ``py::memoryview::from_memory`` in Python 3, and documentation. + `#2223 `_ + +* Fix for ``buffer_info`` on Python 2. + `#2503 `_ + +* If ``__eq__`` defined but not ``__hash__``, ``__hash__`` is now set to + ``None``. + `#2291 `_ + +* ``py::ellipsis`` now also works on Python 2. + `#2360 `_ + +* Pointer to ``std::tuple`` & ``std::pair`` supported in cast. + `#2334 `_ + +* Small fixes in NumPy support. ``py::array`` now uses ``py::ssize_t`` as first + argument type. + `#2293 `_ + +* Added missing signature for ``py::array``. + `#2363 `_ + +* ``unchecked_mutable_reference`` has access to operator ``()`` and ``[]`` when + const. + `#2514 `_ + +* ``py::vectorize`` is now supported on functions that return void. + `#1969 `_ + +* ``py::capsule`` supports ``get_pointer`` and ``set_pointer``. + `#1131 `_ + +* Fix crash when different instances share the same pointer of the same type. + `#2252 `_ + +* Fix for ``py::len`` not clearing Python's error state when it fails and throws. + `#2575 `_ + +* Bugfixes related to more extensive testing, new GitHub Actions CI. + `#2321 `_ + +* Bug in timezone issue in Eastern hemisphere midnight fixed. + `#2438 `_ + +* ``std::chrono::time_point`` now works when the resolution is not the same as + the system. + `#2481 `_ + +* Bug fixed where ``py::array_t`` could accept arrays that did not match the + requested ordering. + `#2484 `_ + +* Avoid a segfault on some compilers when types are removed in Python. + `#2564 `_ + +* ``py::arg::none()`` is now also respected when passing keyword arguments. + `#2611 `_ + +* PyPy fixes, PyPy 7.3.x now supported, including PyPy3. (Known issue with + PyPy2 and Windows `#2596 `_). + `#2146 `_ + +* CPython 3.9.0 workaround for undefined behavior (macOS segfault). + `#2576 `_ + +* CPython 3.9 warning fixes. + `#2253 `_ + +* Improved C++20 support, now tested in CI. + `#2489 `_ + `#2599 `_ + +* Improved but still incomplete debug Python interpreter support. + `#2025 `_ + +* NVCC (CUDA 11) now supported and tested in CI. + `#2461 `_ + +* NVIDIA PGI compilers now supported and tested in CI. + `#2475 `_ + +* At least Intel 18 now explicitly required when compiling with Intel. + `#2577 `_ + +* Extensive style checking in CI, with `pre-commit`_ support. Code + modernization, checked by clang-tidy. + +* Expanded docs, including new main page, new installing section, and CMake + helpers page, along with over a dozen new sections on existing pages. + +* In GitHub, new docs for contributing and new issue templates. + +.. _pre-commit: https://pre-commit.com + +.. _pybind11-mkdoc: https://github.com/pybind/pybind11-mkdoc + +v2.5.0 (Mar 31, 2020) +----------------------------------------------------- + +* Use C++17 fold expressions in type casters, if available. This can + improve performance during overload resolution when functions have + multiple arguments. + `#2043 `_. + +* Changed include directory resolution in ``pybind11/__init__.py`` + and installation in ``setup.py``. This fixes a number of open issues + where pybind11 headers could not be found in certain environments. + `#1995 `_. + +* C++20 ``char8_t`` and ``u8string`` support. `#2026 + `_. + +* CMake: search for Python 3.9. `bb9c91 + `_. + +* Fixes for MSYS-based build environments. + `#2087 `_, + `#2053 `_. + +* STL bindings for ``std::vector<...>::clear``. `#2074 + `_. + +* Read-only flag for ``py::buffer``. `#1466 + `_. + +* Exception handling during module initialization. + `bf2b031 `_. + +* Support linking against a CPython debug build. + `#2025 `_. + +* Fixed issues involving the availability and use of aligned ``new`` and + ``delete``. `#1988 `_, + `759221 `_. + +* Fixed a resource leak upon interpreter shutdown. + `#2020 `_. + +* Fixed error handling in the boolean caster. + `#1976 `_. + +v2.4.3 (Oct 15, 2019) +----------------------------------------------------- + +* Adapt pybind11 to a C API convention change in Python 3.8. `#1950 + `_. + +v2.4.2 (Sep 21, 2019) +----------------------------------------------------- + +* Replaced usage of a C++14 only construct. `#1929 + `_. + +* Made an ifdef future-proof for Python >= 4. `f3109d + `_. + +v2.4.1 (Sep 20, 2019) +----------------------------------------------------- + +* Fixed a problem involving implicit conversion from enumerations to integers + on Python 3.8. `#1780 `_. + +v2.4.0 (Sep 19, 2019) +----------------------------------------------------- + +* Try harder to keep pybind11-internal data structures separate when there + are potential ABI incompatibilities. Fixes crashes that occurred when loading + multiple pybind11 extensions that were e.g. compiled by GCC (libstdc++) + and Clang (libc++). + `#1588 `_ and + `c9f5a `_. + +* Added support for ``__await__``, ``__aiter__``, and ``__anext__`` protocols. + `#1842 `_. + +* ``pybind11_add_module()``: don't strip symbols when compiling in + ``RelWithDebInfo`` mode. `#1980 + `_. + +* ``enum_``: Reproduce Python behavior when comparing against invalid values + (e.g. ``None``, strings, etc.). Add back support for ``__invert__()``. + `#1912 `_, + `#1907 `_. + +* List insertion operation for ``py::list``. + Added ``.empty()`` to all collection types. + Added ``py::set::contains()`` and ``py::dict::contains()``. + `#1887 `_, + `#1884 `_, + `#1888 `_. + +* ``py::details::overload_cast_impl`` is available in C++11 mode, can be used + like ``overload_cast`` with an additional set of parentheses. + `#1581 `_. + +* Fixed ``get_include()`` on Conda. + `#1877 `_. + +* ``stl_bind.h``: negative indexing support. + `#1882 `_. + +* Minor CMake fix to add MinGW compatibility. + `#1851 `_. + +* GIL-related fixes. + `#1836 `_, + `8b90b `_. + +* Other very minor/subtle fixes and improvements. + `#1329 `_, + `#1910 `_, + `#1863 `_, + `#1847 `_, + `#1890 `_, + `#1860 `_, + `#1848 `_, + `#1821 `_, + `#1837 `_, + `#1833 `_, + `#1748 `_, + `#1852 `_. + +v2.3.0 (June 11, 2019) +----------------------------------------------------- + +* Significantly reduced module binary size (10-20%) when compiled in C++11 mode + with GCC/Clang, or in any mode with MSVC. Function signatures are now always + precomputed at compile time (this was previously only available in C++14 mode + for non-MSVC compilers). + `#934 `_. + +* Add basic support for tag-based static polymorphism, where classes + provide a method to returns the desired type of an instance. + `#1326 `_. + +* Python type wrappers (``py::handle``, ``py::object``, etc.) + now support map Python's number protocol onto C++ arithmetic + operators such as ``operator+``, ``operator/=``, etc. + `#1511 `_. + +* A number of improvements related to enumerations: + + 1. The ``enum_`` implementation was rewritten from scratch to reduce + code bloat. Rather than instantiating a full implementation for each + enumeration, most code is now contained in a generic base class. + `#1511 `_. + + 2. The ``value()`` method of ``py::enum_`` now accepts an optional + docstring that will be shown in the documentation of the associated + enumeration. `#1160 `_. + + 3. check for already existing enum value and throw an error if present. + `#1453 `_. + +* Support for over-aligned type allocation via C++17's aligned ``new`` + statement. `#1582 `_. + +* Added ``py::ellipsis()`` method for slicing of multidimensional NumPy arrays + `#1502 `_. + +* Numerous Improvements to the ``mkdoc.py`` script for extracting documentation + from C++ header files. + `#1788 `_. + +* ``pybind11_add_module()``: allow including Python as a ``SYSTEM`` include path. + `#1416 `_. + +* ``pybind11/stl.h`` does not convert strings to ``vector`` anymore. + `#1258 `_. + +* Mark static methods as such to fix auto-generated Sphinx documentation. + `#1732 `_. + +* Re-throw forced unwind exceptions (e.g. during pthread termination). + `#1208 `_. + +* Added ``__contains__`` method to the bindings of maps (``std::map``, + ``std::unordered_map``). + `#1767 `_. + +* Improvements to ``gil_scoped_acquire``. + `#1211 `_. + +* Type caster support for ``std::deque``. + `#1609 `_. + +* Support for ``std::unique_ptr`` holders, whose deleters differ between a base and derived + class. `#1353 `_. + +* Construction of STL array/vector-like data structures from + iterators. Added an ``extend()`` operation. + `#1709 `_, + +* CMake build system improvements for projects that include non-C++ + files (e.g. plain C, CUDA) in ``pybind11_add_module`` et al. + `#1678 `_. + +* Fixed asynchronous invocation and deallocation of Python functions + wrapped in ``std::function``. + `#1595 `_. + +* Fixes regarding return value policy propagation in STL type casters. + `#1603 `_. + +* Fixed scoped enum comparisons. + `#1571 `_. + +* Fixed iostream redirection for code that releases the GIL. + `#1368 `_, + +* A number of CI-related fixes. + `#1757 `_, + `#1744 `_, + `#1670 `_. + +v2.2.4 (September 11, 2018) +----------------------------------------------------- + +* Use new Python 3.7 Thread Specific Storage (TSS) implementation if available. + `#1454 `_, + `#1517 `_. + +* Fixes for newer MSVC versions and C++17 mode. + `#1347 `_, + `#1462 `_. + +* Propagate return value policies to type-specific casters + when casting STL containers. + `#1455 `_. + +* Allow ostream-redirection of more than 1024 characters. + `#1479 `_. + +* Set ``Py_DEBUG`` define when compiling against a debug Python build. + `#1438 `_. + +* Untangle integer logic in number type caster to work for custom + types that may only be castable to a restricted set of builtin types. + `#1442 `_. + +* CMake build system: Remember Python version in cache file. + `#1434 `_. + +* Fix for custom smart pointers: use ``std::addressof`` to obtain holder + address instead of ``operator&``. + `#1435 `_. + +* Properly report exceptions thrown during module initialization. + `#1362 `_. + +* Fixed a segmentation fault when creating empty-shaped NumPy array. + `#1371 `_. + +* The version of Intel C++ compiler must be >= 2017, and this is now checked by + the header files. `#1363 `_. + +* A few minor typo fixes and improvements to the test suite, and + patches that silence compiler warnings. + +* Vectors now support construction from generators, as well as ``extend()`` from a + list or generator. + `#1496 `_. + + +v2.2.3 (April 29, 2018) +----------------------------------------------------- + +* The pybind11 header location detection was replaced by a new implementation + that no longer depends on ``pip`` internals (the recently released ``pip`` + 10 has restricted access to this API). + `#1190 `_. + +* Small adjustment to an implementation detail to work around a compiler segmentation fault in Clang 3.3/3.4. + `#1350 `_. + +* The minimal supported version of the Intel compiler was >= 17.0 since + pybind11 v2.1. This check is now explicit, and a compile-time error is raised + if the compiler meet the requirement. + `#1363 `_. + +* Fixed an endianness-related fault in the test suite. + `#1287 `_. + +v2.2.2 (February 7, 2018) +----------------------------------------------------- + +* Fixed a segfault when combining embedded interpreter + shutdown/reinitialization with external loaded pybind11 modules. + `#1092 `_. + +* Eigen support: fixed a bug where Nx1/1xN numpy inputs couldn't be passed as + arguments to Eigen vectors (which for Eigen are simply compile-time fixed + Nx1/1xN matrices). + `#1106 `_. + +* Clarified to license by moving the licensing of contributions from + ``LICENSE`` into ``CONTRIBUTING.md``: the licensing of contributions is not + actually part of the software license as distributed. This isn't meant to be + a substantial change in the licensing of the project, but addresses concerns + that the clause made the license non-standard. + `#1109 `_. + +* Fixed a regression introduced in 2.1 that broke binding functions with lvalue + character literal arguments. + `#1128 `_. + +* MSVC: fix for compilation failures under /permissive-, and added the flag to + the appveyor test suite. + `#1155 `_. + +* Fixed ``__qualname__`` generation, and in turn, fixes how class names + (especially nested class names) are shown in generated docstrings. + `#1171 `_. + +* Updated the FAQ with a suggested project citation reference. + `#1189 `_. + +* Added fixes for deprecation warnings when compiled under C++17 with + ``-Wdeprecated`` turned on, and add ``-Wdeprecated`` to the test suite + compilation flags. + `#1191 `_. + +* Fixed outdated PyPI URLs in ``setup.py``. + `#1213 `_. + +* Fixed a refcount leak for arguments that end up in a ``py::args`` argument + for functions with both fixed positional and ``py::args`` arguments. + `#1216 `_. + +* Fixed a potential segfault resulting from possible premature destruction of + ``py::args``/``py::kwargs`` arguments with overloaded functions. + `#1223 `_. + +* Fixed ``del map[item]`` for a ``stl_bind.h`` bound stl map. + `#1229 `_. + +* Fixed a regression from v2.1.x where the aggregate initialization could + unintentionally end up at a constructor taking a templated + ``std::initializer_list`` argument. + `#1249 `_. + +* Fixed an issue where calling a function with a keep_alive policy on the same + nurse/patient pair would cause the internal patient storage to needlessly + grow (unboundedly, if the nurse is long-lived). + `#1251 `_. + +* Various other minor fixes. + +v2.2.1 (September 14, 2017) +----------------------------------------------------- + +* Added ``py::module_::reload()`` member function for reloading a module. + `#1040 `_. + +* Fixed a reference leak in the number converter. + `#1078 `_. + +* Fixed compilation with Clang on host GCC < 5 (old libstdc++ which isn't fully + C++11 compliant). `#1062 `_. + +* Fixed a regression where the automatic ``std::vector`` caster would + fail to compile. The same fix also applies to any container which returns + element proxies instead of references. + `#1053 `_. + +* Fixed a regression where the ``py::keep_alive`` policy could not be applied + to constructors. `#1065 `_. + +* Fixed a nullptr dereference when loading a ``py::module_local`` type + that's only registered in an external module. + `#1058 `_. + +* Fixed implicit conversion of accessors to types derived from ``py::object``. + `#1076 `_. + +* The ``name`` in ``PYBIND11_MODULE(name, variable)`` can now be a macro. + `#1082 `_. + +* Relaxed overly strict ``py::pickle()`` check for matching get and set types. + `#1064 `_. + +* Conversion errors now try to be more informative when it's likely that + a missing header is the cause (e.g. forgetting ````). + `#1077 `_. + +v2.2.0 (August 31, 2017) +----------------------------------------------------- + +* Support for embedding the Python interpreter. See the + :doc:`documentation page ` for a + full overview of the new features. + `#774 `_, + `#889 `_, + `#892 `_, + `#920 `_. + + .. code-block:: cpp + + #include + namespace py = pybind11; + + int main() { + py::scoped_interpreter guard{}; // start the interpreter and keep it alive + + py::print("Hello, World!"); // use the Python API + } + +* Support for inheriting from multiple C++ bases in Python. + `#693 `_. + + .. code-block:: python + + from cpp_module import CppBase1, CppBase2 + + + class PyDerived(CppBase1, CppBase2): + def __init__(self): + CppBase1.__init__(self) # C++ bases must be initialized explicitly + CppBase2.__init__(self) + +* ``PYBIND11_MODULE`` is now the preferred way to create module entry points. + ``PYBIND11_PLUGIN`` is deprecated. See :ref:`macros` for details. + `#879 `_. + + .. code-block:: cpp + + // new + PYBIND11_MODULE(example, m) { + m.def("add", [](int a, int b) { return a + b; }); + } + + // old + PYBIND11_PLUGIN(example) { + py::module m("example"); + m.def("add", [](int a, int b) { return a + b; }); + return m.ptr(); + } + +* pybind11's headers and build system now more strictly enforce hidden symbol + visibility for extension modules. This should be seamless for most users, + but see the :doc:`upgrade` if you use a custom build system. + `#995 `_. + +* Support for ``py::module_local`` types which allow multiple modules to + export the same C++ types without conflicts. This is useful for opaque + types like ``std::vector``. ``py::bind_vector`` and ``py::bind_map`` + now default to ``py::module_local`` if their elements are builtins or + local types. See :ref:`module_local` for details. + `#949 `_, + `#981 `_, + `#995 `_, + `#997 `_. + +* Custom constructors can now be added very easily using lambdas or factory + functions which return a class instance by value, pointer or holder. This + supersedes the old placement-new ``__init__`` technique. + See :ref:`custom_constructors` for details. + `#805 `_, + `#1014 `_. + + .. code-block:: cpp + + struct Example { + Example(std::string); + }; + + py::class_(m, "Example") + .def(py::init()) // existing constructor + .def(py::init([](int n) { // custom constructor + return std::make_unique(std::to_string(n)); + })); + +* Similarly to custom constructors, pickling support functions are now bound + using the ``py::pickle()`` adaptor which improves type safety. See the + :doc:`upgrade` and :ref:`pickling` for details. + `#1038 `_. + +* Builtin support for converting C++17 standard library types and general + conversion improvements: + + 1. C++17 ``std::variant`` is supported right out of the box. C++11/14 + equivalents (e.g. ``boost::variant``) can also be added with a simple + user-defined specialization. See :ref:`cpp17_container_casters` for details. + `#811 `_, + `#845 `_, + `#989 `_. + + 2. Out-of-the-box support for C++17 ``std::string_view``. + `#906 `_. + + 3. Improved compatibility of the builtin ``optional`` converter. + `#874 `_. + + 4. The ``bool`` converter now accepts ``numpy.bool_`` and types which + define ``__bool__`` (Python 3.x) or ``__nonzero__`` (Python 2.7). + `#925 `_. + + 5. C++-to-Python casters are now more efficient and move elements out + of rvalue containers whenever possible. + `#851 `_, + `#936 `_, + `#938 `_. + + 6. Fixed ``bytes`` to ``std::string/char*`` conversion on Python 3. + `#817 `_. + + 7. Fixed lifetime of temporary C++ objects created in Python-to-C++ conversions. + `#924 `_. + +* Scope guard call policy for RAII types, e.g. ``py::call_guard()``, + ``py::call_guard()``. See :ref:`call_policies` for details. + `#740 `_. + +* Utility for redirecting C++ streams to Python (e.g. ``std::cout`` -> + ``sys.stdout``). Scope guard ``py::scoped_ostream_redirect`` in C++ and + a context manager in Python. See :ref:`ostream_redirect`. + `#1009 `_. + +* Improved handling of types and exceptions across module boundaries. + `#915 `_, + `#951 `_, + `#995 `_. + +* Fixed destruction order of ``py::keep_alive`` nurse/patient objects + in reference cycles. + `#856 `_. + +* NumPy and buffer protocol related improvements: + + 1. Support for negative strides in Python buffer objects/numpy arrays. This + required changing integers from unsigned to signed for the related C++ APIs. + Note: If you have compiler warnings enabled, you may notice some new conversion + warnings after upgrading. These can be resolved with ``static_cast``. + `#782 `_. + + 2. Support ``std::complex`` and arrays inside ``PYBIND11_NUMPY_DTYPE``. + `#831 `_, + `#832 `_. + + 3. Support for constructing ``py::buffer_info`` and ``py::arrays`` using + arbitrary containers or iterators instead of requiring a ``std::vector``. + `#788 `_, + `#822 `_, + `#860 `_. + + 4. Explicitly check numpy version and require >= 1.7.0. + `#819 `_. + +* Support for allowing/prohibiting ``None`` for specific arguments and improved + ``None`` overload resolution order. See :ref:`none_arguments` for details. + `#843 `_. + `#859 `_. + +* Added ``py::exec()`` as a shortcut for ``py::eval()`` + and support for C++11 raw string literals as input. See :ref:`eval`. + `#766 `_, + `#827 `_. + +* ``py::vectorize()`` ignores non-vectorizable arguments and supports + member functions. + `#762 `_. + +* Support for bound methods as callbacks (``pybind11/functional.h``). + `#815 `_. + +* Allow aliasing pybind11 methods: ``cls.attr("foo") = cls.attr("bar")``. + `#802 `_. + +* Don't allow mixed static/non-static overloads. + `#804 `_. + +* Fixed overriding static properties in derived classes. + `#784 `_. + +* Added support for write only properties. + `#1144 `_. + +* Improved deduction of member functions of a derived class when its bases + aren't registered with pybind11. + `#855 `_. + + .. code-block:: cpp + + struct Base { + int foo() { return 42; } + } + + struct Derived : Base {} + + // Now works, but previously required also binding `Base` + py::class_(m, "Derived") + .def("foo", &Derived::foo); // function is actually from `Base` + +* The implementation of ``py::init<>`` now uses C++11 brace initialization + syntax to construct instances, which permits binding implicit constructors of + aggregate types. `#1015 `_. + + .. code-block:: cpp + + struct Aggregate { + int a; + std::string b; + }; + + py::class_(m, "Aggregate") + .def(py::init()); + +* Fixed issues with multiple inheritance with offset base/derived pointers. + `#812 `_, + `#866 `_, + `#960 `_. + +* Fixed reference leak of type objects. + `#1030 `_. + +* Improved support for the ``/std:c++14`` and ``/std:c++latest`` modes + on MSVC 2017. + `#841 `_, + `#999 `_. + +* Fixed detection of private operator new on MSVC. + `#893 `_, + `#918 `_. + +* Intel C++ compiler compatibility fixes. + `#937 `_. + +* Fixed implicit conversion of ``py::enum_`` to integer types on Python 2.7. + `#821 `_. + +* Added ``py::hash`` to fetch the hash value of Python objects, and + ``.def(hash(py::self))`` to provide the C++ ``std::hash`` as the Python + ``__hash__`` method. + `#1034 `_. + +* Fixed ``__truediv__`` on Python 2 and ``__itruediv__`` on Python 3. + `#867 `_. + +* ``py::capsule`` objects now support the ``name`` attribute. This is useful + for interfacing with ``scipy.LowLevelCallable``. + `#902 `_. + +* Fixed ``py::make_iterator``'s ``__next__()`` for past-the-end calls. + `#897 `_. + +* Added ``error_already_set::matches()`` for checking Python exceptions. + `#772 `_. + +* Deprecated ``py::error_already_set::clear()``. It's no longer needed + following a simplification of the ``py::error_already_set`` class. + `#954 `_. + +* Deprecated ``py::handle::operator==()`` in favor of ``py::handle::is()`` + `#825 `_. + +* Deprecated ``py::object::borrowed``/``py::object::stolen``. + Use ``py::object::borrowed_t{}``/``py::object::stolen_t{}`` instead. + `#771 `_. + +* Changed internal data structure versioning to avoid conflicts between + modules compiled with different revisions of pybind11. + `#1012 `_. + +* Additional compile-time and run-time error checking and more informative messages. + `#786 `_, + `#794 `_, + `#803 `_. + +* Various minor improvements and fixes. + `#764 `_, + `#791 `_, + `#795 `_, + `#840 `_, + `#844 `_, + `#846 `_, + `#849 `_, + `#858 `_, + `#862 `_, + `#871 `_, + `#872 `_, + `#881 `_, + `#888 `_, + `#899 `_, + `#928 `_, + `#931 `_, + `#944 `_, + `#950 `_, + `#952 `_, + `#962 `_, + `#965 `_, + `#970 `_, + `#978 `_, + `#979 `_, + `#986 `_, + `#1020 `_, + `#1027 `_, + `#1037 `_. + +* Testing improvements. + `#798 `_, + `#882 `_, + `#898 `_, + `#900 `_, + `#921 `_, + `#923 `_, + `#963 `_. + +v2.1.1 (April 7, 2017) +----------------------------------------------------- + +* Fixed minimum version requirement for MSVC 2015u3 + `#773 `_. + +v2.1.0 (March 22, 2017) +----------------------------------------------------- + +* pybind11 now performs function overload resolution in two phases. The first + phase only considers exact type matches, while the second allows for implicit + conversions to take place. A special ``noconvert()`` syntax can be used to + completely disable implicit conversions for specific arguments. + `#643 `_, + `#634 `_, + `#650 `_. + +* Fixed a regression where static properties no longer worked with classes + using multiple inheritance. The ``py::metaclass`` attribute is no longer + necessary (and deprecated as of this release) when binding classes with + static properties. + `#679 `_, + +* Classes bound using ``pybind11`` can now use custom metaclasses. + `#679 `_, + +* ``py::args`` and ``py::kwargs`` can now be mixed with other positional + arguments when binding functions using pybind11. + `#611 `_. + +* Improved support for C++11 unicode string and character types; added + extensive documentation regarding pybind11's string conversion behavior. + `#624 `_, + `#636 `_, + `#715 `_. + +* pybind11 can now avoid expensive copies when converting Eigen arrays to NumPy + arrays (and vice versa). `#610 `_. + +* The "fast path" in ``py::vectorize`` now works for any full-size group of C or + F-contiguous arrays. The non-fast path is also faster since it no longer performs + copies of the input arguments (except when type conversions are necessary). + `#610 `_. + +* Added fast, unchecked access to NumPy arrays via a proxy object. + `#746 `_. + +* Transparent support for class-specific ``operator new`` and + ``operator delete`` implementations. + `#755 `_. + +* Slimmer and more efficient STL-compatible iterator interface for sequence types. + `#662 `_. + +* Improved custom holder type support. + `#607 `_. + +* ``nullptr`` to ``None`` conversion fixed in various builtin type casters. + `#732 `_. + +* ``enum_`` now exposes its members via a special ``__members__`` attribute. + `#666 `_. + +* ``std::vector`` bindings created using ``stl_bind.h`` can now optionally + implement the buffer protocol. `#488 `_. + +* Automated C++ reference documentation using doxygen and breathe. + `#598 `_. + +* Added minimum compiler version assertions. + `#727 `_. + +* Improved compatibility with C++1z. + `#677 `_. + +* Improved ``py::capsule`` API. Can be used to implement cleanup + callbacks that are involved at module destruction time. + `#752 `_. + +* Various minor improvements and fixes. + `#595 `_, + `#588 `_, + `#589 `_, + `#603 `_, + `#619 `_, + `#648 `_, + `#695 `_, + `#720 `_, + `#723 `_, + `#729 `_, + `#724 `_, + `#742 `_, + `#753 `_. + +v2.0.1 (Jan 4, 2017) +----------------------------------------------------- + +* Fix pointer to reference error in type_caster on MSVC + `#583 `_. + +* Fixed a segmentation in the test suite due to a typo + `cd7eac `_. + +v2.0.0 (Jan 1, 2017) +----------------------------------------------------- + +* Fixed a reference counting regression affecting types with custom metaclasses + (introduced in v2.0.0-rc1). + `#571 `_. + +* Quenched a CMake policy warning. + `#570 `_. + +v2.0.0-rc1 (Dec 23, 2016) +----------------------------------------------------- + +The pybind11 developers are excited to issue a release candidate of pybind11 +with a subsequent v2.0.0 release planned in early January next year. + +An incredible amount of effort by went into pybind11 over the last ~5 months, +leading to a release that is jam-packed with exciting new features and numerous +usability improvements. The following list links PRs or individual commits +whenever applicable. + +Happy Christmas! + +* Support for binding C++ class hierarchies that make use of multiple + inheritance. `#410 `_. + +* PyPy support: pybind11 now supports nightly builds of PyPy and will + interoperate with the future 5.7 release. No code changes are necessary, + everything "just" works as usual. Note that we only target the Python 2.7 + branch for now; support for 3.x will be added once its ``cpyext`` extension + support catches up. A few minor features remain unsupported for the time + being (notably dynamic attributes in custom types). + `#527 `_. + +* Significant work on the documentation -- in particular, the monolithic + ``advanced.rst`` file was restructured into a easier to read hierarchical + organization. `#448 `_. + +* Many NumPy-related improvements: + + 1. Object-oriented API to access and modify NumPy ``ndarray`` instances, + replicating much of the corresponding NumPy C API functionality. + `#402 `_. + + 2. NumPy array ``dtype`` array descriptors are now first-class citizens and + are exposed via a new class ``py::dtype``. + + 3. Structured dtypes can be registered using the ``PYBIND11_NUMPY_DTYPE()`` + macro. Special ``array`` constructors accepting dtype objects were also + added. + + One potential caveat involving this change: format descriptor strings + should now be accessed via ``format_descriptor::format()`` (however, for + compatibility purposes, the old syntax ``format_descriptor::value`` will + still work for non-structured data types). `#308 + `_. + + 4. Further improvements to support structured dtypes throughout the system. + `#472 `_, + `#474 `_, + `#459 `_, + `#453 `_, + `#452 `_, and + `#505 `_. + + 5. Fast access operators. `#497 `_. + + 6. Constructors for arrays whose storage is owned by another object. + `#440 `_. + + 7. Added constructors for ``array`` and ``array_t`` explicitly accepting shape + and strides; if strides are not provided, they are deduced assuming + C-contiguity. Also added simplified constructors for 1-dimensional case. + + 8. Added buffer/NumPy support for ``char[N]`` and ``std::array`` types. + + 9. Added ``memoryview`` wrapper type which is constructible from ``buffer_info``. + +* Eigen: many additional conversions and support for non-contiguous + arrays/slices. + `#427 `_, + `#315 `_, + `#316 `_, + `#312 `_, and + `#267 `_ + +* Incompatible changes in ``class_<...>::class_()``: + + 1. Declarations of types that provide access via the buffer protocol must + now include the ``py::buffer_protocol()`` annotation as an argument to + the ``class_`` constructor. + + 2. Declarations of types that require a custom metaclass (i.e. all classes + which include static properties via commands such as + ``def_readwrite_static()``) must now include the ``py::metaclass()`` + annotation as an argument to the ``class_`` constructor. + + These two changes were necessary to make type definitions in pybind11 + future-proof, and to support PyPy via its cpyext mechanism. `#527 + `_. + + + 3. This version of pybind11 uses a redesigned mechanism for instantiating + trampoline classes that are used to override virtual methods from within + Python. This led to the following user-visible syntax change: instead of + + .. code-block:: cpp + + py::class_("MyClass") + .alias() + .... + + write + + .. code-block:: cpp + + py::class_("MyClass") + .... + + Importantly, both the original and the trampoline class are now + specified as an arguments (in arbitrary order) to the ``py::class_`` + template, and the ``alias<..>()`` call is gone. The new scheme has zero + overhead in cases when Python doesn't override any functions of the + underlying C++ class. `rev. 86d825 + `_. + +* Added ``eval`` and ``eval_file`` functions for evaluating expressions and + statements from a string or file. `rev. 0d3fc3 + `_. + +* pybind11 can now create types with a modifiable dictionary. + `#437 `_ and + `#444 `_. + +* Support for translation of arbitrary C++ exceptions to Python counterparts. + `#296 `_ and + `#273 `_. + +* Report full backtraces through mixed C++/Python code, better reporting for + import errors, fixed GIL management in exception processing. + `#537 `_, + `#494 `_, + `rev. e72d95 `_, and + `rev. 099d6e `_. + +* Support for bit-level operations, comparisons, and serialization of C++ + enumerations. `#503 `_, + `#508 `_, + `#380 `_, + `#309 `_. + `#311 `_. + +* The ``class_`` constructor now accepts its template arguments in any order. + `#385 `_. + +* Attribute and item accessors now have a more complete interface which makes + it possible to chain attributes as in + ``obj.attr("a")[key].attr("b").attr("method")(1, 2, 3)``. `#425 + `_. + +* Major redesign of the default and conversion constructors in ``pytypes.h``. + `#464 `_. + +* Added built-in support for ``std::shared_ptr`` holder type. It is no longer + necessary to to include a declaration of the form + ``PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr)`` (though continuing to + do so won't cause an error). + `#454 `_. + +* New ``py::overload_cast`` casting operator to select among multiple possible + overloads of a function. An example: + + .. code-block:: cpp + + py::class_(m, "Pet") + .def("set", py::overload_cast(&Pet::set), "Set the pet's age") + .def("set", py::overload_cast(&Pet::set), "Set the pet's name"); + + This feature only works on C++14-capable compilers. + `#541 `_. + +* C++ types are automatically cast to Python types, e.g. when assigning + them as an attribute. For instance, the following is now legal: + + .. code-block:: cpp + + py::module m = /* ... */ + m.attr("constant") = 123; + + (Previously, a ``py::cast`` call was necessary to avoid a compilation error.) + `#551 `_. + +* Redesigned ``pytest``-based test suite. `#321 `_. + +* Instance tracking to detect reference leaks in test suite. `#324 `_ + +* pybind11 can now distinguish between multiple different instances that are + located at the same memory address, but which have different types. + `#329 `_. + +* Improved logic in ``move`` return value policy. + `#510 `_, + `#297 `_. + +* Generalized unpacking API to permit calling Python functions from C++ using + notation such as ``foo(a1, a2, *args, "ka"_a=1, "kb"_a=2, **kwargs)``. `#372 `_. + +* ``py::print()`` function whose behavior matches that of the native Python + ``print()`` function. `#372 `_. + +* Added ``py::dict`` keyword constructor:``auto d = dict("number"_a=42, + "name"_a="World");``. `#372 `_. + +* Added ``py::str::format()`` method and ``_s`` literal: ``py::str s = "1 + 2 + = {}"_s.format(3);``. `#372 `_. + +* Added ``py::repr()`` function which is equivalent to Python's builtin + ``repr()``. `#333 `_. + +* Improved construction and destruction logic for holder types. It is now + possible to reference instances with smart pointer holder types without + constructing the holder if desired. The ``PYBIND11_DECLARE_HOLDER_TYPE`` + macro now accepts an optional second parameter to indicate whether the holder + type uses intrusive reference counting. + `#533 `_ and + `#561 `_. + +* Mapping a stateless C++ function to Python and back is now "for free" (i.e. + no extra indirections or argument conversion overheads). `rev. 954b79 + `_. + +* Bindings for ``std::valarray``. + `#545 `_. + +* Improved support for C++17 capable compilers. + `#562 `_. + +* Bindings for ``std::optional``. + `#475 `_, + `#476 `_, + `#479 `_, + `#499 `_, and + `#501 `_. + +* ``stl_bind.h``: general improvements and support for ``std::map`` and + ``std::unordered_map``. + `#490 `_, + `#282 `_, + `#235 `_. + +* The ``std::tuple``, ``std::pair``, ``std::list``, and ``std::vector`` type + casters now accept any Python sequence type as input. `rev. 107285 + `_. + +* Improved CMake Python detection on multi-architecture Linux. + `#532 `_. + +* Infrastructure to selectively disable or enable parts of the automatically + generated docstrings. `#486 `_. + +* ``reference`` and ``reference_internal`` are now the default return value + properties for static and non-static properties, respectively. `#473 + `_. (the previous defaults + were ``automatic``). `#473 `_. + +* Support for ``std::unique_ptr`` with non-default deleters or no deleter at + all (``py::nodelete``). `#384 `_. + +* Deprecated ``handle::call()`` method. The new syntax to call Python + functions is simply ``handle()``. It can also be invoked explicitly via + ``handle::operator()``, where ``X`` is an optional return value policy. + +* Print more informative error messages when ``make_tuple()`` or ``cast()`` + fail. `#262 `_. + +* Creation of holder types for classes deriving from + ``std::enable_shared_from_this<>`` now also works for ``const`` values. + `#260 `_. + +* ``make_iterator()`` improvements for better compatibility with various + types (now uses prefix increment operator); it now also accepts iterators + with different begin/end types as long as they are equality comparable. + `#247 `_. + +* ``arg()`` now accepts a wider range of argument types for default values. + `#244 `_. + +* Support ``keep_alive`` where the nurse object may be ``None``. `#341 + `_. + +* Added constructors for ``str`` and ``bytes`` from zero-terminated char + pointers, and from char pointers and length. Added constructors for ``str`` + from ``bytes`` and for ``bytes`` from ``str``, which will perform UTF-8 + decoding/encoding as required. + +* Many other improvements of library internals without user-visible changes + + +1.8.1 (July 12, 2016) +---------------------- +* Fixed a rare but potentially very severe issue when the garbage collector ran + during pybind11 type creation. + +1.8.0 (June 14, 2016) +---------------------- +* Redesigned CMake build system which exports a convenient + ``pybind11_add_module`` function to parent projects. +* ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite`` +* Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``) +* Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper + to disable an enforced cast that may lose precision, e.g. to create overloads + for different precisions and complex vs real-valued matrices. +* Prevent implicit conversion of floating point values to integral types in + function arguments +* Fixed incorrect default return value policy for functions returning a shared + pointer +* Don't allow registering a type via ``class_`` twice +* Don't allow casting a ``None`` value into a C++ lvalue reference +* Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command +* Improved detection of whether or not custom C++ types can be copy/move-constructed +* Extended ``str`` type to also work with ``bytes`` instances +* Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``. +* When specifying function arguments via ``py::arg``, the test that verifies + the number of arguments now runs at compile time. +* Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some + compiler warnings +* List function arguments in exception text when the dispatch code cannot find + a matching overload +* Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which + can be used to override virtual methods whose name differs in C++ and Python + (e.g. ``__call__`` and ``operator()``) +* Various minor ``iterator`` and ``make_iterator()`` improvements +* Transparently support ``__bool__`` on Python 2.x and Python 3.x +* Fixed issue with destructor of unpickled object not being called +* Minor CMake build system improvements on Windows +* New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which + take an arbitrary number of arguments and keyword arguments +* New syntax to call a Python function from C++ using ``*args`` and ``*kwargs`` +* The functions ``def_property_*`` now correctly process docstring arguments (these + formerly caused a segmentation fault) +* Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()`` + macro accepts more arguments) +* Cygwin support +* Documentation improvements (pickling support, ``keep_alive``, macro usage) + +1.7 (April 30, 2016) +---------------------- +* Added a new ``move`` return value policy that triggers C++11 move semantics. + The automatic return value policy falls back to this case whenever a rvalue + reference is encountered +* Significantly more general GIL state routines that are used instead of + Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API +* Redesign of opaque types that drastically simplifies their usage +* Extended ability to pass values of type ``[const] void *`` +* ``keep_alive`` fix: don't fail when there is no patient +* ``functional.h``: acquire the GIL before calling a Python function +* Added Python RAII type wrappers ``none`` and ``iterable`` +* Added ``*args`` and ``*kwargs`` pass-through parameters to + ``pybind11.get_include()`` function +* Iterator improvements and fixes +* Documentation on return value policies and opaque types improved + +1.6 (April 30, 2016) +---------------------- +* Skipped due to upload to PyPI gone wrong and inability to recover + (https://github.com/pypa/packaging-problems/issues/74) + +1.5 (April 21, 2016) +---------------------- +* For polymorphic types, use RTTI to try to return the closest type registered with pybind11 +* Pickling support for serializing and unserializing C++ instances to a byte stream in Python +* Added a convenience routine ``make_iterator()`` which turns a range indicated + by a pair of C++ iterators into a iterable Python object +* Added ``len()`` and a variadic ``make_tuple()`` function +* Addressed a rare issue that could confuse the current virtual function + dispatcher and another that could lead to crashes in multi-threaded + applications +* Added a ``get_include()`` function to the Python module that returns the path + of the directory containing the installed pybind11 header files +* Documentation improvements: import issues, symbol visibility, pickling, limitations +* Added casting support for ``std::reference_wrapper<>`` + +1.4 (April 7, 2016) +-------------------------- +* Transparent type conversion for ``std::wstring`` and ``wchar_t`` +* Allow passing ``nullptr``-valued strings +* Transparent passing of ``void *`` pointers using capsules +* Transparent support for returning values wrapped in ``std::unique_ptr<>`` +* Improved docstring generation for compatibility with Sphinx +* Nicer debug error message when default parameter construction fails +* Support for "opaque" types that bypass the transparent conversion layer for STL containers +* Redesigned type casting interface to avoid ambiguities that could occasionally cause compiler errors +* Redesigned property implementation; fixes crashes due to an unfortunate default return value policy +* Anaconda package generation support + +1.3 (March 8, 2016) +-------------------------- + +* Added support for the Intel C++ compiler (v15+) +* Added support for the STL unordered set/map data structures +* Added support for the STL linked list data structure +* NumPy-style broadcasting support in ``pybind11::vectorize`` +* pybind11 now displays more verbose error messages when ``arg::operator=()`` fails +* pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues +* Many, many bugfixes involving corner cases and advanced usage + +1.2 (February 7, 2016) +-------------------------- + +* Optional: efficient generation of function signatures at compile time using C++14 +* Switched to a simpler and more general way of dealing with function default + arguments. Unused keyword arguments in function calls are now detected and + cause errors as expected +* New ``keep_alive`` call policy analogous to Boost.Python's ``with_custodian_and_ward`` +* New ``pybind11::base<>`` attribute to indicate a subclass relationship +* Improved interface for RAII type wrappers in ``pytypes.h`` +* Use RAII type wrappers consistently within pybind11 itself. This + fixes various potential refcount leaks when exceptions occur +* Added new ``bytes`` RAII type wrapper (maps to ``string`` in Python 2.7) +* Made handle and related RAII classes const correct, using them more + consistently everywhere now +* Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are + now stored in a C++ hash table that is not visible in Python +* Fixed refcount leaks involving NumPy arrays and bound functions +* Vastly improved handling of shared/smart pointers +* Removed an unnecessary copy operation in ``pybind11::vectorize`` +* Fixed naming clashes when both pybind11 and NumPy headers are included +* Added conversions for additional exception types +* Documentation improvements (using multiple extension modules, smart pointers, + other minor clarifications) +* unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function +* Fixed license text (was: ZLIB, should have been: 3-clause BSD) +* Python 3.2 compatibility +* Fixed remaining issues when accessing types in another plugin module +* Added enum comparison and casting methods +* Improved SFINAE-based detection of whether types are copy-constructible +* Eliminated many warnings about unused variables and the use of ``offsetof()`` +* Support for ``std::array<>`` conversions + +1.1 (December 7, 2015) +-------------------------- + +* Documentation improvements (GIL, wrapping functions, casting, fixed many typos) +* Generalized conversion of integer types +* Improved support for casting function objects +* Improved support for ``std::shared_ptr<>`` conversions +* Initial support for ``std::set<>`` conversions +* Fixed type resolution issue for types defined in a separate plugin module +* CMake build system improvements +* Factored out generic functionality to non-templated code (smaller code size) +* Added a code size / compile time benchmark vs Boost.Python +* Added an appveyor CI script + +1.0 (October 15, 2015) +------------------------ +* Initial release diff --git a/third_party/CityFlow/extern/pybind11/docs/classes.rst b/third_party/CityFlow/extern/pybind11/docs/classes.rst new file mode 100644 index 0000000000000000000000000000000000000000..4f2167dac1d73418f5f8222ed266d70b38d7e281 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/classes.rst @@ -0,0 +1,555 @@ +.. _classes: + +Object-oriented code +#################### + +Creating bindings for a custom type +=================================== + +Let's now look at a more complex example where we'll create bindings for a +custom C++ data structure named ``Pet``. Its definition is given below: + +.. code-block:: cpp + + struct Pet { + Pet(const std::string &name) : name(name) { } + void setName(const std::string &name_) { name = name_; } + const std::string &getName() const { return name; } + + std::string name; + }; + +The binding code for ``Pet`` looks as follows: + +.. code-block:: cpp + + #include + + namespace py = pybind11; + + PYBIND11_MODULE(example, m) { + py::class_(m, "Pet") + .def(py::init()) + .def("setName", &Pet::setName) + .def("getName", &Pet::getName); + } + +:class:`class_` creates bindings for a C++ *class* or *struct*-style data +structure. :func:`init` is a convenience function that takes the types of a +constructor's parameters as template arguments and wraps the corresponding +constructor (see the :ref:`custom_constructors` section for details). An +interactive Python session demonstrating this example is shown below: + +.. code-block:: pycon + + % python + >>> import example + >>> p = example.Pet("Molly") + >>> print(p) + + >>> p.getName() + 'Molly' + >>> p.setName("Charly") + >>> p.getName() + 'Charly' + +.. seealso:: + + Static member functions can be bound in the same way using + :func:`class_::def_static`. + +.. note:: + + Binding C++ types in unnamed namespaces (also known as anonymous namespaces) + works reliably on many platforms, but not all. The `XFAIL_CONDITION` in + tests/test_unnamed_namespace_a.py encodes the currently known conditions. + For background see `#4319 `_. + If portability is a concern, it is therefore not recommended to bind C++ + types in unnamed namespaces. It will be safest to manually pick unique + namespace names. + +Keyword and default arguments +============================= +It is possible to specify keyword and default arguments using the syntax +discussed in the previous chapter. Refer to the sections :ref:`keyword_args` +and :ref:`default_args` for details. + +Binding lambda functions +======================== + +Note how ``print(p)`` produced a rather useless summary of our data structure in the example above: + +.. code-block:: pycon + + >>> print(p) + + +To address this, we could bind a utility function that returns a human-readable +summary to the special method slot named ``__repr__``. Unfortunately, there is no +suitable functionality in the ``Pet`` data structure, and it would be nice if +we did not have to change it. This can easily be accomplished by binding a +Lambda function instead: + +.. code-block:: cpp + + py::class_(m, "Pet") + .def(py::init()) + .def("setName", &Pet::setName) + .def("getName", &Pet::getName) + .def("__repr__", + [](const Pet &a) { + return ""; + } + ); + +Both stateless [#f1]_ and stateful lambda closures are supported by pybind11. +With the above change, the same Python code now produces the following output: + +.. code-block:: pycon + + >>> print(p) + + +.. [#f1] Stateless closures are those with an empty pair of brackets ``[]`` as the capture object. + +.. _properties: + +Instance and static fields +========================== + +We can also directly expose the ``name`` field using the +:func:`class_::def_readwrite` method. A similar :func:`class_::def_readonly` +method also exists for ``const`` fields. + +.. code-block:: cpp + + py::class_(m, "Pet") + .def(py::init()) + .def_readwrite("name", &Pet::name) + // ... remainder ... + +This makes it possible to write + +.. code-block:: pycon + + >>> p = example.Pet("Molly") + >>> p.name + 'Molly' + >>> p.name = "Charly" + >>> p.name + 'Charly' + +Now suppose that ``Pet::name`` was a private internal variable +that can only be accessed via setters and getters. + +.. code-block:: cpp + + class Pet { + public: + Pet(const std::string &name) : name(name) { } + void setName(const std::string &name_) { name = name_; } + const std::string &getName() const { return name; } + private: + std::string name; + }; + +In this case, the method :func:`class_::def_property` +(:func:`class_::def_property_readonly` for read-only data) can be used to +provide a field-like interface within Python that will transparently call +the setter and getter functions: + +.. code-block:: cpp + + py::class_(m, "Pet") + .def(py::init()) + .def_property("name", &Pet::getName, &Pet::setName) + // ... remainder ... + +Write only properties can be defined by passing ``nullptr`` as the +input for the read function. + +.. seealso:: + + Similar functions :func:`class_::def_readwrite_static`, + :func:`class_::def_readonly_static` :func:`class_::def_property_static`, + and :func:`class_::def_property_readonly_static` are provided for binding + static variables and properties. Please also see the section on + :ref:`static_properties` in the advanced part of the documentation. + +Dynamic attributes +================== + +Native Python classes can pick up new attributes dynamically: + +.. code-block:: pycon + + >>> class Pet: + ... name = "Molly" + ... + >>> p = Pet() + >>> p.name = "Charly" # overwrite existing + >>> p.age = 2 # dynamically add a new attribute + +By default, classes exported from C++ do not support this and the only writable +attributes are the ones explicitly defined using :func:`class_::def_readwrite` +or :func:`class_::def_property`. + +.. code-block:: cpp + + py::class_(m, "Pet") + .def(py::init<>()) + .def_readwrite("name", &Pet::name); + +Trying to set any other attribute results in an error: + +.. code-block:: pycon + + >>> p = example.Pet() + >>> p.name = "Charly" # OK, attribute defined in C++ + >>> p.age = 2 # fail + AttributeError: 'Pet' object has no attribute 'age' + +To enable dynamic attributes for C++ classes, the :class:`py::dynamic_attr` tag +must be added to the :class:`py::class_` constructor: + +.. code-block:: cpp + + py::class_(m, "Pet", py::dynamic_attr()) + .def(py::init<>()) + .def_readwrite("name", &Pet::name); + +Now everything works as expected: + +.. code-block:: pycon + + >>> p = example.Pet() + >>> p.name = "Charly" # OK, overwrite value in C++ + >>> p.age = 2 # OK, dynamically add a new attribute + >>> p.__dict__ # just like a native Python class + {'age': 2} + +Note that there is a small runtime cost for a class with dynamic attributes. +Not only because of the addition of a ``__dict__``, but also because of more +expensive garbage collection tracking which must be activated to resolve +possible circular references. Native Python classes incur this same cost by +default, so this is not anything to worry about. By default, pybind11 classes +are more efficient than native Python classes. Enabling dynamic attributes +just brings them on par. + +.. _inheritance: + +Inheritance and automatic downcasting +===================================== + +Suppose now that the example consists of two data structures with an +inheritance relationship: + +.. code-block:: cpp + + struct Pet { + Pet(const std::string &name) : name(name) { } + std::string name; + }; + + struct Dog : Pet { + Dog(const std::string &name) : Pet(name) { } + std::string bark() const { return "woof!"; } + }; + +There are two different ways of indicating a hierarchical relationship to +pybind11: the first specifies the C++ base class as an extra template +parameter of the :class:`class_`: + +.. code-block:: cpp + + py::class_(m, "Pet") + .def(py::init()) + .def_readwrite("name", &Pet::name); + + // Method 1: template parameter: + py::class_(m, "Dog") + .def(py::init()) + .def("bark", &Dog::bark); + +Alternatively, we can also assign a name to the previously bound ``Pet`` +:class:`class_` object and reference it when binding the ``Dog`` class: + +.. code-block:: cpp + + py::class_ pet(m, "Pet"); + pet.def(py::init()) + .def_readwrite("name", &Pet::name); + + // Method 2: pass parent class_ object: + py::class_(m, "Dog", pet /* <- specify Python parent type */) + .def(py::init()) + .def("bark", &Dog::bark); + +Functionality-wise, both approaches are equivalent. Afterwards, instances will +expose fields and methods of both types: + +.. code-block:: pycon + + >>> p = example.Dog("Molly") + >>> p.name + 'Molly' + >>> p.bark() + 'woof!' + +The C++ classes defined above are regular non-polymorphic types with an +inheritance relationship. This is reflected in Python: + +.. code-block:: cpp + + // Return a base pointer to a derived instance + m.def("pet_store", []() { return std::unique_ptr(new Dog("Molly")); }); + +.. code-block:: pycon + + >>> p = example.pet_store() + >>> type(p) # `Dog` instance behind `Pet` pointer + Pet # no pointer downcasting for regular non-polymorphic types + >>> p.bark() + AttributeError: 'Pet' object has no attribute 'bark' + +The function returned a ``Dog`` instance, but because it's a non-polymorphic +type behind a base pointer, Python only sees a ``Pet``. In C++, a type is only +considered polymorphic if it has at least one virtual function and pybind11 +will automatically recognize this: + +.. code-block:: cpp + + struct PolymorphicPet { + virtual ~PolymorphicPet() = default; + }; + + struct PolymorphicDog : PolymorphicPet { + std::string bark() const { return "woof!"; } + }; + + // Same binding code + py::class_(m, "PolymorphicPet"); + py::class_(m, "PolymorphicDog") + .def(py::init<>()) + .def("bark", &PolymorphicDog::bark); + + // Again, return a base pointer to a derived instance + m.def("pet_store2", []() { return std::unique_ptr(new PolymorphicDog); }); + +.. code-block:: pycon + + >>> p = example.pet_store2() + >>> type(p) + PolymorphicDog # automatically downcast + >>> p.bark() + 'woof!' + +Given a pointer to a polymorphic base, pybind11 performs automatic downcasting +to the actual derived type. Note that this goes beyond the usual situation in +C++: we don't just get access to the virtual functions of the base, we get the +concrete derived type including functions and attributes that the base type may +not even be aware of. + +.. seealso:: + + For more information about polymorphic behavior see :ref:`overriding_virtuals`. + + +Overloaded methods +================== + +Sometimes there are several overloaded C++ methods with the same name taking +different kinds of input arguments: + +.. code-block:: cpp + + struct Pet { + Pet(const std::string &name, int age) : name(name), age(age) { } + + void set(int age_) { age = age_; } + void set(const std::string &name_) { name = name_; } + + std::string name; + int age; + }; + +Attempting to bind ``Pet::set`` will cause an error since the compiler does not +know which method the user intended to select. We can disambiguate by casting +them to function pointers. Binding multiple functions to the same Python name +automatically creates a chain of function overloads that will be tried in +sequence. + +.. code-block:: cpp + + py::class_(m, "Pet") + .def(py::init()) + .def("set", static_cast(&Pet::set), "Set the pet's age") + .def("set", static_cast(&Pet::set), "Set the pet's name"); + +The overload signatures are also visible in the method's docstring: + +.. code-block:: pycon + + >>> help(example.Pet) + + class Pet(__builtin__.object) + | Methods defined here: + | + | __init__(...) + | Signature : (Pet, str, int) -> NoneType + | + | set(...) + | 1. Signature : (Pet, int) -> NoneType + | + | Set the pet's age + | + | 2. Signature : (Pet, str) -> NoneType + | + | Set the pet's name + +If you have a C++14 compatible compiler [#cpp14]_, you can use an alternative +syntax to cast the overloaded function: + +.. code-block:: cpp + + py::class_(m, "Pet") + .def("set", py::overload_cast(&Pet::set), "Set the pet's age") + .def("set", py::overload_cast(&Pet::set), "Set the pet's name"); + +Here, ``py::overload_cast`` only requires the parameter types to be specified. +The return type and class are deduced. This avoids the additional noise of +``void (Pet::*)()`` as seen in the raw cast. If a function is overloaded based +on constness, the ``py::const_`` tag should be used: + +.. code-block:: cpp + + struct Widget { + int foo(int x, float y); + int foo(int x, float y) const; + }; + + py::class_(m, "Widget") + .def("foo_mutable", py::overload_cast(&Widget::foo)) + .def("foo_const", py::overload_cast(&Widget::foo, py::const_)); + +If you prefer the ``py::overload_cast`` syntax but have a C++11 compatible compiler only, +you can use ``py::detail::overload_cast_impl`` with an additional set of parentheses: + +.. code-block:: cpp + + template + using overload_cast_ = pybind11::detail::overload_cast_impl; + + py::class_(m, "Pet") + .def("set", overload_cast_()(&Pet::set), "Set the pet's age") + .def("set", overload_cast_()(&Pet::set), "Set the pet's name"); + +.. [#cpp14] A compiler which supports the ``-std=c++14`` flag. + +.. note:: + + To define multiple overloaded constructors, simply declare one after the + other using the ``.def(py::init<...>())`` syntax. The existing machinery + for specifying keyword and default arguments also works. + +Enumerations and internal types +=============================== + +Let's now suppose that the example class contains internal types like enumerations, e.g.: + +.. code-block:: cpp + + struct Pet { + enum Kind { + Dog = 0, + Cat + }; + + struct Attributes { + float age = 0; + }; + + Pet(const std::string &name, Kind type) : name(name), type(type) { } + + std::string name; + Kind type; + Attributes attr; + }; + +The binding code for this example looks as follows: + +.. code-block:: cpp + + py::class_ pet(m, "Pet"); + + pet.def(py::init()) + .def_readwrite("name", &Pet::name) + .def_readwrite("type", &Pet::type) + .def_readwrite("attr", &Pet::attr); + + py::enum_(pet, "Kind") + .value("Dog", Pet::Kind::Dog) + .value("Cat", Pet::Kind::Cat) + .export_values(); + + py::class_(pet, "Attributes") + .def(py::init<>()) + .def_readwrite("age", &Pet::Attributes::age); + + +To ensure that the nested types ``Kind`` and ``Attributes`` are created within the scope of ``Pet``, the +``pet`` :class:`class_` instance must be supplied to the :class:`enum_` and :class:`class_` +constructor. The :func:`enum_::export_values` function exports the enum entries +into the parent scope, which should be skipped for newer C++11-style strongly +typed enums. + +.. code-block:: pycon + + >>> p = Pet("Lucy", Pet.Cat) + >>> p.type + Kind.Cat + >>> int(p.type) + 1L + +The entries defined by the enumeration type are exposed in the ``__members__`` property: + +.. code-block:: pycon + + >>> Pet.Kind.__members__ + {'Dog': Kind.Dog, 'Cat': Kind.Cat} + +The ``name`` property returns the name of the enum value as a unicode string. + +.. note:: + + It is also possible to use ``str(enum)``, however these accomplish different + goals. The following shows how these two approaches differ. + + .. code-block:: pycon + + >>> p = Pet("Lucy", Pet.Cat) + >>> pet_type = p.type + >>> pet_type + Pet.Cat + >>> str(pet_type) + 'Pet.Cat' + >>> pet_type.name + 'Cat' + +.. note:: + + When the special tag ``py::arithmetic()`` is specified to the ``enum_`` + constructor, pybind11 creates an enumeration that also supports rudimentary + arithmetic and bit-level operations like comparisons, and, or, xor, negation, + etc. + + .. code-block:: cpp + + py::enum_(pet, "Kind", py::arithmetic()) + ... + + By default, these are omitted to conserve space. + +.. warning:: + + Contrary to Python customs, enum values from the wrappers should not be compared using ``is``, but with ``==`` (see `#1177 `_ for background). diff --git a/third_party/CityFlow/extern/pybind11/docs/cmake/index.rst b/third_party/CityFlow/extern/pybind11/docs/cmake/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..eaf66d70f31fadc25bc6810aa458854893b9db6e --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/cmake/index.rst @@ -0,0 +1,8 @@ +CMake helpers +------------- + +Pybind11 can be used with ``add_subdirectory(extern/pybind11)``, or from an +install with ``find_package(pybind11 CONFIG)``. The interface provided in +either case is functionally identical. + +.. cmake-module:: ../../tools/pybind11Config.cmake.in diff --git a/third_party/CityFlow/extern/pybind11/docs/compiling.rst b/third_party/CityFlow/extern/pybind11/docs/compiling.rst new file mode 100644 index 0000000000000000000000000000000000000000..3be84ba7d85c7efbe29ec412dc361c72fdc909e1 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/compiling.rst @@ -0,0 +1,649 @@ +.. _compiling: + +Build systems +############# + +.. _build-setuptools: + +Building with setuptools +======================== + +For projects on PyPI, building with setuptools is the way to go. Sylvain Corlay +has kindly provided an example project which shows how to set up everything, +including automatic generation of documentation using Sphinx. Please refer to +the [python_example]_ repository. + +.. [python_example] https://github.com/pybind/python_example + +A helper file is provided with pybind11 that can simplify usage with setuptools. + +To use pybind11 inside your ``setup.py``, you have to have some system to +ensure that ``pybind11`` is installed when you build your package. There are +four possible ways to do this, and pybind11 supports all four: You can ask all +users to install pybind11 beforehand (bad), you can use +:ref:`setup_helpers-pep518` (good, but very new and requires Pip 10), +:ref:`setup_helpers-setup_requires` (discouraged by Python packagers now that +PEP 518 is available, but it still works everywhere), or you can +:ref:`setup_helpers-copy-manually` (always works but you have to manually sync +your copy to get updates). + +An example of a ``setup.py`` using pybind11's helpers: + +.. code-block:: python + + from glob import glob + from setuptools import setup + from pybind11.setup_helpers import Pybind11Extension + + ext_modules = [ + Pybind11Extension( + "python_example", + sorted(glob("src/*.cpp")), # Sort source files for reproducibility + ), + ] + + setup(..., ext_modules=ext_modules) + +If you want to do an automatic search for the highest supported C++ standard, +that is supported via a ``build_ext`` command override; it will only affect +``Pybind11Extensions``: + +.. code-block:: python + + from glob import glob + from setuptools import setup + from pybind11.setup_helpers import Pybind11Extension, build_ext + + ext_modules = [ + Pybind11Extension( + "python_example", + sorted(glob("src/*.cpp")), + ), + ] + + setup(..., cmdclass={"build_ext": build_ext}, ext_modules=ext_modules) + +If you have single-file extension modules that are directly stored in the +Python source tree (``foo.cpp`` in the same directory as where a ``foo.py`` +would be located), you can also generate ``Pybind11Extensions`` using +``setup_helpers.intree_extensions``: ``intree_extensions(["path/to/foo.cpp", +...])`` returns a list of ``Pybind11Extensions`` which can be passed to +``ext_modules``, possibly after further customizing their attributes +(``libraries``, ``include_dirs``, etc.). By doing so, a ``foo.*.so`` extension +module will be generated and made available upon installation. + +``intree_extension`` will automatically detect if you are using a ``src``-style +layout (as long as no namespace packages are involved), but you can also +explicitly pass ``package_dir`` to it (as in ``setuptools.setup``). + +Since pybind11 does not require NumPy when building, a light-weight replacement +for NumPy's parallel compilation distutils tool is included. Use it like this: + +.. code-block:: python + + from pybind11.setup_helpers import ParallelCompile + + # Optional multithreaded build + ParallelCompile("NPY_NUM_BUILD_JOBS").install() + + setup(...) + +The argument is the name of an environment variable to control the number of +threads, such as ``NPY_NUM_BUILD_JOBS`` (as used by NumPy), though you can set +something different if you want; ``CMAKE_BUILD_PARALLEL_LEVEL`` is another choice +a user might expect. You can also pass ``default=N`` to set the default number +of threads (0 will take the number of threads available) and ``max=N``, the +maximum number of threads; if you have a large extension you may want set this +to a memory dependent number. + +If you are developing rapidly and have a lot of C++ files, you may want to +avoid rebuilding files that have not changed. For simple cases were you are +using ``pip install -e .`` and do not have local headers, you can skip the +rebuild if an object file is newer than its source (headers are not checked!) +with the following: + +.. code-block:: python + + from pybind11.setup_helpers import ParallelCompile, naive_recompile + + ParallelCompile("NPY_NUM_BUILD_JOBS", needs_recompile=naive_recompile).install() + + +If you have a more complex build, you can implement a smarter function and pass +it to ``needs_recompile``, or you can use [Ccache]_ instead. ``CXX="cache g++" +pip install -e .`` would be the way to use it with GCC, for example. Unlike the +simple solution, this even works even when not compiling in editable mode, but +it does require Ccache to be installed. + +Keep in mind that Pip will not even attempt to rebuild if it thinks it has +already built a copy of your code, which it deduces from the version number. +One way to avoid this is to use [setuptools_scm]_, which will generate a +version number that includes the number of commits since your last tag and a +hash for a dirty directory. Another way to force a rebuild is purge your cache +or use Pip's ``--no-cache-dir`` option. + +.. [Ccache] https://ccache.dev + +.. [setuptools_scm] https://github.com/pypa/setuptools_scm + +.. _setup_helpers-pep518: + +PEP 518 requirements (Pip 10+ required) +--------------------------------------- + +If you use `PEP 518's `_ +``pyproject.toml`` file, you can ensure that ``pybind11`` is available during +the compilation of your project. When this file exists, Pip will make a new +virtual environment, download just the packages listed here in ``requires=``, +and build a wheel (binary Python package). It will then throw away the +environment, and install your wheel. + +Your ``pyproject.toml`` file will likely look something like this: + +.. code-block:: toml + + [build-system] + requires = ["setuptools>=42", "pybind11>=2.6.1"] + build-backend = "setuptools.build_meta" + +.. note:: + + The main drawback to this method is that a `PEP 517`_ compliant build tool, + such as Pip 10+, is required for this approach to work; older versions of + Pip completely ignore this file. If you distribute binaries (called wheels + in Python) using something like `cibuildwheel`_, remember that ``setup.py`` + and ``pyproject.toml`` are not even contained in the wheel, so this high + Pip requirement is only for source builds, and will not affect users of + your binary wheels. If you are building SDists and wheels, then + `pypa-build`_ is the recommended official tool. + +.. _PEP 517: https://www.python.org/dev/peps/pep-0517/ +.. _cibuildwheel: https://cibuildwheel.readthedocs.io +.. _pypa-build: https://pypa-build.readthedocs.io/en/latest/ + +.. _setup_helpers-setup_requires: + +Classic ``setup_requires`` +-------------------------- + +If you want to support old versions of Pip with the classic +``setup_requires=["pybind11"]`` keyword argument to setup, which triggers a +two-phase ``setup.py`` run, then you will need to use something like this to +ensure the first pass works (which has not yet installed the ``setup_requires`` +packages, since it can't install something it does not know about): + +.. code-block:: python + + try: + from pybind11.setup_helpers import Pybind11Extension + except ImportError: + from setuptools import Extension as Pybind11Extension + + +It doesn't matter that the Extension class is not the enhanced subclass for the +first pass run; and the second pass will have the ``setup_requires`` +requirements. + +This is obviously more of a hack than the PEP 518 method, but it supports +ancient versions of Pip. + +.. _setup_helpers-copy-manually: + +Copy manually +------------- + +You can also copy ``setup_helpers.py`` directly to your project; it was +designed to be usable standalone, like the old example ``setup.py``. You can +set ``include_pybind11=False`` to skip including the pybind11 package headers, +so you can use it with git submodules and a specific git version. If you use +this, you will need to import from a local file in ``setup.py`` and ensure the +helper file is part of your MANIFEST. + + +Closely related, if you include pybind11 as a subproject, you can run the +``setup_helpers.py`` inplace. If loaded correctly, this should even pick up +the correct include for pybind11, though you can turn it off as shown above if +you want to input it manually. + +Suggested usage if you have pybind11 as a submodule in ``extern/pybind11``: + +.. code-block:: python + + DIR = os.path.abspath(os.path.dirname(__file__)) + + sys.path.append(os.path.join(DIR, "extern", "pybind11")) + from pybind11.setup_helpers import Pybind11Extension # noqa: E402 + + del sys.path[-1] + + +.. versionchanged:: 2.6 + + Added ``setup_helpers`` file. + +Building with cppimport +======================== + +[cppimport]_ is a small Python import hook that determines whether there is a C++ +source file whose name matches the requested module. If there is, the file is +compiled as a Python extension using pybind11 and placed in the same folder as +the C++ source file. Python is then able to find the module and load it. + +.. [cppimport] https://github.com/tbenthompson/cppimport + +.. _cmake: + +Building with CMake +=================== + +For C++ codebases that have an existing CMake-based build system, a Python +extension module can be created with just a few lines of code: + +.. code-block:: cmake + + cmake_minimum_required(VERSION 3.5...3.27) + project(example LANGUAGES CXX) + + add_subdirectory(pybind11) + pybind11_add_module(example example.cpp) + +This assumes that the pybind11 repository is located in a subdirectory named +:file:`pybind11` and that the code is located in a file named :file:`example.cpp`. +The CMake command ``add_subdirectory`` will import the pybind11 project which +provides the ``pybind11_add_module`` function. It will take care of all the +details needed to build a Python extension module on any platform. + +A working sample project, including a way to invoke CMake from :file:`setup.py` for +PyPI integration, can be found in the [cmake_example]_ repository. + +.. [cmake_example] https://github.com/pybind/cmake_example + +.. versionchanged:: 2.6 + CMake 3.4+ is required. + +.. versionchanged:: 2.11 + CMake 3.5+ is required. + +Further information can be found at :doc:`cmake/index`. + +pybind11_add_module +------------------- + +To ease the creation of Python extension modules, pybind11 provides a CMake +function with the following signature: + +.. code-block:: cmake + + pybind11_add_module( [MODULE | SHARED] [EXCLUDE_FROM_ALL] + [NO_EXTRAS] [THIN_LTO] [OPT_SIZE] source1 [source2 ...]) + +This function behaves very much like CMake's builtin ``add_library`` (in fact, +it's a wrapper function around that command). It will add a library target +called ```` to be built from the listed source files. In addition, it +will take care of all the Python-specific compiler and linker flags as well +as the OS- and Python-version-specific file extension. The produced target +```` can be further manipulated with regular CMake commands. + +``MODULE`` or ``SHARED`` may be given to specify the type of library. If no +type is given, ``MODULE`` is used by default which ensures the creation of a +Python-exclusive module. Specifying ``SHARED`` will create a more traditional +dynamic library which can also be linked from elsewhere. ``EXCLUDE_FROM_ALL`` +removes this target from the default build (see CMake docs for details). + +Since pybind11 is a template library, ``pybind11_add_module`` adds compiler +flags to ensure high quality code generation without bloat arising from long +symbol names and duplication of code in different translation units. It +sets default visibility to *hidden*, which is required for some pybind11 +features and functionality when attempting to load multiple pybind11 modules +compiled under different pybind11 versions. It also adds additional flags +enabling LTO (Link Time Optimization) and strip unneeded symbols. See the +:ref:`FAQ entry ` for a more detailed explanation. These +latter optimizations are never applied in ``Debug`` mode. If ``NO_EXTRAS`` is +given, they will always be disabled, even in ``Release`` mode. However, this +will result in code bloat and is generally not recommended. + +As stated above, LTO is enabled by default. Some newer compilers also support +different flavors of LTO such as `ThinLTO`_. Setting ``THIN_LTO`` will cause +the function to prefer this flavor if available. The function falls back to +regular LTO if ``-flto=thin`` is not available. If +``CMAKE_INTERPROCEDURAL_OPTIMIZATION`` is set (either ``ON`` or ``OFF``), then +that will be respected instead of the built-in flag search. + +.. note:: + + If you want to set the property form on targets or the + ``CMAKE_INTERPROCEDURAL_OPTIMIZATION_`` versions of this, you should + still use ``set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)`` (otherwise a + no-op) to disable pybind11's ipo flags. + +The ``OPT_SIZE`` flag enables size-based optimization equivalent to the +standard ``/Os`` or ``-Os`` compiler flags and the ``MinSizeRel`` build type, +which avoid optimizations that that can substantially increase the size of the +resulting binary. This flag is particularly useful in projects that are split +into performance-critical parts and associated bindings. In this case, we can +compile the project in release mode (and hence, optimize performance globally), +and specify ``OPT_SIZE`` for the binding target, where size might be the main +concern as performance is often less critical here. A ~25% size reduction has +been observed in practice. This flag only changes the optimization behavior at +a per-target level and takes precedence over the global CMake build type +(``Release``, ``RelWithDebInfo``) except for ``Debug`` builds, where +optimizations remain disabled. + +.. _ThinLTO: http://clang.llvm.org/docs/ThinLTO.html + +Configuration variables +----------------------- + +By default, pybind11 will compile modules with the compiler default or the +minimum standard required by pybind11, whichever is higher. You can set the +standard explicitly with +`CMAKE_CXX_STANDARD `_: + +.. code-block:: cmake + + set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ version selection") # or 11, 14, 17, 20 + set(CMAKE_CXX_STANDARD_REQUIRED ON) # optional, ensure standard is supported + set(CMAKE_CXX_EXTENSIONS OFF) # optional, keep compiler extensions off + +The variables can also be set when calling CMake from the command line using +the ``-D=`` flag. You can also manually set ``CXX_STANDARD`` +on a target or use ``target_compile_features`` on your targets - anything that +CMake supports. + +Classic Python support: The target Python version can be selected by setting +``PYBIND11_PYTHON_VERSION`` or an exact Python installation can be specified +with ``PYTHON_EXECUTABLE``. For example: + +.. code-block:: bash + + cmake -DPYBIND11_PYTHON_VERSION=3.6 .. + + # Another method: + cmake -DPYTHON_EXECUTABLE=/path/to/python .. + + # This often is a good way to get the current Python, works in environments: + cmake -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") .. + + +find_package vs. add_subdirectory +--------------------------------- + +For CMake-based projects that don't include the pybind11 repository internally, +an external installation can be detected through ``find_package(pybind11)``. +See the `Config file`_ docstring for details of relevant CMake variables. + +.. code-block:: cmake + + cmake_minimum_required(VERSION 3.4...3.18) + project(example LANGUAGES CXX) + + find_package(pybind11 REQUIRED) + pybind11_add_module(example example.cpp) + +Note that ``find_package(pybind11)`` will only work correctly if pybind11 +has been correctly installed on the system, e. g. after downloading or cloning +the pybind11 repository : + +.. code-block:: bash + + # Classic CMake + cd pybind11 + mkdir build + cd build + cmake .. + make install + + # CMake 3.15+ + cd pybind11 + cmake -S . -B build + cmake --build build -j 2 # Build on 2 cores + cmake --install build + +Once detected, the aforementioned ``pybind11_add_module`` can be employed as +before. The function usage and configuration variables are identical no matter +if pybind11 is added as a subdirectory or found as an installed package. You +can refer to the same [cmake_example]_ repository for a full sample project +-- just swap out ``add_subdirectory`` for ``find_package``. + +.. _Config file: https://github.com/pybind/pybind11/blob/master/tools/pybind11Config.cmake.in + + +.. _find-python-mode: + +FindPython mode +--------------- + +CMake 3.12+ (3.15+ recommended, 3.18.2+ ideal) added a new module called +FindPython that had a highly improved search algorithm and modern targets +and tools. If you use FindPython, pybind11 will detect this and use the +existing targets instead: + +.. code-block:: cmake + + cmake_minimum_required(VERSION 3.15...3.22) + project(example LANGUAGES CXX) + + find_package(Python 3.6 COMPONENTS Interpreter Development REQUIRED) + find_package(pybind11 CONFIG REQUIRED) + # or add_subdirectory(pybind11) + + pybind11_add_module(example example.cpp) + +You can also use the targets (as listed below) with FindPython. If you define +``PYBIND11_FINDPYTHON``, pybind11 will perform the FindPython step for you +(mostly useful when building pybind11's own tests, or as a way to change search +algorithms from the CMake invocation, with ``-DPYBIND11_FINDPYTHON=ON``. + +.. warning:: + + If you use FindPython to multi-target Python versions, use the individual + targets listed below, and avoid targets that directly include Python parts. + +There are `many ways to hint or force a discovery of a specific Python +installation `_), +setting ``Python_ROOT_DIR`` may be the most common one (though with +virtualenv/venv support, and Conda support, this tends to find the correct +Python version more often than the old system did). + +.. warning:: + + When the Python libraries (i.e. ``libpythonXX.a`` and ``libpythonXX.so`` + on Unix) are not available, as is the case on a manylinux image, the + ``Development`` component will not be resolved by ``FindPython``. When not + using the embedding functionality, CMake 3.18+ allows you to specify + ``Development.Module`` instead of ``Development`` to resolve this issue. + +.. versionadded:: 2.6 + +Advanced: interface library targets +----------------------------------- + +Pybind11 supports modern CMake usage patterns with a set of interface targets, +available in all modes. The targets provided are: + + ``pybind11::headers`` + Just the pybind11 headers and minimum compile requirements + + ``pybind11::pybind11`` + Python headers + ``pybind11::headers`` + + ``pybind11::python_link_helper`` + Just the "linking" part of pybind11:module + + ``pybind11::module`` + Everything for extension modules - ``pybind11::pybind11`` + ``Python::Module`` (FindPython CMake 3.15+) or ``pybind11::python_link_helper`` + + ``pybind11::embed`` + Everything for embedding the Python interpreter - ``pybind11::pybind11`` + ``Python::Python`` (FindPython) or Python libs + + ``pybind11::lto`` / ``pybind11::thin_lto`` + An alternative to `INTERPROCEDURAL_OPTIMIZATION` for adding link-time optimization. + + ``pybind11::windows_extras`` + ``/bigobj`` and ``/mp`` for MSVC. + + ``pybind11::opt_size`` + ``/Os`` for MSVC, ``-Os`` for other compilers. Does nothing for debug builds. + +Two helper functions are also provided: + + ``pybind11_strip(target)`` + Strips a target (uses ``CMAKE_STRIP`` after the target is built) + + ``pybind11_extension(target)`` + Sets the correct extension (with SOABI) for a target. + +You can use these targets to build complex applications. For example, the +``add_python_module`` function is identical to: + +.. code-block:: cmake + + cmake_minimum_required(VERSION 3.5...3.27) + project(example LANGUAGES CXX) + + find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11) + + add_library(example MODULE main.cpp) + + target_link_libraries(example PRIVATE pybind11::module pybind11::lto pybind11::windows_extras) + + pybind11_extension(example) + if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo) + # Strip unnecessary sections of the binary on Linux/macOS + pybind11_strip(example) + endif() + + set_target_properties(example PROPERTIES CXX_VISIBILITY_PRESET "hidden" + CUDA_VISIBILITY_PRESET "hidden") + +Instead of setting properties, you can set ``CMAKE_*`` variables to initialize these correctly. + +.. warning:: + + Since pybind11 is a metatemplate library, it is crucial that certain + compiler flags are provided to ensure high quality code generation. In + contrast to the ``pybind11_add_module()`` command, the CMake interface + provides a *composable* set of targets to ensure that you retain flexibility. + It can be especially important to provide or set these properties; the + :ref:`FAQ ` contains an explanation on why these are needed. + +.. versionadded:: 2.6 + +.. _nopython-mode: + +Advanced: NOPYTHON mode +----------------------- + +If you want complete control, you can set ``PYBIND11_NOPYTHON`` to completely +disable Python integration (this also happens if you run ``FindPython2`` and +``FindPython3`` without running ``FindPython``). This gives you complete +freedom to integrate into an existing system (like `Scikit-Build's +`_ ``PythonExtensions``). +``pybind11_add_module`` and ``pybind11_extension`` will be unavailable, and the +targets will be missing any Python specific behavior. + +.. versionadded:: 2.6 + +Embedding the Python interpreter +-------------------------------- + +In addition to extension modules, pybind11 also supports embedding Python into +a C++ executable or library. In CMake, simply link with the ``pybind11::embed`` +target. It provides everything needed to get the interpreter running. The Python +headers and libraries are attached to the target. Unlike ``pybind11::module``, +there is no need to manually set any additional properties here. For more +information about usage in C++, see :doc:`/advanced/embedding`. + +.. code-block:: cmake + + cmake_minimum_required(VERSION 3.5...3.27) + project(example LANGUAGES CXX) + + find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11) + + add_executable(example main.cpp) + target_link_libraries(example PRIVATE pybind11::embed) + +.. _building_manually: + +Building manually +================= + +pybind11 is a header-only library, hence it is not necessary to link against +any special libraries and there are no intermediate (magic) translation steps. + +On Linux, you can compile an example such as the one given in +:ref:`simple_example` using the following command: + +.. code-block:: bash + + $ c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) example.cpp -o example$(python3-config --extension-suffix) + +The ``python3 -m pybind11 --includes`` command fetches the include paths for +both pybind11 and Python headers. This assumes that pybind11 has been installed +using ``pip`` or ``conda``. If it hasn't, you can also manually specify +``-I /include`` together with the Python includes path +``python3-config --includes``. + +On macOS: the build command is almost the same but it also requires passing +the ``-undefined dynamic_lookup`` flag so as to ignore missing symbols when +building the module: + +.. code-block:: bash + + $ c++ -O3 -Wall -shared -std=c++11 -undefined dynamic_lookup $(python3 -m pybind11 --includes) example.cpp -o example$(python3-config --extension-suffix) + +In general, it is advisable to include several additional build parameters +that can considerably reduce the size of the created binary. Refer to section +:ref:`cmake` for a detailed example of a suitable cross-platform CMake-based +build system that works on all platforms including Windows. + +.. note:: + + On Linux and macOS, it's better to (intentionally) not link against + ``libpython``. The symbols will be resolved when the extension library + is loaded into a Python binary. This is preferable because you might + have several different installations of a given Python version (e.g. the + system-provided Python, and one that ships with a piece of commercial + software). In this way, the plugin will work with both versions, instead + of possibly importing a second Python library into a process that already + contains one (which will lead to a segfault). + + +Building with Bazel +=================== + +You can build with the Bazel build system using the `pybind11_bazel +`_ repository. + +Generating binding code automatically +===================================== + +The ``Binder`` project is a tool for automatic generation of pybind11 binding +code by introspecting existing C++ codebases using LLVM/Clang. See the +[binder]_ documentation for details. + +.. [binder] http://cppbinder.readthedocs.io/en/latest/about.html + +[AutoWIG]_ is a Python library that wraps automatically compiled libraries into +high-level languages. It parses C++ code using LLVM/Clang technologies and +generates the wrappers using the Mako templating engine. The approach is automatic, +extensible, and applies to very complex C++ libraries, composed of thousands of +classes or incorporating modern meta-programming constructs. + +.. [AutoWIG] https://github.com/StatisKit/AutoWIG + +[robotpy-build]_ is a is a pure python, cross platform build tool that aims to +simplify creation of python wheels for pybind11 projects, and provide +cross-project dependency management. Additionally, it is able to autogenerate +customizable pybind11-based wrappers by parsing C++ header files. + +.. [robotpy-build] https://robotpy-build.readthedocs.io + +[litgen]_ is an automatic python bindings generator with a focus on generating +documented and discoverable bindings: bindings will nicely reproduce the documentation +found in headers. It is is based on srcML (srcml.org), a highly scalable, multi-language +parsing tool with a developer centric approach. The API that you want to expose to python +must be C++14 compatible (but your implementation can use more modern constructs). + +.. [litgen] https://pthom.github.io/litgen diff --git a/third_party/CityFlow/extern/pybind11/docs/conf.py b/third_party/CityFlow/extern/pybind11/docs/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..6e24751e9ee830b43bed01f99e4fabd11ce586c4 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/conf.py @@ -0,0 +1,368 @@ +#!/usr/bin/env python3 +# +# pybind11 documentation build configuration file, created by +# sphinx-quickstart on Sun Oct 11 19:23:48 2015. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import os +import re +import subprocess +import sys +from pathlib import Path + +DIR = Path(__file__).parent.resolve() + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "breathe", + "sphinx_copybutton", + "sphinxcontrib.rsvgconverter", + "sphinxcontrib.moderncmakedomain", +] + +breathe_projects = {"pybind11": ".build/doxygenxml/"} +breathe_default_project = "pybind11" +breathe_domain_by_extension = {"h": "cpp"} + +# Add any paths that contain templates here, relative to this directory. +templates_path = [".templates"] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# source_suffix = ['.rst', '.md'] +source_suffix = ".rst" + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = "index" + +# General information about the project. +project = "pybind11" +copyright = "2017, Wenzel Jakob" +author = "Wenzel Jakob" + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. + +# Read the listed version +with open("../pybind11/_version.py") as f: + code = compile(f.read(), "../pybind11/_version.py", "exec") +loc = {} +exec(code, loc) + +# The full version, including alpha/beta/rc tags. +version = loc["__version__"] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = [".build", "release.rst"] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +default_role = "any" + +# If true, '()' will be appended to :func: etc. cross-reference text. +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +# pygments_style = 'monokai' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. + +html_theme = "furo" + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +# html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ["_static"] + +html_css_files = [ + "css/custom.css", +] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr' +# html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# Now only 'ja' uses this config value +# html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +# html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = "pybind11doc" + +# -- Options for LaTeX output --------------------------------------------- + +latex_engine = "pdflatex" + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + # + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + # + # Additional stuff for the LaTeX preamble. + # remove blank pages (between the title page and the TOC, etc.) + "classoptions": ",openany,oneside", + "preamble": r""" +\usepackage{fontawesome} +\usepackage{textgreek} +\DeclareUnicodeCharacter{00A0}{} +\DeclareUnicodeCharacter{2194}{\faArrowsH} +\DeclareUnicodeCharacter{1F382}{\faBirthdayCake} +\DeclareUnicodeCharacter{1F355}{\faAdjust} +\DeclareUnicodeCharacter{0301}{'} +\DeclareUnicodeCharacter{03C0}{\textpi} + +""", + # Latex figure (float) alignment + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, "pybind11.tex", "pybind11 Documentation", "Wenzel Jakob", "manual"), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = 'pybind11-logo.png' + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [(master_doc, "pybind11", "pybind11 Documentation", [author], 1)] + +# If true, show URL addresses after external links. +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ( + master_doc, + "pybind11", + "pybind11 Documentation", + author, + "pybind11", + "One line description of project.", + "Miscellaneous", + ), +] + +# Documents to append as an appendix to all manuals. +# texinfo_appendices = [] + +# If false, no module index is generated. +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# texinfo_no_detailmenu = False + +primary_domain = "cpp" +highlight_language = "cpp" + + +def generate_doxygen_xml(app): + build_dir = os.path.join(app.confdir, ".build") + if not os.path.exists(build_dir): + os.mkdir(build_dir) + + try: + subprocess.call(["doxygen", "--version"]) + retcode = subprocess.call(["doxygen"], cwd=app.confdir) + if retcode < 0: + sys.stderr.write(f"doxygen error code: {-retcode}\n") + except OSError as e: + sys.stderr.write(f"doxygen execution failed: {e}\n") + + +def prepare(app): + with open(DIR.parent / "README.rst") as f: + contents = f.read() + + if app.builder.name == "latex": + # Remove badges and stuff from start + contents = contents[contents.find(r".. start") :] + + # Filter out section titles for index.rst for LaTeX + contents = re.sub(r"^(.*)\n[-~]{3,}$", r"**\1**", contents, flags=re.MULTILINE) + + with open(DIR / "readme.rst", "w") as f: + f.write(contents) + + +def clean_up(app, exception): # noqa: ARG001 + (DIR / "readme.rst").unlink() + + +def setup(app): + # Add hook for building doxygen xml when needed + app.connect("builder-inited", generate_doxygen_xml) + + # Copy the readme in + app.connect("builder-inited", prepare) + + # Clean up the generated readme + app.connect("build-finished", clean_up) diff --git a/third_party/CityFlow/extern/pybind11/docs/faq.rst b/third_party/CityFlow/extern/pybind11/docs/faq.rst new file mode 100644 index 0000000000000000000000000000000000000000..1eb00efada9e986b5fefaac67da12018ca5a3df0 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/faq.rst @@ -0,0 +1,308 @@ +Frequently asked questions +########################## + +"ImportError: dynamic module does not define init function" +=========================================================== + +1. Make sure that the name specified in PYBIND11_MODULE is identical to the +filename of the extension library (without suffixes such as ``.so``). + +2. If the above did not fix the issue, you are likely using an incompatible +version of Python that does not match what you compiled with. + +"Symbol not found: ``__Py_ZeroStruct`` / ``_PyInstanceMethod_Type``" +======================================================================== + +See the first answer. + +"SystemError: dynamic module not initialized properly" +====================================================== + +See the first answer. + +The Python interpreter immediately crashes when importing my module +=================================================================== + +See the first answer. + +.. _faq_reference_arguments: + +Limitations involving reference arguments +========================================= + +In C++, it's fairly common to pass arguments using mutable references or +mutable pointers, which allows both read and write access to the value +supplied by the caller. This is sometimes done for efficiency reasons, or to +realize functions that have multiple return values. Here are two very basic +examples: + +.. code-block:: cpp + + void increment(int &i) { i++; } + void increment_ptr(int *i) { (*i)++; } + +In Python, all arguments are passed by reference, so there is no general +issue in binding such code from Python. + +However, certain basic Python types (like ``str``, ``int``, ``bool``, +``float``, etc.) are **immutable**. This means that the following attempt +to port the function to Python doesn't have the same effect on the value +provided by the caller -- in fact, it does nothing at all. + +.. code-block:: python + + def increment(i): + i += 1 # nope.. + +pybind11 is also affected by such language-level conventions, which means that +binding ``increment`` or ``increment_ptr`` will also create Python functions +that don't modify their arguments. + +Although inconvenient, one workaround is to encapsulate the immutable types in +a custom type that does allow modifications. + +An other alternative involves binding a small wrapper lambda function that +returns a tuple with all output arguments (see the remainder of the +documentation for examples on binding lambda functions). An example: + +.. code-block:: cpp + + int foo(int &i) { i++; return 123; } + +and the binding code + +.. code-block:: cpp + + m.def("foo", [](int i) { int rv = foo(i); return std::make_tuple(rv, i); }); + + +How can I reduce the build time? +================================ + +It's good practice to split binding code over multiple files, as in the +following example: + +:file:`example.cpp`: + +.. code-block:: cpp + + void init_ex1(py::module_ &); + void init_ex2(py::module_ &); + /* ... */ + + PYBIND11_MODULE(example, m) { + init_ex1(m); + init_ex2(m); + /* ... */ + } + +:file:`ex1.cpp`: + +.. code-block:: cpp + + void init_ex1(py::module_ &m) { + m.def("add", [](int a, int b) { return a + b; }); + } + +:file:`ex2.cpp`: + +.. code-block:: cpp + + void init_ex2(py::module_ &m) { + m.def("sub", [](int a, int b) { return a - b; }); + } + +:command:`python`: + +.. code-block:: pycon + + >>> import example + >>> example.add(1, 2) + 3 + >>> example.sub(1, 1) + 0 + +As shown above, the various ``init_ex`` functions should be contained in +separate files that can be compiled independently from one another, and then +linked together into the same final shared object. Following this approach +will: + +1. reduce memory requirements per compilation unit. + +2. enable parallel builds (if desired). + +3. allow for faster incremental builds. For instance, when a single class + definition is changed, only a subset of the binding code will generally need + to be recompiled. + +"recursive template instantiation exceeded maximum depth of 256" +================================================================ + +If you receive an error about excessive recursive template evaluation, try +specifying a larger value, e.g. ``-ftemplate-depth=1024`` on GCC/Clang. The +culprit is generally the generation of function signatures at compile time +using C++14 template metaprogramming. + +.. _`faq:hidden_visibility`: + +"'SomeClass' declared with greater visibility than the type of its field 'SomeClass::member' [-Wattributes]" +============================================================================================================ + +This error typically indicates that you are compiling without the required +``-fvisibility`` flag. pybind11 code internally forces hidden visibility on +all internal code, but if non-hidden (and thus *exported*) code attempts to +include a pybind type (for example, ``py::object`` or ``py::list``) you can run +into this warning. + +To avoid it, make sure you are specifying ``-fvisibility=hidden`` when +compiling pybind code. + +As to why ``-fvisibility=hidden`` is necessary, because pybind modules could +have been compiled under different versions of pybind itself, it is also +important that the symbols defined in one module do not clash with the +potentially-incompatible symbols defined in another. While Python extension +modules are usually loaded with localized symbols (under POSIX systems +typically using ``dlopen`` with the ``RTLD_LOCAL`` flag), this Python default +can be changed, but even if it isn't it is not always enough to guarantee +complete independence of the symbols involved when not using +``-fvisibility=hidden``. + +Additionally, ``-fvisibility=hidden`` can deliver considerably binary size +savings. (See the following section for more details.) + + +.. _`faq:symhidden`: + +How can I create smaller binaries? +================================== + +To do its job, pybind11 extensively relies on a programming technique known as +*template metaprogramming*, which is a way of performing computation at compile +time using type information. Template metaprogramming usually instantiates code +involving significant numbers of deeply nested types that are either completely +removed or reduced to just a few instructions during the compiler's optimization +phase. However, due to the nested nature of these types, the resulting symbol +names in the compiled extension library can be extremely long. For instance, +the included test suite contains the following symbol: + +.. only:: html + + .. code-block:: none + + _​_​Z​N​8​p​y​b​i​n​d​1​1​1​2​c​p​p​_​f​u​n​c​t​i​o​n​C​1​I​v​8​E​x​a​m​p​l​e​2​J​R​N​S​t​3​_​_​1​6​v​e​c​t​o​r​I​N​S​3​_​1​2​b​a​s​i​c​_​s​t​r​i​n​g​I​w​N​S​3​_​1​1​c​h​a​r​_​t​r​a​i​t​s​I​w​E​E​N​S​3​_​9​a​l​l​o​c​a​t​o​r​I​w​E​E​E​E​N​S​8​_​I​S​A​_​E​E​E​E​E​J​N​S​_​4​n​a​m​e​E​N​S​_​7​s​i​b​l​i​n​g​E​N​S​_​9​i​s​_​m​e​t​h​o​d​E​A​2​8​_​c​E​E​E​M​T​0​_​F​T​_​D​p​T​1​_​E​D​p​R​K​T​2​_ + +.. only:: not html + + .. code-block:: cpp + + __ZN8pybind1112cpp_functionC1Iv8Example2JRNSt3__16vectorINS3_12basic_stringIwNS3_11char_traitsIwEENS3_9allocatorIwEEEENS8_ISA_EEEEEJNS_4nameENS_7siblingENS_9is_methodEA28_cEEEMT0_FT_DpT1_EDpRKT2_ + +which is the mangled form of the following function type: + +.. code-block:: cpp + + pybind11::cpp_function::cpp_function, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >&, pybind11::name, pybind11::sibling, pybind11::is_method, char [28]>(void (Example2::*)(std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >&), pybind11::name const&, pybind11::sibling const&, pybind11::is_method const&, char const (&) [28]) + +The memory needed to store just the mangled name of this function (196 bytes) +is larger than the actual piece of code (111 bytes) it represents! On the other +hand, it's silly to even give this function a name -- after all, it's just a +tiny cog in a bigger piece of machinery that is not exposed to the outside +world. So we'll generally only want to export symbols for those functions which +are actually called from the outside. + +This can be achieved by specifying the parameter ``-fvisibility=hidden`` to GCC +and Clang, which sets the default symbol visibility to *hidden*, which has a +tremendous impact on the final binary size of the resulting extension library. +(On Visual Studio, symbols are already hidden by default, so nothing needs to +be done there.) + +In addition to decreasing binary size, ``-fvisibility=hidden`` also avoids +potential serious issues when loading multiple modules and is required for +proper pybind operation. See the previous FAQ entry for more details. + +How can I properly handle Ctrl-C in long-running functions? +=========================================================== + +Ctrl-C is received by the Python interpreter, and holds it until the GIL +is released, so a long-running function won't be interrupted. + +To interrupt from inside your function, you can use the ``PyErr_CheckSignals()`` +function, that will tell if a signal has been raised on the Python side. This +function merely checks a flag, so its impact is negligible. When a signal has +been received, you must either explicitly interrupt execution by throwing +``py::error_already_set`` (which will propagate the existing +``KeyboardInterrupt``), or clear the error (which you usually will not want): + +.. code-block:: cpp + + PYBIND11_MODULE(example, m) + { + m.def("long running_func", []() + { + for (;;) { + if (PyErr_CheckSignals() != 0) + throw py::error_already_set(); + // Long running iteration + } + }); + } + +CMake doesn't detect the right Python version +============================================= + +The CMake-based build system will try to automatically detect the installed +version of Python and link against that. When this fails, or when there are +multiple versions of Python and it finds the wrong one, delete +``CMakeCache.txt`` and then add ``-DPYTHON_EXECUTABLE=$(which python)`` to your +CMake configure line. (Replace ``$(which python)`` with a path to python if +your prefer.) + +You can alternatively try ``-DPYBIND11_FINDPYTHON=ON``, which will activate the +new CMake FindPython support instead of pybind11's custom search. Requires +CMake 3.12+, and 3.15+ or 3.18.2+ are even better. You can set this in your +``CMakeLists.txt`` before adding or finding pybind11, as well. + +Inconsistent detection of Python version in CMake and pybind11 +============================================================== + +The functions ``find_package(PythonInterp)`` and ``find_package(PythonLibs)`` +provided by CMake for Python version detection are modified by pybind11 due to +unreliability and limitations that make them unsuitable for pybind11's needs. +Instead pybind11 provides its own, more reliable Python detection CMake code. +Conflicts can arise, however, when using pybind11 in a project that *also* uses +the CMake Python detection in a system with several Python versions installed. + +This difference may cause inconsistencies and errors if *both* mechanisms are +used in the same project. + +There are three possible solutions: + +1. Avoid using ``find_package(PythonInterp)`` and ``find_package(PythonLibs)`` + from CMake and rely on pybind11 in detecting Python version. If this is not + possible, the CMake machinery should be called *before* including pybind11. +2. Set ``PYBIND11_FINDPYTHON`` to ``True`` or use ``find_package(Python + COMPONENTS Interpreter Development)`` on modern CMake (3.12+, 3.15+ better, + 3.18.2+ best). Pybind11 in these cases uses the new CMake FindPython instead + of the old, deprecated search tools, and these modules are much better at + finding the correct Python. If FindPythonLibs/Interp are not available + (CMake 3.27+), then this will be ignored and FindPython will be used. +3. Set ``PYBIND11_NOPYTHON`` to ``TRUE``. Pybind11 will not search for Python. + However, you will have to use the target-based system, and do more setup + yourself, because it does not know about or include things that depend on + Python, like ``pybind11_add_module``. This might be ideal for integrating + into an existing system, like scikit-build's Python helpers. + +How to cite this project? +========================= + +We suggest the following BibTeX template to cite pybind11 in scientific +discourse: + +.. code-block:: bash + + @misc{pybind11, + author = {Wenzel Jakob and Jason Rhinelander and Dean Moldovan}, + year = {2017}, + note = {https://github.com/pybind/pybind11}, + title = {pybind11 -- Seamless operability between C++11 and Python} + } diff --git a/third_party/CityFlow/extern/pybind11/docs/index.rst b/third_party/CityFlow/extern/pybind11/docs/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..4e2e8ca3a04a072d9adfdfa4bb98f5c221be10ea --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/index.rst @@ -0,0 +1,48 @@ +.. only:: latex + + Intro + ===== + +.. include:: readme.rst + +.. only:: not latex + + Contents: + +.. toctree:: + :maxdepth: 1 + + changelog + upgrade + +.. toctree:: + :caption: The Basics + :maxdepth: 2 + + installing + basics + classes + compiling + +.. toctree:: + :caption: Advanced Topics + :maxdepth: 2 + + advanced/functions + advanced/classes + advanced/exceptions + advanced/smart_ptrs + advanced/cast/index + advanced/pycpp/index + advanced/embedding + advanced/misc + +.. toctree:: + :caption: Extra Information + :maxdepth: 1 + + faq + benchmark + limitations + reference + cmake/index diff --git a/third_party/CityFlow/extern/pybind11/docs/installing.rst b/third_party/CityFlow/extern/pybind11/docs/installing.rst new file mode 100644 index 0000000000000000000000000000000000000000..30b9f1853d7edf9b90f88ff347be63648056f99f --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/installing.rst @@ -0,0 +1,105 @@ +.. _installing: + +Installing the library +###################### + +There are several ways to get the pybind11 source, which lives at +`pybind/pybind11 on GitHub `_. The pybind11 +developers recommend one of the first three ways listed here, submodule, PyPI, +or conda-forge, for obtaining pybind11. + +.. _include_as_a_submodule: + +Include as a submodule +====================== + +When you are working on a project in Git, you can use the pybind11 repository +as a submodule. From your git repository, use: + +.. code-block:: bash + + git submodule add -b stable ../../pybind/pybind11 extern/pybind11 + git submodule update --init + +This assumes you are placing your dependencies in ``extern/``, and that you are +using GitHub; if you are not using GitHub, use the full https or ssh URL +instead of the relative URL ``../../pybind/pybind11`` above. Some other servers +also require the ``.git`` extension (GitHub does not). + +From here, you can now include ``extern/pybind11/include``, or you can use +the various integration tools (see :ref:`compiling`) pybind11 provides directly +from the local folder. + +Include with PyPI +================= + +You can download the sources and CMake files as a Python package from PyPI +using Pip. Just use: + +.. code-block:: bash + + pip install pybind11 + +This will provide pybind11 in a standard Python package format. If you want +pybind11 available directly in your environment root, you can use: + +.. code-block:: bash + + pip install "pybind11[global]" + +This is not recommended if you are installing with your system Python, as it +will add files to ``/usr/local/include/pybind11`` and +``/usr/local/share/cmake/pybind11``, so unless that is what you want, it is +recommended only for use in virtual environments or your ``pyproject.toml`` +file (see :ref:`compiling`). + +Include with conda-forge +======================== + +You can use pybind11 with conda packaging via `conda-forge +`_: + +.. code-block:: bash + + conda install -c conda-forge pybind11 + + +Include with vcpkg +================== +You can download and install pybind11 using the Microsoft `vcpkg +`_ dependency manager: + +.. code-block:: bash + + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + vcpkg install pybind11 + +The pybind11 port in vcpkg is kept up to date by Microsoft team members and +community contributors. If the version is out of date, please `create an issue +or pull request `_ on the vcpkg +repository. + +Global install with brew +======================== + +The brew package manager (Homebrew on macOS, or Linuxbrew on Linux) has a +`pybind11 package +`_. +To install: + +.. code-block:: bash + + brew install pybind11 + +.. We should list Conan, and possibly a few other C++ package managers (hunter, +.. perhaps). Conan has a very clean CMake integration that would be good to show. + +Other options +============= + +Other locations you can find pybind11 are `listed here +`_; these are maintained +by various packagers and the community. diff --git a/third_party/CityFlow/extern/pybind11/docs/limitations.rst b/third_party/CityFlow/extern/pybind11/docs/limitations.rst new file mode 100644 index 0000000000000000000000000000000000000000..def5ad659c98c6d7b04dc5af49f084e90dc65a76 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/limitations.rst @@ -0,0 +1,72 @@ +Limitations +########### + +Design choices +^^^^^^^^^^^^^^ + +pybind11 strives to be a general solution to binding generation, but it also has +certain limitations: + +- pybind11 casts away ``const``-ness in function arguments and return values. + This is in line with the Python language, which has no concept of ``const`` + values. This means that some additional care is needed to avoid bugs that + would be caught by the type checker in a traditional C++ program. + +- The NumPy interface ``pybind11::array`` greatly simplifies accessing + numerical data from C++ (and vice versa), but it's not a full-blown array + class like ``Eigen::Array`` or ``boost.multi_array``. ``Eigen`` objects are + directly supported, however, with ``pybind11/eigen.h``. + +Large but useful features could be implemented in pybind11 but would lead to a +significant increase in complexity. Pybind11 strives to be simple and compact. +Users who require large new features are encouraged to write an extension to +pybind11; see `pybind11_json `_ for an +example. + + +Known bugs +^^^^^^^^^^ + +These are issues that hopefully will one day be fixed, but currently are +unsolved. If you know how to help with one of these issues, contributions +are welcome! + +- Intel 20.2 is currently having an issue with the test suite. + `#2573 `_ + +- Debug mode Python does not support 1-5 tests in the test suite currently. + `#2422 `_ + +- PyPy3 7.3.1 and 7.3.2 have issues with several tests on 32-bit Windows. + +Known limitations +^^^^^^^^^^^^^^^^^ + +These are issues that are probably solvable, but have not been fixed yet. A +clean, well written patch would likely be accepted to solve them. + +- Type casters are not kept alive recursively. + `#2527 `_ + One consequence is that containers of ``char *`` are currently not supported. + `#2245 `_ + +- The ``cpptest`` does not run on Windows with Python 3.8 or newer, due to DLL + loader changes. User code that is correctly installed should not be affected. + `#2560 `_ + +Python 3.9.0 warning +^^^^^^^^^^^^^^^^^^^^ + +Combining older versions of pybind11 (< 2.6.0) with Python on exactly 3.9.0 +will trigger undefined behavior that typically manifests as crashes during +interpreter shutdown (but could also destroy your data. **You have been +warned**). + +This issue was `fixed in Python `_. +As a mitigation for this bug, pybind11 2.6.0 or newer includes a workaround +specifically when Python 3.9.0 is detected at runtime, leaking about 50 bytes +of memory when a callback function is garbage collected. For reference, the +pybind11 test suite has about 2,000 such callbacks, but only 49 are garbage +collected before the end-of-process. Wheels (even if built with Python 3.9.0) +will correctly avoid the leak when run in Python 3.9.1, and this does not +affect other 3.X versions. diff --git a/third_party/CityFlow/extern/pybind11/docs/pybind11-logo.png b/third_party/CityFlow/extern/pybind11/docs/pybind11-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2d633a4d0c129d6bdd94b4134c9516fdc92bb192 Binary files /dev/null and b/third_party/CityFlow/extern/pybind11/docs/pybind11-logo.png differ diff --git a/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python1.png b/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python1.png new file mode 100644 index 0000000000000000000000000000000000000000..833231f240809884fb6eb4079db528b9b3c0a9ac Binary files /dev/null and b/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python1.png differ diff --git a/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python1.svg b/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python1.svg new file mode 100644 index 0000000000000000000000000000000000000000..5bf950e6fdc81676d9a9774926a623b4f6a2e2a8 Binary files /dev/null and b/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python1.svg differ diff --git a/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python2.png b/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python2.png new file mode 100644 index 0000000000000000000000000000000000000000..9f17272c50663957d6ae6d8e23fdd5a15757e71f Binary files /dev/null and b/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python2.png differ diff --git a/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python2.svg b/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python2.svg new file mode 100644 index 0000000000000000000000000000000000000000..5ed6530ca112cbe643d5dd6d6fde385c4edea6b5 Binary files /dev/null and b/third_party/CityFlow/extern/pybind11/docs/pybind11_vs_boost_python2.svg differ diff --git a/third_party/CityFlow/extern/pybind11/docs/reference.rst b/third_party/CityFlow/extern/pybind11/docs/reference.rst new file mode 100644 index 0000000000000000000000000000000000000000..e64a03519da2461e5cea7109b569b72fbcd2bfac --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/reference.rst @@ -0,0 +1,130 @@ +.. _reference: + +.. warning:: + + Please be advised that the reference documentation discussing pybind11 + internals is currently incomplete. Please refer to the previous sections + and the pybind11 header files for the nitty gritty details. + +Reference +######### + +.. _macros: + +Macros +====== + +.. doxygendefine:: PYBIND11_MODULE + +.. _core_types: + +Convenience classes for arbitrary Python types +============================================== + +Common member functions +----------------------- + +.. doxygenclass:: object_api + :members: + +Without reference counting +-------------------------- + +.. doxygenclass:: handle + :members: + +With reference counting +----------------------- + +.. doxygenclass:: object + :members: + +.. doxygenfunction:: reinterpret_borrow + +.. doxygenfunction:: reinterpret_steal + +Convenience classes for specific Python types +============================================= + +.. doxygenclass:: module_ + :members: + +.. doxygengroup:: pytypes + :members: + +Convenience functions converting to Python types +================================================ + +.. doxygenfunction:: make_tuple(Args&&...) + +.. doxygenfunction:: make_iterator(Iterator, Sentinel, Extra &&...) +.. doxygenfunction:: make_iterator(Type &, Extra&&...) + +.. doxygenfunction:: make_key_iterator(Iterator, Sentinel, Extra &&...) +.. doxygenfunction:: make_key_iterator(Type &, Extra&&...) + +.. doxygenfunction:: make_value_iterator(Iterator, Sentinel, Extra &&...) +.. doxygenfunction:: make_value_iterator(Type &, Extra&&...) + +.. _extras: + +Passing extra arguments to ``def`` or ``class_`` +================================================ + +.. doxygengroup:: annotations + :members: + +Embedding the interpreter +========================= + +.. doxygendefine:: PYBIND11_EMBEDDED_MODULE + +.. doxygenfunction:: initialize_interpreter + +.. doxygenfunction:: finalize_interpreter + +.. doxygenclass:: scoped_interpreter + +Redirecting C++ streams +======================= + +.. doxygenclass:: scoped_ostream_redirect + +.. doxygenclass:: scoped_estream_redirect + +.. doxygenfunction:: add_ostream_redirect + +Python built-in functions +========================= + +.. doxygengroup:: python_builtins + :members: + +Inheritance +=========== + +See :doc:`/classes` and :doc:`/advanced/classes` for more detail. + +.. doxygendefine:: PYBIND11_OVERRIDE + +.. doxygendefine:: PYBIND11_OVERRIDE_PURE + +.. doxygendefine:: PYBIND11_OVERRIDE_NAME + +.. doxygendefine:: PYBIND11_OVERRIDE_PURE_NAME + +.. doxygenfunction:: get_override + +Exceptions +========== + +.. doxygenclass:: error_already_set + :members: + +.. doxygenclass:: builtin_exception + :members: + +Literals +======== + +.. doxygennamespace:: literals diff --git a/third_party/CityFlow/extern/pybind11/docs/release.rst b/third_party/CityFlow/extern/pybind11/docs/release.rst new file mode 100644 index 0000000000000000000000000000000000000000..47b5717cad7c05aee1d2f0bbf83aa133c2ff3190 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/release.rst @@ -0,0 +1,143 @@ +On version numbers +^^^^^^^^^^^^^^^^^^ + +The two version numbers (C++ and Python) must match when combined (checked when +you build the PyPI package), and must be a valid `PEP 440 +`_ version when combined. + +For example: + +.. code-block:: C++ + + #define PYBIND11_VERSION_MAJOR X + #define PYBIND11_VERSION_MINOR Y + #define PYBIND11_VERSION_PATCH Z.dev1 + +For beta, ``PYBIND11_VERSION_PATCH`` should be ``Z.b1``. RC's can be ``Z.rc1``. +Always include the dot (even though PEP 440 allows it to be dropped). For a +final release, this must be a simple integer. There is also +``PYBIND11_VERSION_HEX`` just below that needs to be updated. + + +To release a new version of pybind11: +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you don't have nox, you should either use ``pipx run nox`` instead, or use +``pipx install nox`` or ``brew install nox`` (Unix). + +- Update the version number + + - Update ``PYBIND11_VERSION_MAJOR`` etc. in + ``include/pybind11/detail/common.h``. PATCH should be a simple integer. + + - Update ``PYBIND11_VERSION_HEX`` just below as well. + + - Update ``pybind11/_version.py`` (match above). + + - Run ``nox -s tests_packaging`` to ensure this was done correctly. + +- Ensure that all the information in ``setup.cfg`` is up-to-date, like + supported Python versions. + +- Add release date in ``docs/changelog.rst`` and integrate the output of + ``nox -s make_changelog``. + + - Note that the ``nox -s make_changelog`` command inspects + `needs changelog `_. + + - Manually clear the ``needs changelog`` labels using the GitHub web + interface (very easy: start by clicking the link above). + +- ``git add`` and ``git commit``, ``git push``. **Ensure CI passes**. (If it + fails due to a known flake issue, either ignore or restart CI.) + +- Add a release branch if this is a new MINOR version, or update the existing + release branch if it is a patch version + + - New branch: ``git checkout -b vX.Y``, ``git push -u origin vX.Y`` + + - Update branch: ``git checkout vX.Y``, ``git merge ``, ``git push`` + +- Update tags (optional; if you skip this, the GitHub release makes a + non-annotated tag for you) + + - ``git tag -a vX.Y.Z -m 'vX.Y.Z release'`` + + - ``grep ^__version__ pybind11/_version.py`` + + - Last-minute consistency check: same as tag? + + - ``git push --tags`` + +- Update stable + + - ``git checkout stable`` + + - ``git merge -X theirs vX.Y.Z`` + + - ``git diff vX.Y.Z`` + + - Carefully review and reconcile any diffs. There should be none. + + - ``git push`` + +- Make a GitHub release (this shows up in the UI, sends new release + notifications to users watching releases, and also uploads PyPI packages). + (Note: if you do not use an existing tag, this creates a new lightweight tag + for you, so you could skip the above step.) + + - GUI method: Under `releases `_ + click "Draft a new release" on the far right, fill in the tag name + (if you didn't tag above, it will be made here), fill in a release name + like "Version X.Y.Z", and copy-and-paste the markdown-formatted (!) changelog + into the description. You can use ``cat docs/changelog.rst | pandoc -f rst -t gfm``, + then manually remove line breaks and strip links to PRs and issues, + e.g. to a bare ``#1234``, without the surrounding ``<...>_`` hyperlink markup. + Check "pre-release" if this is a beta/RC. + + - CLI method: with ``gh`` installed, run ``gh release create vX.Y.Z -t "Version X.Y.Z"`` + If this is a pre-release, add ``-p``. + +- Get back to work + + - Make sure you are on master, not somewhere else: ``git checkout master`` + + - Update version macros in ``include/pybind11/detail/common.h`` (set PATCH to + ``0.dev1`` and increment MINOR). + + - Update ``pybind11/_version.py`` to match. + + - Run ``nox -s tests_packaging`` to ensure this was done correctly. + + - If the release was a new MINOR version, add a new ``IN DEVELOPMENT`` + section in ``docs/changelog.rst``. + + - ``git add``, ``git commit``, ``git push`` + +If a version branch is updated, remember to set PATCH to ``1.dev1``. + +If you'd like to bump homebrew, run: + +.. code-block:: console + + brew bump-formula-pr --url https://github.com/pybind/pybind11/archive/vX.Y.Z.tar.gz + +Conda-forge should automatically make a PR in a few hours, and automatically +merge it if there are no issues. + + +Manual packaging +^^^^^^^^^^^^^^^^ + +If you need to manually upload releases, you can download the releases from +the job artifacts and upload them with twine. You can also make the files +locally (not recommended in general, as your local directory is more likely +to be "dirty" and SDists love picking up random unrelated/hidden files); +this is the procedure: + +.. code-block:: bash + + nox -s build + twine upload dist/* + +This makes SDists and wheels, and the final line uploads them. diff --git a/third_party/CityFlow/extern/pybind11/docs/requirements.txt b/third_party/CityFlow/extern/pybind11/docs/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..d2a9ae1645be110a5db5405d454176082d3f9296 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/requirements.txt @@ -0,0 +1,6 @@ +breathe==4.34.0 +furo==2022.6.21 +sphinx==5.0.2 +sphinx-copybutton==0.5.0 +sphinxcontrib-moderncmakedomain==3.21.4 +sphinxcontrib-svg2pdfconverter==1.2.0 diff --git a/third_party/CityFlow/extern/pybind11/docs/upgrade.rst b/third_party/CityFlow/extern/pybind11/docs/upgrade.rst new file mode 100644 index 0000000000000000000000000000000000000000..17c26aaa9389ec42a1a49aef5901fec743ad5c95 --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/docs/upgrade.rst @@ -0,0 +1,594 @@ +Upgrade guide +############# + +This is a companion guide to the :doc:`changelog`. While the changelog briefly +lists all of the new features, improvements and bug fixes, this upgrade guide +focuses only the subset which directly impacts your experience when upgrading +to a new version. But it goes into more detail. This includes things like +deprecated APIs and their replacements, build system changes, general code +modernization and other useful information. + +.. _upgrade-guide-2.12: + +v2.12 +===== + +NumPy support has been upgraded to support the 2.x series too. The two relevant +changes are that: + +* ``dtype.flags()`` is now a ``uint64`` and ``dtype.alignment()`` an + ``ssize_t`` (and NumPy may return an larger than integer value for + ``itemsize()`` in NumPy 2.x). + +* The long deprecated NumPy function ``PyArray_GetArrayParamsFromObject`` + function is not available anymore. + +Due to NumPy changes, you may experience difficulties updating to NumPy 2. +Please see the [NumPy 2 migration guide](https://numpy.org/devdocs/numpy_2_0_migration_guide.html) for details. +For example, a more direct change could be that the default integer ``"int_"`` +(and ``"uint"``) is now ``ssize_t`` and not ``long`` (affects 64bit windows). + +If you want to only support NumPy 1.x for now and are having problems due to +the two internal changes listed above, you can define +``PYBIND11_NUMPY_1_ONLY`` to disable the new support for now. Make sure you +define this on all pybind11 compile units, since it could be a source of ODR +violations if used inconsistently. This option will be removed in the future, +so adapting your code is highly recommended. + + +.. _upgrade-guide-2.11: + +v2.11 +===== + +* The minimum version of CMake is now 3.5. A future version will likely move to + requiring something like CMake 3.15. Note that CMake 3.27 is removing the + long-deprecated support for ``FindPythonInterp`` if you set 3.27 as the + minimum or maximum supported version. To prepare for that future, CMake 3.15+ + using ``FindPython`` or setting ``PYBIND11_FINDPYTHON`` is highly recommended, + otherwise pybind11 will automatically switch to using ``FindPython`` if + ``FindPythonInterp`` is not available. + + +.. _upgrade-guide-2.9: + +v2.9 +==== + +* Any usage of the recently added ``py::make_simple_namespace`` should be + converted to using ``py::module_::import("types").attr("SimpleNamespace")`` + instead. + +* The use of ``_`` in custom type casters can now be replaced with the more + readable ``const_name`` instead. The old ``_`` shortcut has been retained + unless it is being used as a macro (like for gettext). + + +.. _upgrade-guide-2.7: + +v2.7 +==== + +*Before* v2.7, ``py::str`` can hold ``PyUnicodeObject`` or ``PyBytesObject``, +and ``py::isinstance()`` is ``true`` for both ``py::str`` and +``py::bytes``. Starting with v2.7, ``py::str`` exclusively holds +``PyUnicodeObject`` (`#2409 `_), +and ``py::isinstance()`` is ``true`` only for ``py::str``. To help in +the transition of user code, the ``PYBIND11_STR_LEGACY_PERMISSIVE`` macro +is provided as an escape hatch to go back to the legacy behavior. This macro +will be removed in future releases. Two types of required fixes are expected +to be common: + +* Accidental use of ``py::str`` instead of ``py::bytes``, masked by the legacy + behavior. These are probably very easy to fix, by changing from + ``py::str`` to ``py::bytes``. + +* Reliance on py::isinstance(obj) being ``true`` for + ``py::bytes``. This is likely to be easy to fix in most cases by adding + ``|| py::isinstance(obj)``, but a fix may be more involved, e.g. if + ``py::isinstance`` appears in a template. Such situations will require + careful review and custom fixes. + + +.. _upgrade-guide-2.6: + +v2.6 +==== + +Usage of the ``PYBIND11_OVERLOAD*`` macros and ``get_overload`` function should +be replaced by ``PYBIND11_OVERRIDE*`` and ``get_override``. In the future, the +old macros may be deprecated and removed. + +``py::module`` has been renamed ``py::module_``, but a backward compatible +typedef has been included. This change was to avoid a language change in C++20 +that requires unqualified ``module`` not be placed at the start of a logical +line. Qualified usage is unaffected and the typedef will remain unless the +C++ language rules change again. + +The public constructors of ``py::module_`` have been deprecated. Use +``PYBIND11_MODULE`` or ``module_::create_extension_module`` instead. + +An error is now thrown when ``__init__`` is forgotten on subclasses. This was +incorrect before, but was not checked. Add a call to ``__init__`` if it is +missing. + +A ``py::type_error`` is now thrown when casting to a subclass (like +``py::bytes`` from ``py::object``) if the conversion is not valid. Make a valid +conversion instead. + +The undocumented ``h.get_type()`` method has been deprecated and replaced by +``py::type::of(h)``. + +Enums now have a ``__str__`` method pre-defined; if you want to override it, +the simplest fix is to add the new ``py::prepend()`` tag when defining +``"__str__"``. + +If ``__eq__`` defined but not ``__hash__``, ``__hash__`` is now set to +``None``, as in normal CPython. You should add ``__hash__`` if you intended the +class to be hashable, possibly using the new ``py::hash`` shortcut. + +The constructors for ``py::array`` now always take signed integers for size, +for consistency. This may lead to compiler warnings on some systems. Cast to +``py::ssize_t`` instead of ``std::size_t``. + +The ``tools/clang`` submodule and ``tools/mkdoc.py`` have been moved to a +standalone package, `pybind11-mkdoc`_. If you were using those tools, please +use them via a pip install from the new location. + +The ``pybind11`` package on PyPI no longer fills the wheel "headers" slot - if +you were using the headers from this slot, they are available by requesting the +``global`` extra, that is, ``pip install "pybind11[global]"``. (Most users will +be unaffected, as the ``pybind11/include`` location is reported by ``python -m +pybind11 --includes`` and ``pybind11.get_include()`` is still correct and has +not changed since 2.5). + +.. _pybind11-mkdoc: https://github.com/pybind/pybind11-mkdoc + +CMake support: +-------------- + +The minimum required version of CMake is now 3.4. Several details of the CMake +support have been deprecated; warnings will be shown if you need to change +something. The changes are: + +* ``PYBIND11_CPP_STANDARD=`` is deprecated, please use + ``CMAKE_CXX_STANDARD=`` instead, or any other valid CMake CXX or CUDA + standard selection method, like ``target_compile_features``. + +* If you do not request a standard, pybind11 targets will compile with the + compiler default, but not less than C++11, instead of forcing C++14 always. + If you depend on the old behavior, please use ``set(CMAKE_CXX_STANDARD 14 CACHE STRING "")`` + instead. + +* Direct ``pybind11::module`` usage should always be accompanied by at least + ``set(CMAKE_CXX_VISIBILITY_PRESET hidden)`` or similar - it used to try to + manually force this compiler flag (but not correctly on all compilers or with + CUDA). + +* ``pybind11_add_module``'s ``SYSTEM`` argument is deprecated and does nothing; + linking now behaves like other imported libraries consistently in both + config and submodule mode, and behaves like a ``SYSTEM`` library by + default. + +* If ``PYTHON_EXECUTABLE`` is not set, virtual environments (``venv``, + ``virtualenv``, and ``conda``) are prioritized over the standard search + (similar to the new FindPython mode). + +In addition, the following changes may be of interest: + +* ``CMAKE_INTERPROCEDURAL_OPTIMIZATION`` will be respected by + ``pybind11_add_module`` if set instead of linking to ``pybind11::lto`` or + ``pybind11::thin_lto``. + +* Using ``find_package(Python COMPONENTS Interpreter Development)`` before + pybind11 will cause pybind11 to use the new Python mechanisms instead of its + own custom search, based on a patched version of classic ``FindPythonInterp`` + / ``FindPythonLibs``. In the future, this may become the default. A recent + (3.15+ or 3.18.2+) version of CMake is recommended. + + + +v2.5 +==== + +The Python package now includes the headers as data in the package itself, as +well as in the "headers" wheel slot. ``pybind11 --includes`` and +``pybind11.get_include()`` report the new location, which is always correct +regardless of how pybind11 was installed, making the old ``user=`` argument +meaningless. If you are not using the function to get the location already, you +are encouraged to switch to the package location. + + +v2.2 +==== + +Deprecation of the ``PYBIND11_PLUGIN`` macro +-------------------------------------------- + +``PYBIND11_MODULE`` is now the preferred way to create module entry points. +The old macro emits a compile-time deprecation warning. + +.. code-block:: cpp + + // old + PYBIND11_PLUGIN(example) { + py::module m("example", "documentation string"); + + m.def("add", [](int a, int b) { return a + b; }); + + return m.ptr(); + } + + // new + PYBIND11_MODULE(example, m) { + m.doc() = "documentation string"; // optional + + m.def("add", [](int a, int b) { return a + b; }); + } + + +New API for defining custom constructors and pickling functions +--------------------------------------------------------------- + +The old placement-new custom constructors have been deprecated. The new approach +uses ``py::init()`` and factory functions to greatly improve type safety. + +Placement-new can be called accidentally with an incompatible type (without any +compiler errors or warnings), or it can initialize the same object multiple times +if not careful with the Python-side ``__init__`` calls. The new-style custom +constructors prevent such mistakes. See :ref:`custom_constructors` for details. + +.. code-block:: cpp + + // old -- deprecated (runtime warning shown only in debug mode) + py::class(m, "Foo") + .def("__init__", [](Foo &self, ...) { + new (&self) Foo(...); // uses placement-new + }); + + // new + py::class(m, "Foo") + .def(py::init([](...) { // Note: no `self` argument + return new Foo(...); // return by raw pointer + // or: return std::make_unique(...); // return by holder + // or: return Foo(...); // return by value (move constructor) + })); + +Mirroring the custom constructor changes, ``py::pickle()`` is now the preferred +way to get and set object state. See :ref:`pickling` for details. + +.. code-block:: cpp + + // old -- deprecated (runtime warning shown only in debug mode) + py::class(m, "Foo") + ... + .def("__getstate__", [](const Foo &self) { + return py::make_tuple(self.value1(), self.value2(), ...); + }) + .def("__setstate__", [](Foo &self, py::tuple t) { + new (&self) Foo(t[0].cast(), ...); + }); + + // new + py::class(m, "Foo") + ... + .def(py::pickle( + [](const Foo &self) { // __getstate__ + return py::make_tuple(self.value1(), self.value2(), ...); // unchanged + }, + [](py::tuple t) { // __setstate__, note: no `self` argument + return new Foo(t[0].cast(), ...); + // or: return std::make_unique(...); // return by holder + // or: return Foo(...); // return by value (move constructor) + } + )); + +For both the constructors and pickling, warnings are shown at module +initialization time (on import, not when the functions are called). +They're only visible when compiled in debug mode. Sample warning: + +.. code-block:: none + + pybind11-bound class 'mymodule.Foo' is using an old-style placement-new '__init__' + which has been deprecated. See the upgrade guide in pybind11's docs. + + +Stricter enforcement of hidden symbol visibility for pybind11 modules +--------------------------------------------------------------------- + +pybind11 now tries to actively enforce hidden symbol visibility for modules. +If you're using either one of pybind11's :doc:`CMake or Python build systems +` (the two example repositories) and you haven't been exporting any +symbols, there's nothing to be concerned about. All the changes have been done +transparently in the background. If you were building manually or relied on +specific default visibility, read on. + +Setting default symbol visibility to *hidden* has always been recommended for +pybind11 (see :ref:`faq:symhidden`). On Linux and macOS, hidden symbol +visibility (in conjunction with the ``strip`` utility) yields much smaller +module binaries. `CPython's extension docs`_ also recommend hiding symbols +by default, with the goal of avoiding symbol name clashes between modules. +Starting with v2.2, pybind11 enforces this more strictly: (1) by declaring +all symbols inside the ``pybind11`` namespace as hidden and (2) by including +the ``-fvisibility=hidden`` flag on Linux and macOS (only for extension +modules, not for embedding the interpreter). + +.. _CPython's extension docs: https://docs.python.org/3/extending/extending.html#providing-a-c-api-for-an-extension-module + +The namespace-scope hidden visibility is done automatically in pybind11's +headers and it's generally transparent to users. It ensures that: + +* Modules compiled with different pybind11 versions don't clash with each other. + +* Some new features, like ``py::module_local`` bindings, can work as intended. + +The ``-fvisibility=hidden`` flag applies the same visibility to user bindings +outside of the ``pybind11`` namespace. It's now set automatic by pybind11's +CMake and Python build systems, but this needs to be done manually by users +of other build systems. Adding this flag: + +* Minimizes the chances of symbol conflicts between modules. E.g. if two + unrelated modules were statically linked to different (ABI-incompatible) + versions of the same third-party library, a symbol clash would be likely + (and would end with unpredictable results). + +* Produces smaller binaries on Linux and macOS, as pointed out previously. + +Within pybind11's CMake build system, ``pybind11_add_module`` has always been +setting the ``-fvisibility=hidden`` flag in release mode. From now on, it's +being applied unconditionally, even in debug mode and it can no longer be opted +out of with the ``NO_EXTRAS`` option. The ``pybind11::module`` target now also +adds this flag to its interface. The ``pybind11::embed`` target is unchanged. + +The most significant change here is for the ``pybind11::module`` target. If you +were previously relying on default visibility, i.e. if your Python module was +doubling as a shared library with dependents, you'll need to either export +symbols manually (recommended for cross-platform libraries) or factor out the +shared library (and have the Python module link to it like the other +dependents). As a temporary workaround, you can also restore default visibility +using the CMake code below, but this is not recommended in the long run: + +.. code-block:: cmake + + target_link_libraries(mymodule PRIVATE pybind11::module) + + add_library(restore_default_visibility INTERFACE) + target_compile_options(restore_default_visibility INTERFACE -fvisibility=default) + target_link_libraries(mymodule PRIVATE restore_default_visibility) + + +Local STL container bindings +---------------------------- + +Previous pybind11 versions could only bind types globally -- all pybind11 +modules, even unrelated ones, would have access to the same exported types. +However, this would also result in a conflict if two modules exported the +same C++ type, which is especially problematic for very common types, e.g. +``std::vector``. :ref:`module_local` were added to resolve this (see +that section for a complete usage guide). + +``py::class_`` still defaults to global bindings (because these types are +usually unique across modules), however in order to avoid clashes of opaque +types, ``py::bind_vector`` and ``py::bind_map`` will now bind STL containers +as ``py::module_local`` if their elements are: builtins (``int``, ``float``, +etc.), not bound using ``py::class_``, or bound as ``py::module_local``. For +example, this change allows multiple modules to bind ``std::vector`` +without causing conflicts. See :ref:`stl_bind` for more details. + +When upgrading to this version, if you have multiple modules which depend on +a single global binding of an STL container, note that all modules can still +accept foreign ``py::module_local`` types in the direction of Python-to-C++. +The locality only affects the C++-to-Python direction. If this is needed in +multiple modules, you'll need to either: + +* Add a copy of the same STL binding to all of the modules which need it. + +* Restore the global status of that single binding by marking it + ``py::module_local(false)``. + +The latter is an easy workaround, but in the long run it would be best to +localize all common type bindings in order to avoid conflicts with +third-party modules. + + +Negative strides for Python buffer objects and numpy arrays +----------------------------------------------------------- + +Support for negative strides required changing the integer type from unsigned +to signed in the interfaces of ``py::buffer_info`` and ``py::array``. If you +have compiler warnings enabled, you may notice some new conversion warnings +after upgrading. These can be resolved using ``static_cast``. + + +Deprecation of some ``py::object`` APIs +--------------------------------------- + +To compare ``py::object`` instances by pointer, you should now use +``obj1.is(obj2)`` which is equivalent to ``obj1 is obj2`` in Python. +Previously, pybind11 used ``operator==`` for this (``obj1 == obj2``), but +that could be confusing and is now deprecated (so that it can eventually +be replaced with proper rich object comparison in a future release). + +For classes which inherit from ``py::object``, ``borrowed`` and ``stolen`` +were previously available as protected constructor tags. Now the types +should be used directly instead: ``borrowed_t{}`` and ``stolen_t{}`` +(`#771 `_). + + +Stricter compile-time error checking +------------------------------------ + +Some error checks have been moved from run time to compile time. Notably, +automatic conversion of ``std::shared_ptr`` is not possible when ``T`` is +not directly registered with ``py::class_`` (e.g. ``std::shared_ptr`` +or ``std::shared_ptr>`` are not automatically convertible). +Attempting to bind a function with such arguments now results in a compile-time +error instead of waiting to fail at run time. + +``py::init<...>()`` constructor definitions are also stricter and now prevent +bindings which could cause unexpected behavior: + +.. code-block:: cpp + + struct Example { + Example(int &); + }; + + py::class_(m, "Example") + .def(py::init()); // OK, exact match + // .def(py::init()); // compile-time error, mismatch + +A non-``const`` lvalue reference is not allowed to bind to an rvalue. However, +note that a constructor taking ``const T &`` can still be registered using +``py::init()`` because a ``const`` lvalue reference can bind to an rvalue. + +v2.1 +==== + +Minimum compiler versions are enforced at compile time +------------------------------------------------------ + +The minimums also apply to v2.0 but the check is now explicit and a compile-time +error is raised if the compiler does not meet the requirements: + +* GCC >= 4.8 +* clang >= 3.3 (appleclang >= 5.0) +* MSVC >= 2015u3 +* Intel C++ >= 15.0 + + +The ``py::metaclass`` attribute is not required for static properties +--------------------------------------------------------------------- + +Binding classes with static properties is now possible by default. The +zero-parameter version of ``py::metaclass()`` is deprecated. However, a new +one-parameter ``py::metaclass(python_type)`` version was added for rare +cases when a custom metaclass is needed to override pybind11's default. + +.. code-block:: cpp + + // old -- emits a deprecation warning + py::class_(m, "Foo", py::metaclass()) + .def_property_readonly_static("foo", ...); + + // new -- static properties work without the attribute + py::class_(m, "Foo") + .def_property_readonly_static("foo", ...); + + // new -- advanced feature, override pybind11's default metaclass + py::class_(m, "Bar", py::metaclass(custom_python_type)) + ... + + +v2.0 +==== + +Breaking changes in ``py::class_`` +---------------------------------- + +These changes were necessary to make type definitions in pybind11 +future-proof, to support PyPy via its ``cpyext`` mechanism (`#527 +`_), and to improve efficiency +(`rev. 86d825 `_). + +1. Declarations of types that provide access via the buffer protocol must + now include the ``py::buffer_protocol()`` annotation as an argument to + the ``py::class_`` constructor. + + .. code-block:: cpp + + py::class_("Matrix", py::buffer_protocol()) + .def(py::init<...>()) + .def_buffer(...); + +2. Classes which include static properties (e.g. ``def_readwrite_static()``) + must now include the ``py::metaclass()`` attribute. Note: this requirement + has since been removed in v2.1. If you're upgrading from 1.x, it's + recommended to skip directly to v2.1 or newer. + +3. This version of pybind11 uses a redesigned mechanism for instantiating + trampoline classes that are used to override virtual methods from within + Python. This led to the following user-visible syntax change: + + .. code-block:: cpp + + // old v1.x syntax + py::class_("MyClass") + .alias() + ... + + // new v2.x syntax + py::class_("MyClass") + ... + + Importantly, both the original and the trampoline class are now specified + as arguments to the ``py::class_`` template, and the ``alias<..>()`` call + is gone. The new scheme has zero overhead in cases when Python doesn't + override any functions of the underlying C++ class. + `rev. 86d825 `_. + + The class type must be the first template argument given to ``py::class_`` + while the trampoline can be mixed in arbitrary order with other arguments + (see the following section). + + +Deprecation of the ``py::base()`` attribute +---------------------------------------------- + +``py::base()`` was deprecated in favor of specifying ``T`` as a template +argument to ``py::class_``. This new syntax also supports multiple inheritance. +Note that, while the type being exported must be the first argument in the +``py::class_`` template, the order of the following types (bases, +holder and/or trampoline) is not important. + +.. code-block:: cpp + + // old v1.x + py::class_("Derived", py::base()); + + // new v2.x + py::class_("Derived"); + + // new -- multiple inheritance + py::class_("Derived"); + + // new -- apart from `Derived` the argument order can be arbitrary + py::class_("Derived"); + + +Out-of-the-box support for ``std::shared_ptr`` +---------------------------------------------- + +The relevant type caster is now built in, so it's no longer necessary to +include a declaration of the form: + +.. code-block:: cpp + + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) + +Continuing to do so won't cause an error or even a deprecation warning, +but it's completely redundant. + + +Deprecation of a few ``py::object`` APIs +---------------------------------------- + +All of the old-style calls emit deprecation warnings. + ++---------------------------------------+---------------------------------------------+ +| Old syntax | New syntax | ++=======================================+=============================================+ +| ``obj.call(args...)`` | ``obj(args...)`` | ++---------------------------------------+---------------------------------------------+ +| ``obj.str()`` | ``py::str(obj)`` | ++---------------------------------------+---------------------------------------------+ +| ``auto l = py::list(obj); l.check()`` | ``py::isinstance(obj)`` | ++---------------------------------------+---------------------------------------------+ +| ``py::object(ptr, true)`` | ``py::reinterpret_borrow(ptr)`` | ++---------------------------------------+---------------------------------------------+ +| ``py::object(ptr, false)`` | ``py::reinterpret_steal(ptr)`` | ++---------------------------------------+---------------------------------------------+ +| ``if (obj.attr("foo"))`` | ``if (py::hasattr(obj, "foo"))`` | ++---------------------------------------+---------------------------------------------+ +| ``if (obj["bar"])`` | ``if (obj.contains("bar"))`` | ++---------------------------------------+---------------------------------------------+ diff --git a/third_party/CityFlow/extern/pybind11/include/pybind11/attr.h b/third_party/CityFlow/extern/pybind11/include/pybind11/attr.h new file mode 100644 index 0000000000000000000000000000000000000000..1044db94d906ac5fcf6faab6ac7668187314598f --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/include/pybind11/attr.h @@ -0,0 +1,690 @@ +/* + pybind11/attr.h: Infrastructure for processing custom + type and function attributes + + Copyright (c) 2016 Wenzel Jakob + + All rights reserved. Use of this source code is governed by a + BSD-style license that can be found in the LICENSE file. +*/ + +#pragma once + +#include "detail/common.h" +#include "cast.h" + +#include + +PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) + +/// \addtogroup annotations +/// @{ + +/// Annotation for methods +struct is_method { + handle class_; + explicit is_method(const handle &c) : class_(c) {} +}; + +/// Annotation for setters +struct is_setter {}; + +/// Annotation for operators +struct is_operator {}; + +/// Annotation for classes that cannot be subclassed +struct is_final {}; + +/// Annotation for parent scope +struct scope { + handle value; + explicit scope(const handle &s) : value(s) {} +}; + +/// Annotation for documentation +struct doc { + const char *value; + explicit doc(const char *value) : value(value) {} +}; + +/// Annotation for function names +struct name { + const char *value; + explicit name(const char *value) : value(value) {} +}; + +/// Annotation indicating that a function is an overload associated with a given "sibling" +struct sibling { + handle value; + explicit sibling(const handle &value) : value(value.ptr()) {} +}; + +/// Annotation indicating that a class derives from another given type +template +struct base { + + PYBIND11_DEPRECATED( + "base() was deprecated in favor of specifying 'T' as a template argument to class_") + base() = default; +}; + +/// Keep patient alive while nurse lives +template +struct keep_alive {}; + +/// Annotation indicating that a class is involved in a multiple inheritance relationship +struct multiple_inheritance {}; + +/// Annotation which enables dynamic attributes, i.e. adds `__dict__` to a class +struct dynamic_attr {}; + +/// Annotation which enables the buffer protocol for a type +struct buffer_protocol {}; + +/// Annotation which requests that a special metaclass is created for a type +struct metaclass { + handle value; + + PYBIND11_DEPRECATED("py::metaclass() is no longer required. It's turned on by default now.") + metaclass() = default; + + /// Override pybind11's default metaclass + explicit metaclass(handle value) : value(value) {} +}; + +/// Specifies a custom callback with signature `void (PyHeapTypeObject*)` that +/// may be used to customize the Python type. +/// +/// The callback is invoked immediately before `PyType_Ready`. +/// +/// Note: This is an advanced interface, and uses of it may require changes to +/// work with later versions of pybind11. You may wish to consult the +/// implementation of `make_new_python_type` in `detail/classes.h` to understand +/// the context in which the callback will be run. +struct custom_type_setup { + using callback = std::function; + + explicit custom_type_setup(callback value) : value(std::move(value)) {} + + callback value; +}; + +/// Annotation that marks a class as local to the module: +struct module_local { + const bool value; + constexpr explicit module_local(bool v = true) : value(v) {} +}; + +/// Annotation to mark enums as an arithmetic type +struct arithmetic {}; + +/// Mark a function for addition at the beginning of the existing overload chain instead of the end +struct prepend {}; + +/** \rst + A call policy which places one or more guard variables (``Ts...``) around the function call. + + For example, this definition: + + .. code-block:: cpp + + m.def("foo", foo, py::call_guard()); + + is equivalent to the following pseudocode: + + .. code-block:: cpp + + m.def("foo", [](args...) { + T scope_guard; + return foo(args...); // forwarded arguments + }); + \endrst */ +template +struct call_guard; + +template <> +struct call_guard<> { + using type = detail::void_type; +}; + +template +struct call_guard { + static_assert(std::is_default_constructible::value, + "The guard type must be default constructible"); + + using type = T; +}; + +template +struct call_guard { + struct type { + T guard{}; // Compose multiple guard types with left-to-right default-constructor order + typename call_guard::type next{}; + }; +}; + +/// @} annotations + +PYBIND11_NAMESPACE_BEGIN(detail) +/* Forward declarations */ +enum op_id : int; +enum op_type : int; +struct undefined_t; +template +struct op_; +void keep_alive_impl(size_t Nurse, size_t Patient, function_call &call, handle ret); + +/// Internal data structure which holds metadata about a keyword argument +struct argument_record { + const char *name; ///< Argument name + const char *descr; ///< Human-readable version of the argument value + handle value; ///< Associated Python object + bool convert : 1; ///< True if the argument is allowed to convert when loading + bool none : 1; ///< True if None is allowed when loading + + argument_record(const char *name, const char *descr, handle value, bool convert, bool none) + : name(name), descr(descr), value(value), convert(convert), none(none) {} +}; + +/// Internal data structure which holds metadata about a bound function (signature, overloads, +/// etc.) +struct function_record { + function_record() + : is_constructor(false), is_new_style_constructor(false), is_stateless(false), + is_operator(false), is_method(false), is_setter(false), has_args(false), + has_kwargs(false), prepend(false) {} + + /// Function name + char *name = nullptr; /* why no C++ strings? They generate heavier code.. */ + + // User-specified documentation string + char *doc = nullptr; + + /// Human-readable version of the function signature + char *signature = nullptr; + + /// List of registered keyword arguments + std::vector args; + + /// Pointer to lambda function which converts arguments and performs the actual call + handle (*impl)(function_call &) = nullptr; + + /// Storage for the wrapped function pointer and captured data, if any + void *data[3] = {}; + + /// Pointer to custom destructor for 'data' (if needed) + void (*free_data)(function_record *ptr) = nullptr; + + /// Return value policy associated with this function + return_value_policy policy = return_value_policy::automatic; + + /// True if name == '__init__' + bool is_constructor : 1; + + /// True if this is a new-style `__init__` defined in `detail/init.h` + bool is_new_style_constructor : 1; + + /// True if this is a stateless function pointer + bool is_stateless : 1; + + /// True if this is an operator (__add__), etc. + bool is_operator : 1; + + /// True if this is a method + bool is_method : 1; + + /// True if this is a setter + bool is_setter : 1; + + /// True if the function has a '*args' argument + bool has_args : 1; + + /// True if the function has a '**kwargs' argument + bool has_kwargs : 1; + + /// True if this function is to be inserted at the beginning of the overload resolution chain + bool prepend : 1; + + /// Number of arguments (including py::args and/or py::kwargs, if present) + std::uint16_t nargs; + + /// Number of leading positional arguments, which are terminated by a py::args or py::kwargs + /// argument or by a py::kw_only annotation. + std::uint16_t nargs_pos = 0; + + /// Number of leading arguments (counted in `nargs`) that are positional-only + std::uint16_t nargs_pos_only = 0; + + /// Python method object + PyMethodDef *def = nullptr; + + /// Python handle to the parent scope (a class or a module) + handle scope; + + /// Python handle to the sibling function representing an overload chain + handle sibling; + + /// Pointer to next overload + function_record *next = nullptr; +}; + +/// Special data structure which (temporarily) holds metadata about a bound class +struct type_record { + PYBIND11_NOINLINE type_record() + : multiple_inheritance(false), dynamic_attr(false), buffer_protocol(false), + default_holder(true), module_local(false), is_final(false) {} + + /// Handle to the parent scope + handle scope; + + /// Name of the class + const char *name = nullptr; + + // Pointer to RTTI type_info data structure + const std::type_info *type = nullptr; + + /// How large is the underlying C++ type? + size_t type_size = 0; + + /// What is the alignment of the underlying C++ type? + size_t type_align = 0; + + /// How large is the type's holder? + size_t holder_size = 0; + + /// The global operator new can be overridden with a class-specific variant + void *(*operator_new)(size_t) = nullptr; + + /// Function pointer to class_<..>::init_instance + void (*init_instance)(instance *, const void *) = nullptr; + + /// Function pointer to class_<..>::dealloc + void (*dealloc)(detail::value_and_holder &) = nullptr; + + /// List of base classes of the newly created type + list bases; + + /// Optional docstring + const char *doc = nullptr; + + /// Custom metaclass (optional) + handle metaclass; + + /// Custom type setup. + custom_type_setup::callback custom_type_setup_callback; + + /// Multiple inheritance marker + bool multiple_inheritance : 1; + + /// Does the class manage a __dict__? + bool dynamic_attr : 1; + + /// Does the class implement the buffer protocol? + bool buffer_protocol : 1; + + /// Is the default (unique_ptr) holder type used? + bool default_holder : 1; + + /// Is the class definition local to the module shared object? + bool module_local : 1; + + /// Is the class inheritable from python classes? + bool is_final : 1; + + PYBIND11_NOINLINE void add_base(const std::type_info &base, void *(*caster)(void *) ) { + auto *base_info = detail::get_type_info(base, false); + if (!base_info) { + std::string tname(base.name()); + detail::clean_type_id(tname); + pybind11_fail("generic_type: type \"" + std::string(name) + + "\" referenced unknown base type \"" + tname + "\""); + } + + if (default_holder != base_info->default_holder) { + std::string tname(base.name()); + detail::clean_type_id(tname); + pybind11_fail("generic_type: type \"" + std::string(name) + "\" " + + (default_holder ? "does not have" : "has") + + " a non-default holder type while its base \"" + tname + "\" " + + (base_info->default_holder ? "does not" : "does")); + } + + bases.append((PyObject *) base_info->type); + +#if PY_VERSION_HEX < 0x030B0000 + dynamic_attr |= base_info->type->tp_dictoffset != 0; +#else + dynamic_attr |= (base_info->type->tp_flags & Py_TPFLAGS_MANAGED_DICT) != 0; +#endif + + if (caster) { + base_info->implicit_casts.emplace_back(type, caster); + } + } +}; + +inline function_call::function_call(const function_record &f, handle p) : func(f), parent(p) { + args.reserve(f.nargs); + args_convert.reserve(f.nargs); +} + +/// Tag for a new-style `__init__` defined in `detail/init.h` +struct is_new_style_constructor {}; + +/** + * Partial template specializations to process custom attributes provided to + * cpp_function_ and class_. These are either used to initialize the respective + * fields in the type_record and function_record data structures or executed at + * runtime to deal with custom call policies (e.g. keep_alive). + */ +template +struct process_attribute; + +template +struct process_attribute_default { + /// Default implementation: do nothing + static void init(const T &, function_record *) {} + static void init(const T &, type_record *) {} + static void precall(function_call &) {} + static void postcall(function_call &, handle) {} +}; + +/// Process an attribute specifying the function's name +template <> +struct process_attribute : process_attribute_default { + static void init(const name &n, function_record *r) { r->name = const_cast(n.value); } +}; + +/// Process an attribute specifying the function's docstring +template <> +struct process_attribute : process_attribute_default { + static void init(const doc &n, function_record *r) { r->doc = const_cast(n.value); } +}; + +/// Process an attribute specifying the function's docstring (provided as a C-style string) +template <> +struct process_attribute : process_attribute_default { + static void init(const char *d, function_record *r) { r->doc = const_cast(d); } + static void init(const char *d, type_record *r) { r->doc = d; } +}; +template <> +struct process_attribute : process_attribute {}; + +/// Process an attribute indicating the function's return value policy +template <> +struct process_attribute : process_attribute_default { + static void init(const return_value_policy &p, function_record *r) { r->policy = p; } +}; + +/// Process an attribute which indicates that this is an overloaded function associated with a +/// given sibling +template <> +struct process_attribute : process_attribute_default { + static void init(const sibling &s, function_record *r) { r->sibling = s.value; } +}; + +/// Process an attribute which indicates that this function is a method +template <> +struct process_attribute : process_attribute_default { + static void init(const is_method &s, function_record *r) { + r->is_method = true; + r->scope = s.class_; + } +}; + +/// Process an attribute which indicates that this function is a setter +template <> +struct process_attribute : process_attribute_default { + static void init(const is_setter &, function_record *r) { r->is_setter = true; } +}; + +/// Process an attribute which indicates the parent scope of a method +template <> +struct process_attribute : process_attribute_default { + static void init(const scope &s, function_record *r) { r->scope = s.value; } +}; + +/// Process an attribute which indicates that this function is an operator +template <> +struct process_attribute : process_attribute_default { + static void init(const is_operator &, function_record *r) { r->is_operator = true; } +}; + +template <> +struct process_attribute + : process_attribute_default { + static void init(const is_new_style_constructor &, function_record *r) { + r->is_new_style_constructor = true; + } +}; + +inline void check_kw_only_arg(const arg &a, function_record *r) { + if (r->args.size() > r->nargs_pos && (!a.name || a.name[0] == '\0')) { + pybind11_fail("arg(): cannot specify an unnamed argument after a kw_only() annotation or " + "args() argument"); + } +} + +inline void append_self_arg_if_needed(function_record *r) { + if (r->is_method && r->args.empty()) { + r->args.emplace_back("self", nullptr, handle(), /*convert=*/true, /*none=*/false); + } +} + +/// Process a keyword argument attribute (*without* a default value) +template <> +struct process_attribute : process_attribute_default { + static void init(const arg &a, function_record *r) { + append_self_arg_if_needed(r); + r->args.emplace_back(a.name, nullptr, handle(), !a.flag_noconvert, a.flag_none); + + check_kw_only_arg(a, r); + } +}; + +/// Process a keyword argument attribute (*with* a default value) +template <> +struct process_attribute : process_attribute_default { + static void init(const arg_v &a, function_record *r) { + if (r->is_method && r->args.empty()) { + r->args.emplace_back( + "self", /*descr=*/nullptr, /*parent=*/handle(), /*convert=*/true, /*none=*/false); + } + + if (!a.value) { +#if defined(PYBIND11_DETAILED_ERROR_MESSAGES) + std::string descr("'"); + if (a.name) { + descr += std::string(a.name) + ": "; + } + descr += a.type + "'"; + if (r->is_method) { + if (r->name) { + descr += " in method '" + (std::string) str(r->scope) + "." + + (std::string) r->name + "'"; + } else { + descr += " in method of '" + (std::string) str(r->scope) + "'"; + } + } else if (r->name) { + descr += " in function '" + (std::string) r->name + "'"; + } + pybind11_fail("arg(): could not convert default argument " + descr + + " into a Python object (type not registered yet?)"); +#else + pybind11_fail("arg(): could not convert default argument " + "into a Python object (type not registered yet?). " + "#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for " + "more information."); +#endif + } + r->args.emplace_back(a.name, a.descr, a.value.inc_ref(), !a.flag_noconvert, a.flag_none); + + check_kw_only_arg(a, r); + } +}; + +/// Process a keyword-only-arguments-follow pseudo argument +template <> +struct process_attribute : process_attribute_default { + static void init(const kw_only &, function_record *r) { + append_self_arg_if_needed(r); + if (r->has_args && r->nargs_pos != static_cast(r->args.size())) { + pybind11_fail("Mismatched args() and kw_only(): they must occur at the same relative " + "argument location (or omit kw_only() entirely)"); + } + r->nargs_pos = static_cast(r->args.size()); + } +}; + +/// Process a positional-only-argument maker +template <> +struct process_attribute : process_attribute_default { + static void init(const pos_only &, function_record *r) { + append_self_arg_if_needed(r); + r->nargs_pos_only = static_cast(r->args.size()); + if (r->nargs_pos_only > r->nargs_pos) { + pybind11_fail("pos_only(): cannot follow a py::args() argument"); + } + // It also can't follow a kw_only, but a static_assert in pybind11.h checks that + } +}; + +/// Process a parent class attribute. Single inheritance only (class_ itself already guarantees +/// that) +template +struct process_attribute::value>> + : process_attribute_default { + static void init(const handle &h, type_record *r) { r->bases.append(h); } +}; + +/// Process a parent class attribute (deprecated, does not support multiple inheritance) +template +struct process_attribute> : process_attribute_default> { + static void init(const base &, type_record *r) { r->add_base(typeid(T), nullptr); } +}; + +/// Process a multiple inheritance attribute +template <> +struct process_attribute : process_attribute_default { + static void init(const multiple_inheritance &, type_record *r) { + r->multiple_inheritance = true; + } +}; + +template <> +struct process_attribute : process_attribute_default { + static void init(const dynamic_attr &, type_record *r) { r->dynamic_attr = true; } +}; + +template <> +struct process_attribute { + static void init(const custom_type_setup &value, type_record *r) { + r->custom_type_setup_callback = value.value; + } +}; + +template <> +struct process_attribute : process_attribute_default { + static void init(const is_final &, type_record *r) { r->is_final = true; } +}; + +template <> +struct process_attribute : process_attribute_default { + static void init(const buffer_protocol &, type_record *r) { r->buffer_protocol = true; } +}; + +template <> +struct process_attribute : process_attribute_default { + static void init(const metaclass &m, type_record *r) { r->metaclass = m.value; } +}; + +template <> +struct process_attribute : process_attribute_default { + static void init(const module_local &l, type_record *r) { r->module_local = l.value; } +}; + +/// Process a 'prepend' attribute, putting this at the beginning of the overload chain +template <> +struct process_attribute : process_attribute_default { + static void init(const prepend &, function_record *r) { r->prepend = true; } +}; + +/// Process an 'arithmetic' attribute for enums (does nothing here) +template <> +struct process_attribute : process_attribute_default {}; + +template +struct process_attribute> : process_attribute_default> {}; + +/** + * Process a keep_alive call policy -- invokes keep_alive_impl during the + * pre-call handler if both Nurse, Patient != 0 and use the post-call handler + * otherwise + */ +template +struct process_attribute> + : public process_attribute_default> { + template = 0> + static void precall(function_call &call) { + keep_alive_impl(Nurse, Patient, call, handle()); + } + template = 0> + static void postcall(function_call &, handle) {} + template = 0> + static void precall(function_call &) {} + template = 0> + static void postcall(function_call &call, handle ret) { + keep_alive_impl(Nurse, Patient, call, ret); + } +}; + +/// Recursively iterate over variadic template arguments +template +struct process_attributes { + static void init(const Args &...args, function_record *r) { + PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(r); + PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(r); + using expander = int[]; + (void) expander{ + 0, ((void) process_attribute::type>::init(args, r), 0)...}; + } + static void init(const Args &...args, type_record *r) { + PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(r); + PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(r); + using expander = int[]; + (void) expander{0, + (process_attribute::type>::init(args, r), 0)...}; + } + static void precall(function_call &call) { + PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(call); + using expander = int[]; + (void) expander{0, + (process_attribute::type>::precall(call), 0)...}; + } + static void postcall(function_call &call, handle fn_ret) { + PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(call, fn_ret); + PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(fn_ret); + using expander = int[]; + (void) expander{ + 0, (process_attribute::type>::postcall(call, fn_ret), 0)...}; + } +}; + +template +using is_call_guard = is_instantiation; + +/// Extract the ``type`` from the first `call_guard` in `Extras...` (or `void_type` if none found) +template +using extract_guard_t = typename exactly_one_t, Extra...>::type; + +/// Check the number of named arguments at compile time +template ::value...), + size_t self = constexpr_sum(std::is_same::value...)> +constexpr bool expected_num_args(size_t nargs, bool has_args, bool has_kwargs) { + PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(nargs, has_args, has_kwargs); + return named == 0 || (self + named + size_t(has_args) + size_t(has_kwargs)) == nargs; +} + +PYBIND11_NAMESPACE_END(detail) +PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE) diff --git a/third_party/CityFlow/extern/pybind11/include/pybind11/buffer_info.h b/third_party/CityFlow/extern/pybind11/include/pybind11/buffer_info.h new file mode 100644 index 0000000000000000000000000000000000000000..b99ee8bef422a6dc65d27e364eded545615e9ccc --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/include/pybind11/buffer_info.h @@ -0,0 +1,208 @@ +/* + pybind11/buffer_info.h: Python buffer object interface + + Copyright (c) 2016 Wenzel Jakob + + All rights reserved. Use of this source code is governed by a + BSD-style license that can be found in the LICENSE file. +*/ + +#pragma once + +#include "detail/common.h" + +PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) + +PYBIND11_NAMESPACE_BEGIN(detail) + +// Default, C-style strides +inline std::vector c_strides(const std::vector &shape, ssize_t itemsize) { + auto ndim = shape.size(); + std::vector strides(ndim, itemsize); + if (ndim > 0) { + for (size_t i = ndim - 1; i > 0; --i) { + strides[i - 1] = strides[i] * shape[i]; + } + } + return strides; +} + +// F-style strides; default when constructing an array_t with `ExtraFlags & f_style` +inline std::vector f_strides(const std::vector &shape, ssize_t itemsize) { + auto ndim = shape.size(); + std::vector strides(ndim, itemsize); + for (size_t i = 1; i < ndim; ++i) { + strides[i] = strides[i - 1] * shape[i - 1]; + } + return strides; +} + +template +struct compare_buffer_info; + +PYBIND11_NAMESPACE_END(detail) + +/// Information record describing a Python buffer object +struct buffer_info { + void *ptr = nullptr; // Pointer to the underlying storage + ssize_t itemsize = 0; // Size of individual items in bytes + ssize_t size = 0; // Total number of entries + std::string format; // For homogeneous buffers, this should be set to + // format_descriptor::format() + ssize_t ndim = 0; // Number of dimensions + std::vector shape; // Shape of the tensor (1 entry per dimension) + std::vector strides; // Number of bytes between adjacent entries + // (for each per dimension) + bool readonly = false; // flag to indicate if the underlying storage may be written to + + buffer_info() = default; + + buffer_info(void *ptr, + ssize_t itemsize, + const std::string &format, + ssize_t ndim, + detail::any_container shape_in, + detail::any_container strides_in, + bool readonly = false) + : ptr(ptr), itemsize(itemsize), size(1), format(format), ndim(ndim), + shape(std::move(shape_in)), strides(std::move(strides_in)), readonly(readonly) { + if (ndim != (ssize_t) shape.size() || ndim != (ssize_t) strides.size()) { + pybind11_fail("buffer_info: ndim doesn't match shape and/or strides length"); + } + for (size_t i = 0; i < (size_t) ndim; ++i) { + size *= shape[i]; + } + } + + template + buffer_info(T *ptr, + detail::any_container shape_in, + detail::any_container strides_in, + bool readonly = false) + : buffer_info(private_ctr_tag(), + ptr, + sizeof(T), + format_descriptor::format(), + static_cast(shape_in->size()), + std::move(shape_in), + std::move(strides_in), + readonly) {} + + buffer_info(void *ptr, + ssize_t itemsize, + const std::string &format, + ssize_t size, + bool readonly = false) + : buffer_info(ptr, itemsize, format, 1, {size}, {itemsize}, readonly) {} + + template + buffer_info(T *ptr, ssize_t size, bool readonly = false) + : buffer_info(ptr, sizeof(T), format_descriptor::format(), size, readonly) {} + + template + buffer_info(const T *ptr, ssize_t size, bool readonly = true) + : buffer_info( + const_cast(ptr), sizeof(T), format_descriptor::format(), size, readonly) {} + + explicit buffer_info(Py_buffer *view, bool ownview = true) + : buffer_info( + view->buf, + view->itemsize, + view->format, + view->ndim, + {view->shape, view->shape + view->ndim}, + /* Though buffer::request() requests PyBUF_STRIDES, ctypes objects + * ignore this flag and return a view with NULL strides. + * When strides are NULL, build them manually. */ + view->strides + ? std::vector(view->strides, view->strides + view->ndim) + : detail::c_strides({view->shape, view->shape + view->ndim}, view->itemsize), + (view->readonly != 0)) { + // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) + this->m_view = view; + // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) + this->ownview = ownview; + } + + buffer_info(const buffer_info &) = delete; + buffer_info &operator=(const buffer_info &) = delete; + + buffer_info(buffer_info &&other) noexcept { (*this) = std::move(other); } + + buffer_info &operator=(buffer_info &&rhs) noexcept { + ptr = rhs.ptr; + itemsize = rhs.itemsize; + size = rhs.size; + format = std::move(rhs.format); + ndim = rhs.ndim; + shape = std::move(rhs.shape); + strides = std::move(rhs.strides); + std::swap(m_view, rhs.m_view); + std::swap(ownview, rhs.ownview); + readonly = rhs.readonly; + return *this; + } + + ~buffer_info() { + if (m_view && ownview) { + PyBuffer_Release(m_view); + delete m_view; + } + } + + Py_buffer *view() const { return m_view; } + Py_buffer *&view() { return m_view; } + + /* True if the buffer item type is equivalent to `T`. */ + // To define "equivalent" by example: + // `buffer_info::item_type_is_equivalent_to(b)` and + // `buffer_info::item_type_is_equivalent_to(b)` may both be true + // on some platforms, but `int` and `unsigned` will never be equivalent. + // For the ground truth, please inspect `detail::compare_buffer_info<>`. + template + bool item_type_is_equivalent_to() const { + return detail::compare_buffer_info::compare(*this); + } + +private: + struct private_ctr_tag {}; + + buffer_info(private_ctr_tag, + void *ptr, + ssize_t itemsize, + const std::string &format, + ssize_t ndim, + detail::any_container &&shape_in, + detail::any_container &&strides_in, + bool readonly) + : buffer_info( + ptr, itemsize, format, ndim, std::move(shape_in), std::move(strides_in), readonly) {} + + Py_buffer *m_view = nullptr; + bool ownview = false; +}; + +PYBIND11_NAMESPACE_BEGIN(detail) + +template +struct compare_buffer_info { + static bool compare(const buffer_info &b) { + // NOLINTNEXTLINE(bugprone-sizeof-expression) Needed for `PyObject *` + return b.format == format_descriptor::format() && b.itemsize == (ssize_t) sizeof(T); + } +}; + +template +struct compare_buffer_info::value>> { + static bool compare(const buffer_info &b) { + return (size_t) b.itemsize == sizeof(T) + && (b.format == format_descriptor::value + || ((sizeof(T) == sizeof(long)) + && b.format == (std::is_unsigned::value ? "L" : "l")) + || ((sizeof(T) == sizeof(size_t)) + && b.format == (std::is_unsigned::value ? "N" : "n"))); + } +}; + +PYBIND11_NAMESPACE_END(detail) +PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE) diff --git a/third_party/CityFlow/extern/pybind11/include/pybind11/cast.h b/third_party/CityFlow/extern/pybind11/include/pybind11/cast.h new file mode 100644 index 0000000000000000000000000000000000000000..02d9488daec63655a27e13f3b86c742bfbcbae3c --- /dev/null +++ b/third_party/CityFlow/extern/pybind11/include/pybind11/cast.h @@ -0,0 +1,1837 @@ +/* + pybind11/cast.h: Partial template specializations to cast between + C++ and Python types + + Copyright (c) 2016 Wenzel Jakob + + All rights reserved. Use of this source code is governed by a + BSD-style license that can be found in the LICENSE file. +*/ + +#pragma once + +#include "detail/common.h" +#include "detail/descr.h" +#include "detail/type_caster_base.h" +#include "detail/typeid.h" +#include "pytypes.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) + +PYBIND11_WARNING_DISABLE_MSVC(4127) + +PYBIND11_NAMESPACE_BEGIN(detail) + +template +class type_caster : public type_caster_base {}; +template +using make_caster = type_caster>; + +// Shortcut for calling a caster's `cast_op_type` cast operator for casting a type_caster to a T +template +typename make_caster::template cast_op_type cast_op(make_caster &caster) { + using result_t = typename make_caster::template cast_op_type; // See PR #4893 + return caster.operator result_t(); +} +template +typename make_caster::template cast_op_type::type> +cast_op(make_caster &&caster) { + using result_t = typename make_caster::template cast_op_type< + typename std::add_rvalue_reference::type>; // See PR #4893 + return std::move(caster).operator result_t(); +} + +template +class type_caster> { +private: + using caster_t = make_caster; + caster_t subcaster; + using reference_t = type &; + using subcaster_cast_op_type = typename caster_t::template cast_op_type; + + static_assert( + std::is_same::type &, subcaster_cast_op_type>::value + || std::is_same::value, + "std::reference_wrapper caster requires T to have a caster with an " + "`operator T &()` or `operator const T &()`"); + +public: + bool load(handle src, bool convert) { return subcaster.load(src, convert); } + static constexpr auto name = caster_t::name; + static handle + cast(const std::reference_wrapper &src, return_value_policy policy, handle parent) { + // It is definitely wrong to take ownership of this pointer, so mask that rvp + if (policy == return_value_policy::take_ownership + || policy == return_value_policy::automatic) { + policy = return_value_policy::automatic_reference; + } + return caster_t::cast(&src.get(), policy, parent); + } + template + using cast_op_type = std::reference_wrapper; + explicit operator std::reference_wrapper() { return cast_op(subcaster); } +}; + +#define PYBIND11_TYPE_CASTER(type, py_name) \ +protected: \ + type value; \ + \ +public: \ + static constexpr auto name = py_name; \ + template >::value, \ + int> \ + = 0> \ + static ::pybind11::handle cast( \ + T_ *src, ::pybind11::return_value_policy policy, ::pybind11::handle parent) { \ + if (!src) \ + return ::pybind11::none().release(); \ + if (policy == ::pybind11::return_value_policy::take_ownership) { \ + auto h = cast(std::move(*src), policy, parent); \ + delete src; \ + return h; \ + } \ + return cast(*src, policy, parent); \ + } \ + operator type *() { return &value; } /* NOLINT(bugprone-macro-parentheses) */ \ + operator type &() { return value; } /* NOLINT(bugprone-macro-parentheses) */ \ + operator type &&() && { return std::move(value); } /* NOLINT(bugprone-macro-parentheses) */ \ + template \ + using cast_op_type = ::pybind11::detail::movable_cast_op_type + +template +using is_std_char_type = any_of, /* std::string */ +#if defined(PYBIND11_HAS_U8STRING) + std::is_same, /* std::u8string */ +#endif + std::is_same, /* std::u16string */ + std::is_same, /* std::u32string */ + std::is_same /* std::wstring */ + >; + +template +struct type_caster::value && !is_std_char_type::value>> { + using _py_type_0 = conditional_t; + using _py_type_1 = conditional_t::value, + _py_type_0, + typename std::make_unsigned<_py_type_0>::type>; + using py_type = conditional_t::value, double, _py_type_1>; + +public: + bool load(handle src, bool convert) { + py_type py_value; + + if (!src) { + return false; + } + +#if !defined(PYPY_VERSION) + auto index_check = [](PyObject *o) { return PyIndex_Check(o); }; +#else + // In PyPy 7.3.3, `PyIndex_Check` is implemented by calling `__index__`, + // while CPython only considers the existence of `nb_index`/`__index__`. + auto index_check = [](PyObject *o) { return hasattr(o, "__index__"); }; +#endif + + if (std::is_floating_point::value) { + if (convert || PyFloat_Check(src.ptr())) { + py_value = (py_type) PyFloat_AsDouble(src.ptr()); + } else { + return false; + } + } else if (PyFloat_Check(src.ptr()) + || (!convert && !PYBIND11_LONG_CHECK(src.ptr()) && !index_check(src.ptr()))) { + return false; + } else { + handle src_or_index = src; + // PyPy: 7.3.7's 3.8 does not implement PyLong_*'s __index__ calls. +#if PY_VERSION_HEX < 0x03080000 || defined(PYPY_VERSION) + object index; + if (!PYBIND11_LONG_CHECK(src.ptr())) { // So: index_check(src.ptr()) + index = reinterpret_steal(PyNumber_Index(src.ptr())); + if (!index) { + PyErr_Clear(); + if (!convert) + return false; + } else { + src_or_index = index; + } + } +#endif + if (std::is_unsigned::value) { + py_value = as_unsigned(src_or_index.ptr()); + } else { // signed integer: + py_value = sizeof(T) <= sizeof(long) + ? (py_type) PyLong_AsLong(src_or_index.ptr()) + : (py_type) PYBIND11_LONG_AS_LONGLONG(src_or_index.ptr()); + } + } + + // Python API reported an error + bool py_err = py_value == (py_type) -1 && PyErr_Occurred(); + + // Check to see if the conversion is valid (integers should match exactly) + // Signed/unsigned checks happen elsewhere + if (py_err + || (std::is_integral::value && sizeof(py_type) != sizeof(T) + && py_value != (py_type) (T) py_value)) { + PyErr_Clear(); + if (py_err && convert && (PyNumber_Check(src.ptr()) != 0)) { + auto tmp = reinterpret_steal(std::is_floating_point::value + ? PyNumber_Float(src.ptr()) + : PyNumber_Long(src.ptr())); + PyErr_Clear(); + return load(tmp, false); + } + return false; + } + + value = (T) py_value; + return true; + } + + template + static typename std::enable_if::value, handle>::type + cast(U src, return_value_policy /* policy */, handle /* parent */) { + return PyFloat_FromDouble((double) src); + } + + template + static typename std::enable_if::value && std::is_signed::value + && (sizeof(U) <= sizeof(long)), + handle>::type + cast(U src, return_value_policy /* policy */, handle /* parent */) { + return PYBIND11_LONG_FROM_SIGNED((long) src); + } + + template + static typename std::enable_if::value && std::is_unsigned::value + && (sizeof(U) <= sizeof(unsigned long)), + handle>::type + cast(U src, return_value_policy /* policy */, handle /* parent */) { + return PYBIND11_LONG_FROM_UNSIGNED((unsigned long) src); + } + + template + static typename std::enable_if::value && std::is_signed::value + && (sizeof(U) > sizeof(long)), + handle>::type + cast(U src, return_value_policy /* policy */, handle /* parent */) { + return PyLong_FromLongLong((long long) src); + } + + template + static typename std::enable_if::value && std::is_unsigned::value + && (sizeof(U) > sizeof(unsigned long)), + handle>::type + cast(U src, return_value_policy /* policy */, handle /* parent */) { + return PyLong_FromUnsignedLongLong((unsigned long long) src); + } + + PYBIND11_TYPE_CASTER(T, const_name::value>("int", "float")); +}; + +template +struct void_caster { +public: + bool load(handle src, bool) { + if (src && src.is_none()) { + return true; + } + return false; + } + static handle cast(T, return_value_policy /* policy */, handle /* parent */) { + return none().release(); + } + PYBIND11_TYPE_CASTER(T, const_name("None")); +}; + +template <> +class type_caster : public void_caster {}; + +template <> +class type_caster : public type_caster { +public: + using type_caster::cast; + + bool load(handle h, bool) { + if (!h) { + return false; + } + if (h.is_none()) { + value = nullptr; + return true; + } + + /* Check if this is a capsule */ + if (isinstance(h)) { + value = reinterpret_borrow(h); + return true; + } + + /* Check if this is a C++ type */ + const auto &bases = all_type_info((PyTypeObject *) type::handle_of(h).ptr()); + if (bases.size() == 1) { // Only allowing loading from a single-value type + value = values_and_holders(reinterpret_cast(h.ptr())).begin()->value_ptr(); + return true; + } + + /* Fail */ + return false; + } + + static handle cast(const void *ptr, return_value_policy /* policy */, handle /* parent */) { + if (ptr) { + return capsule(ptr).release(); + } + return none().release(); + } + + template + using cast_op_type = void *&; + explicit operator void *&() { return value; } + static constexpr auto name = const_name("capsule"); + +private: + void *value = nullptr; +}; + +template <> +class type_caster : public void_caster {}; + +template <> +class type_caster { +public: + bool load(handle src, bool convert) { + if (!src) { + return false; + } + if (src.ptr() == Py_True) { + value = true; + return true; + } + if (src.ptr() == Py_False) { + value = false; + return true; + } + if (convert || is_numpy_bool(src)) { + // (allow non-implicit conversion for numpy booleans), use strncmp + // since NumPy 1.x had an additional trailing underscore. + + Py_ssize_t res = -1; + if (src.is_none()) { + res = 0; // None is implicitly converted to False + } +#if defined(PYPY_VERSION) + // On PyPy, check that "__bool__" attr exists + else if (hasattr(src, PYBIND11_BOOL_ATTR)) { + res = PyObject_IsTrue(src.ptr()); + } +#else + // Alternate approach for CPython: this does the same as the above, but optimized + // using the CPython API so as to avoid an unneeded attribute lookup. + else if (auto *tp_as_number = src.ptr()->ob_type->tp_as_number) { + if (PYBIND11_NB_BOOL(tp_as_number)) { + res = (*PYBIND11_NB_BOOL(tp_as_number))(src.ptr()); + } + } +#endif + if (res == 0 || res == 1) { + value = (res != 0); + return true; + } + PyErr_Clear(); + } + return false; + } + static handle cast(bool src, return_value_policy /* policy */, handle /* parent */) { + return handle(src ? Py_True : Py_False).inc_ref(); + } + PYBIND11_TYPE_CASTER(bool, const_name("bool")); + +private: + // Test if an object is a NumPy boolean (without fetching the type). + static inline bool is_numpy_bool(handle object) { + const char *type_name = Py_TYPE(object.ptr())->tp_name; + // Name changed to `numpy.bool` in NumPy 2, `numpy.bool_` is needed for 1.x support + return std::strcmp("numpy.bool", type_name) == 0 + || std::strcmp("numpy.bool_", type_name) == 0; + } +}; + +// Helper class for UTF-{8,16,32} C++ stl strings: +template +struct string_caster { + using CharT = typename StringType::value_type; + + // Simplify life by being able to assume standard char sizes (the standard only guarantees + // minimums, but Python requires exact sizes) + static_assert(!std::is_same::value || sizeof(CharT) == 1, + "Unsupported char size != 1"); +#if defined(PYBIND11_HAS_U8STRING) + static_assert(!std::is_same::value || sizeof(CharT) == 1, + "Unsupported char8_t size != 1"); +#endif + static_assert(!std::is_same::value || sizeof(CharT) == 2, + "Unsupported char16_t size != 2"); + static_assert(!std::is_same::value || sizeof(CharT) == 4, + "Unsupported char32_t size != 4"); + // wchar_t can be either 16 bits (Windows) or 32 (everywhere else) + static_assert(!std::is_same::value || sizeof(CharT) == 2 || sizeof(CharT) == 4, + "Unsupported wchar_t size != 2/4"); + static constexpr size_t UTF_N = 8 * sizeof(CharT); + + bool load(handle src, bool) { + handle load_src = src; + if (!src) { + return false; + } + if (!PyUnicode_Check(load_src.ptr())) { + return load_raw(load_src); + } + + // For UTF-8 we avoid the need for a temporary `bytes` object by using + // `PyUnicode_AsUTF8AndSize`. + if (UTF_N == 8) { + Py_ssize_t size = -1; + const auto *buffer + = reinterpret_cast(PyUnicode_AsUTF8AndSize(load_src.ptr(), &size)); + if (!buffer) { + PyErr_Clear(); + return false; + } + value = StringType(buffer, static_cast(size)); + return true; + } + + auto utfNbytes + = reinterpret_steal(PyUnicode_AsEncodedString(load_src.ptr(), + UTF_N == 8 ? "utf-8" + : UTF_N == 16 ? "utf-16" + : "utf-32", + nullptr)); + if (!utfNbytes) { + PyErr_Clear(); + return false; + } + + const auto *buffer + = reinterpret_cast(PYBIND11_BYTES_AS_STRING(utfNbytes.ptr())); + size_t length = (size_t) PYBIND11_BYTES_SIZE(utfNbytes.ptr()) / sizeof(CharT); + // Skip BOM for UTF-16/32 + if (UTF_N > 8) { + buffer++; + length--; + } + value = StringType(buffer, length); + + // If we're loading a string_view we need to keep the encoded Python object alive: + if (IsView) { + loader_life_support::add_patient(utfNbytes); + } + + return true; + } + + static handle + cast(const StringType &src, return_value_policy /* policy */, handle /* parent */) { + const char *buffer = reinterpret_cast(src.data()); + auto nbytes = ssize_t(src.size() * sizeof(CharT)); + handle s = decode_utfN(buffer, nbytes); + if (!s) { + throw error_already_set(); + } + return s; + } + + PYBIND11_TYPE_CASTER(StringType, const_name(PYBIND11_STRING_NAME)); + +private: + static handle decode_utfN(const char *buffer, ssize_t nbytes) { +#if !defined(PYPY_VERSION) + return UTF_N == 8 ? PyUnicode_DecodeUTF8(buffer, nbytes, nullptr) + : UTF_N == 16 ? PyUnicode_DecodeUTF16(buffer, nbytes, nullptr, nullptr) + : PyUnicode_DecodeUTF32(buffer, nbytes, nullptr, nullptr); +#else + // PyPy segfaults when on PyUnicode_DecodeUTF16 (and possibly on PyUnicode_DecodeUTF32 as + // well), so bypass the whole thing by just passing the encoding as a string value, which + // works properly: + return PyUnicode_Decode(buffer, + nbytes, + UTF_N == 8 ? "utf-8" + : UTF_N == 16 ? "utf-16" + : "utf-32", + nullptr); +#endif + } + + // When loading into a std::string or char*, accept a bytes/bytearray object as-is (i.e. + // without any encoding/decoding attempt). For other C++ char sizes this is a no-op. + // which supports loading a unicode from a str, doesn't take this path. + template + bool load_raw(enable_if_t::value, handle> src) { + if (PYBIND11_BYTES_CHECK(src.ptr())) { + // We were passed raw bytes; accept it into a std::string or char* + // without any encoding attempt. + const char *bytes = PYBIND11_BYTES_AS_STRING(src.ptr()); + if (!bytes) { + pybind11_fail("Unexpected PYBIND11_BYTES_AS_STRING() failure."); + } + value = StringType(bytes, (size_t) PYBIND11_BYTES_SIZE(src.ptr())); + return true; + } + if (PyByteArray_Check(src.ptr())) { + // We were passed a bytearray; accept it into a std::string or char* + // without any encoding attempt. + const char *bytearray = PyByteArray_AsString(src.ptr()); + if (!bytearray) { + pybind11_fail("Unexpected PyByteArray_AsString() failure."); + } + value = StringType(bytearray, (size_t) PyByteArray_Size(src.ptr())); + return true; + } + + return false; + } + + template + bool load_raw(enable_if_t::value, handle>) { + return false; + } +}; + +template +struct type_caster, + enable_if_t::value>> + : string_caster> {}; + +#ifdef PYBIND11_HAS_STRING_VIEW +template +struct type_caster, + enable_if_t::value>> + : string_caster, true> {}; +#endif + +// Type caster for C-style strings. We basically use a std::string type caster, but also add the +// ability to use None as a nullptr char* (which the string caster doesn't allow). +template +struct type_caster::value>> { + using StringType = std::basic_string; + using StringCaster = make_caster; + StringCaster str_caster; + bool none = false; + CharT one_char = 0; + +public: + bool load(handle src, bool convert) { + if (!src) { + return false; + } + if (src.is_none()) { + // Defer accepting None to other overloads (if we aren't in convert mode): + if (!convert) { + return false; + } + none = true; + return true; + } + return str_caster.load(src, convert); + } + + static handle cast(const CharT *src, return_value_policy policy, handle parent) { + if (src == nullptr) { + return pybind11::none().release(); + } + return StringCaster::cast(StringType(src), policy, parent); + } + + static handle cast(CharT src, return_value_policy policy, handle parent) { + if (std::is_same::value) { + handle s = PyUnicode_DecodeLatin1((const char *) &src, 1, nullptr); + if (!s) { + throw error_already_set(); + } + return s; + } + return StringCaster::cast(StringType(1, src), policy, parent); + } + + explicit operator CharT *() { + return none ? nullptr : const_cast(static_cast(str_caster).c_str()); + } + explicit operator CharT &() { + if (none) { + throw value_error("Cannot convert None to a character"); + } + + auto &value = static_cast(str_caster); + size_t str_len = value.size(); + if (str_len == 0) { + throw value_error("Cannot convert empty string to a character"); + } + + // If we're in UTF-8 mode, we have two possible failures: one for a unicode character that + // is too high, and one for multiple unicode characters (caught later), so we need to + // figure out how long the first encoded character is in bytes to distinguish between these + // two errors. We also allow want to allow unicode characters U+0080 through U+00FF, as + // those can fit into a single char value. + if (StringCaster::UTF_N == 8 && str_len > 1 && str_len <= 4) { + auto v0 = static_cast(value[0]); + // low bits only: 0-127 + // 0b110xxxxx - start of 2-byte sequence + // 0b1110xxxx - start of 3-byte sequence + // 0b11110xxx - start of 4-byte sequence + size_t char0_bytes = (v0 & 0x80) == 0 ? 1 + : (v0 & 0xE0) == 0xC0 ? 2 + : (v0 & 0xF0) == 0xE0 ? 3 + : 4; + + if (char0_bytes == str_len) { + // If we have a 128-255 value, we can decode it into a single char: + if (char0_bytes == 2 && (v0 & 0xFC) == 0xC0) { // 0x110000xx 0x10xxxxxx + one_char = static_cast(((v0 & 3) << 6) + + (static_cast(value[1]) & 0x3F)); + return one_char; + } + // Otherwise we have a single character, but it's > U+00FF + throw value_error("Character code point not in range(0x100)"); + } + } + + // UTF-16 is much easier: we can only have a surrogate pair for values above U+FFFF, thus a + // surrogate pair with total length 2 instantly indicates a range error (but not a "your + // string was too long" error). + else if (StringCaster::UTF_N == 16 && str_len == 2) { + one_char = static_cast(value[0]); + if (one_char >= 0xD800 && one_char < 0xE000) { + throw value_error("Character code point not in range(0x10000)"); + } + } + + if (str_len != 1) { + throw value_error("Expected a character, but multi-character string found"); + } + + one_char = value[0]; + return one_char; + } + + static constexpr auto name = const_name(PYBIND11_STRING_NAME); + template + using cast_op_type = pybind11::detail::cast_op_type<_T>; +}; + +// Base implementation for std::tuple and std::pair +template