diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7db3fb5d3666b7bfcedfff262238713a45286f2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,126 @@ +**/*.pt +**/checkpoints +**/wget-log +**/_build/ +**/*.ckpt +**/outputs +**/*.tar.gz +**/playground +**/wandb +/verl +/scripts +/saves +/runs +/results +/cleanrl +/train_*.sh + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class +dataset/* +tensorflow/my_graph/* +.idea/ +# C extensions +*.so +data +results/ + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +image_outputs + +checkpoints + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + + +# virtualenv +venv/ + + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject + +# vscode +.vscode + +# Mac +.DS_Store + +# output logs +tests/e2e/toy_examples/deepspeed/synchronous/output.txt + +# vim +*.swp + + +log/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000000000000000000000000000000000..fc7a3224399958345379c3b29d7c70b97a3f7f59 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "verl"] + path = verl + url = https://github.com/volcengine/verl.git +[submodule "external/webshop-minimal"] + path = external/webshop-minimal + url = https://github.com/ZihanWang314/webshop-minimal.git +[submodule "external/kimina-lean-server"] + path = external/kimina-lean-server + url = https://github.com/project-numina/kimina-lean-server.git diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..3231ddc3348e3a2f1f158aa3881e727aea9e2c2b --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2025 RAGEN Team + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/cleanrl/.github/FUNDING.yml b/cleanrl/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..a222369d3f3545f43f4665035c58b162ea10d6bd --- /dev/null +++ b/cleanrl/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [vwxyzjn]# Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: ['https://www.buymeacoffee.com/dosssman']# Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/cleanrl/.github/issue_template.md b/cleanrl/.github/issue_template.md new file mode 100644 index 0000000000000000000000000000000000000000..eb30f3f5f032b611c043fd7852e948471752525c --- /dev/null +++ b/cleanrl/.github/issue_template.md @@ -0,0 +1,24 @@ +## Problem Description + + +## Checklist +- [ ] I have installed dependencies via `uv pip install` (see [CleanRL's installation guideline](https://docs.cleanrl.dev/get-started/installation/). +- [ ] I have checked that there is no similar [issue](https://github.com/vwxyzjn/cleanrl/issues) in the repo. +- [ ] I have checked the [documentation site](https://docs.cleanrl.dev/) and found not relevant information in [GitHub issues](https://github.com/vwxyzjn/cleanrl/issues). + +## Current Behavior + + +## Expected Behavior + + +## Possible Solution + + +## Steps to Reproduce + + +1. +2. +3. +4. diff --git a/cleanrl/.github/pull_request_template.md b/cleanrl/.github/pull_request_template.md new file mode 100644 index 0000000000000000000000000000000000000000..52a0aa5b47e0dc7bd3f066c40980bb0a1b9c26e6 --- /dev/null +++ b/cleanrl/.github/pull_request_template.md @@ -0,0 +1,33 @@ +## Description + + +## Types of changes + +- [ ] Bug fix +- [ ] New feature +- [ ] New algorithm +- [ ] Documentation + +## Checklist: + + +- [ ] I've read the [CONTRIBUTION](https://docs.cleanrl.dev/contribution/) guide (**required**). +- [ ] I have ensured `pre-commit run --all-files` passes (**required**). +- [ ] I have updated the tests accordingly (if applicable). +- [ ] I have updated the documentation and previewed the changes via `mkdocs serve`. + - [ ] I have explained note-worthy implementation details. + - [ ] I have explained the logged metrics. + - [ ] I have added links to the original paper and related papers. + +If you need to run benchmark experiments for a performance-impacting changes: + +- [ ] I have contacted @vwxyzjn to obtain access to the [openrlbenchmark W&B team](https://wandb.ai/openrlbenchmark). +- [ ] I have used the [benchmark utility](/get-started/benchmark-utility/) to submit the tracked experiments to the [openrlbenchmark/cleanrl](https://wandb.ai/openrlbenchmark/cleanrl) W&B project, optionally with `--capture_video`. +- [ ] I have performed RLops with `python -m openrlbenchmark.rlops`. + - For new feature or bug fix: + - [ ] I have used the RLops utility to understand the performance impact of the changes and confirmed there is no regression. + - For new algorithm: + - [ ] I have created a table comparing my results against those from reputable sources (i.e., the original paper or other reference implementation). + - [ ] I have added the learning curves generated by the `python -m openrlbenchmark.rlops` utility to the documentation. + - [ ] I have added links to the tracked experiments in W&B, generated by `python -m openrlbenchmark.rlops ....your_args... --report`, to the documentation. + diff --git a/cleanrl/.github/workflows/pre-commit.yml b/cleanrl/.github/workflows/pre-commit.yml new file mode 100644 index 0000000000000000000000000000000000000000..eca1cf3097df7d53e597046fba0de205fe8d5871 --- /dev/null +++ b/cleanrl/.github/workflows/pre-commit.yml @@ -0,0 +1,25 @@ +name: pre-commit + +on: + pull_request: + paths-ignore: + - 'docs/blog/*' # dummy ignore +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.9] + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - uses: pre-commit/action@v3.0.1 + with: + extra_args: --hook-stage manual --all-files diff --git a/cleanrl/.github/workflows/tests.yaml b/cleanrl/.github/workflows/tests.yaml new file mode 100644 index 0000000000000000000000000000000000000000..03d53cd0bff28f6a61f28ec4f9fb56138b19125e --- /dev/null +++ b/cleanrl/.github/workflows/tests.yaml @@ -0,0 +1,201 @@ +name: tests +on: + pull_request: + paths-ignore: + - '**/README.md' + - 'docs/**/*' + - 'cloud/**/*' +jobs: + test-core-envs: + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v5 + - run: uv venv + + # classic control tests + - name: Install core dependencies + run: uv pip install ".[pytest]" + - name: Run core tests + run: uv run pytest tests/test_classic_control.py + - name: Install jax + if: runner.os == 'Linux' || runner.os == 'macOS' + run: uv pip install ".[pytest, jax]" + - name: Run gymnasium tests + run: uv run pytest tests/test_classic_control_gymnasium.py + - name: Run core tests with jax + if: runner.os == 'Linux' || runner.os == 'macOS' + run: uv run pytest tests/test_classic_control_jax_gymnasium.py + - name: Run gae tests with jax + if: runner.os == 'Linux' || runner.os == 'macOS' + run: uv run pytest tests/test_jax_compute_gae.py + - name: Install tuner dependencies + run: uv pip install ".[pytest, optuna]" + - name: Run tuner tests + run: uv run pytest tests/test_tuner.py + + test-atari-envs: + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v5 + - run: uv venv + + # atari tests + - name: Install atari dependencies + run: uv pip install ".[pytest, atari]" + - name: Run atari tests + run: uv run pytest tests/test_atari.py + - name: Install jax + if: runner.os == 'Linux' || runner.os == 'macOS' + run: uv pip install ".[pytest, atari, jax]" + - name: Run gymnasium migration dependencies + run: uv run pip install "gymnasium[atari,accept-rom-license]==0.28.1" "ale-py==0.8.1" + - name: Run gymnasium tests + run: uv run pytest tests/test_atari_gymnasium.py + - name: Run gymnasium tests with jax + if: runner.os == 'Linux' || runner.os == 'macOS' + run: uv run pytest tests/test_atari_jax_gymnasium.py + + test-procgen-envs: + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v5 + - run: uv venv + + # procgen tests + - name: Install core dependencies + run: uv pip install ".[pytest, procgen]" + - name: Downgrade setuptools + run: uv run pip install setuptools==59.5.0 + - name: Run procgen tests + run: uv run pytest tests/test_procgen.py + + test-mujoco-envs: + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v5 + - run: uv venv + - name: Setup virtual display + run: | + sudo apt-get update + sudo apt-get install -y xvfb + export DISPLAY=:99 + Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + + # mujoco tests + - name: Install dependencies + run: uv pip install ".[pytest, mujoco, dm_control, jax]" + - name: install mujoco dependencies + run: | + sudo apt-get update && sudo apt-get -y install libgl1-mesa-glx libosmesa6 libglfw3 + - name: Run mujoco tests + run: uv run pytest tests/test_mujoco.py + env: + DISPLAY: :99 + + test-envpool-envs: + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v5 + - run: uv venv + + # envpool tests + - name: Install envpool dependencies + run: uv pip install ".[pytest, envpool, jax]" + - name: Run envpool tests + run: uv run pytest tests/test_envpool.py + + test-atari-multigpu-envs: + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v5 + - run: uv venv + + # atari multigpu tests + - name: Install atari dependencies + run: uv pip install ".[pytest, atari]" + - name: Run atari tests + run: uv run pytest tests/test_atari_multigpu.py + + test-pettingzoo-envs: + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v5 + - run: uv venv + + # pettingzoo tests + - name: Install pettingzoo dependencies + run: uv pip install ".[pytest, pettingzoo, atari]" + - name: Install ROMs + run: uv run AutoROM --accept-license + - name: Run pettingzoo tests + run: uv run pytest tests/test_pettingzoo_ma_atari.py diff --git a/cleanrl/.github/workflows/utils_test.yaml b/cleanrl/.github/workflows/utils_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..19761dd389b11764c01a373ef3c093a75a6f830c --- /dev/null +++ b/cleanrl/.github/workflows/utils_test.yaml @@ -0,0 +1,32 @@ +name: utils_test +on: + pull_request: + paths-ignore: + - '**/README.md' + - 'docs/**/*' + - 'cloud/**/*' +jobs: + ci: + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install uv + uses: astral-sh/setup-uv@v5 + - run: uv venv + + - name: Install test dependencies + run: uv pip install ".[pytest]" + - name: Install cloud dependencies + run: uv pip install ".[pytest, cloud]" + - name: Downgrade setuptools + run: uv pip install setuptools==59.5.0 + - name: Run utils tests + run: uv run pytest tests/test_utils.py diff --git a/cleanrl/Dockerfile b/cleanrl/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3e9b002832d96fabff1bc216d69f13aa120588cf --- /dev/null +++ b/cleanrl/Dockerfile @@ -0,0 +1,21 @@ +FROM nvidia/cuda:11.4.2-runtime-ubuntu20.04 + +# install ubuntu dependencies +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && \ + apt-get -y install python3-pip xvfb ffmpeg git build-essential python-opengl +RUN ln -s /usr/bin/python3 /usr/bin/python + +# install python dependencies +RUN mkdir cleanrl_utils && touch cleanrl_utils/__init__.py +RUN pip install uv --upgrade +COPY pyproject.toml pyproject.toml +COPY uv.lock uv.lock +RUN uv pip install . + +COPY entrypoint.sh /usr/local/bin/ +RUN chmod 777 /usr/local/bin/entrypoint.sh +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] + +# copy local files +COPY ./cleanrl /cleanrl diff --git a/cleanrl/benchmark/cleanrl_1gpu.slurm_template b/cleanrl/benchmark/cleanrl_1gpu.slurm_template new file mode 100644 index 0000000000000000000000000000000000000000..b7c76c2973bcf1938bc7ff799d5fd05a5f56c7c2 --- /dev/null +++ b/cleanrl/benchmark/cleanrl_1gpu.slurm_template @@ -0,0 +1,21 @@ +#!/bin/bash +#SBATCH --job-name=low-priority +#SBATCH --partition=production-cluster +#SBATCH --gpus-per-task={{gpus_per_task}} +#SBATCH --cpus-per-gpu={{cpus_per_gpu}} +#SBATCH --ntasks={{ntasks}} +#SBATCH --output=slurm/logs/%x_%j.out +#SBATCH --array={{array}} +#SBATCH --mem-per-cpu=12G +#SBATCH --exclude=ip-26-0-146-[33,100,122-123,149,183,212,249],ip-26-0-147-[6,94,120,141],ip-26-0-152-[71,101,119,178,186,207,211],ip-26-0-153-[6,62,112,132,166,251],ip-26-0-154-[38,65],ip-26-0-155-[164,174,187,217],ip-26-0-156-[13,40],ip-26-0-157-27 +##SBATCH --nodelist=ip-26-0-147-204 +{{nodes}} + +env_ids={{env_ids}} +seeds={{seeds}} +env_id=${env_ids[$SLURM_ARRAY_TASK_ID / {{len_seeds}}]} +seed=${seeds[$SLURM_ARRAY_TASK_ID % {{len_seeds}}]} + +echo "Running task $SLURM_ARRAY_TASK_ID with env_id: $env_id and seed: $seed" + +srun {{command}} --env-id $env_id --seed $seed # diff --git a/cleanrl/benchmark/ddpg.sh b/cleanrl/benchmark/ddpg.sh new file mode 100644 index 0000000000000000000000000000000000000000..39162592bde61fc3e5fa3c16ec8cc7f4fe0dbd20 --- /dev/null +++ b/cleanrl/benchmark/ddpg.sh @@ -0,0 +1,22 @@ +uv pip install ".[mujoco]" +python -m cleanrl_utils.benchmark \ + --env-ids HalfCheetah-v4 Walker2d-v4 Hopper-v4 InvertedPendulum-v4 Humanoid-v4 Pusher-v4 \ + --command "uv run python cleanrl/ddpg_continuous_action.py --track" \ + --num-seeds 3 \ + --workers 18 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[mujoco, jax]" +uv pip install --upgrade "jax[cuda11_cudnn82]==0.4.8" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html +uv run python -m cleanrl_utils.benchmark \ + --env-ids HalfCheetah-v4 Walker2d-v4 Hopper-v4 InvertedPendulum-v4 Humanoid-v4 Pusher-v4 \ + --command "uv run python cleanrl/ddpg_continuous_action_jax.py --track" \ + --num-seeds 3 \ + --workers 18 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template diff --git a/cleanrl/benchmark/ppo.sh b/cleanrl/benchmark/ppo.sh new file mode 100644 index 0000000000000000000000000000000000000000..275db4db8da93f7626aa2c1b8a94ca4d61d1c7d2 --- /dev/null +++ b/cleanrl/benchmark/ppo.sh @@ -0,0 +1,145 @@ +# export WANDB_ENTITY=openrlbenchmark + +uv pip install . +OMP_NUM_THREADS=1 xvfb-run -a uv run python -m cleanrl_utils.benchmark \ + --env-ids CartPole-v1 Acrobot-v1 MountainCar-v0 \ + --command "uv run python cleanrl/ppo.py --no_cuda --track --capture_video" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[atari]" +OMP_NUM_THREADS=1 xvfb-run -a uv run python -m cleanrl_utils.benchmark \ + --env-ids PongNoFrameskip-v4 BeamRiderNoFrameskip-v4 BreakoutNoFrameskip-v4 \ + --command "uv run python cleanrl/ppo_atari.py --track --capture_video" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[mujoco]" +OMP_NUM_THREADS=1 xvfb-run -a python -m cleanrl_utils.benchmark \ + --env-ids HalfCheetah-v4 Walker2d-v4 Hopper-v4 InvertedPendulum-v4 Humanoid-v4 Pusher-v4 \ + --command "uv run python cleanrl/ppo_continuous_action.py --no_cuda --track --capture_video" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[mujoco, dm_control]" +OMP_NUM_THREADS=1 xvfb-run -a uv run python -m cleanrl_utils.benchmark \ + --env-ids dm_control/acrobot-swingup-v0 dm_control/acrobot-swingup_sparse-v0 dm_control/ball_in_cup-catch-v0 dm_control/cartpole-balance-v0 dm_control/cartpole-balance_sparse-v0 dm_control/cartpole-swingup-v0 dm_control/cartpole-swingup_sparse-v0 dm_control/cartpole-two_poles-v0 dm_control/cartpole-three_poles-v0 dm_control/cheetah-run-v0 dm_control/dog-stand-v0 dm_control/dog-walk-v0 dm_control/dog-trot-v0 dm_control/dog-run-v0 dm_control/dog-fetch-v0 dm_control/finger-spin-v0 dm_control/finger-turn_easy-v0 dm_control/finger-turn_hard-v0 dm_control/fish-upright-v0 dm_control/fish-swim-v0 dm_control/hopper-stand-v0 dm_control/hopper-hop-v0 dm_control/humanoid-stand-v0 dm_control/humanoid-walk-v0 dm_control/humanoid-run-v0 dm_control/humanoid-run_pure_state-v0 dm_control/humanoid_CMU-stand-v0 dm_control/humanoid_CMU-run-v0 dm_control/lqr-lqr_2_1-v0 dm_control/lqr-lqr_6_2-v0 dm_control/manipulator-bring_ball-v0 dm_control/manipulator-bring_peg-v0 dm_control/manipulator-insert_ball-v0 dm_control/manipulator-insert_peg-v0 dm_control/pendulum-swingup-v0 dm_control/point_mass-easy-v0 dm_control/point_mass-hard-v0 dm_control/quadruped-walk-v0 dm_control/quadruped-run-v0 dm_control/quadruped-escape-v0 dm_control/quadruped-fetch-v0 dm_control/reacher-easy-v0 dm_control/reacher-hard-v0 dm_control/stacker-stack_2-v0 dm_control/stacker-stack_4-v0 dm_control/swimmer-swimmer6-v0 dm_control/swimmer-swimmer15-v0 dm_control/walker-stand-v0 dm_control/walker-walk-v0 dm_control/walker-run-v0 \ + --command "uv run python cleanrl/ppo_continuous_action.py --exp-name ppo_continuous_action_8M --total-timesteps 8000000 --no_cuda --track" \ + --num-seeds 10 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[atari]" +OMP_NUM_THREADS=1 xvfb-run -a uv run python -m cleanrl_utils.benchmark \ + --env-ids PongNoFrameskip-v4 BeamRiderNoFrameskip-v4 BreakoutNoFrameskip-v4 \ + --command "uv run python cleanrl/ppo_atari_lstm.py --track --capture_video" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[envpool]" +uv run python -m cleanrl_utils.benchmark \ + --env-ids Pong-v5 BeamRider-v5 Breakout-v5 \ + --command "uv run python cleanrl/ppo_atari_envpool.py --track --capture_video" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[envpool, jax]" +uv run python -m cleanrl_utils.benchmark \ + --env-ids Alien-v5 Amidar-v5 Assault-v5 Asterix-v5 Asteroids-v5 Atlantis-v5 BankHeist-v5 BattleZone-v5 BeamRider-v5 Berzerk-v5 Bowling-v5 Boxing-v5 Breakout-v5 Centipede-v5 ChopperCommand-v5 CrazyClimber-v5 Defender-v5 DemonAttack-v5 DoubleDunk-v5 Enduro-v5 FishingDerby-v5 Freeway-v5 Frostbite-v5 Gopher-v5 Gravitar-v5 Hero-v5 IceHockey-v5 Jamesbond-v5 Kangaroo-v5 Krull-v5 KungFuMaster-v5 MontezumaRevenge-v5 MsPacman-v5 NameThisGame-v5 Phoenix-v5 Pitfall-v5 Pong-v5 PrivateEye-v5 Qbert-v5 Riverraid-v5 RoadRunner-v5 Robotank-v5 Seaquest-v5 Skiing-v5 Solaris-v5 SpaceInvaders-v5 StarGunner-v5 Surround-v5 Tennis-v5 TimePilot-v5 Tutankham-v5 UpNDown-v5 Venture-v5 VideoPinball-v5 WizardOfWor-v5 YarsRevenge-v5 Zaxxon-v5 \ + --command "uv run python ppo_atari_envpool_xla_jax.py --track --wandb-project-name envpool-atari --wandb-entity openrlbenchmark" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[envpool, jax]" +python -m cleanrl_utils.benchmark \ + --env-ids Pong-v5 BeamRider-v5 Breakout-v5 \ + --command "uv run python cleanrl/ppo_atari_envpool_xla_jax_scan.py --track --capture_video" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[procgen]" +uv run python -m cleanrl_utils.benchmark \ + --env-ids starpilot bossfight bigfish \ + --command "uv run python cleanrl/ppo_procgen.py --track --capture_video" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[atari]" +xvfb-run -a uv run python -m cleanrl_utils.benchmark \ + --env-ids PongNoFrameskip-v4 BeamRiderNoFrameskip-v4 BreakoutNoFrameskip-v4 \ + --command "uv run torchrun --standalone --nnodes=1 --nproc_per_node=2 cleanrl/ppo_atari_multigpu.py --local-num-envs 4 --track --capture_video" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +uv pip install ".[pettingzoo, atari]" +uv run AutoROM --accept-license +xvfb-run -a uv run python -m cleanrl_utils.benchmark \ + --env-ids pong_v3 surround_v2 tennis_v3 \ + --command "uv run python cleanrl/ppo_pettingzoo_ma_atari.py --track --capture_video" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template + +# IMPORTANT: see specific Isaac Gym installation at +# https://docs.cleanrl.dev/rl-algorithms/ppo/#usage_8 +poetry install --with isaacgym +xvfb-run -a uv run python -m cleanrl_utils.benchmark \ + --env-ids Cartpole Ant Humanoid BallBalance Anymal \ + --command "uv run python cleanrl/ppo_continuous_action_isaacgym/ppo_continuous_action_isaacgym.py --track --capture_video" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template +xvfb-run -a uv run python -m cleanrl_utils.benchmark \ + --env-ids AllegroHand ShadowHand \ + --command "uv run python cleanrl/ppo_continuous_action_isaacgym/ppo_continuous_action_isaacgym.py --track --capture_video --num-envs 8192 --num-steps 8 --update-epochs 5 --num-minibatches 4 --reward-scaler 0.01 --total-timesteps 600000000 --record-video-step-frequency 3660" \ + --num-seeds 3 \ + --workers 9 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template diff --git a/cleanrl/benchmark/sac.sh b/cleanrl/benchmark/sac.sh new file mode 100644 index 0000000000000000000000000000000000000000..783b1448f8bca8d197f1fab918c0b7a50223be0b --- /dev/null +++ b/cleanrl/benchmark/sac.sh @@ -0,0 +1,10 @@ +uv pip install ".[mujoco]" +uv run python -m cleanrl_utils.benchmark \ + --env-ids HalfCheetah-v4 Walker2d-v4 Hopper-v4 InvertedPendulum-v4 Humanoid-v4 Pusher-v4 \ + --command "uv run python cleanrl/sac_continuous_action.py --track" \ + --num-seeds 3 \ + --workers 18 \ + --slurm-gpus-per-task 1 \ + --slurm-ntasks 1 \ + --slurm-total-cpus 10 \ + --slurm-template-path benchmark/cleanrl_1gpu.slurm_template diff --git a/cleanrl/cleanrl/ppo_atari_multigpu.py b/cleanrl/cleanrl/ppo_atari_multigpu.py new file mode 100644 index 0000000000000000000000000000000000000000..9f4521864f46629825c791325faa1f67f5ecf816 --- /dev/null +++ b/cleanrl/cleanrl/ppo_atari_multigpu.py @@ -0,0 +1,403 @@ +# docs and experiment results can be found at https://docs.cleanrl.dev/rl-algorithms/ppo/#ppo_atari_multigpupy +import os +import random +import time +import warnings +from dataclasses import dataclass, field +from typing import List, Literal + +import gymnasium as gym +import numpy as np +import torch +import torch.distributed as dist +import torch.nn as nn +import torch.optim as optim +import tyro +from rich.pretty import pprint +from torch.distributions.categorical import Categorical +from torch.utils.tensorboard import SummaryWriter + +from cleanrl_utils.atari_wrappers import ( # isort:skip + ClipRewardEnv, + EpisodicLifeEnv, + FireResetEnv, + MaxAndSkipEnv, + NoopResetEnv, +) + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + """the name of this experiment""" + seed: int = 1 + """seed of the experiment""" + torch_deterministic: bool = True + """if toggled, `torch.backends.cudnn.deterministic=False`""" + cuda: bool = True + """if toggled, cuda will be enabled by default""" + track: bool = False + """if toggled, this experiment will be tracked with Weights and Biases""" + wandb_project_name: str = "cleanRL" + """the wandb's project name""" + wandb_entity: str = None + """the entity (team) of wandb's project""" + capture_video: bool = False + """whether to capture videos of the agent performances (check out `videos` folder)""" + + # Algorithm specific arguments + env_id: str = "BreakoutNoFrameskip-v4" + """the id of the environment""" + total_timesteps: int = 10000000 + """total timesteps of the experiments""" + learning_rate: float = 2.5e-4 + """the learning rate of the optimizer""" + local_num_envs: int = 8 + """the number of parallel game environments (in the local rank)""" + num_steps: int = 128 + """the number of steps to run in each environment per policy rollout""" + anneal_lr: bool = True + """Toggle learning rate annealing for policy and value networks""" + gamma: float = 0.99 + """the discount factor gamma""" + gae_lambda: float = 0.95 + """the lambda for the general advantage estimation""" + num_minibatches: int = 4 + """the number of mini-batches""" + update_epochs: int = 4 + """the K epochs to update the policy""" + norm_adv: bool = True + """Toggles advantages normalization""" + clip_coef: float = 0.1 + """the surrogate clipping coefficient""" + clip_vloss: bool = True + """Toggles whether or not to use a clipped loss for the value function, as per the paper.""" + ent_coef: float = 0.01 + """coefficient of the entropy""" + vf_coef: float = 0.5 + """coefficient of the value function""" + max_grad_norm: float = 0.5 + """the maximum norm for the gradient clipping""" + target_kl: float = None + """the target KL divergence threshold""" + device_ids: List[int] = field(default_factory=lambda: []) + """the device ids that subprocess workers will use""" + backend: Literal["gloo", "nccl", "mpi"] = "gloo" + """the backend for distributed training""" + + # to be filled in runtime + local_batch_size: int = 0 + """the local batch size in the local rank (computed in runtime)""" + local_minibatch_size: int = 0 + """the local mini-batch size in the local rank (computed in runtime)""" + num_envs: int = 0 + """the number of parallel game environments (computed in runtime)""" + batch_size: int = 0 + """the batch size (computed in runtime)""" + minibatch_size: int = 0 + """the mini-batch size (computed in runtime)""" + num_iterations: int = 0 + """the number of iterations (computed in runtime)""" + world_size: int = 0 + """the number of processes (computed in runtime)""" + + +def make_env(env_id, idx, capture_video, run_name): + def thunk(): + if capture_video and idx == 0: + env = gym.make(env_id, render_mode="rgb_array") + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + else: + env = gym.make(env_id) + env = gym.wrappers.RecordEpisodeStatistics(env) + env = NoopResetEnv(env, noop_max=30) + env = MaxAndSkipEnv(env, skip=4) + env = EpisodicLifeEnv(env) + if "FIRE" in env.unwrapped.get_action_meanings(): + env = FireResetEnv(env) + env = ClipRewardEnv(env) + env = gym.wrappers.ResizeObservation(env, (84, 84)) + env = gym.wrappers.GrayScaleObservation(env) + env = gym.wrappers.FrameStack(env, 4) + return env + + return thunk + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class Agent(nn.Module): + def __init__(self, envs): + super().__init__() + self.network = nn.Sequential( + layer_init(nn.Conv2d(4, 32, 8, stride=4)), + nn.ReLU(), + layer_init(nn.Conv2d(32, 64, 4, stride=2)), + nn.ReLU(), + layer_init(nn.Conv2d(64, 64, 3, stride=1)), + nn.ReLU(), + nn.Flatten(), + layer_init(nn.Linear(64 * 7 * 7, 512)), + nn.ReLU(), + ) + self.actor = layer_init(nn.Linear(512, envs.single_action_space.n), std=0.01) + self.critic = layer_init(nn.Linear(512, 1), std=1) + + def get_value(self, x): + return self.critic(self.network(x / 255.0)) + + def get_action_and_value(self, x, action=None): + hidden = self.network(x / 255.0) + logits = self.actor(hidden) + probs = Categorical(logits=logits) + if action is None: + action = probs.sample() + return action, probs.log_prob(action), probs.entropy(), self.critic(hidden) + + +if __name__ == "__main__": + # torchrun --standalone --nnodes=1 --nproc_per_node=2 ppo_atari_multigpu.py + # taken from https://pytorch.org/docs/stable/elastic/run.html + args = tyro.cli(Args) + local_rank = int(os.getenv("LOCAL_RANK", "0")) + args.world_size = int(os.getenv("WORLD_SIZE", "1")) + args.local_batch_size = int(args.local_num_envs * args.num_steps) + args.local_minibatch_size = int(args.local_batch_size // args.num_minibatches) + args.num_envs = args.local_num_envs * args.world_size + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + args.num_iterations = args.total_timesteps // args.batch_size + if args.world_size > 1: + dist.init_process_group(args.backend, rank=local_rank, world_size=args.world_size) + else: + warnings.warn( + """ +Not using distributed mode! +If you want to use distributed mode, please execute this script with 'torchrun'. +E.g., `torchrun --standalone --nnodes=1 --nproc_per_node=2 ppo_atari_multigpu.py` + """ + ) + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + writer = None + if local_rank == 0: + if args.track: + import wandb + + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + sync_tensorboard=True, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + writer = SummaryWriter(f"runs/{run_name}") + writer.add_text( + "hyperparameters", + "|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])), + ) + pprint(args) + + # TRY NOT TO MODIFY: seeding + # CRUCIAL: note that we needed to pass a different seed for each data parallelism worker + args.seed += local_rank + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed - local_rank) + torch.backends.cudnn.deterministic = args.torch_deterministic + + if len(args.device_ids) > 0: + assert len(args.device_ids) == args.world_size, "you must specify the same number of device ids as `--nproc_per_node`" + device = torch.device(f"cuda:{args.device_ids[local_rank]}" if torch.cuda.is_available() and args.cuda else "cpu") + else: + device_count = torch.cuda.device_count() + if device_count < args.world_size: + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + else: + device = torch.device(f"cuda:{local_rank}" if torch.cuda.is_available() and args.cuda else "cpu") + + # env setup + envs = gym.vector.SyncVectorEnv( + [make_env(args.env_id, i, args.capture_video, run_name) for i in range(args.local_num_envs)], + ) + assert isinstance(envs.single_action_space, gym.spaces.Discrete), "only discrete action space is supported" + + agent = Agent(envs).to(device) + torch.manual_seed(args.seed) + optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5) + + # ALGO Logic: Storage setup + obs = torch.zeros((args.num_steps, args.local_num_envs) + envs.single_observation_space.shape).to(device) + actions = torch.zeros((args.num_steps, args.local_num_envs) + envs.single_action_space.shape).to(device) + logprobs = torch.zeros((args.num_steps, args.local_num_envs)).to(device) + rewards = torch.zeros((args.num_steps, args.local_num_envs)).to(device) + dones = torch.zeros((args.num_steps, args.local_num_envs)).to(device) + values = torch.zeros((args.num_steps, args.local_num_envs)).to(device) + + # TRY NOT TO MODIFY: start the game + global_step = 0 + start_time = time.time() + next_obs, _ = envs.reset(seed=args.seed) + next_obs = torch.Tensor(next_obs).to(device) + next_done = torch.zeros(args.local_num_envs).to(device) + + for iteration in range(1, args.num_iterations + 1): + # Annealing the rate if instructed to do so. + if args.anneal_lr: + frac = 1.0 - (iteration - 1.0) / args.num_iterations + lrnow = frac * args.learning_rate + optimizer.param_groups[0]["lr"] = lrnow + + for step in range(0, args.num_steps): + global_step += args.num_envs + obs[step] = next_obs + dones[step] = next_done + + # ALGO LOGIC: action logic + with torch.no_grad(): + action, logprob, _, value = agent.get_action_and_value(next_obs) + values[step] = value.flatten() + actions[step] = action + logprobs[step] = logprob + + # TRY NOT TO MODIFY: execute the game and log data. + next_obs, reward, terminations, truncations, infos = envs.step(action.cpu().numpy()) + next_done = np.logical_or(terminations, truncations) + rewards[step] = torch.tensor(reward).to(device).view(-1) + next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(next_done).to(device) + + if not writer: + continue + + if "final_info" in infos: + for info in infos["final_info"]: + if info and "episode" in info: + print(f"global_step={global_step}, episodic_return={info['episode']['r']}") + writer.add_scalar("charts/episodic_return", info["episode"]["r"], global_step) + writer.add_scalar("charts/episodic_length", info["episode"]["l"], global_step) + + print( + f"local_rank: {local_rank}, action.sum(): {action.sum()}, iteration: {iteration}, agent.actor.weight.sum(): {agent.actor.weight.sum()}" + ) + # bootstrap value if not done + with torch.no_grad(): + next_value = agent.get_value(next_obs).reshape(1, -1) + advantages = torch.zeros_like(rewards).to(device) + lastgaelam = 0 + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + nextnonterminal = 1.0 - next_done + nextvalues = next_value + else: + nextnonterminal = 1.0 - dones[t + 1] + nextvalues = values[t + 1] + delta = rewards[t] + args.gamma * nextvalues * nextnonterminal - values[t] + advantages[t] = lastgaelam = delta + args.gamma * args.gae_lambda * nextnonterminal * lastgaelam + returns = advantages + values + + # flatten the batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_logprobs = logprobs.reshape(-1) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_advantages = advantages.reshape(-1) + b_returns = returns.reshape(-1) + b_values = values.reshape(-1) + + # Optimizing the policy and value network + b_inds = np.arange(args.local_batch_size) + clipfracs = [] + for epoch in range(args.update_epochs): + np.random.shuffle(b_inds) + for start in range(0, args.local_batch_size, args.local_minibatch_size): + end = start + args.local_minibatch_size + mb_inds = b_inds[start:end] + + _, newlogprob, entropy, newvalue = agent.get_action_and_value(b_obs[mb_inds], b_actions.long()[mb_inds]) + logratio = newlogprob - b_logprobs[mb_inds] + ratio = logratio.exp() + + with torch.no_grad(): + # calculate approx_kl http://joschu.net/blog/kl-approx.html + old_approx_kl = (-logratio).mean() + approx_kl = ((ratio - 1) - logratio).mean() + clipfracs += [((ratio - 1.0).abs() > args.clip_coef).float().mean().item()] + + mb_advantages = b_advantages[mb_inds] + if args.norm_adv: + mb_advantages = (mb_advantages - mb_advantages.mean()) / (mb_advantages.std() + 1e-8) + + # Policy loss + pg_loss1 = -mb_advantages * ratio + pg_loss2 = -mb_advantages * torch.clamp(ratio, 1 - args.clip_coef, 1 + args.clip_coef) + pg_loss = torch.max(pg_loss1, pg_loss2).mean() + + # Value loss + newvalue = newvalue.view(-1) + if args.clip_vloss: + v_loss_unclipped = (newvalue - b_returns[mb_inds]) ** 2 + v_clipped = b_values[mb_inds] + torch.clamp( + newvalue - b_values[mb_inds], + -args.clip_coef, + args.clip_coef, + ) + v_loss_clipped = (v_clipped - b_returns[mb_inds]) ** 2 + v_loss_max = torch.max(v_loss_unclipped, v_loss_clipped) + v_loss = 0.5 * v_loss_max.mean() + else: + v_loss = 0.5 * ((newvalue - b_returns[mb_inds]) ** 2).mean() + + entropy_loss = entropy.mean() + loss = pg_loss - args.ent_coef * entropy_loss + v_loss * args.vf_coef + + optimizer.zero_grad() + loss.backward() + + if args.world_size > 1: + # batch allreduce ops: see https://github.com/entity-neural-network/incubator/pull/220 + all_grads_list = [] + for param in agent.parameters(): + if param.grad is not None: + all_grads_list.append(param.grad.view(-1)) + all_grads = torch.cat(all_grads_list) + dist.all_reduce(all_grads, op=dist.ReduceOp.SUM) + offset = 0 + for param in agent.parameters(): + if param.grad is not None: + param.grad.data.copy_( + all_grads[offset : offset + param.numel()].view_as(param.grad.data) / args.world_size + ) + offset += param.numel() + + nn.utils.clip_grad_norm_(agent.parameters(), args.max_grad_norm) + optimizer.step() + + if args.target_kl is not None and approx_kl > args.target_kl: + break + + y_pred, y_true = b_values.cpu().numpy(), b_returns.cpu().numpy() + var_y = np.var(y_true) + explained_var = np.nan if var_y == 0 else 1 - np.var(y_true - y_pred) / var_y + + # TRY NOT TO MODIFY: record rewards for plotting purposes + if local_rank == 0: + writer.add_scalar("charts/learning_rate", optimizer.param_groups[0]["lr"], global_step) + writer.add_scalar("losses/value_loss", v_loss.item(), global_step) + writer.add_scalar("losses/policy_loss", pg_loss.item(), global_step) + writer.add_scalar("losses/entropy", entropy_loss.item(), global_step) + writer.add_scalar("losses/old_approx_kl", old_approx_kl.item(), global_step) + writer.add_scalar("losses/approx_kl", approx_kl.item(), global_step) + writer.add_scalar("losses/clipfrac", np.mean(clipfracs), global_step) + writer.add_scalar("losses/explained_variance", explained_var, global_step) + print("SPS:", int(global_step / (time.time() - start_time))) + writer.add_scalar("charts/SPS", int(global_step / (time.time() - start_time)), global_step) + + envs.close() + if local_rank == 0: + writer.close() + if args.track: + wandb.finish() diff --git a/cleanrl/cleanrl/ppo_blackjack.py b/cleanrl/cleanrl/ppo_blackjack.py new file mode 100644 index 0000000000000000000000000000000000000000..ab6732298ded57c39719b466a6632eeb02a177d9 --- /dev/null +++ b/cleanrl/cleanrl/ppo_blackjack.py @@ -0,0 +1,564 @@ +# PPO with small MLP for RAGEN Blackjack using the improved Wrapper logic +import os +import random +import time +import re +from dataclasses import dataclass +from pathlib import Path +from typing import Dict, Any, Tuple, List +import json +import sys +from collections import deque + +import gymnasium as gym +import numpy as np +import torch +import torch.nn as nn +import torch.optim as optim +import tyro +from torch.distributions.categorical import Categorical + +# 假设你的目录结构是 ragen/env/blackjack/ +# 如果报错找不到 ragen,请调整这里的路径或者在项目根目录运行 +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../')) + +from ragen.env.blackjack.env import BlackjackEnv +from ragen.env.blackjack.config import BlackjackEnvConfig + + +class BlackjackWrapper(gym.Env): + """ + 改进后的适配器,用于处理新的 text observation 格式。 + - 增加了 _last_dealer_show 记忆,防止游戏结算画面丢失 Dealer 明牌信息。 + - 使用正则解析,更稳健。 + """ + metadata = {"render_modes": ["ansi", "human", "text"]} + + def __init__(self): + super().__init__() + # 强制使用 text 模式以便解析 + cfg = BlackjackEnvConfig(render_mode='text') + self._env = BlackjackEnv(cfg) + + # 8维特征向量: + # [player_sum/31, dealer_show/11, usable_ace, done_flag, + # is_20_21, player_sum_sq, dealer_ge_7, bias] + self.observation_space = gym.spaces.Box(low=0.0, high=1.0, shape=(8,), dtype=np.float32) + self.action_space = gym.spaces.Discrete(2) + + # 记忆变量 + self._last_dealer_show = 0 + + @staticmethod + def _safe_extract_ints(line: str) -> List[int]: + """使用正则提取行内所有整数""" + return [int(x) for x in re.findall(r'-?\d+', line)] + + def _encode_obs(self, text_obs: str, done_flag: bool) -> np.ndarray: + # 默认值 + p_sum = 0 + usable = 0 + # 如果是 Done 状态,Environment 可能不显示 Visible Card,使用记忆值 + dealer_show = self._last_dealer_show + + lines = text_obs.split('\n') + for ln in lines: + # 1. 解析玩家点数 + # 格式示例: "Your Hand: [10, 8] (Total: 18)." + if "Your Hand" in ln: + if "Total:" in ln: + try: + # 截取 Total: 之后的部分进行数字提取 + part = ln.split("Total:")[1] + ints = self._safe_extract_ints(part) + if ints: p_sum = ints[0] + except: + pass + else: + # 兼容旧格式或兜底:取该行最后一个数字 + ints = self._safe_extract_ints(ln) + if ints: p_sum = ints[-1] + + # 2. 解析 Usable Ace + elif "usable Ace" in ln: + if "do NOT" not in ln and "possess" in ln: + usable = 1 + + # 3. 解析庄家明牌 + # 只有在非 Done 状态下,才有这一行 + elif "Dealer's Visible Card:" in ln: + ints = self._safe_extract_ints(ln) + if len(ints) >= 1: + dealer_show = ints[0] + self._last_dealer_show = dealer_show # 更新记忆 + + # 特征归一化与构建 + ps = float(p_sum) / 31.0 + ds = float(dealer_show) / 11.0 + ua = float(usable) + df = 1.0 if done_flag else 0.0 + + # 辅助特征 (Heuristic features) + is_20_21 = 1.0 if (p_sum >= 20) else 0.0 + ps_sq = (float(p_sum) ** 2) / (31.0 ** 2) + dealer_ge_7 = 1.0 if dealer_show >= 7 else 0.0 + bias = 1.0 + + feat = np.array([ps, ds, ua, df, is_20_21, ps_sq, dealer_ge_7, bias], dtype=np.float32) + return feat + + def reset(self, *, seed: int | None = None, options: Dict[str, Any] | None = None): + text_obs = self._env.reset(seed=seed) + self._last_dealer_show = 0 # 重置 + # 第一次 encode 会自动更新 _last_dealer_show + obs = self._encode_obs(text_obs, done_flag=False) + return obs, {} + + def step(self, action: int): + # 映射: Agent 0/1 -> Env 1(Stick)/2(Hit) + mapped = int(action) + 1 + text_obs, reward, done, info = self._env.step(mapped) + + # 即使 done=True,也会根据 _last_dealer_show 生成稳定的 observation + obs = self._encode_obs(text_obs, done_flag=bool(done)) + + terminated = bool(done) + truncated = False + info = info or {} + return obs, float(reward), terminated, truncated, info + + def render(self): + return self._env.render() + + def close(self): + self._env.close() + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + seed: int = 1 + torch_deterministic: bool = True + cuda: bool = True + track: bool = False # 如果要用 WandB,设为 True + wandb_project_name: str = "ragen_blackjack" + wandb_entity: str | None = None + capture_video: bool = False + + # Algorithm + env_id: str = "Blackjack" + total_timesteps: int = 2000_000 + learning_rate: float = 2.5e-4 + num_envs: int = 8 + num_steps: int = 128 + anneal_lr: bool = True + gamma: float = 0.99 + gae_lambda: float = 0.95 + num_minibatches: int = 4 + update_epochs: int = 4 + norm_adv: bool = True + clip_coef: float = 0.2 + clip_vloss: bool = True + + # 修改:增加熵系数,鼓励探索 + ent_coef: float = 0.05 + vf_coef: float = 0.5 + max_grad_norm: float = 0.5 + target_kl: float | None = None + + # runtime filled + batch_size: int = 0 + minibatch_size: int = 0 + num_iterations: int = 0 + + # eval config + eval_splits: int = 10 + eval_episodes: int = 1000 + + +def make_env(idx, run_name, seed, capture_video=False): + def thunk(): + env = BlackjackWrapper() + # Blackjack 每一局很短,设置一个安全上限即可 + env = gym.wrappers.TimeLimit(env, max_episode_steps=64) + env = gym.wrappers.RecordEpisodeStatistics(env) + if capture_video and idx == 0: + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + return env + return thunk + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class Agent(nn.Module): + def __init__(self, envs): + super().__init__() + obs_shape = int(np.array(envs.single_observation_space.shape).prod()) + hidden = 64 + # Critic: 评估当前状态好坏 + self.critic = nn.Sequential( + layer_init(nn.Linear(obs_shape, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, 1), std=1.0), + ) + # Actor: 输出动作概率 + self.actor = nn.Sequential( + layer_init(nn.Linear(obs_shape, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, envs.single_action_space.n), std=0.01), + ) + + def get_value(self, x): + return self.critic(x) + + def get_action_and_value(self, x, action=None): + logits = self.actor(x) + probs = Categorical(logits=logits) + if action is None: + action = probs.sample() + return action, probs.log_prob(action), probs.entropy(), self.critic(x) + + +if __name__ == "__main__": + args = tyro.cli(Args) + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + args.num_iterations = args.total_timesteps // args.batch_size + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + + if args.track: + import wandb + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + + # Seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + print(f"Using device: {device}") + + # Envs + envs = gym.vector.SyncVectorEnv([ + make_env(i, run_name, args.seed, args.capture_video) + for i in range(args.num_envs) + ]) + assert isinstance(envs.single_action_space, gym.spaces.Discrete) + + agent = Agent(envs).to(device) + optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5) + + # Storage setup + obs = torch.zeros((args.num_steps, args.num_envs) + envs.single_observation_space.shape).to(device) + actions = torch.zeros((args.num_steps, args.num_envs) + envs.single_action_space.shape).to(device) + logprobs = torch.zeros((args.num_steps, args.num_envs)).to(device) + rewards = torch.zeros((args.num_steps, args.num_envs)).to(device) + dones = torch.zeros((args.num_steps, args.num_envs)).to(device) + values = torch.zeros((args.num_steps, args.num_envs)).to(device) + + # Start loop + global_step = 0 + start_time = time.time() + next_obs, _ = envs.reset(seed=args.seed) + next_obs = torch.Tensor(next_obs).to(device) + next_done = torch.zeros(args.num_envs).to(device) + + # Evaluation helper function + def collect_eval_trajectories(agent_model, make_env_fn, n_episodes, step_tag): + out_dir = Path(f"runs/{run_name}/trajectories/step_{step_tag}") + out_dir.mkdir(parents=True, exist_ok=True) + out_path = out_dir / "trajectories.jsonl" + + # 独立的 Eval 环境 + env = make_env_fn() + collected = 0 + summary_returns = [] + summary_success = [] + + with out_path.open("w") as f: + while collected < n_episodes: + state, _ = env.reset(seed=args.seed + 100000 + collected) + traj_states = [state.tolist()] + traj_actions = [] + traj_rewards = [] + traj_dones = [] + traj_success = [] + done = False + + while not done: + with torch.no_grad(): + logits = agent_model.actor(torch.tensor(state, dtype=torch.float32, device=device).unsqueeze(0)) + action = int(torch.argmax(logits, dim=1).item()) + + next_state, reward, terminated, truncated, info = env.step(action) + + traj_actions.append(int(action)) + traj_rewards.append(float(reward)) + + d = bool(terminated) or bool(truncated) + traj_dones.append(d) + traj_success.append(bool((info or {}).get('success', False))) + + state = next_state + traj_states.append(state.tolist()) + done = d + + ep_ret = float(sum(traj_rewards)) + ep_succ = bool(any(traj_success)) + + record = { + "states": traj_states, + "actions": traj_actions, + "rewards": traj_rewards, + "dones": traj_dones, + "success": traj_success, + "episode_return": ep_ret, + "episode_success": ep_succ, + } + f.write(json.dumps(record) + "\n") + collected += 1 + summary_returns.append(ep_ret) + summary_success.append(1.0 if ep_succ else 0.0) + + env.close() + try: + metrics = { + "global_step": int(step_tag), + "episodes": int(n_episodes), + "success_rate": float(np.mean(summary_success)) if len(summary_success) else 0.0, + "avg_return": float(np.mean(summary_returns)) if len(summary_returns) else 0.0, + } + with (out_dir / "metrics.json").open("w") as mf: + json.dump(metrics, mf) + return metrics + except Exception as e: + print(f"Warning: failed to write eval metrics: {e}") + return { + "global_step": int(step_tag), + "episodes": int(n_episodes), + "success_rate": float(np.mean(summary_success)) if len(summary_success) else 0.0, + "avg_return": float(np.mean(summary_returns)) if len(summary_returns) else 0.0, + } + + # Training Loop + eval_every_iters = max(1, args.num_iterations // args.eval_splits) + # Convergence trackers + recent_winrates = deque(maxlen=50) + winrate_ema = None + + for iteration in range(1, args.num_iterations + 1): + # Anneal LR + if args.anneal_lr: + frac = 1.0 - (iteration - 1.0) / args.num_iterations + lrnow = frac * args.learning_rate + optimizer.param_groups[0]["lr"] = lrnow + + # Per-iteration episode outcome accumulators + iter_outcomes: List[int] = [] # +1 win, 0 draw, -1 loss + iter_ep_returns: List[float] = [] + + for step in range(0, args.num_steps): + global_step += args.num_envs + obs[step] = next_obs + dones[step] = next_done + + with torch.no_grad(): + action, logprob, _, value = agent.get_action_and_value(next_obs) + values[step] = value.flatten() + actions[step] = action + logprobs[step] = logprob + + # Step Env + next_obs, reward, terminations, truncations, infos = envs.step(action.cpu().numpy()) + next_done = np.logical_or(terminations, truncations) + rewards[step] = torch.tensor(reward).to(device).view(-1) + next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(next_done).to(device) + + # Collect per-episode stats robustly across Gymnasium vector API variants + # Preferred: infos.get("final_info") contains a list of infos for envs that ended this step + if isinstance(infos, dict): + final_infos = infos.get("final_info", None) + if final_infos is not None: + for finfo in final_infos: + if finfo: + ep_r = float(finfo.get("episode", {}).get("r", 0.0)) + # success flag may be propagated; fallback to reward sign + succ = bool(finfo.get("success", ep_r > 0)) + if succ: + iter_outcomes.append(1) + else: + # draw if zero, else loss + if ep_r == 0.0: + iter_outcomes.append(0) + else: + iter_outcomes.append(-1) + iter_ep_returns.append(ep_r) + # Fallback: some vector envs expose aggregated episode arrays directly + elif "episode" in infos: + ep = infos.get("episode", {}) + # ep["r"] may be array-like aligned with envs where episode ended + ep_r_vals = ep.get("r", []) + try: + for ep_r in list(np.atleast_1d(ep_r_vals)): + ep_r = float(ep_r) + if ep_r > 0: + iter_outcomes.append(1) + elif ep_r < 0: + iter_outcomes.append(-1) + else: + iter_outcomes.append(0) + iter_ep_returns.append(ep_r) + except Exception: + pass + + # GAE Calculation + with torch.no_grad(): + next_value = agent.get_value(next_obs).reshape(1, -1) + advantages = torch.zeros_like(rewards).to(device) + lastgaelam = 0 + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + nextnonterminal = 1.0 - next_done + nextvalues = next_value + else: + nextnonterminal = 1.0 - dones[t + 1] + nextvalues = values[t + 1] + delta = rewards[t] + args.gamma * nextvalues * nextnonterminal - values[t] + advantages[t] = lastgaelam = delta + args.gamma * args.gae_lambda * nextnonterminal * lastgaelam + returns = advantages + values + + # Flatten batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_logprobs = logprobs.reshape(-1) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_advantages = advantages.reshape(-1) + b_returns = returns.reshape(-1) + b_values = values.reshape(-1) + + # Optimizing the policy and value network + b_inds = np.arange(args.batch_size) + clipfracs = [] + for epoch in range(args.update_epochs): + np.random.shuffle(b_inds) + for start in range(0, args.batch_size, args.minibatch_size): + end = start + args.minibatch_size + mb_inds = b_inds[start:end] + + _, newlogprob, entropy, newvalue = agent.get_action_and_value(b_obs[mb_inds], b_actions.long()[mb_inds]) + logratio = newlogprob - b_logprobs[mb_inds] + ratio = logratio.exp() + + with torch.no_grad(): + # old_approx_kl = (-logratio).mean() + approx_kl = ((ratio - 1) - logratio).mean() + clipfracs += [((ratio - 1.0).abs() > args.clip_coef).float().mean().item()] + + mb_advantages = b_advantages[mb_inds] + if args.norm_adv: + mb_advantages = (mb_advantages - mb_advantages.mean()) / (mb_advantages.std() + 1e-8) + + # Policy Loss + pg_loss1 = -mb_advantages * ratio + pg_loss2 = -mb_advantages * torch.clamp(ratio, 1 - args.clip_coef, 1 + args.clip_coef) + pg_loss = torch.max(pg_loss1, pg_loss2).mean() + + # Value Loss + newvalue = newvalue.view(-1) + if args.clip_vloss: + v_loss_unclipped = (newvalue - b_returns[mb_inds]) ** 2 + v_clipped = b_values[mb_inds] + torch.clamp( + newvalue - b_values[mb_inds], -args.clip_coef, args.clip_coef, + ) + v_loss_clipped = (v_clipped - b_returns[mb_inds]) ** 2 + v_loss = 0.5 * torch.max(v_loss_unclipped, v_loss_clipped).mean() + else: + v_loss = 0.5 * ((newvalue - b_returns[mb_inds]) ** 2).mean() + + entropy_loss = entropy.mean() + loss = pg_loss - args.ent_coef * entropy_loss + v_loss * args.vf_coef + + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(agent.parameters(), args.max_grad_norm) + optimizer.step() + + if args.target_kl is not None and approx_kl > args.target_kl: + break + + # Output / Logging + sps = int(global_step / (time.time() - start_time)) + progress = 100 * iteration / args.num_iterations + # Compute iteration-level win/draw/loss rates from finished episodes + if len(iter_outcomes) > 0: + wins = sum(1 for o in iter_outcomes if o == 1) + draws = sum(1 for o in iter_outcomes if o == 0) + losses = sum(1 for o in iter_outcomes if o == -1) + total_eps = len(iter_outcomes) + win_rate = wins / total_eps + draw_rate = draws / total_eps + loss_rate = losses / total_eps + avg_ep_return = float(np.mean(iter_ep_returns)) if len(iter_ep_returns) else 0.0 + recent_winrates.append(win_rate) + if winrate_ema is None: + winrate_ema = win_rate + else: + winrate_ema = 0.1 * win_rate + 0.9 * winrate_ema + winrate_std_50 = float(np.std(list(recent_winrates))) if len(recent_winrates) > 1 else 0.0 + else: + win_rate = draw_rate = loss_rate = avg_ep_return = 0.0 + winrate_std_50 = float(np.std(list(recent_winrates))) if len(recent_winrates) > 1 else 0.0 + if winrate_ema is None: + winrate_ema = 0.0 + + print(f"[{progress:5.1f}%] Iter {iteration:4d} | SPS: {sps:4d} | Rew: {rewards.mean().item():.3f} | PLoss: {pg_loss.item():.3f} | VLoss: {v_loss.item():.3f} | WinRate: {win_rate:.3f} (EMA {winrate_ema:.3f})") + + if args.track: + import wandb + wandb.log({ + "charts/avg_reward": float(rewards.mean().item()), + "losses/policy_loss": float(pg_loss.item()), + "losses/value_loss": float(v_loss.item()), + "global_step": global_step, + "charts/SPS": sps, + "charts/win_rate": float(win_rate), + "charts/draw_rate": float(draw_rate), + "charts/loss_rate": float(loss_rate), + "charts/avg_ep_return": float(avg_ep_return), + "charts/winrate_ema": float(winrate_ema), + "charts/winrate_std_50": float(winrate_std_50), + }) + + # Eval + if iteration == 1 or iteration % eval_every_iters == 0: + print(f"Running evaluation at step {global_step}...") + try: + def eval_thunk(): + return make_env(0, run_name, args.seed + 9999, False)() + eval_metrics = collect_eval_trajectories(agent, eval_thunk, n_episodes=args.eval_episodes, step_tag=global_step) + if args.track: + import wandb + wandb.log({ + "eval/success_rate": float(eval_metrics.get("success_rate", 0.0)), + "eval/avg_return": float(eval_metrics.get("avg_return", 0.0)), + "global_step": global_step, + }) + except Exception as e: + print(f"Eval failed: {e}") + + envs.close() \ No newline at end of file diff --git a/cleanrl/cleanrl/ppo_continuous_action_isaacgym/ppo_continuous_action_isaacgym.py b/cleanrl/cleanrl/ppo_continuous_action_isaacgym/ppo_continuous_action_isaacgym.py new file mode 100644 index 0000000000000000000000000000000000000000..9ba45735d6e3733c807866d5cec8ff794a1bb11f --- /dev/null +++ b/cleanrl/cleanrl/ppo_continuous_action_isaacgym/ppo_continuous_action_isaacgym.py @@ -0,0 +1,393 @@ +# Copyright (c) 2018-2022, NVIDIA Corporation +# 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. + +# docs and experiment results can be found at https://docs.cleanrl.dev/rl-algorithms/ppo/#ppo_continuous_action_isaacgympy +import os +import random +import time +from dataclasses import dataclass + +import gym +import isaacgym # noqa +import isaacgymenvs +import numpy as np +import torch +import torch.nn as nn +import torch.optim as optim +import tyro +from torch.distributions.normal import Normal +from torch.utils.tensorboard import SummaryWriter + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + """the name of this experiment""" + seed: int = 1 + """seed of the experiment""" + torch_deterministic: bool = True + """if toggled, `torch.backends.cudnn.deterministic=False`""" + cuda: bool = True + """if toggled, cuda will be enabled by default""" + track: bool = False + """if toggled, this experiment will be tracked with Weights and Biases""" + wandb_project_name: str = "cleanRL" + """the wandb's project name""" + wandb_entity: str = None + """the entity (team) of wandb's project""" + capture_video: bool = False + """whether to capture videos of the agent performances (check out `videos` folder)""" + + # Algorithm specific arguments + env_id: str = "Ant" + """the id of the environment""" + total_timesteps: int = 30000000 + """total timesteps of the experiments""" + learning_rate: float = 0.0026 + """the learning rate of the optimizer""" + num_envs: int = 4096 + """the number of parallel game environments""" + num_steps: int = 16 + """the number of steps to run in each environment per policy rollout""" + anneal_lr: bool = False + """Toggle learning rate annealing for policy and value networks""" + gamma: float = 0.99 + """the discount factor gamma""" + gae_lambda: float = 0.95 + """the lambda for the general advantage estimation""" + num_minibatches: int = 2 + """the number of mini-batches""" + update_epochs: int = 4 + """the K epochs to update the policy""" + norm_adv: bool = True + """Toggles advantages normalization""" + clip_coef: float = 0.2 + """the surrogate clipping coefficient""" + clip_vloss: bool = False + """Toggles whether or not to use a clipped loss for the value function, as per the paper.""" + ent_coef: float = 0.0 + """coefficient of the entropy""" + vf_coef: float = 2 + """coefficient of the value function""" + max_grad_norm: float = 1 + """the maximum norm for the gradient clipping""" + target_kl: float = None + """the target KL divergence threshold""" + reward_scaler: float = 1 + """the scale factor applied to the reward during training""" + record_video_step_frequency: int = 1464 + """the frequency at which to record the videos""" + + # to be filled in runtime + batch_size: int = 0 + """the batch size (computed in runtime)""" + minibatch_size: int = 0 + """the mini-batch size (computed in runtime)""" + num_iterations: int = 0 + """the number of iterations (computed in runtime)""" + + +class RecordEpisodeStatisticsTorch(gym.Wrapper): + def __init__(self, env, device): + super().__init__(env) + self.num_envs = getattr(env, "num_envs", 1) + self.device = device + self.episode_returns = None + self.episode_lengths = None + + def reset(self, **kwargs): + observations = super().reset(**kwargs) + self.episode_returns = torch.zeros(self.num_envs, dtype=torch.float32, device=self.device) + self.episode_lengths = torch.zeros(self.num_envs, dtype=torch.int32, device=self.device) + self.returned_episode_returns = torch.zeros(self.num_envs, dtype=torch.float32, device=self.device) + self.returned_episode_lengths = torch.zeros(self.num_envs, dtype=torch.int32, device=self.device) + return observations + + def step(self, action): + observations, rewards, dones, infos = super().step(action) + self.episode_returns += rewards + self.episode_lengths += 1 + self.returned_episode_returns[:] = self.episode_returns + self.returned_episode_lengths[:] = self.episode_lengths + self.episode_returns *= 1 - dones + self.episode_lengths *= 1 - dones + infos["r"] = self.returned_episode_returns + infos["l"] = self.returned_episode_lengths + return ( + observations, + rewards, + dones, + infos, + ) + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class Agent(nn.Module): + def __init__(self, envs): + super().__init__() + self.critic = nn.Sequential( + layer_init(nn.Linear(np.array(envs.single_observation_space.shape).prod(), 256)), + nn.Tanh(), + layer_init(nn.Linear(256, 256)), + nn.Tanh(), + layer_init(nn.Linear(256, 1), std=1.0), + ) + self.actor_mean = nn.Sequential( + layer_init(nn.Linear(np.array(envs.single_observation_space.shape).prod(), 256)), + nn.Tanh(), + layer_init(nn.Linear(256, 256)), + nn.Tanh(), + layer_init(nn.Linear(256, np.prod(envs.single_action_space.shape)), std=0.01), + ) + self.actor_logstd = nn.Parameter(torch.zeros(1, np.prod(envs.single_action_space.shape))) + + def get_value(self, x): + return self.critic(x) + + def get_action_and_value(self, x, action=None): + action_mean = self.actor_mean(x) + action_logstd = self.actor_logstd.expand_as(action_mean) + action_std = torch.exp(action_logstd) + probs = Normal(action_mean, action_std) + if action is None: + action = probs.sample() + return action, probs.log_prob(action).sum(1), probs.entropy().sum(1), self.critic(x) + + +class ExtractObsWrapper(gym.ObservationWrapper): + def observation(self, obs): + return obs["obs"] + + +if __name__ == "__main__": + args = tyro.cli(Args) + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + args.num_iterations = args.total_timesteps // args.batch_size + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + if args.track: + import wandb + + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + sync_tensorboard=True, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + writer = SummaryWriter(f"runs/{run_name}") + writer.add_text( + "hyperparameters", + "|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])), + ) + + # TRY NOT TO MODIFY: seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + # env setup + envs = isaacgymenvs.make( + seed=args.seed, + task=args.env_id, + num_envs=args.num_envs, + sim_device="cuda:0" if torch.cuda.is_available() and args.cuda else "cpu", + rl_device="cuda:0" if torch.cuda.is_available() and args.cuda else "cpu", + graphics_device_id=0 if torch.cuda.is_available() and args.cuda else -1, + headless=False if torch.cuda.is_available() and args.cuda else True, + multi_gpu=False, + virtual_screen_capture=args.capture_video, + force_render=False, + ) + if args.capture_video: + envs.is_vector_env = True + print(f"record_video_step_frequency={args.record_video_step_frequency}") + envs = gym.wrappers.RecordVideo( + envs, + f"videos/{run_name}", + step_trigger=lambda step: step % args.record_video_step_frequency == 0, + video_length=100, # for each video record up to 100 steps + ) + envs = ExtractObsWrapper(envs) + envs = RecordEpisodeStatisticsTorch(envs, device) + envs.single_action_space = envs.action_space + envs.single_observation_space = envs.observation_space + assert isinstance(envs.single_action_space, gym.spaces.Box), "only continuous action space is supported" + + agent = Agent(envs).to(device) + optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5) + + # ALGO Logic: Storage setup + obs = torch.zeros((args.num_steps, args.num_envs) + envs.single_observation_space.shape, dtype=torch.float).to(device) + actions = torch.zeros((args.num_steps, args.num_envs) + envs.single_action_space.shape, dtype=torch.float).to(device) + logprobs = torch.zeros((args.num_steps, args.num_envs), dtype=torch.float).to(device) + rewards = torch.zeros((args.num_steps, args.num_envs), dtype=torch.float).to(device) + dones = torch.zeros((args.num_steps, args.num_envs), dtype=torch.float).to(device) + values = torch.zeros((args.num_steps, args.num_envs), dtype=torch.float).to(device) + advantages = torch.zeros_like(rewards, dtype=torch.float).to(device) + + # TRY NOT TO MODIFY: start the game + global_step = 0 + start_time = time.time() + next_obs = envs.reset() + next_done = torch.zeros(args.num_envs, dtype=torch.float).to(device) + + for iteration in range(1, args.num_iterations + 1): + # Annealing the rate if instructed to do so. + if args.anneal_lr: + frac = 1.0 - (iteration - 1.0) / args.num_iterations + lrnow = frac * args.learning_rate + optimizer.param_groups[0]["lr"] = lrnow + + for step in range(0, args.num_steps): + global_step += args.num_envs + obs[step] = next_obs + dones[step] = next_done + + # ALGO LOGIC: action logic + with torch.no_grad(): + action, logprob, _, value = agent.get_action_and_value(next_obs) + values[step] = value.flatten() + actions[step] = action + logprobs[step] = logprob + + # TRY NOT TO MODIFY: execute the game and log data. + next_obs, rewards[step], next_done, info = envs.step(action) + if 0 <= step <= 2: + for idx, d in enumerate(next_done): + if d: + episodic_return = info["r"][idx].item() + print(f"global_step={global_step}, episodic_return={episodic_return}") + writer.add_scalar("charts/episodic_return", episodic_return, global_step) + writer.add_scalar("charts/episodic_length", info["l"][idx], global_step) + if "consecutive_successes" in info: # ShadowHand and AllegroHand metric + writer.add_scalar( + "charts/consecutive_successes", info["consecutive_successes"].item(), global_step + ) + break + + # bootstrap value if not done + with torch.no_grad(): + next_value = agent.get_value(next_obs).reshape(1, -1) + advantages = torch.zeros_like(rewards).to(device) + lastgaelam = 0 + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + nextnonterminal = 1.0 - next_done + nextvalues = next_value + else: + nextnonterminal = 1.0 - dones[t + 1] + nextvalues = values[t + 1] + delta = rewards[t] + args.gamma * nextvalues * nextnonterminal - values[t] + advantages[t] = lastgaelam = delta + args.gamma * args.gae_lambda * nextnonterminal * lastgaelam + returns = advantages + values + + # flatten the batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_logprobs = logprobs.reshape(-1) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_advantages = advantages.reshape(-1) + b_returns = returns.reshape(-1) + b_values = values.reshape(-1) + + # Optimizing the policy and value network + clipfracs = [] + for epoch in range(args.update_epochs): + b_inds = torch.randperm(args.batch_size, device=device) + for start in range(0, args.batch_size, args.minibatch_size): + end = start + args.minibatch_size + mb_inds = b_inds[start:end] + + _, newlogprob, entropy, newvalue = agent.get_action_and_value(b_obs[mb_inds], b_actions[mb_inds]) + logratio = newlogprob - b_logprobs[mb_inds] + ratio = logratio.exp() + + with torch.no_grad(): + # calculate approx_kl http://joschu.net/blog/kl-approx.html + old_approx_kl = (-logratio).mean() + approx_kl = ((ratio - 1) - logratio).mean() + clipfracs += [((ratio - 1.0).abs() > args.clip_coef).float().mean().item()] + + mb_advantages = b_advantages[mb_inds] + if args.norm_adv: + mb_advantages = (mb_advantages - mb_advantages.mean()) / (mb_advantages.std() + 1e-8) + + # Policy loss + pg_loss1 = -mb_advantages * ratio + pg_loss2 = -mb_advantages * torch.clamp(ratio, 1 - args.clip_coef, 1 + args.clip_coef) + pg_loss = torch.max(pg_loss1, pg_loss2).mean() + + # Value loss + newvalue = newvalue.view(-1) + if args.clip_vloss: + v_loss_unclipped = (newvalue - b_returns[mb_inds]) ** 2 + v_clipped = b_values[mb_inds] + torch.clamp( + newvalue - b_values[mb_inds], + -args.clip_coef, + args.clip_coef, + ) + v_loss_clipped = (v_clipped - b_returns[mb_inds]) ** 2 + v_loss_max = torch.max(v_loss_unclipped, v_loss_clipped) + v_loss = 0.5 * v_loss_max.mean() + else: + v_loss = 0.5 * ((newvalue - b_returns[mb_inds]) ** 2).mean() + + entropy_loss = entropy.mean() + loss = pg_loss - args.ent_coef * entropy_loss + v_loss * args.vf_coef + + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(agent.parameters(), args.max_grad_norm) + optimizer.step() + + if args.target_kl is not None and approx_kl > args.target_kl: + break + + # TRY NOT TO MODIFY: record rewards for plotting purposes + writer.add_scalar("charts/learning_rate", optimizer.param_groups[0]["lr"], global_step) + writer.add_scalar("losses/value_loss", v_loss.item(), global_step) + writer.add_scalar("losses/policy_loss", pg_loss.item(), global_step) + writer.add_scalar("losses/entropy", entropy_loss.item(), global_step) + writer.add_scalar("losses/old_approx_kl", old_approx_kl.item(), global_step) + writer.add_scalar("losses/approx_kl", approx_kl.item(), global_step) + writer.add_scalar("losses/clipfrac", np.mean(clipfracs), global_step) + print("SPS:", int(global_step / (time.time() - start_time))) + writer.add_scalar("charts/SPS", int(global_step / (time.time() - start_time)), global_step) + + # envs.close() + writer.close() diff --git a/cleanrl/cleanrl/ppo_frozenlake.py b/cleanrl/cleanrl/ppo_frozenlake.py new file mode 100644 index 0000000000000000000000000000000000000000..0e575ccc20b961a2a1156ee0163702190f686831 --- /dev/null +++ b/cleanrl/cleanrl/ppo_frozenlake.py @@ -0,0 +1,567 @@ +# PPO implementation for RAGEN FrozenLake environment +import os +import random +import time +from dataclasses import dataclass +import json +from pathlib import Path + +import gymnasium as gym +import numpy as np +import torch +import torch.nn as nn +import torch.optim as optim +import tyro +from torch.distributions.categorical import Categorical +from torch.utils.tensorboard import SummaryWriter + +import sys +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../')) + +from ragen.env.frozen_lake.env import FrozenLakeEnv +from ragen.env.frozen_lake.config import FrozenLakeEnvConfig +from ragen_wrappers import FrozenLakeWrapper + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + """the name of this experiment""" + seed: int = 1 + """seed of the experiment""" + torch_deterministic: bool = True + """if toggled, `torch.backends.cudnn.deterministic=False`""" + cuda: bool = True + """if toggled, cuda will be enabled by default""" + track: bool = True + """if toggled, this experiment will be tracked with Weights and Biases""" + wandb_project_name: str = "cleanRL" + """the wandb's project name""" + wandb_entity: str = None + """the entity (team) of wandb's project""" + capture_video: bool = False + """whether to capture videos of the agent performances (check out `videos` folder)""" + + # Algorithm specific arguments + env_id: str = "FrozenLake" + """the id of the environment""" + total_timesteps: int = 1000000 + """total timesteps of the experiments""" + learning_rate: float = 2.5e-4 + """the learning rate of the optimizer""" + num_envs: int = 8 + """the number of parallel game environments""" + num_steps: int = 128 + """the number of steps to run in each environment per policy rollout""" + anneal_lr: bool = True + """Toggle learning rate annealing for policy and value networks""" + gamma: float = 0.99 + """the discount factor gamma""" + gae_lambda: float = 0.95 + """the lambda for the general advantage estimation""" + num_minibatches: int = 4 + """the number of mini-batches""" + update_epochs: int = 4 + """the K epochs to update the policy""" + norm_adv: bool = True + """Toggles advantages normalization""" + clip_coef: float = 0.2 + """the surrogate clipping coefficient""" + clip_vloss: bool = True + """Toggles whether or not to use a clipped loss for the value function, as per the paper.""" + ent_coef: float = 0.01 + """coefficient of the entropy""" + vf_coef: float = 0.5 + """coefficient of the value function""" + max_grad_norm: float = 0.5 + """the maximum norm for the gradient clipping""" + target_kl: float = None + """the target KL divergence threshold""" + save_plots: bool = True + """whether to save PNG/CSV curves for training trend""" + eval_splits: int = 5 + """number of test checkpoints (every 1/eval_splits of training)""" + eval_episodes: int = 4000 + """number of test trajectories to collect per checkpoint""" + + # FrozenLake specific + grid_size: int = 4 + """size of the frozen lake grid""" + is_slippery: bool = True + """whether the ice is slippery""" + + # to be filled in runtime + batch_size: int = 0 + """the batch size (computed in runtime)""" + minibatch_size: int = 0 + """the mini-batch size (computed in runtime)""" + num_iterations: int = 0 + """the number of iterations (computed in runtime)""" + + +def make_env(env_id, idx, capture_video, run_name, seed, grid_size, is_slippery): + def thunk(): + config = FrozenLakeEnvConfig( + size=grid_size, + p=0.8, + is_slippery=is_slippery, + map_seed=seed + idx + ) + env = FrozenLakeEnv(config) + env = FrozenLakeWrapper(env) + # Add a time limit to prevent infinite loops during evaluation/training + max_steps = int(grid_size * grid_size * 4) + env = gym.wrappers.TimeLimit(env, max_episode_steps=max_steps) + env = gym.wrappers.RecordEpisodeStatistics(env) + if capture_video and idx == 0: + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + return env + return thunk + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class Agent(nn.Module): + def __init__(self, envs): + super().__init__() + obs_shape = np.array(envs.single_observation_space.shape).prod() + self.critic = nn.Sequential( + layer_init(nn.Linear(obs_shape, 128)), + nn.Tanh(), + layer_init(nn.Linear(128, 128)), + nn.Tanh(), + layer_init(nn.Linear(128, 1), std=1.0), + ) + self.actor = nn.Sequential( + layer_init(nn.Linear(obs_shape, 128)), + nn.Tanh(), + layer_init(nn.Linear(128, 128)), + nn.Tanh(), + layer_init(nn.Linear(128, envs.single_action_space.n), std=0.01), + ) + + def get_value(self, x): + return self.critic(x) + + def get_action_and_value(self, x, action=None): + logits = self.actor(x) + probs = Categorical(logits=logits) + if action is None: + action = probs.sample() + return action, probs.log_prob(action), probs.entropy(), self.critic(x) + + +if __name__ == "__main__": + args = tyro.cli(Args) + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + args.num_iterations = args.total_timesteps // args.batch_size + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + if args.track: + import wandb + + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + sync_tensorboard=True, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + # Define step metric and groups for better chart organization + try: + wandb.define_metric("global_step") + for prefix in ["train/*", "rollout/*", "eval/*", "losses/*", "charts/*", "perf/*"]: + wandb.define_metric(prefix, step_metric="global_step") + except Exception: + pass + writer = SummaryWriter(f"runs/{run_name}") + writer.add_text( + "hyperparameters", + "|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])), + ) + + # TRY NOT TO MODIFY: seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + # env setup + envs = gym.vector.SyncVectorEnv( + [make_env(args.env_id, i, args.capture_video, run_name, args.seed, args.grid_size, args.is_slippery) + for i in range(args.num_envs)], + ) + assert isinstance(envs.single_action_space, gym.spaces.Discrete), "only discrete action space is supported" + + agent = Agent(envs).to(device) + optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5) + + # ALGO Logic: Storage setup + obs = torch.zeros((args.num_steps, args.num_envs) + envs.single_observation_space.shape).to(device) + actions = torch.zeros((args.num_steps, args.num_envs) + envs.single_action_space.shape).to(device) + logprobs = torch.zeros((args.num_steps, args.num_envs)).to(device) + rewards = torch.zeros((args.num_steps, args.num_envs)).to(device) + dones = torch.zeros((args.num_steps, args.num_envs)).to(device) + values = torch.zeros((args.num_steps, args.num_envs)).to(device) + + # TRY NOT TO MODIFY: start the game + global_step = 0 + start_time = time.time() + next_obs, _ = envs.reset(seed=args.seed) + next_obs = torch.Tensor(next_obs).to(device) + next_done = torch.zeros(args.num_envs).to(device) + + episode_returns = [] + episode_steps = [] + episode_successes = [] + # Helper: evaluate greedy policy rollout and dump trajectories + def collect_eval_trajectories(agent_model, make_env_fn, n_episodes, step_tag): + out_dir = Path(f"runs/{run_name}/trajectories/step_{step_tag}") + out_dir.mkdir(parents=True, exist_ok=True) + out_path = out_dir / "trajectories.jsonl" + env = make_env_fn() + collected = 0 + summary_returns = [] + summary_success = [] + with out_path.open("w") as f: + while collected < n_episodes: + # Make sure to reseed and also guard against long episodes + state, _ = env.reset(seed=args.seed + 100000 + collected) + traj_states = [state.tolist()] + traj_actions = [] + traj_rewards = [] + traj_dones = [] + traj_success = [] + done = False + step_count = 0 + max_eval_steps = getattr(env, '_max_episode_steps', None) or int(args.grid_size * args.grid_size * 4) + while not done: + with torch.no_grad(): + logits = agent_model.actor(torch.tensor(state, dtype=torch.float32, device=device).unsqueeze(0)) + action = int(torch.argmax(logits, dim=1).item()) + next_state, reward, terminated, truncated, info = env.step(action) + traj_actions.append(int(action)) + traj_rewards.append(float(reward)) + step_count += 1 + d = bool(terminated) or bool(truncated) or (step_count >= max_eval_steps) + traj_dones.append(d) + traj_success.append(bool(info.get('success', False))) + state = next_state + traj_states.append(state.tolist()) + done = d + ep_ret = float(sum(traj_rewards)) + ep_succ = bool(any(traj_success)) + record = { + "states": traj_states, + "actions": traj_actions, + "rewards": traj_rewards, + "dones": traj_dones, + "success": traj_success, + "episode_return": ep_ret, + "episode_success": ep_succ, + } + f.write(json.dumps(record) + "\n") + collected += 1 + summary_returns.append(ep_ret) + summary_success.append(1.0 if ep_succ else 0.0) + env.close() + # write summary metrics + try: + metrics = { + "global_step": int(step_tag), + "episodes": int(n_episodes), + "success_rate": float(np.mean(summary_success)) if len(summary_success) else 0.0, + "avg_return": float(np.mean(summary_returns)) if len(summary_returns) else 0.0, + "std_return": float(np.std(summary_returns)) if len(summary_returns) else 0.0, + } + with (out_dir / "metrics.json").open("w") as mf: + json.dump(metrics, mf) + except Exception as e: + print(f"Warning: failed to write eval metrics: {e}") + + eval_every_iters = max(1, args.num_iterations // args.eval_splits) + for iteration in range(1, args.num_iterations + 1): + # Annealing the rate if instructed to do so. + if args.anneal_lr: + frac = 1.0 - (iteration - 1.0) / args.num_iterations + lrnow = frac * args.learning_rate + optimizer.param_groups[0]["lr"] = lrnow + + for step in range(0, args.num_steps): + global_step += args.num_envs + obs[step] = next_obs + dones[step] = next_done + + # ALGO LOGIC: action logic + with torch.no_grad(): + action, logprob, _, value = agent.get_action_and_value(next_obs) + values[step] = value.flatten() + actions[step] = action + logprobs[step] = logprob + + # TRY NOT TO MODIFY: execute the game and log data. + next_obs, reward, terminations, truncations, infos = envs.step(action.cpu().numpy()) + next_done = np.logical_or(terminations, truncations) + rewards[step] = torch.tensor(reward).to(device).view(-1) + next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(next_done).to(device) + # Vectorized episode end handling: use RecordEpisodeStatistics outputs + try: + mask = None + if isinstance(infos, dict): + if "_episode" in infos: + mask = np.asarray(infos["_episode"]).astype(bool) + elif "episode" in infos and isinstance(infos["episode"], dict) and "_l" in infos["episode"]: + mask = np.asarray(infos["episode"]["_l"]).astype(bool) + if mask is not None and np.any(mask): + # For each finished sub-env, log its episode stats + r_arr = np.asarray(infos.get("episode", {}).get("r", np.zeros_like(mask, dtype=float))) + l_arr = np.asarray(infos.get("episode", {}).get("l", np.zeros_like(mask, dtype=int))) + succ_arr = np.asarray(infos.get("success", np.zeros_like(mask, dtype=bool))).astype(float) + for i in np.where(mask)[0]: + ep_r = float(r_arr[i]) + ep_l = int(l_arr[i]) + ep_succ = float(succ_arr[i]) + episode_returns.append(ep_r) + episode_steps.append(global_step) + episode_successes.append(ep_succ) + # print(f"global_step={global_step}, episodic_return={ep_r}") + writer.add_scalar("charts/episodic_return", ep_r, global_step) + writer.add_scalar("charts/episodic_length", ep_l, global_step) + writer.add_scalar("charts/success", ep_succ, global_step) + if len(episode_successes) >= 100: + writer.add_scalar("charts/success_rate_100", float(np.mean(episode_successes[-100:])), global_step) + if args.track: + try: + import wandb + log_dict = { + "global_step": int(global_step), + # per-step averages across finished episodes + "rollout/ep_rew_mean": float(np.mean(r_arr[mask])) if np.any(mask) else None, + "rollout/ep_len_mean": float(np.mean(l_arr[mask])) if np.any(mask) else None, + "rollout/success_rate": float(np.mean(succ_arr[mask])) if np.any(mask) else None, + } + # Also log the latest episode stats individually for convenience + if np.any(mask): + last_idx = np.where(mask)[0][-1] + log_dict.update({ + "train/episodic_return": float(r_arr[last_idx]), + "train/episodic_length": int(l_arr[last_idx]), + "train/success": float(succ_arr[last_idx]), + "train/success_rate_100": float(np.mean(episode_successes[-100:])) if len(episode_successes) >= 100 else None, + }) + wandb.log(log_dict, step=global_step) + except Exception: + pass + except Exception: + # Be robust to any unexpected info structure + pass + + # bootstrap value if not done + with torch.no_grad(): + next_value = agent.get_value(next_obs).reshape(1, -1) + advantages = torch.zeros_like(rewards).to(device) + lastgaelam = 0 + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + nextnonterminal = 1.0 - next_done + nextvalues = next_value + else: + nextnonterminal = 1.0 - dones[t + 1] + nextvalues = values[t + 1] + delta = rewards[t] + args.gamma * nextvalues * nextnonterminal - values[t] + advantages[t] = lastgaelam = delta + args.gamma * args.gae_lambda * nextnonterminal * lastgaelam + returns = advantages + values + + # flatten the batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_logprobs = logprobs.reshape(-1) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_advantages = advantages.reshape(-1) + b_returns = returns.reshape(-1) + b_values = values.reshape(-1) + + # Optimizing the policy and value network + b_inds = np.arange(args.batch_size) + clipfracs = [] + for epoch in range(args.update_epochs): + np.random.shuffle(b_inds) + for start in range(0, args.batch_size, args.minibatch_size): + end = start + args.minibatch_size + mb_inds = b_inds[start:end] + + _, newlogprob, entropy, newvalue = agent.get_action_and_value(b_obs[mb_inds], b_actions.long()[mb_inds]) + logratio = newlogprob - b_logprobs[mb_inds] + ratio = logratio.exp() + + with torch.no_grad(): + # calculate approx_kl http://joschu.net/blog/kl-approx.html + old_approx_kl = (-logratio).mean() + approx_kl = ((ratio - 1) - logratio).mean() + clipfracs += [((ratio - 1.0).abs() > args.clip_coef).float().mean().item()] + + mb_advantages = b_advantages[mb_inds] + if args.norm_adv: + mb_advantages = (mb_advantages - mb_advantages.mean()) / (mb_advantages.std() + 1e-8) + + # Policy loss + pg_loss1 = -mb_advantages * ratio + pg_loss2 = -mb_advantages * torch.clamp(ratio, 1 - args.clip_coef, 1 + args.clip_coef) + pg_loss = torch.max(pg_loss1, pg_loss2).mean() + + # Value loss + newvalue = newvalue.view(-1) + if args.clip_vloss: + v_loss_unclipped = (newvalue - b_returns[mb_inds]) ** 2 + v_clipped = b_values[mb_inds] + torch.clamp( + newvalue - b_values[mb_inds], + -args.clip_coef, + args.clip_coef, + ) + v_loss_clipped = (v_clipped - b_returns[mb_inds]) ** 2 + v_loss_max = torch.max(v_loss_unclipped, v_loss_clipped) + v_loss = 0.5 * v_loss_max.mean() + else: + v_loss = 0.5 * ((newvalue - b_returns[mb_inds]) ** 2).mean() + + entropy_loss = entropy.mean() + loss = pg_loss - args.ent_coef * entropy_loss + v_loss * args.vf_coef + + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(agent.parameters(), args.max_grad_norm) + optimizer.step() + + if args.target_kl is not None and approx_kl > args.target_kl: + break + + y_pred, y_true = b_values.cpu().numpy(), b_returns.cpu().numpy() + var_y = np.var(y_true) + explained_var = np.nan if var_y == 0 else 1 - np.var(y_true - y_pred) / var_y + + # TRY NOT TO MODIFY: record rewards for plotting purposes + writer.add_scalar("charts/learning_rate", optimizer.param_groups[0]["lr"], global_step) + writer.add_scalar("losses/value_loss", v_loss.item(), global_step) + writer.add_scalar("losses/policy_loss", pg_loss.item(), global_step) + writer.add_scalar("losses/entropy", entropy_loss.item(), global_step) + writer.add_scalar("losses/old_approx_kl", old_approx_kl.item(), global_step) + writer.add_scalar("losses/approx_kl", approx_kl.item(), global_step) + writer.add_scalar("losses/clipfrac", np.mean(clipfracs), global_step) + writer.add_scalar("losses/explained_variance", explained_var, global_step) + + # Additional useful metrics + writer.add_scalar("charts/avg_reward", rewards.mean().item(), global_step) + writer.add_scalar("charts/avg_value", values.mean().item(), global_step) + writer.add_scalar("charts/max_reward", rewards.max().item(), global_step) + writer.add_scalar("charts/min_reward", rewards.min().item(), global_step) + + # Console output with key metrics + sps = int(global_step / (time.time() - start_time)) + progress = 100 * iteration / args.num_iterations + print(f"[{progress:5.1f}%] Iter {iteration:4d}/{args.num_iterations} | " + f"SPS: {sps:5d} | " + f"Reward: {rewards.mean().item():6.3f} | " + f"Value: {values.mean().item():6.3f} | " + f"VLoss: {v_loss.item():.4f} | " + f"PLoss: {pg_loss.item():.4f} | " + f"Ent: {entropy_loss.item():.4f}") + writer.add_scalar("charts/SPS", sps, global_step) + # Mirror key metrics to W&B explicitly (in addition to TB sync) + if args.track: + try: + import wandb + wandb.log({ + "global_step": int(global_step), + "train/value_loss": float(v_loss.item()), + "train/policy_loss": float(pg_loss.item()), + "train/entropy": float(entropy_loss.item()), + "train/old_approx_kl": float(old_approx_kl.item()), + "train/approx_kl": float(approx_kl.item()), + "train/clipfrac": float(np.mean(clipfracs)), + "losses/explained_variance": float(explained_var), + "charts/avg_reward": float(rewards.mean().item()), + "charts/avg_value": float(values.mean().item()), + "perf/SPS": int(sps), + "train/learning_rate": float(optimizer.param_groups[0]["lr"]), + }, step=global_step) + except Exception: + pass + # periodic evaluation collection + if iteration % eval_every_iters == 0: + try: + eval_thunk = make_env(args.env_id, 0, False, run_name, args.seed + 9999, args.grid_size, args.is_slippery) + # collect trajectories and write metrics.json + collect_eval_trajectories(agent, eval_thunk, args.eval_episodes, step_tag=global_step) + # also log summary metrics to W&B + if args.track: + try: + import json as _json + from pathlib import Path as _Path + mpath = _Path(f"runs/{run_name}/trajectories/step_{global_step}/metrics.json") + if mpath.exists(): + with mpath.open("r") as mf: + metrics = _json.load(mf) + import wandb + wandb.log({ + "eval/success_rate": metrics.get("success_rate"), + "eval/avg_return": metrics.get("avg_return"), + "eval/std_return": metrics.get("std_return"), + "eval/episodes": metrics.get("episodes"), + }, step=global_step) + except Exception: + pass + print(f"Collected {args.eval_episodes} eval trajectories at global_step {global_step}") + except Exception as e: + print(f"Warning: eval trajectory collection failed at step {global_step}: {e}") + + envs.close() + writer.close() + # Persist episodic log and optional plot for visible trend + try: + import csv + from pathlib import Path + out_dir = Path(f"runs/{run_name}") + out_dir.mkdir(parents=True, exist_ok=True) + csv_path = out_dir / "episodic_log.csv" + with csv_path.open("w", newline="") as f: + writer_csv = csv.writer(f) + writer_csv.writerow(["global_step", "episode_return"]) + for s, r in zip(episode_steps, episode_returns): + writer_csv.writerow([int(s), float(r)]) + print(f"Saved episodic CSV to {csv_path}") + except Exception as e: + print(f"Warning: failed to save episodic CSV: {e}") + + if args.save_plots and len(episode_returns) > 0: + try: + import matplotlib.pyplot as plt + import numpy as np + def moving_avg(x, w=50): + if len(x) == 0: + return np.array([]) + w = max(1, min(w, len(x))) + c = np.cumsum(np.insert(x, 0, 0)) + return (c[w:] - c[:-w]) / float(w) + fig, ax = plt.subplots(1, 1, figsize=(8, 4)) + ax.plot(episode_steps, episode_returns, alpha=0.3, label="return") + ma = moving_avg(episode_returns, w=50) + if len(ma) > 0: + ax.plot(episode_steps[49:], ma, label="MA@50") + ax.set_title("FrozenLake: Episodic Return") + ax.set_xlabel("global_step") + ax.set_ylabel("return") + ax.legend() + png_path = f"runs/{run_name}/training_curve.png" + fig.tight_layout() + plt.savefig(png_path) + plt.close(fig) + print(f"Saved training curve to {png_path}") + except Exception as e: + print(f"Warning: failed to save training plot: {e}") diff --git a/cleanrl/cleanrl/ppo_frozenlake_nochangeenv.py b/cleanrl/cleanrl/ppo_frozenlake_nochangeenv.py new file mode 100644 index 0000000000000000000000000000000000000000..8edd9170e921b4e2e47bde5a9aabb1dca17a2b85 --- /dev/null +++ b/cleanrl/cleanrl/ppo_frozenlake_nochangeenv.py @@ -0,0 +1,494 @@ +# PPO with small MLP for RAGEN FrozenLake using the existing env (no env edits) +import os +import random +import time +from dataclasses import dataclass +from pathlib import Path +from typing import Tuple, Dict, Any +import json + +import gymnasium as gym +import numpy as np +import torch +import torch.nn as nn +import torch.optim as optim +import tyro +from torch.distributions.categorical import Categorical + +import sys +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../')) + +from ragen.env.frozen_lake.env import FrozenLakeEnv +from ragen.env.frozen_lake.config import FrozenLakeEnvConfig + +# python /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/ppo_frozenlake_nochangeenv.py --total-timesteps 2000000 --num-envs 8 --num-steps 128 --grid-size 4 --is-slippery --track +class FrozenLakeWrapper(gym.Env): + """ + Adapter to use ragen FrozenLakeEnv with Gymnasium vector API. + - Converts text observation to one-hot grid vector (6 tokens per cell). + - Maps agent actions [0..3] to env actions [1..4]. + - Exposes proper observation_space and action_space. + """ + metadata = {"render_modes": ["rgb_array", "human", "ansi"]} + + def __init__(self, env: FrozenLakeEnv): + super().__init__() + self._env = env + self._size = int(self._env.nrow) # square grid + self._tokens = ['P', '_', 'O', 'G', 'X', '√'] + self._token_to_idx = {t: i for i, t in enumerate(self._tokens)} + self.observation_space = gym.spaces.Box(low=0.0, high=1.0, shape=(self._size * self._size * len(self._tokens),), dtype=np.float32) + self.action_space = gym.spaces.Discrete(4) + + def _encode_obs(self, text_obs: str) -> np.ndarray: + # text_obs is multi-line grid with tokens above + rows = text_obs.split('\n') + # handle any accidental extra whitespace + rows = [list(r) for r in rows if len(r) > 0] + h = len(rows) + w = len(rows[0]) if h > 0 else self._size + grid = np.zeros((h, w, len(self._tokens)), dtype=np.float32) + for i in range(h): + for j in range(w): + ch = rows[i][j] + idx = self._token_to_idx.get(ch, 0) + grid[i, j, idx] = 1.0 + return grid.reshape(-1) + + def reset(self, *, seed: int | None = None, options: Dict[str, Any] | None = None): + text_obs = self._env.reset(seed=seed) + obs = self._encode_obs(text_obs) + return obs, {} + + def step(self, action: int): + # map 0..3 -> 1..4 for the underlying env + mapped = int(action) + 1 + text_obs, reward, done, info = self._env.step(mapped) + obs = self._encode_obs(text_obs) + terminated = bool(done) + truncated = False + # propagate success if present + return obs, float(reward), terminated, truncated, info or {} + + def render(self): + return self._env.render() + + def close(self): + self._env.close() + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + seed: int = 1 + torch_deterministic: bool = True + cuda: bool = True + track: bool = True + wandb_project_name: str = "cleanRL" + wandb_entity: str | None = None + capture_video: bool = False + + # Algorithm + env_id: str = "FrozenLake" + total_timesteps: int = 200_000 + learning_rate: float = 2.5e-4 + num_envs: int = 8 + num_steps: int = 128 + anneal_lr: bool = True + gamma: float = 0.99 + gae_lambda: float = 0.95 + num_minibatches: int = 4 + update_epochs: int = 4 + norm_adv: bool = True + clip_coef: float = 0.2 + clip_vloss: bool = True + ent_coef: float = 0.01 + vf_coef: float = 0.5 + max_grad_norm: float = 0.5 + target_kl: float | None = None + + # FrozenLake specific + grid_size: int = 4 + is_slippery: bool = False + + # runtime filled + batch_size: int = 0 + minibatch_size: int = 0 + num_iterations: int = 0 + # eval config to mirror reference script + eval_splits: int = 20 + eval_episodes: int = 4000 + + +def make_env(idx, run_name, seed, grid_size, is_slippery, capture_video=False): + def thunk(): + config = FrozenLakeEnvConfig(size=grid_size, p=0.8, success_rate = 0.8, is_slippery=is_slippery, map_seed=seed + idx, render_mode='text') + # import pdb;pdb.set_trace() + env = FrozenLakeEnv(config) + env = FrozenLakeWrapper(env) + max_steps = int(grid_size * grid_size * 4) + env = gym.wrappers.TimeLimit(env, max_episode_steps=max_steps) + env = gym.wrappers.RecordEpisodeStatistics(env) + if capture_video and idx == 0: + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + return env + return thunk + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class Agent(nn.Module): + def __init__(self, envs): + super().__init__() + obs_shape = int(np.array(envs.single_observation_space.shape).prod()) + hidden = 64 + self.critic = nn.Sequential( + layer_init(nn.Linear(obs_shape, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, 1), std=1.0), + ) + self.actor = nn.Sequential( + layer_init(nn.Linear(obs_shape, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, envs.single_action_space.n), std=0.01), + ) + + def get_value(self, x): + return self.critic(x) + + def get_action_and_value(self, x, action=None): + logits = self.actor(x) + probs = Categorical(logits=logits) + if action is None: + action = probs.sample() + return action, probs.log_prob(action), probs.entropy(), self.critic(x) + + +if __name__ == "__main__": + args = tyro.cli(Args) + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + args.num_iterations = args.total_timesteps // args.batch_size + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + + if args.track: + import wandb + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + try: + wandb.define_metric("global_step") + for prefix in ["train/*", "rollout/*", "eval/*", "losses/*", "charts/*", "perf/*"]: + wandb.define_metric(prefix, step_metric="global_step") + except Exception: + pass + + # seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + # envs + envs = gym.vector.SyncVectorEnv([ + make_env(i, run_name, args.seed, args.grid_size, args.is_slippery, args.capture_video) + for i in range(args.num_envs) + ]) + assert isinstance(envs.single_action_space, gym.spaces.Discrete) + + agent = Agent(envs).to(device) + optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5) + + # storage + obs = torch.zeros((args.num_steps, args.num_envs) + envs.single_observation_space.shape).to(device) + actions = torch.zeros((args.num_steps, args.num_envs) + envs.single_action_space.shape).to(device) + logprobs = torch.zeros((args.num_steps, args.num_envs)).to(device) + rewards = torch.zeros((args.num_steps, args.num_envs)).to(device) + dones = torch.zeros((args.num_steps, args.num_envs)).to(device) + values = torch.zeros((args.num_steps, args.num_envs)).to(device) + + # start + global_step = 0 + start_time = time.time() + next_obs, _ = envs.reset(seed=args.seed) + next_obs = torch.Tensor(next_obs).to(device) + next_done = torch.zeros(args.num_envs).to(device) + + episode_returns = [] + episode_steps = [] + episode_successes = [] + + # Eval helper identical to reference + def collect_eval_trajectories(agent_model, make_env_fn, n_episodes, step_tag): + out_dir = Path(f"runs/{run_name}/trajectories/step_{step_tag}") + out_dir.mkdir(parents=True, exist_ok=True) + out_path = out_dir / "trajectories.jsonl" + env = make_env_fn() + collected = 0 + summary_returns = [] + summary_success = [] + with out_path.open("w") as f: + while collected < n_episodes: + state, _ = env.reset(seed=args.seed + 100000 + collected) + traj_states = [state.tolist()] + traj_actions = [] + traj_rewards = [] + traj_dones = [] + traj_success = [] + done = False + step_count = 0 + max_eval_steps = getattr(env, '_max_episode_steps', None) or int(args.grid_size * args.grid_size * 4) + while not done: + with torch.no_grad(): + logits = agent_model.actor(torch.tensor(state, dtype=torch.float32, device=device).unsqueeze(0)) + action = int(torch.argmax(logits, dim=1).item()) + next_state, reward, terminated, truncated, info = env.step(action) + traj_actions.append(int(action)) + traj_rewards.append(float(reward)) + step_count += 1 + d = bool(terminated) or bool(truncated) or (step_count >= max_eval_steps) + traj_dones.append(d) + traj_success.append(bool(info.get('success', False))) + state = next_state + traj_states.append(state.tolist()) + done = d + ep_ret = float(sum(traj_rewards)) + ep_succ = bool(any(traj_success)) + record = { + "states": traj_states, + "actions": traj_actions, + "rewards": traj_rewards, + "dones": traj_dones, + "success": traj_success, + "episode_return": ep_ret, + "episode_success": ep_succ, + } + f.write(json.dumps(record) + "\n") + collected += 1 + summary_returns.append(ep_ret) + summary_success.append(1.0 if ep_succ else 0.0) + env.close() + try: + metrics = { + "global_step": int(step_tag), + "episodes": int(n_episodes), + "success_rate": float(np.mean(summary_success)) if len(summary_success) else 0.0, + "avg_return": float(np.mean(summary_returns)) if len(summary_returns) else 0.0, + "std_return": float(np.std(summary_returns)) if len(summary_returns) else 0.0, + } + with (out_dir / "metrics.json").open("w") as mf: + json.dump(metrics, mf) + except Exception as e: + print(f"Warning: failed to write eval metrics: {e}") + + eval_every_iters = max(1, args.num_iterations // args.eval_splits) + for iteration in range(1, args.num_iterations + 1): + # Anneal LR + if args.anneal_lr: + frac = 1.0 - (iteration - 1.0) / args.num_iterations + lrnow = frac * args.learning_rate + optimizer.param_groups[0]["lr"] = lrnow + + for step in range(0, args.num_steps): + global_step += args.num_envs + obs[step] = next_obs + dones[step] = next_done + + with torch.no_grad(): + action, logprob, _, value = agent.get_action_and_value(next_obs) + values[step] = value.flatten() + actions[step] = action + logprobs[step] = logprob + + next_obs, reward, terminations, truncations, infos = envs.step(action.cpu().numpy()) + next_done = np.logical_or(terminations, truncations) + rewards[step] = torch.tensor(reward).to(device).view(-1) + next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(next_done).to(device) + # Episode stats logging as in reference + try: + mask = None + if isinstance(infos, dict): + if "_episode" in infos: + mask = np.asarray(infos["_episode"]).astype(bool) + elif "episode" in infos and isinstance(infos["episode"], dict) and "_l" in infos["episode"]: + mask = np.asarray(infos["episode"]["_l"]).astype(bool) + if mask is not None and np.any(mask): + r_arr = np.asarray(infos.get("episode", {}).get("r", np.zeros_like(mask, dtype=float))) + l_arr = np.asarray(infos.get("episode", {}).get("l", np.zeros_like(mask, dtype=int))) + succ_arr = np.asarray(infos.get("success", np.zeros_like(mask, dtype=bool))).astype(float) + for i in np.where(mask)[0]: + ep_r = float(r_arr[i]) + ep_l = int(l_arr[i]) + ep_succ = float(succ_arr[i]) + episode_returns.append(ep_r) + episode_steps.append(global_step) + episode_successes.append(ep_succ) + if args.track: + try: + import wandb + log_dict = { + "global_step": int(global_step), + "rollout/ep_rew_mean": float(np.mean(r_arr[mask])) if np.any(mask) else None, + "rollout/ep_len_mean": float(np.mean(l_arr[mask])) if np.any(mask) else None, + "rollout/success_rate": float(np.mean(succ_arr[mask])) if np.any(mask) else None, + } + if np.any(mask): + last_idx = np.where(mask)[0][-1] + log_dict.update({ + "train/episodic_return": float(r_arr[last_idx]), + "train/episodic_length": int(l_arr[last_idx]), + "train/success": float(succ_arr[last_idx]), + "train/success_rate_100": float(np.mean(episode_successes[-100:])) if len(episode_successes) >= 100 else None, + }) + wandb.log(log_dict, step=global_step) + except Exception: + pass + except Exception: + pass + + # GAE + with torch.no_grad(): + next_value = agent.get_value(next_obs).reshape(1, -1) + advantages = torch.zeros_like(rewards).to(device) + lastgaelam = 0 + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + nextnonterminal = 1.0 - next_done + nextvalues = next_value + else: + nextnonterminal = 1.0 - dones[t + 1] + nextvalues = values[t + 1] + delta = rewards[t] + args.gamma * nextvalues * nextnonterminal - values[t] + advantages[t] = lastgaelam = delta + args.gamma * args.gae_lambda * nextnonterminal * lastgaelam + returns = advantages + values + + # flatten batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_logprobs = logprobs.reshape(-1) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_advantages = advantages.reshape(-1) + b_returns = returns.reshape(-1) + b_values = values.reshape(-1) + + # update + b_inds = np.arange(args.batch_size) + clipfracs = [] + for epoch in range(args.update_epochs): + np.random.shuffle(b_inds) + for start in range(0, args.batch_size, args.minibatch_size): + end = start + args.minibatch_size + mb_inds = b_inds[start:end] + + _, newlogprob, entropy, newvalue = agent.get_action_and_value(b_obs[mb_inds], b_actions.long()[mb_inds]) + logratio = newlogprob - b_logprobs[mb_inds] + ratio = logratio.exp() + + with torch.no_grad(): + old_approx_kl = (-logratio).mean() + approx_kl = ((ratio - 1) - logratio).mean() + clipfracs += [((ratio - 1.0).abs() > args.clip_coef).float().mean().item()] + + mb_advantages = b_advantages[mb_inds] + if args.norm_adv: + mb_advantages = (mb_advantages - mb_advantages.mean()) / (mb_advantages.std() + 1e-8) + + pg_loss1 = -mb_advantages * ratio + pg_loss2 = -mb_advantages * torch.clamp(ratio, 1 - args.clip_coef, 1 + args.clip_coef) + pg_loss = torch.max(pg_loss1, pg_loss2).mean() + + newvalue = newvalue.view(-1) + if args.clip_vloss: + v_loss_unclipped = (newvalue - b_returns[mb_inds]) ** 2 + v_clipped = b_values[mb_inds] + torch.clamp( + newvalue - b_values[mb_inds], -args.clip_coef, args.clip_coef, + ) + v_loss_clipped = (v_clipped - b_returns[mb_inds]) ** 2 + v_loss = 0.5 * torch.max(v_loss_unclipped, v_loss_clipped).mean() + else: + v_loss = 0.5 * ((newvalue - b_returns[mb_inds]) ** 2).mean() + + entropy_loss = entropy.mean() + loss = pg_loss - args.ent_coef * entropy_loss + v_loss * args.vf_coef + + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(agent.parameters(), args.max_grad_norm) + optimizer.step() + + if args.target_kl is not None and approx_kl > args.target_kl: + break + + y_pred, y_true = b_values.cpu().numpy(), b_returns.cpu().numpy() + var_y = np.var(y_true) + explained_var = np.nan if var_y == 0 else 1 - np.var(y_true - y_pred) / var_y + + sps = int(global_step / (time.time() - start_time)) + progress = 100 * iteration / args.num_iterations + print(f"[{progress:5.1f}%] Iter {iteration:4d}/{args.num_iterations} | " + f"SPS: {sps:5d} | " + f"Reward: {rewards.mean().item():6.3f} | " + f"Value: {values.mean().item():6.3f} | " + f"VLoss: {v_loss.item():.4f} | " + f"PLoss: {pg_loss.item():.4f} | " + f"Ent: {entropy_loss.item():.4f}") + if args.track: + try: + import wandb + wandb.log({ + "global_step": int(global_step), + "train/value_loss": float(v_loss.item()), + "train/policy_loss": float(pg_loss.item()), + "train/entropy": float(entropy_loss.item()), + "train/old_approx_kl": float(old_approx_kl.item()), + "train/approx_kl": float(approx_kl.item()), + "train/clipfrac": float(np.mean(clipfracs)), + "losses/explained_variance": float(explained_var), + "charts/avg_reward": float(rewards.mean().item()), + "charts/avg_value": float(values.mean().item()), + "perf/SPS": int(sps), + "train/learning_rate": float(optimizer.param_groups[0]["lr"]), + }, step=global_step) + except Exception: + pass + + # periodic evaluation collection + if iteration==1 or iteration % eval_every_iters == 0: + try: + eval_thunk = make_env(0, run_name, args.seed + 9999, args.grid_size, args.is_slippery, False) + collect_eval_trajectories(agent, eval_thunk, n_episodes=args.eval_episodes, step_tag=global_step) + if args.track: + try: + import json as _json + from pathlib import Path as _Path + mpath = _Path(f"runs/{run_name}/trajectories/step_{global_step}/metrics.json") + if mpath.exists(): + with mpath.open("r") as mf: + metrics = _json.load(mf) + wandb.log({ + "eval/success_rate": metrics.get("success_rate"), + "eval/avg_return": metrics.get("avg_return"), + "eval/std_return": metrics.get("std_return"), + "eval/episodes": metrics.get("episodes"), + }, step=global_step) + except Exception: + pass + print(f"Collected {args.eval_episodes} eval trajectories at global_step {global_step}") + except Exception as e: + print(f"Warning: eval trajectory collection failed at step {global_step}: {e}") + + envs.close() diff --git a/cleanrl/cleanrl/ppo_pettingzoo_ma_atari.py b/cleanrl/cleanrl/ppo_pettingzoo_ma_atari.py new file mode 100644 index 0000000000000000000000000000000000000000..87b2b31236d75a3cd2c3146e8c99638b84b23100 --- /dev/null +++ b/cleanrl/cleanrl/ppo_pettingzoo_ma_atari.py @@ -0,0 +1,313 @@ +# docs and experiment results can be found at https://docs.cleanrl.dev/rl-algorithms/ppo/#ppo_pettingzoo_ma_ataripy +import argparse +import importlib +import os +import random +import time +from distutils.util import strtobool + +import gym +import numpy as np +import supersuit as ss +import torch +import torch.nn as nn +import torch.optim as optim +from torch.distributions.categorical import Categorical +from torch.utils.tensorboard import SummaryWriter + + +def parse_args(): + # fmt: off + parser = argparse.ArgumentParser() + parser.add_argument("--exp-name", type=str, default=os.path.basename(__file__).rstrip(".py"), + help="the name of this experiment") + parser.add_argument("--seed", type=int, default=1, + help="seed of the experiment") + parser.add_argument("--torch-deterministic", type=lambda x: bool(strtobool(x)), default=True, nargs="?", const=True, + help="if toggled, `torch.backends.cudnn.deterministic=False`") + parser.add_argument("--cuda", type=lambda x: bool(strtobool(x)), default=True, nargs="?", const=True, + help="if toggled, cuda will be enabled by default") + parser.add_argument("--track", type=lambda x: bool(strtobool(x)), default=False, nargs="?", const=True, + help="if toggled, this experiment will be tracked with Weights and Biases") + parser.add_argument("--wandb-project-name", type=str, default="cleanRL", + help="the wandb's project name") + parser.add_argument("--wandb-entity", type=str, default=None, + help="the entity (team) of wandb's project") + parser.add_argument("--capture_video", type=lambda x: bool(strtobool(x)), default=False, nargs="?", const=True, + help="whether to capture videos of the agent performances (check out `videos` folder)") + + # Algorithm specific arguments + parser.add_argument("--env-id", type=str, default="pong_v3", + help="the id of the environment") + parser.add_argument("--total-timesteps", type=int, default=20000000, + help="total timesteps of the experiments") + parser.add_argument("--learning-rate", type=float, default=2.5e-4, + help="the learning rate of the optimizer") + parser.add_argument("--num-envs", type=int, default=16, + help="the number of parallel game environments") + parser.add_argument("--num-steps", type=int, default=128, + help="the number of steps to run in each environment per policy rollout") + parser.add_argument("--anneal-lr", type=lambda x: bool(strtobool(x)), default=True, nargs="?", const=True, + help="Toggle learning rate annealing for policy and value networks") + parser.add_argument("--gamma", type=float, default=0.99, + help="the discount factor gamma") + parser.add_argument("--gae-lambda", type=float, default=0.95, + help="the lambda for the general advantage estimation") + parser.add_argument("--num-minibatches", type=int, default=4, + help="the number of mini-batches") + parser.add_argument("--update-epochs", type=int, default=4, + help="the K epochs to update the policy") + parser.add_argument("--norm-adv", type=lambda x: bool(strtobool(x)), default=True, nargs="?", const=True, + help="Toggles advantages normalization") + parser.add_argument("--clip-coef", type=float, default=0.1, + help="the surrogate clipping coefficient") + parser.add_argument("--clip-vloss", type=lambda x: bool(strtobool(x)), default=True, nargs="?", const=True, + help="Toggles whether or not to use a clipped loss for the value function, as per the paper.") + parser.add_argument("--ent-coef", type=float, default=0.01, + help="coefficient of the entropy") + parser.add_argument("--vf-coef", type=float, default=0.5, + help="coefficient of the value function") + parser.add_argument("--max-grad-norm", type=float, default=0.5, + help="the maximum norm for the gradient clipping") + parser.add_argument("--target-kl", type=float, default=None, + help="the target KL divergence threshold") + args = parser.parse_args() + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + # fmt: on + return args + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class Agent(nn.Module): + def __init__(self, envs): + super().__init__() + self.network = nn.Sequential( + layer_init(nn.Conv2d(6, 32, 8, stride=4)), + nn.ReLU(), + layer_init(nn.Conv2d(32, 64, 4, stride=2)), + nn.ReLU(), + layer_init(nn.Conv2d(64, 64, 3, stride=1)), + nn.ReLU(), + nn.Flatten(), + layer_init(nn.Linear(64 * 7 * 7, 512)), + nn.ReLU(), + ) + self.actor = layer_init(nn.Linear(512, envs.single_action_space.n), std=0.01) + self.critic = layer_init(nn.Linear(512, 1), std=1) + + def get_value(self, x): + x = x.clone() + x[:, :, :, [0, 1, 2, 3]] /= 255.0 + return self.critic(self.network(x.permute((0, 3, 1, 2)))) + + def get_action_and_value(self, x, action=None): + x = x.clone() + x[:, :, :, [0, 1, 2, 3]] /= 255.0 + hidden = self.network(x.permute((0, 3, 1, 2))) + logits = self.actor(hidden) + probs = Categorical(logits=logits) + if action is None: + action = probs.sample() + return action, probs.log_prob(action), probs.entropy(), self.critic(hidden) + + +if __name__ == "__main__": + args = parse_args() + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + if args.track: + import wandb + + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + sync_tensorboard=True, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + writer = SummaryWriter(f"runs/{run_name}") + writer.add_text( + "hyperparameters", + "|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])), + ) + + # TRY NOT TO MODIFY: seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + # env setup + env = importlib.import_module(f"pettingzoo.atari.{args.env_id}").parallel_env() + env = ss.max_observation_v0(env, 2) + env = ss.frame_skip_v0(env, 4) + env = ss.clip_reward_v0(env, lower_bound=-1, upper_bound=1) + env = ss.color_reduction_v0(env, mode="B") + env = ss.resize_v1(env, x_size=84, y_size=84) + env = ss.frame_stack_v1(env, 4) + env = ss.agent_indicator_v0(env, type_only=False) + env = ss.pettingzoo_env_to_vec_env_v1(env) + envs = ss.concat_vec_envs_v1(env, args.num_envs // 2, num_cpus=0, base_class="gym") + envs.single_observation_space = envs.observation_space + envs.single_action_space = envs.action_space + envs.is_vector_env = True + envs = gym.wrappers.RecordEpisodeStatistics(envs) + if args.capture_video: + envs = gym.wrappers.RecordVideo(envs, f"videos/{run_name}") + assert isinstance(envs.single_action_space, gym.spaces.Discrete), "only discrete action space is supported" + + agent = Agent(envs).to(device) + optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5) + + # ALGO Logic: Storage setup + obs = torch.zeros((args.num_steps, args.num_envs) + envs.single_observation_space.shape).to(device) + actions = torch.zeros((args.num_steps, args.num_envs) + envs.single_action_space.shape).to(device) + logprobs = torch.zeros((args.num_steps, args.num_envs)).to(device) + rewards = torch.zeros((args.num_steps, args.num_envs)).to(device) + dones = torch.zeros((args.num_steps, args.num_envs)).to(device) + values = torch.zeros((args.num_steps, args.num_envs)).to(device) + + # TRY NOT TO MODIFY: start the game + global_step = 0 + start_time = time.time() + next_obs = torch.Tensor(envs.reset()).to(device) + next_done = torch.zeros(args.num_envs).to(device) + num_updates = args.total_timesteps // args.batch_size + + for update in range(1, num_updates + 1): + # Annealing the rate if instructed to do so. + if args.anneal_lr: + frac = 1.0 - (update - 1.0) / num_updates + lrnow = frac * args.learning_rate + optimizer.param_groups[0]["lr"] = lrnow + + for step in range(0, args.num_steps): + global_step += 1 * args.num_envs + obs[step] = next_obs + dones[step] = next_done + + # ALGO LOGIC: action logic + with torch.no_grad(): + action, logprob, _, value = agent.get_action_and_value(next_obs) + values[step] = value.flatten() + actions[step] = action + logprobs[step] = logprob + + # TRY NOT TO MODIFY: execute the game and log data. + next_obs, reward, done, info = envs.step(action.cpu().numpy()) + rewards[step] = torch.tensor(reward).to(device).view(-1) + next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(done).to(device) + + for idx, item in enumerate(info): + player_idx = idx % 2 + if "episode" in item.keys(): + print(f"global_step={global_step}, {player_idx}-episodic_return={item['episode']['r']}") + writer.add_scalar(f"charts/episodic_return-player{player_idx}", item["episode"]["r"], global_step) + writer.add_scalar(f"charts/episodic_length-player{player_idx}", item["episode"]["l"], global_step) + + # bootstrap value if not done + with torch.no_grad(): + next_value = agent.get_value(next_obs).reshape(1, -1) + advantages = torch.zeros_like(rewards).to(device) + lastgaelam = 0 + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + nextnonterminal = 1.0 - next_done + nextvalues = next_value + else: + nextnonterminal = 1.0 - dones[t + 1] + nextvalues = values[t + 1] + delta = rewards[t] + args.gamma * nextvalues * nextnonterminal - values[t] + advantages[t] = lastgaelam = delta + args.gamma * args.gae_lambda * nextnonterminal * lastgaelam + returns = advantages + values + + # flatten the batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_logprobs = logprobs.reshape(-1) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_advantages = advantages.reshape(-1) + b_returns = returns.reshape(-1) + b_values = values.reshape(-1) + + # Optimizing the policy and value network + b_inds = np.arange(args.batch_size) + clipfracs = [] + for epoch in range(args.update_epochs): + np.random.shuffle(b_inds) + for start in range(0, args.batch_size, args.minibatch_size): + end = start + args.minibatch_size + mb_inds = b_inds[start:end] + + _, newlogprob, entropy, newvalue = agent.get_action_and_value(b_obs[mb_inds], b_actions.long()[mb_inds]) + logratio = newlogprob - b_logprobs[mb_inds] + ratio = logratio.exp() + + with torch.no_grad(): + # calculate approx_kl http://joschu.net/blog/kl-approx.html + old_approx_kl = (-logratio).mean() + approx_kl = ((ratio - 1) - logratio).mean() + clipfracs += [((ratio - 1.0).abs() > args.clip_coef).float().mean().item()] + + mb_advantages = b_advantages[mb_inds] + if args.norm_adv: + mb_advantages = (mb_advantages - mb_advantages.mean()) / (mb_advantages.std() + 1e-8) + + # Policy loss + pg_loss1 = -mb_advantages * ratio + pg_loss2 = -mb_advantages * torch.clamp(ratio, 1 - args.clip_coef, 1 + args.clip_coef) + pg_loss = torch.max(pg_loss1, pg_loss2).mean() + + # Value loss + newvalue = newvalue.view(-1) + if args.clip_vloss: + v_loss_unclipped = (newvalue - b_returns[mb_inds]) ** 2 + v_clipped = b_values[mb_inds] + torch.clamp( + newvalue - b_values[mb_inds], + -args.clip_coef, + args.clip_coef, + ) + v_loss_clipped = (v_clipped - b_returns[mb_inds]) ** 2 + v_loss_max = torch.max(v_loss_unclipped, v_loss_clipped) + v_loss = 0.5 * v_loss_max.mean() + else: + v_loss = 0.5 * ((newvalue - b_returns[mb_inds]) ** 2).mean() + + entropy_loss = entropy.mean() + loss = pg_loss - args.ent_coef * entropy_loss + v_loss * args.vf_coef + + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(agent.parameters(), args.max_grad_norm) + optimizer.step() + + if args.target_kl is not None: + if approx_kl > args.target_kl: + break + + y_pred, y_true = b_values.cpu().numpy(), b_returns.cpu().numpy() + var_y = np.var(y_true) + explained_var = np.nan if var_y == 0 else 1 - np.var(y_true - y_pred) / var_y + + # TRY NOT TO MODIFY: record rewards for plotting purposes + writer.add_scalar("charts/learning_rate", optimizer.param_groups[0]["lr"], global_step) + writer.add_scalar("losses/value_loss", v_loss.item(), global_step) + writer.add_scalar("losses/policy_loss", pg_loss.item(), global_step) + writer.add_scalar("losses/entropy", entropy_loss.item(), global_step) + writer.add_scalar("losses/old_approx_kl", old_approx_kl.item(), global_step) + writer.add_scalar("losses/approx_kl", approx_kl.item(), global_step) + writer.add_scalar("losses/clipfrac", np.mean(clipfracs), global_step) + writer.add_scalar("losses/explained_variance", explained_var, global_step) + print("SPS:", int(global_step / (time.time() - start_time))) + writer.add_scalar("charts/SPS", int(global_step / (time.time() - start_time)), global_step) + + envs.close() + writer.close() diff --git a/cleanrl/cleanrl/ppo_sudoku.py b/cleanrl/cleanrl/ppo_sudoku.py new file mode 100644 index 0000000000000000000000000000000000000000..ef0e4aa9796d9a73612a7593aae01504b00c0644 --- /dev/null +++ b/cleanrl/cleanrl/ppo_sudoku.py @@ -0,0 +1,538 @@ +# PPO with small MLP for RAGEN Sudoku using the existing env (no env edits) +import os +import random +import time +from dataclasses import dataclass +from pathlib import Path +from typing import Tuple, Dict, Any, List +import json + +import gymnasium as gym +import numpy as np +import torch +import torch.nn as nn +import torch.optim as optim +import tyro +from torch.distributions.categorical import Categorical + +import sys +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../')) + +from ragen.env.sudoku.env import SudokuEnv +from ragen.env.sudoku.config import SudokuEnvConfig + + +class SudokuWrapper(gym.Env): + """ + Adapter to use ragen SudokuEnv with Gymnasium vector API. + - Converts text observation (simple format) to one-hot grid vector ((GxG) * (G+1)). + - Maps discrete action id to action string "row,col,num" (1-indexed) for the env. + - Exposes proper observation_space and action_space. + """ + metadata = {"render_modes": ["rgb_array", "human", "ansi"]} + + def __init__(self, env: SudokuEnv, grid_size: int): + super().__init__() + self._env = env + self._size = grid_size + # observation: one-hot per cell for value in {0..grid_size}, 0 denotes empty + self._val_dim = self._size + 1 + self.observation_space = gym.spaces.Box(low=0.0, high=1.0, shape=(self._size * self._size * self._val_dim,), dtype=np.float32) + # actions: (row, col, num) with row/col in [0..G-1], num in [1..G] + self._act_n = self._size * self._size * self._size + self.action_space = gym.spaces.Discrete(self._act_n) + + def _encode_obs(self, text_obs: str) -> np.ndarray: + # Parse the 'simple' grid format; skip separator lines and '|' tokens + vals: List[int] = [] + for line in text_obs.splitlines(): + ls = line.strip() + if len(ls) == 0: + continue + # separator lines look like '-----' etc. + if set(ls) <= {'-'}: + continue + tokens = [t for t in ls.split() if t != '|'] + # tolerate short lines (e.g., headers) by skipping + if len(tokens) == 0: + continue + for t in tokens: + if t == '.': + vals.append(0) + else: + # numeric token (handles multi-digit for 16x16) + try: + v = int(t) + except ValueError: + # unexpected token, treat as empty + v = 0 + vals.append(v) + # Ensure we have exactly G*G cells; if more due to formatting, crop; if less, pad + target = self._size * self._size + if len(vals) < target: + vals.extend([0] * (target - len(vals))) + if len(vals) > target: + vals = vals[:target] + # One-hot encode + grid = np.zeros((target, self._val_dim), dtype=np.float32) + for i, v in enumerate(vals): + v_clamped = int(v) + if v_clamped < 0 or v_clamped > self._size: + v_clamped = 0 + grid[i, v_clamped] = 1.0 + return grid.reshape(-1) + + @staticmethod + def _decode_action(action_id: int, grid_size: int) -> Tuple[int, int, int]: + # Map discrete id -> (row, col, num) with 0-index row/col, 1-index num + g = grid_size + row = action_id // (g * g) + rem = action_id % (g * g) + col = rem // g + num = (rem % g) + 1 + return row, col, num + + def reset(self, *, seed: int | None = None, options: Dict[str, Any] | None = None): + text_obs = self._env.reset(seed=seed) + obs = self._encode_obs(text_obs) + return obs, {} + + def step(self, action: int): + row, col, num = self._decode_action(int(action), self._size) + # env expects 1-indexed row/col in action string + act_str = f"{row+1},{col+1},{num}" + text_obs, reward, done, info = self._env.step(act_str) + obs = self._encode_obs(text_obs) + terminated = bool(done) + truncated = False + return obs, float(reward), terminated, truncated, info or {} + + def render(self): + return self._env.render() + + def close(self): + self._env.close() + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + seed: int = 1 + torch_deterministic: bool = True + cuda: bool = True + track: bool = True + wandb_project_name: str = "cleanRL" + wandb_entity: str | None = None + capture_video: bool = False + + # Algorithm + env_id: str = "Sudoku" + total_timesteps: int = 2000_000 + learning_rate: float = 3e-4 + num_envs: int = 8 + num_steps: int = 128 + anneal_lr: bool = True + gamma: float = 0.99 + gae_lambda: float = 0.95 + num_minibatches: int = 4 + update_epochs: int = 4 + norm_adv: bool = True + clip_coef: float = 0.2 + clip_vloss: bool = True + ent_coef: float = 0.01 + vf_coef: float = 0.5 + max_grad_norm: float = 0.5 + target_kl: float | None = None + + # Sudoku specific + grid_size: int = 4 # 4 or 9 recommended + difficulty: str = "easy" # easy/medium/hard + + # runtime filled + batch_size: int = 0 + minibatch_size: int = 0 + num_iterations: int = 0 + + # eval + eval_splits: int = 2 + eval_episodes: int = 4000 + + +def make_env(idx, run_name, seed, grid_size, difficulty, capture_video=False): + def thunk(): + config = SudokuEnvConfig( + grid_size=grid_size, + difficulty=difficulty, + render_mode='text', + render_format='simple', # easier to parse; no env modification + ) + env = SudokuEnv(config) + env = SudokuWrapper(env, grid_size) + # Use env's own max_steps default if available, otherwise a sane cap + max_steps = int(grid_size * grid_size * 6) + env = gym.wrappers.TimeLimit(env, max_episode_steps=max_steps) + env = gym.wrappers.RecordEpisodeStatistics(env) + if capture_video and idx == 0: + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + return env + return thunk + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class Agent(nn.Module): + def __init__(self, envs): + super().__init__() + obs_shape = int(np.array(envs.single_observation_space.shape).prod()) + hidden = 128 + self.critic = nn.Sequential( + layer_init(nn.Linear(obs_shape, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, 1), std=1.0), + ) + self.actor = nn.Sequential( + layer_init(nn.Linear(obs_shape, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, envs.single_action_space.n), std=0.01), + ) + + def get_value(self, x): + return self.critic(x) + + def get_action_and_value(self, x, action=None): + logits = self.actor(x) + probs = Categorical(logits=logits) + if action is None: + action = probs.sample() + return action, probs.log_prob(action), probs.entropy(), self.critic(x) + + +if __name__ == "__main__": + args = tyro.cli(Args) + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + args.num_iterations = args.total_timesteps // args.batch_size + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + + if args.track: + import wandb + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + try: + wandb.define_metric("global_step") + for prefix in ["train/*", "rollout/*", "eval/*", "losses/*", "charts/*", "perf/*"]: + wandb.define_metric(prefix, step_metric="global_step") + except Exception: + pass + + # seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + # envs + envs = gym.vector.SyncVectorEnv([ + make_env(i, run_name, args.seed, args.grid_size, args.difficulty, args.capture_video) + for i in range(args.num_envs) + ]) + assert isinstance(envs.single_action_space, gym.spaces.Discrete) + + agent = Agent(envs).to(device) + optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5) + + # storage + obs = torch.zeros((args.num_steps, args.num_envs) + envs.single_observation_space.shape).to(device) + actions = torch.zeros((args.num_steps, args.num_envs) + envs.single_action_space.shape).to(device) + logprobs = torch.zeros((args.num_steps, args.num_envs)).to(device) + rewards = torch.zeros((args.num_steps, args.num_envs)).to(device) + dones = torch.zeros((args.num_steps, args.num_envs)).to(device) + values = torch.zeros((args.num_steps, args.num_envs)).to(device) + + # start + global_step = 0 + start_time = time.time() + next_obs, _ = envs.reset(seed=args.seed) + next_obs = torch.Tensor(next_obs).to(device) + next_done = torch.zeros(args.num_envs).to(device) + + episode_returns = [] + episode_steps = [] + episode_successes = [] + + # Eval helper identical to FrozenLake script + def collect_eval_trajectories(agent_model, make_env_fn, n_episodes, step_tag): + out_dir = Path(f"runs/{run_name}/trajectories/step_{step_tag}") + out_dir.mkdir(parents=True, exist_ok=True) + out_path = out_dir / "trajectories.jsonl" + env = make_env_fn() + collected = 0 + summary_returns = [] + summary_success = [] + with out_path.open("w") as f: + while collected < n_episodes: + state, _ = env.reset(seed=args.seed + collected) + traj_states = [state.tolist()] + traj_actions = [] + traj_rewards = [] + traj_dones = [] + traj_success = [] + done = False + step_count = 0 + max_eval_steps = getattr(env, '_max_episode_steps', None) or int(args.grid_size * args.grid_size * 6) + while not done: + with torch.no_grad(): + logits = agent_model.actor(torch.tensor(state, dtype=torch.float32, device=device).unsqueeze(0)) + # action = int(torch.argmax(logits, dim=1).item()) + probs = Categorical(logits=logits) + action = int(probs.sample().item()) + next_state, reward, terminated, truncated, info = env.step(action) + traj_actions.append(int(action)) + traj_rewards.append(float(reward)) + step_count += 1 + d = bool(terminated) or bool(truncated) or (step_count >= max_eval_steps) + traj_dones.append(d) + traj_success.append(bool(info.get('success', False))) + state = next_state + traj_states.append(state.tolist()) + done = d + ep_ret = float(sum(traj_rewards)) + ep_succ = bool(any(traj_success)) + record = { + "states": traj_states, + "actions": traj_actions, + "rewards": traj_rewards, + "dones": traj_dones, + "success": traj_success, + "episode_return": ep_ret, + "episode_success": ep_succ, + } + f.write(json.dumps(record) + "\n") + collected += 1 + summary_returns.append(ep_ret) + summary_success.append(1.0 if ep_succ else 0.0) + env.close() + try: + metrics = { + "global_step": int(step_tag), + "episodes": int(n_episodes), + "success_rate": float(np.mean(summary_success)) if len(summary_success) else 0.0, + "avg_return": float(np.mean(summary_returns)) if len(summary_returns) else 0.0, + "std_return": float(np.std(summary_returns)) if len(summary_returns) else 0.0, + } + with (out_dir / "metrics.json").open("w") as mf: + json.dump(metrics, mf) + except Exception as e: + print(f"Warning: failed to write eval metrics: {e}") + + eval_every_iters = max(1, args.num_iterations // args.eval_splits) + + # training loop + for iteration in range(1, args.num_iterations + 1): + # Anneal LR + if args.anneal_lr: + frac = 1.0 - (iteration - 1.0) / args.num_iterations + optimizer.param_groups[0]["lr"] = frac * args.learning_rate + + for step in range(0, args.num_steps): + global_step += args.num_envs + obs[step] = next_obs + dones[step] = next_done + + with torch.no_grad(): + action, logprob, _, value = agent.get_action_and_value(next_obs) + values[step] = value.flatten() + actions[step] = action + logprobs[step] = logprob + + next_obs, reward, terminations, truncations, infos = envs.step(action.cpu().numpy()) + next_done = np.logical_or(terminations, truncations) + rewards[step] = torch.tensor(reward).to(device).view(-1) + next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(next_done).to(device) + # Episode stats logging as in FrozenLake + try: + mask = None + if isinstance(infos, dict): + if "_episode" in infos: + mask = np.asarray(infos["_episode"]).astype(bool) + elif "episode" in infos and isinstance(infos["episode"], dict) and "_l" in infos["episode"]: + mask = np.asarray(infos["episode"]["_l"]).astype(bool) + if mask is not None and np.any(mask): + r_arr = np.asarray(infos.get("episode", {}).get("r", np.zeros_like(mask, dtype=float))) + l_arr = np.asarray(infos.get("episode", {}).get("l", np.zeros_like(mask, dtype=int))) + succ_arr = np.asarray(infos.get("success", np.zeros_like(mask, dtype=bool))).astype(float) + for i in np.where(mask)[0]: + ep_r = float(r_arr[i]) + ep_l = int(l_arr[i]) + ep_succ = float(succ_arr[i]) + episode_returns.append(ep_r) + episode_steps.append(global_step) + episode_successes.append(ep_succ) + if args.track: + try: + import wandb + log_dict = { + "global_step": int(global_step), + "rollout/ep_rew_mean": float(np.mean(r_arr[mask])) if np.any(mask) else None, + "rollout/ep_len_mean": float(np.mean(l_arr[mask])) if np.any(mask) else None, + "rollout/success_rate": float(np.mean(succ_arr[mask])) if np.any(mask) else None, + } + if np.any(mask): + last_idx = np.where(mask)[0][-1] + log_dict.update({ + "train/episodic_return": float(r_arr[last_idx]), + "train/episodic_length": int(l_arr[last_idx]), + "train/success": float(succ_arr[last_idx]), + "train/success_rate_100": float(np.mean(episode_successes[-100:])) if len(episode_successes) >= 100 else None, + }) + wandb.log(log_dict, step=global_step) + except Exception: + pass + except Exception: + pass + + # GAE + with torch.no_grad(): + next_value = agent.get_value(next_obs).reshape(1, -1) + advantages = torch.zeros_like(rewards).to(device) + lastgaelam = 0 + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + nextnonterminal = 1.0 - next_done + nextvalues = next_value + else: + nextnonterminal = 1.0 - dones[t + 1] + nextvalues = values[t + 1] + delta = rewards[t] + args.gamma * nextvalues * nextnonterminal - values[t] + advantages[t] = lastgaelam = delta + args.gamma * args.gae_lambda * nextnonterminal * lastgaelam + returns = advantages + values + + # flatten batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_logprobs = logprobs.reshape(-1) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_advantages = advantages.reshape(-1) + b_returns = returns.reshape(-1) + b_values = values.reshape(-1) + + # update + b_inds = np.arange(args.batch_size) + for epoch in range(args.update_epochs): + np.random.shuffle(b_inds) + for start in range(0, args.batch_size, args.minibatch_size): + end = start + args.minibatch_size + mb_inds = b_inds[start:end] + + _, newlogprob, entropy, newvalue = agent.get_action_and_value(b_obs[mb_inds], b_actions.long()[mb_inds]) + logratio = newlogprob - b_logprobs[mb_inds] + ratio = logratio.exp() + + with torch.no_grad(): + old_approx_kl = (-logratio).mean() + approx_kl = ((ratio - 1) - logratio).mean() + + mb_advantages = b_advantages[mb_inds] + if args.norm_adv: + mb_advantages = (mb_advantages - mb_advantages.mean()) / (mb_advantages.std() + 1e-8) + + pg_loss1 = -mb_advantages * ratio + pg_loss2 = -mb_advantages * torch.clamp(ratio, 1 - args.clip_coef, 1 + args.clip_coef) + pg_loss = torch.max(pg_loss1, pg_loss2).mean() + + newvalue = newvalue.view(-1) + if args.clip_vloss: + v_loss_unclipped = (newvalue - b_returns[mb_inds]) ** 2 + v_clipped = b_values[mb_inds] + torch.clamp( + newvalue - b_values[mb_inds], -args.clip_coef, args.clip_coef, + ) + v_loss_clipped = (v_clipped - b_returns[mb_inds]) ** 2 + v_loss = 0.5 * torch.max(v_loss_unclipped, v_loss_clipped).mean() + else: + v_loss = 0.5 * ((newvalue - b_returns[mb_inds]) ** 2).mean() + + entropy_loss = entropy.mean() + loss = pg_loss - args.ent_coef * entropy_loss + v_loss * args.vf_coef + + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(agent.parameters(), args.max_grad_norm) + optimizer.step() + + if args.target_kl is not None and approx_kl > args.target_kl: + break + + # logging + y_pred, y_true = b_values.cpu().numpy(), b_returns.cpu().numpy() + var_y = np.var(y_true) + explained_var = np.nan if var_y == 0 else 1 - np.var(y_true - y_pred) / var_y + + sps = int(global_step / (time.time() - start_time)) + progress = 100 * iteration / args.num_iterations + print(f"[{progress:5.1f}%] Iter {iteration:4d}/{args.num_iterations} | " + f"SPS: {sps:5d} | " + f"Reward: {rewards.mean().item():6.3f} | " + f"Value: {values.mean().item():6.3f} | " + f"VLoss: {v_loss.item():.4f} | " + f"PLoss: {pg_loss.item():.4f} | " + f"Ent: {entropy_loss.item():.4f}") + if args.track: + try: + import wandb + wandb.log({ + "global_step": int(global_step), + "train/value_loss": float(v_loss.item()), + "train/policy_loss": float(pg_loss.item()), + "train/entropy": float(entropy_loss.item()), + "train/old_approx_kl": float(old_approx_kl.item()), + "train/approx_kl": float(approx_kl.item()), + "losses/explained_variance": float(explained_var), + "charts/avg_reward": float(rewards.mean().item()), + "charts/avg_value": float(values.mean().item()), + "perf/SPS": int(sps), + "train/learning_rate": float(optimizer.param_groups[0]["lr"]), + }, step=global_step) + except Exception: + pass + + # periodic evaluation collection + if iteration % eval_every_iters == 0: + try: + eval_thunk = make_env(0, run_name, args.seed + 9999, args.grid_size, args.difficulty, False) + collect_eval_trajectories(agent, eval_thunk, n_episodes=args.eval_episodes, step_tag=global_step) + if args.track: + try: + import json as _json + from pathlib import Path as _Path + mpath = _Path(f"runs/{run_name}/trajectories/step_{global_step}/metrics.json") + if mpath.exists(): + with mpath.open("r") as mf: + metrics = _json.load(mf) + wandb.log({ + "eval/success_rate": metrics.get("success_rate"), + "eval/avg_return": metrics.get("avg_return"), + "eval/std_return": metrics.get("std_return"), + "eval/episodes": metrics.get("episodes"), + }, step=global_step) + except Exception: + pass + print(f"Collected {args.eval_episodes} eval trajectories at global_step {global_step}") + except Exception as e: + print(f"Warning: eval trajectory collection failed at step {global_step}: {e}") + + envs.close() diff --git a/cleanrl/cleanrl/ppo_trxl/enjoy.py b/cleanrl/cleanrl/ppo_trxl/enjoy.py new file mode 100644 index 0000000000000000000000000000000000000000..6c0310abe1a526f140f28844ee2e21cdfb2afa61 --- /dev/null +++ b/cleanrl/cleanrl/ppo_trxl/enjoy.py @@ -0,0 +1,91 @@ +from dataclasses import dataclass + +import gymnasium as gym +import torch +import tyro +from ppo_trxl import Agent, make_env + + +@dataclass +class Args: + hub: bool = False + """whether to load the model from the huggingface hub or from the local disk""" + name: str = "Endless-MortarMayhem-v0_12.nn" + """path to the model file""" + + +if __name__ == "__main__": + # Parse command line arguments and retrieve model path + cli_args = tyro.cli(Args) + if cli_args.hub: + try: + from huggingface_hub import hf_hub_download + + path = hf_hub_download(repo_id="LilHairdy/cleanrl_memory_gym", filename=cli_args.name) + except: + raise RuntimeError( + "Cannot load model from the huggingface hub. Please install the huggingface_hub pypi package and verify the model name. You can also download the model from the hub manually and load it from disk." + ) + else: + path = cli_args.name + + # Load the pre-trained model and the original args used to train it + checkpoint = torch.load(path) + args = checkpoint["args"] + args = type("Args", (), args) + + # Init environment and reset + env = make_env(args.env_id, 0, False, "", "human")() + obs, _ = env.reset() + env.render() + + # Determine maximum episode steps + max_episode_steps = env.spec.max_episode_steps + if not max_episode_steps: + max_episode_steps = env.max_episode_steps + if max_episode_steps <= 0: + max_episode_steps = 1024 # Memory Gym envs have max_episode_steps set to -1 + # May episode impacts positional encoding, so make sure to set this accordingly + + # Setup agent and load its model parameters + action_space_shape = ( + (env.action_space.n,) if isinstance(env.action_space, gym.spaces.Discrete) else tuple(env.action_space.nvec) + ) + agent = Agent(args, env.observation_space, action_space_shape, max_episode_steps) + agent.load_state_dict(checkpoint["model_weights"]) + + # Setup Transformer-XL memory, mask and indices + memory = torch.zeros((1, max_episode_steps, args.trxl_num_layers, args.trxl_dim), dtype=torch.float32) + memory_mask = torch.tril(torch.ones((args.trxl_memory_length, args.trxl_memory_length)), diagonal=-1) + repetitions = torch.repeat_interleave( + torch.arange(0, args.trxl_memory_length).unsqueeze(0), args.trxl_memory_length - 1, dim=0 + ).long() + memory_indices = torch.stack( + [torch.arange(i, i + args.trxl_memory_length) for i in range(max_episode_steps - args.trxl_memory_length + 1)] + ).long() + memory_indices = torch.cat((repetitions, memory_indices)) + + # Run episode + done = False + t = 0 + while not done: + # Prepare observation and memory + obs = torch.Tensor(obs).unsqueeze(0) + memory_window = memory[0, memory_indices[t].unsqueeze(0)] + t_ = max(0, min(t, args.trxl_memory_length - 1)) + mask = memory_mask[t_].unsqueeze(0) + indices = memory_indices[t].unsqueeze(0) + # Forward agent + action, _, _, _, new_memory = agent.get_action_and_value(obs, memory_window, mask, indices) + memory[:, t] = new_memory + # Step + obs, reward, termination, truncation, info = env.step(action.cpu().squeeze().numpy()) + env.render() + done = termination or truncation + t += 1 + + if "r" in info["episode"].keys(): + print(f"Episode return: {info['episode']['r'][0]}, Episode length: {info['episode']['l'][0]}") + else: + print(f"Episode return: {info['reward']}, Episode length: {info['length']}") + env.close() diff --git a/cleanrl/cleanrl/ppo_trxl/uv.lock b/cleanrl/cleanrl/ppo_trxl/uv.lock new file mode 100644 index 0000000000000000000000000000000000000000..f78071346ef9ad06448ef03949e88033d9e819f6 --- /dev/null +++ b/cleanrl/cleanrl/ppo_trxl/uv.lock @@ -0,0 +1,1220 @@ +version = 1 +revision = 2 +requires-python = ">=3.10, <4" +resolution-markers = [ + "python_full_version >= '3.12' and sys_platform == 'darwin'", + "python_full_version >= '3.12' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version >= '3.12' and platform_machine != 'aarch64' and sys_platform == 'linux'", + "python_full_version >= '3.12' and sys_platform != 'darwin' and sys_platform != 'linux'", + "python_full_version == '3.11.*' and sys_platform == 'darwin'", + "python_full_version == '3.11.*' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version == '3.11.*' and platform_machine != 'aarch64' and sys_platform == 'linux'", + "python_full_version == '3.11.*' and sys_platform != 'darwin' and sys_platform != 'linux'", + "python_full_version < '3.11' and sys_platform == 'darwin'", + "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux'", + "python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux'", +] + +[[package]] +name = "absl-py" +version = "2.3.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/10/2a/c93173ffa1b39c1d0395b7e842bbdc62e556ca9d8d3b5572926f3e4ca752/absl_py-2.3.1.tar.gz", hash = "sha256:a97820526f7fbfd2ec1bce83f3f25e3a14840dac0d8e02a0b71cd75db3f77fc9", size = 116588, upload-time = "2025-07-03T09:31:44.05Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/aa/ba0014cc4659328dc818a28827be78e6d97312ab0cb98105a770924dc11e/absl_py-2.3.1-py3-none-any.whl", hash = "sha256:eeecf07f0c2a93ace0772c92e596ace6d3d3996c042b2128459aaae2a76de11d", size = 135811, upload-time = "2025-07-03T09:31:42.253Z" }, +] + +[[package]] +name = "appdirs" +version = "1.4.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41", size = 13470, upload-time = "2020-05-11T07:59:51.037Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128", size = 9566, upload-time = "2020-05-11T07:59:49.499Z" }, +] + +[[package]] +name = "backports-shutil-get-terminal-size" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ec/9c/368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/backports.shutil_get_terminal_size-1.0.0.tar.gz", hash = "sha256:713e7a8228ae80341c70586d1cc0a8caa5207346927e23d09dcbcaf18eadec80", size = 4279, upload-time = "2014-08-19T18:42:49.082Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7d/cd/1750d6c35fe86d35f8562091737907f234b78fdffab42b29c72b1dd861f4/backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl", hash = "sha256:0975ba55054c15e346944b38956a4c9cbee9009391e41b86c68990effb8c1f64", size = 6497, upload-time = "2014-08-19T18:42:51.908Z" }, +] + +[[package]] +name = "certifi" +version = "2025.6.15" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/73/f7/f14b46d4bcd21092d7d3ccef689615220d8a08fb25e564b65d20738e672e/certifi-2025.6.15.tar.gz", hash = "sha256:d747aa5a8b9bbbb1bb8c22bb13e22bd1f18e9796defa16bab421f7f7a317323b", size = 158753, upload-time = "2025-06-15T02:45:51.329Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/84/ae/320161bd181fc06471eed047ecce67b693fd7515b16d495d8932db763426/certifi-2025.6.15-py3-none-any.whl", hash = "sha256:2e0c7ce7cb5d8f8634ca55d2ba7e6ec2689a2fd6537d8dec1296a477a4910057", size = 157650, upload-time = "2025-06-15T02:45:49.977Z" }, +] + +[[package]] +name = "charset-normalizer" +version = "3.4.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63", size = 126367, upload-time = "2025-05-02T08:34:42.01Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/95/28/9901804da60055b406e1a1c5ba7aac1276fb77f1dde635aabfc7fd84b8ab/charset_normalizer-3.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941", size = 201818, upload-time = "2025-05-02T08:31:46.725Z" }, + { url = "https://files.pythonhosted.org/packages/d9/9b/892a8c8af9110935e5adcbb06d9c6fe741b6bb02608c6513983048ba1a18/charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd", size = 144649, upload-time = "2025-05-02T08:31:48.889Z" }, + { url = "https://files.pythonhosted.org/packages/7b/a5/4179abd063ff6414223575e008593861d62abfc22455b5d1a44995b7c101/charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9cbfacf36cb0ec2897ce0ebc5d08ca44213af24265bd56eca54bee7923c48fd6", size = 155045, upload-time = "2025-05-02T08:31:50.757Z" }, + { url = "https://files.pythonhosted.org/packages/3b/95/bc08c7dfeddd26b4be8c8287b9bb055716f31077c8b0ea1cd09553794665/charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18dd2e350387c87dabe711b86f83c9c78af772c748904d372ade190b5c7c9d4d", size = 147356, upload-time = "2025-05-02T08:31:52.634Z" }, + { url = "https://files.pythonhosted.org/packages/a8/2d/7a5b635aa65284bf3eab7653e8b4151ab420ecbae918d3e359d1947b4d61/charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8075c35cd58273fee266c58c0c9b670947c19df5fb98e7b66710e04ad4e9ff86", size = 149471, upload-time = "2025-05-02T08:31:56.207Z" }, + { url = "https://files.pythonhosted.org/packages/ae/38/51fc6ac74251fd331a8cfdb7ec57beba8c23fd5493f1050f71c87ef77ed0/charset_normalizer-3.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5bf4545e3b962767e5c06fe1738f951f77d27967cb2caa64c28be7c4563e162c", size = 151317, upload-time = "2025-05-02T08:31:57.613Z" }, + { url = "https://files.pythonhosted.org/packages/b7/17/edee1e32215ee6e9e46c3e482645b46575a44a2d72c7dfd49e49f60ce6bf/charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7a6ab32f7210554a96cd9e33abe3ddd86732beeafc7a28e9955cdf22ffadbab0", size = 146368, upload-time = "2025-05-02T08:31:59.468Z" }, + { url = "https://files.pythonhosted.org/packages/26/2c/ea3e66f2b5f21fd00b2825c94cafb8c326ea6240cd80a91eb09e4a285830/charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b33de11b92e9f75a2b545d6e9b6f37e398d86c3e9e9653c4864eb7e89c5773ef", size = 154491, upload-time = "2025-05-02T08:32:01.219Z" }, + { url = "https://files.pythonhosted.org/packages/52/47/7be7fa972422ad062e909fd62460d45c3ef4c141805b7078dbab15904ff7/charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8755483f3c00d6c9a77f490c17e6ab0c8729e39e6390328e42521ef175380ae6", size = 157695, upload-time = "2025-05-02T08:32:03.045Z" }, + { url = "https://files.pythonhosted.org/packages/2f/42/9f02c194da282b2b340f28e5fb60762de1151387a36842a92b533685c61e/charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:68a328e5f55ec37c57f19ebb1fdc56a248db2e3e9ad769919a58672958e8f366", size = 154849, upload-time = "2025-05-02T08:32:04.651Z" }, + { url = "https://files.pythonhosted.org/packages/67/44/89cacd6628f31fb0b63201a618049be4be2a7435a31b55b5eb1c3674547a/charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:21b2899062867b0e1fde9b724f8aecb1af14f2778d69aacd1a5a1853a597a5db", size = 150091, upload-time = "2025-05-02T08:32:06.719Z" }, + { url = "https://files.pythonhosted.org/packages/1f/79/4b8da9f712bc079c0f16b6d67b099b0b8d808c2292c937f267d816ec5ecc/charset_normalizer-3.4.2-cp310-cp310-win32.whl", hash = "sha256:e8082b26888e2f8b36a042a58307d5b917ef2b1cacab921ad3323ef91901c71a", size = 98445, upload-time = "2025-05-02T08:32:08.66Z" }, + { url = "https://files.pythonhosted.org/packages/7d/d7/96970afb4fb66497a40761cdf7bd4f6fca0fc7bafde3a84f836c1f57a926/charset_normalizer-3.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:f69a27e45c43520f5487f27627059b64aaf160415589230992cec34c5e18a509", size = 105782, upload-time = "2025-05-02T08:32:10.46Z" }, + { url = "https://files.pythonhosted.org/packages/05/85/4c40d00dcc6284a1c1ad5de5e0996b06f39d8232f1031cd23c2f5c07ee86/charset_normalizer-3.4.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:be1e352acbe3c78727a16a455126d9ff83ea2dfdcbc83148d2982305a04714c2", size = 198794, upload-time = "2025-05-02T08:32:11.945Z" }, + { url = "https://files.pythonhosted.org/packages/41/d9/7a6c0b9db952598e97e93cbdfcb91bacd89b9b88c7c983250a77c008703c/charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa88ca0b1932e93f2d961bf3addbb2db902198dca337d88c89e1559e066e7645", size = 142846, upload-time = "2025-05-02T08:32:13.946Z" }, + { url = "https://files.pythonhosted.org/packages/66/82/a37989cda2ace7e37f36c1a8ed16c58cf48965a79c2142713244bf945c89/charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d524ba3f1581b35c03cb42beebab4a13e6cdad7b36246bd22541fa585a56cccd", size = 153350, upload-time = "2025-05-02T08:32:15.873Z" }, + { url = "https://files.pythonhosted.org/packages/df/68/a576b31b694d07b53807269d05ec3f6f1093e9545e8607121995ba7a8313/charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28a1005facc94196e1fb3e82a3d442a9d9110b8434fc1ded7a24a2983c9888d8", size = 145657, upload-time = "2025-05-02T08:32:17.283Z" }, + { url = "https://files.pythonhosted.org/packages/92/9b/ad67f03d74554bed3aefd56fe836e1623a50780f7c998d00ca128924a499/charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fdb20a30fe1175ecabed17cbf7812f7b804b8a315a25f24678bcdf120a90077f", size = 147260, upload-time = "2025-05-02T08:32:18.807Z" }, + { url = "https://files.pythonhosted.org/packages/a6/e6/8aebae25e328160b20e31a7e9929b1578bbdc7f42e66f46595a432f8539e/charset_normalizer-3.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0f5d9ed7f254402c9e7d35d2f5972c9bbea9040e99cd2861bd77dc68263277c7", size = 149164, upload-time = "2025-05-02T08:32:20.333Z" }, + { url = "https://files.pythonhosted.org/packages/8b/f2/b3c2f07dbcc248805f10e67a0262c93308cfa149a4cd3d1fe01f593e5fd2/charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:efd387a49825780ff861998cd959767800d54f8308936b21025326de4b5a42b9", size = 144571, upload-time = "2025-05-02T08:32:21.86Z" }, + { url = "https://files.pythonhosted.org/packages/60/5b/c3f3a94bc345bc211622ea59b4bed9ae63c00920e2e8f11824aa5708e8b7/charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f0aa37f3c979cf2546b73e8222bbfa3dc07a641585340179d768068e3455e544", size = 151952, upload-time = "2025-05-02T08:32:23.434Z" }, + { url = "https://files.pythonhosted.org/packages/e2/4d/ff460c8b474122334c2fa394a3f99a04cf11c646da895f81402ae54f5c42/charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e70e990b2137b29dc5564715de1e12701815dacc1d056308e2b17e9095372a82", size = 155959, upload-time = "2025-05-02T08:32:24.993Z" }, + { url = "https://files.pythonhosted.org/packages/a2/2b/b964c6a2fda88611a1fe3d4c400d39c66a42d6c169c924818c848f922415/charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0c8c57f84ccfc871a48a47321cfa49ae1df56cd1d965a09abe84066f6853b9c0", size = 153030, upload-time = "2025-05-02T08:32:26.435Z" }, + { url = "https://files.pythonhosted.org/packages/59/2e/d3b9811db26a5ebf444bc0fa4f4be5aa6d76fc6e1c0fd537b16c14e849b6/charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6b66f92b17849b85cad91259efc341dce9c1af48e2173bf38a85c6329f1033e5", size = 148015, upload-time = "2025-05-02T08:32:28.376Z" }, + { url = "https://files.pythonhosted.org/packages/90/07/c5fd7c11eafd561bb51220d600a788f1c8d77c5eef37ee49454cc5c35575/charset_normalizer-3.4.2-cp311-cp311-win32.whl", hash = "sha256:daac4765328a919a805fa5e2720f3e94767abd632ae410a9062dff5412bae65a", size = 98106, upload-time = "2025-05-02T08:32:30.281Z" }, + { url = "https://files.pythonhosted.org/packages/a8/05/5e33dbef7e2f773d672b6d79f10ec633d4a71cd96db6673625838a4fd532/charset_normalizer-3.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:e53efc7c7cee4c1e70661e2e112ca46a575f90ed9ae3fef200f2a25e954f4b28", size = 105402, upload-time = "2025-05-02T08:32:32.191Z" }, + { url = "https://files.pythonhosted.org/packages/d7/a4/37f4d6035c89cac7930395a35cc0f1b872e652eaafb76a6075943754f095/charset_normalizer-3.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7", size = 199936, upload-time = "2025-05-02T08:32:33.712Z" }, + { url = "https://files.pythonhosted.org/packages/ee/8a/1a5e33b73e0d9287274f899d967907cd0bf9c343e651755d9307e0dbf2b3/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3", size = 143790, upload-time = "2025-05-02T08:32:35.768Z" }, + { url = "https://files.pythonhosted.org/packages/66/52/59521f1d8e6ab1482164fa21409c5ef44da3e9f653c13ba71becdd98dec3/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a", size = 153924, upload-time = "2025-05-02T08:32:37.284Z" }, + { url = "https://files.pythonhosted.org/packages/86/2d/fb55fdf41964ec782febbf33cb64be480a6b8f16ded2dbe8db27a405c09f/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214", size = 146626, upload-time = "2025-05-02T08:32:38.803Z" }, + { url = "https://files.pythonhosted.org/packages/8c/73/6ede2ec59bce19b3edf4209d70004253ec5f4e319f9a2e3f2f15601ed5f7/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a", size = 148567, upload-time = "2025-05-02T08:32:40.251Z" }, + { url = "https://files.pythonhosted.org/packages/09/14/957d03c6dc343c04904530b6bef4e5efae5ec7d7990a7cbb868e4595ee30/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd", size = 150957, upload-time = "2025-05-02T08:32:41.705Z" }, + { url = "https://files.pythonhosted.org/packages/0d/c8/8174d0e5c10ccebdcb1b53cc959591c4c722a3ad92461a273e86b9f5a302/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981", size = 145408, upload-time = "2025-05-02T08:32:43.709Z" }, + { url = "https://files.pythonhosted.org/packages/58/aa/8904b84bc8084ac19dc52feb4f5952c6df03ffb460a887b42615ee1382e8/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c", size = 153399, upload-time = "2025-05-02T08:32:46.197Z" }, + { url = "https://files.pythonhosted.org/packages/c2/26/89ee1f0e264d201cb65cf054aca6038c03b1a0c6b4ae998070392a3ce605/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b", size = 156815, upload-time = "2025-05-02T08:32:48.105Z" }, + { url = "https://files.pythonhosted.org/packages/fd/07/68e95b4b345bad3dbbd3a8681737b4338ff2c9df29856a6d6d23ac4c73cb/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d", size = 154537, upload-time = "2025-05-02T08:32:49.719Z" }, + { url = "https://files.pythonhosted.org/packages/77/1a/5eefc0ce04affb98af07bc05f3bac9094513c0e23b0562d64af46a06aae4/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f", size = 149565, upload-time = "2025-05-02T08:32:51.404Z" }, + { url = "https://files.pythonhosted.org/packages/37/a0/2410e5e6032a174c95e0806b1a6585eb21e12f445ebe239fac441995226a/charset_normalizer-3.4.2-cp312-cp312-win32.whl", hash = "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c", size = 98357, upload-time = "2025-05-02T08:32:53.079Z" }, + { url = "https://files.pythonhosted.org/packages/6c/4f/c02d5c493967af3eda9c771ad4d2bbc8df6f99ddbeb37ceea6e8716a32bc/charset_normalizer-3.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e", size = 105776, upload-time = "2025-05-02T08:32:54.573Z" }, + { url = "https://files.pythonhosted.org/packages/ea/12/a93df3366ed32db1d907d7593a94f1fe6293903e3e92967bebd6950ed12c/charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0", size = 199622, upload-time = "2025-05-02T08:32:56.363Z" }, + { url = "https://files.pythonhosted.org/packages/04/93/bf204e6f344c39d9937d3c13c8cd5bbfc266472e51fc8c07cb7f64fcd2de/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf", size = 143435, upload-time = "2025-05-02T08:32:58.551Z" }, + { url = "https://files.pythonhosted.org/packages/22/2a/ea8a2095b0bafa6c5b5a55ffdc2f924455233ee7b91c69b7edfcc9e02284/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e", size = 153653, upload-time = "2025-05-02T08:33:00.342Z" }, + { url = "https://files.pythonhosted.org/packages/b6/57/1b090ff183d13cef485dfbe272e2fe57622a76694061353c59da52c9a659/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1", size = 146231, upload-time = "2025-05-02T08:33:02.081Z" }, + { url = "https://files.pythonhosted.org/packages/e2/28/ffc026b26f441fc67bd21ab7f03b313ab3fe46714a14b516f931abe1a2d8/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c", size = 148243, upload-time = "2025-05-02T08:33:04.063Z" }, + { url = "https://files.pythonhosted.org/packages/c0/0f/9abe9bd191629c33e69e47c6ef45ef99773320e9ad8e9cb08b8ab4a8d4cb/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691", size = 150442, upload-time = "2025-05-02T08:33:06.418Z" }, + { url = "https://files.pythonhosted.org/packages/67/7c/a123bbcedca91d5916c056407f89a7f5e8fdfce12ba825d7d6b9954a1a3c/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0", size = 145147, upload-time = "2025-05-02T08:33:08.183Z" }, + { url = "https://files.pythonhosted.org/packages/ec/fe/1ac556fa4899d967b83e9893788e86b6af4d83e4726511eaaad035e36595/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b", size = 153057, upload-time = "2025-05-02T08:33:09.986Z" }, + { url = "https://files.pythonhosted.org/packages/2b/ff/acfc0b0a70b19e3e54febdd5301a98b72fa07635e56f24f60502e954c461/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff", size = 156454, upload-time = "2025-05-02T08:33:11.814Z" }, + { url = "https://files.pythonhosted.org/packages/92/08/95b458ce9c740d0645feb0e96cea1f5ec946ea9c580a94adfe0b617f3573/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b", size = 154174, upload-time = "2025-05-02T08:33:13.707Z" }, + { url = "https://files.pythonhosted.org/packages/78/be/8392efc43487ac051eee6c36d5fbd63032d78f7728cb37aebcc98191f1ff/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148", size = 149166, upload-time = "2025-05-02T08:33:15.458Z" }, + { url = "https://files.pythonhosted.org/packages/44/96/392abd49b094d30b91d9fbda6a69519e95802250b777841cf3bda8fe136c/charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7", size = 98064, upload-time = "2025-05-02T08:33:17.06Z" }, + { url = "https://files.pythonhosted.org/packages/e9/b0/0200da600134e001d91851ddc797809e2fe0ea72de90e09bec5a2fbdaccb/charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980", size = 105641, upload-time = "2025-05-02T08:33:18.753Z" }, + { url = "https://files.pythonhosted.org/packages/20/94/c5790835a017658cbfabd07f3bfb549140c3ac458cfc196323996b10095a/charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0", size = 52626, upload-time = "2025-05-02T08:34:40.053Z" }, +] + +[[package]] +name = "click" +version = "8.2.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz", hash = "sha256:27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202", size = 286342, upload-time = "2025-05-20T23:19:49.832Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/85/32/10bb5764d90a8eee674e9dc6f4db6a0ab47c8c4d0d83c27f7c39ac415a4d/click-8.2.1-py3-none-any.whl", hash = "sha256:61a3265b914e850b85317d0b3109c7f8cd35a670f963866005d6ef1d5175a12b", size = 102215, upload-time = "2025-05-20T23:19:47.796Z" }, +] + +[[package]] +name = "cloudpickle" +version = "3.1.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/52/39/069100b84d7418bc358d81669d5748efb14b9cceacd2f9c75f550424132f/cloudpickle-3.1.1.tar.gz", hash = "sha256:b216fa8ae4019d5482a8ac3c95d8f6346115d8835911fd4aefd1a445e4242c64", size = 22113, upload-time = "2025-01-14T17:02:05.085Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/e8/64c37fadfc2816a7701fa8a6ed8d87327c7d54eacfbfb6edab14a2f2be75/cloudpickle-3.1.1-py3-none-any.whl", hash = "sha256:c8c5a44295039331ee9dad40ba100a9c7297b6f988e50e87ccdf3765a668350e", size = 20992, upload-time = "2025-01-14T17:02:02.417Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "docker-pycreds" +version = "0.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c5/e6/d1f6c00b7221e2d7c4b470132c931325c8b22c51ca62417e300f5ce16009/docker-pycreds-0.4.0.tar.gz", hash = "sha256:6ce3270bcaf404cc4c3e27e4b6c70d3521deae82fb508767870fdbf772d584d4", size = 8754, upload-time = "2018-11-29T03:26:50.996Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f5/e8/f6bd1eee09314e7e6dee49cbe2c5e22314ccdb38db16c9fc72d2fa80d054/docker_pycreds-0.4.0-py2.py3-none-any.whl", hash = "sha256:7266112468627868005106ec19cd0d722702d2b7d5912a28e19b826c3d37af49", size = 8982, upload-time = "2018-11-29T03:26:49.575Z" }, +] + +[[package]] +name = "docstring-parser" +version = "0.16" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/08/12/9c22a58c0b1e29271051222d8906257616da84135af9ed167c9e28f85cb3/docstring_parser-0.16.tar.gz", hash = "sha256:538beabd0af1e2db0146b6bd3caa526c35a34d61af9fd2887f3a8a27a739aa6e", size = 26565, upload-time = "2024-03-15T10:39:44.419Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d5/7c/e9fcff7623954d86bdc17782036cbf715ecab1bec4847c008557affe1ca8/docstring_parser-0.16-py3-none-any.whl", hash = "sha256:bf0a1387354d3691d102edef7ec124f219ef639982d096e26e3b60aeffa90637", size = 36533, upload-time = "2024-03-15T10:39:41.527Z" }, +] + +[[package]] +name = "einops" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/74/6b/84ea8ea496b32a9c9331e7ca0529c670e1de0af239f597bf4f783e4a5396/einops-0.7.0.tar.gz", hash = "sha256:b2b04ad6081a3b227080c9bf5e3ace7160357ff03043cd66cc5b2319eb7031d1", size = 58522, upload-time = "2023-10-01T01:13:47.95Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/29/0b/2d1c0ebfd092e25935b86509a9a817159212d82aa43d7fb07eca4eeff2c2/einops-0.7.0-py3-none-any.whl", hash = "sha256:0f3096f26b914f465f6ff3c66f5478f9a5e380bb367ffc6493a68143fbbf1fd1", size = 44599, upload-time = "2023-10-01T01:13:46.178Z" }, +] + +[[package]] +name = "farama-notifications" +version = "0.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2e/2c/8384832b7a6b1fd6ba95bbdcae26e7137bb3eedc955c42fd5cdcc086cfbf/Farama-Notifications-0.0.4.tar.gz", hash = "sha256:13fceff2d14314cf80703c8266462ebf3733c7d165336eee998fc58e545efd18", size = 2131, upload-time = "2023-02-27T18:28:41.047Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/05/2c/ffc08c54c05cdce6fbed2aeebc46348dbe180c6d2c541c7af7ba0aa5f5f8/Farama_Notifications-0.0.4-py3-none-any.whl", hash = "sha256:14de931035a41961f7c056361dc7f980762a143d05791ef5794a751a2caf05ae", size = 2511, upload-time = "2023-02-27T18:28:39.447Z" }, +] + +[[package]] +name = "filelock" +version = "3.18.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz", hash = "sha256:adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2", size = 18075, upload-time = "2025-03-14T07:11:40.47Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4d/36/2a115987e2d8c300a974597416d9de88f2444426de9571f4b59b2cca3acc/filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de", size = 16215, upload-time = "2025-03-14T07:11:39.145Z" }, +] + +[[package]] +name = "fsspec" +version = "2025.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/00/f7/27f15d41f0ed38e8fcc488584b57e902b331da7f7c6dcda53721b15838fc/fsspec-2025.5.1.tar.gz", hash = "sha256:2e55e47a540b91843b755e83ded97c6e897fa0942b11490113f09e9c443c2475", size = 303033, upload-time = "2025-05-24T12:03:23.792Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bb/61/78c7b3851add1481b048b5fdc29067397a1784e2910592bc81bb3f608635/fsspec-2025.5.1-py3-none-any.whl", hash = "sha256:24d3a2e663d5fc735ab256263c4075f374a174c3410c0b25e5bd1970bceaa462", size = 199052, upload-time = "2025-05-24T12:03:21.66Z" }, +] + +[[package]] +name = "gitdb" +version = "4.0.12" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "smmap" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz", hash = "sha256:5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571", size = 394684, upload-time = "2025-01-02T07:20:46.413Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/61/5c78b91c3143ed5c14207f463aecfc8f9dbb5092fb2869baf37c273b2705/gitdb-4.0.12-py3-none-any.whl", hash = "sha256:67073e15955400952c6565cc3e707c554a4eea2e428946f7a4c162fab9bd9bcf", size = 62794, upload-time = "2025-01-02T07:20:43.624Z" }, +] + +[[package]] +name = "gitpython" +version = "3.1.44" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "gitdb" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c0/89/37df0b71473153574a5cdef8f242de422a0f5d26d7a9e231e6f169b4ad14/gitpython-3.1.44.tar.gz", hash = "sha256:c87e30b26253bf5418b01b0660f818967f3c503193838337fe5e573331249269", size = 214196, upload-time = "2025-01-02T07:32:43.59Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1d/9a/4114a9057db2f1462d5c8f8390ab7383925fe1ac012eaa42402ad65c2963/GitPython-3.1.44-py3-none-any.whl", hash = "sha256:9e0e10cda9bed1ee64bc9a6de50e7e38a9c9943241cd7f585f6df3ed28011110", size = 207599, upload-time = "2025-01-02T07:32:40.731Z" }, +] + +[[package]] +name = "grpcio" +version = "1.73.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/79/e8/b43b851537da2e2f03fa8be1aef207e5cbfb1a2e014fbb6b40d24c177cd3/grpcio-1.73.1.tar.gz", hash = "sha256:7fce2cd1c0c1116cf3850564ebfc3264fba75d3c74a7414373f1238ea365ef87", size = 12730355, upload-time = "2025-06-26T01:53:24.622Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/51/a5748ab2773d893d099b92653039672f7e26dd35741020972b84d604066f/grpcio-1.73.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:2d70f4ddd0a823436c2624640570ed6097e40935c9194482475fe8e3d9754d55", size = 5365087, upload-time = "2025-06-26T01:51:44.541Z" }, + { url = "https://files.pythonhosted.org/packages/ae/12/c5ee1a5dfe93dbc2eaa42a219e2bf887250b52e2e2ee5c036c4695f2769c/grpcio-1.73.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:3841a8a5a66830261ab6a3c2a3dc539ed84e4ab019165f77b3eeb9f0ba621f26", size = 10608921, upload-time = "2025-06-26T01:51:48.111Z" }, + { url = "https://files.pythonhosted.org/packages/c4/6d/b0c6a8120f02b7d15c5accda6bfc43bc92be70ada3af3ba6d8e077c00374/grpcio-1.73.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:628c30f8e77e0258ab788750ec92059fc3d6628590fb4b7cea8c102503623ed7", size = 5803221, upload-time = "2025-06-26T01:51:50.486Z" }, + { url = "https://files.pythonhosted.org/packages/a6/7a/3c886d9f1c1e416ae81f7f9c7d1995ae72cd64712d29dab74a6bafacb2d2/grpcio-1.73.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:67a0468256c9db6d5ecb1fde4bf409d016f42cef649323f0a08a72f352d1358b", size = 6444603, upload-time = "2025-06-26T01:51:52.203Z" }, + { url = "https://files.pythonhosted.org/packages/42/07/f143a2ff534982c9caa1febcad1c1073cdec732f6ac7545d85555a900a7e/grpcio-1.73.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68b84d65bbdebd5926eb5c53b0b9ec3b3f83408a30e4c20c373c5337b4219ec5", size = 6040969, upload-time = "2025-06-26T01:51:55.028Z" }, + { url = "https://files.pythonhosted.org/packages/fb/0f/523131b7c9196d0718e7b2dac0310eb307b4117bdbfef62382e760f7e8bb/grpcio-1.73.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c54796ca22b8349cc594d18b01099e39f2b7ffb586ad83217655781a350ce4da", size = 6132201, upload-time = "2025-06-26T01:51:56.867Z" }, + { url = "https://files.pythonhosted.org/packages/ad/18/010a055410eef1d3a7a1e477ec9d93b091ac664ad93e9c5f56d6cc04bdee/grpcio-1.73.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:75fc8e543962ece2f7ecd32ada2d44c0c8570ae73ec92869f9af8b944863116d", size = 6774718, upload-time = "2025-06-26T01:51:58.338Z" }, + { url = "https://files.pythonhosted.org/packages/16/11/452bfc1ab39d8ee748837ab8ee56beeae0290861052948785c2c445fb44b/grpcio-1.73.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6a6037891cd2b1dd1406b388660522e1565ed340b1fea2955b0234bdd941a862", size = 6304362, upload-time = "2025-06-26T01:51:59.802Z" }, + { url = "https://files.pythonhosted.org/packages/1e/1c/c75ceee626465721e5cb040cf4b271eff817aa97388948660884cb7adffa/grpcio-1.73.1-cp310-cp310-win32.whl", hash = "sha256:cce7265b9617168c2d08ae570fcc2af4eaf72e84f8c710ca657cc546115263af", size = 3679036, upload-time = "2025-06-26T01:52:01.817Z" }, + { url = "https://files.pythonhosted.org/packages/62/2e/42cb31b6cbd671a7b3dbd97ef33f59088cf60e3cf2141368282e26fafe79/grpcio-1.73.1-cp310-cp310-win_amd64.whl", hash = "sha256:6a2b372e65fad38842050943f42ce8fee00c6f2e8ea4f7754ba7478d26a356ee", size = 4340208, upload-time = "2025-06-26T01:52:03.674Z" }, + { url = "https://files.pythonhosted.org/packages/e4/41/921565815e871d84043e73e2c0e748f0318dab6fa9be872cd042778f14a9/grpcio-1.73.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:ba2cea9f7ae4bc21f42015f0ec98f69ae4179848ad744b210e7685112fa507a1", size = 5363853, upload-time = "2025-06-26T01:52:05.5Z" }, + { url = "https://files.pythonhosted.org/packages/b0/cc/9c51109c71d068e4d474becf5f5d43c9d63038cec1b74112978000fa72f4/grpcio-1.73.1-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:d74c3f4f37b79e746271aa6cdb3a1d7e4432aea38735542b23adcabaaee0c097", size = 10621476, upload-time = "2025-06-26T01:52:07.211Z" }, + { url = "https://files.pythonhosted.org/packages/8f/d3/33d738a06f6dbd4943f4d377468f8299941a7c8c6ac8a385e4cef4dd3c93/grpcio-1.73.1-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:5b9b1805a7d61c9e90541cbe8dfe0a593dfc8c5c3a43fe623701b6a01b01d710", size = 5807903, upload-time = "2025-06-26T01:52:09.466Z" }, + { url = "https://files.pythonhosted.org/packages/5d/47/36deacd3c967b74e0265f4c608983e897d8bb3254b920f8eafdf60e4ad7e/grpcio-1.73.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3215f69a0670a8cfa2ab53236d9e8026bfb7ead5d4baabe7d7dc11d30fda967", size = 6448172, upload-time = "2025-06-26T01:52:11.459Z" }, + { url = "https://files.pythonhosted.org/packages/0e/64/12d6dc446021684ee1428ea56a3f3712048a18beeadbdefa06e6f8814a6e/grpcio-1.73.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc5eccfd9577a5dc7d5612b2ba90cca4ad14c6d949216c68585fdec9848befb1", size = 6044226, upload-time = "2025-06-26T01:52:12.987Z" }, + { url = "https://files.pythonhosted.org/packages/72/4b/6bae2d88a006000f1152d2c9c10ffd41d0131ca1198e0b661101c2e30ab9/grpcio-1.73.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:dc7d7fd520614fce2e6455ba89791458020a39716951c7c07694f9dbae28e9c0", size = 6135690, upload-time = "2025-06-26T01:52:14.92Z" }, + { url = "https://files.pythonhosted.org/packages/38/64/02c83b5076510784d1305025e93e0d78f53bb6a0213c8c84cfe8a00c5c48/grpcio-1.73.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:105492124828911f85127e4825d1c1234b032cb9d238567876b5515d01151379", size = 6775867, upload-time = "2025-06-26T01:52:16.446Z" }, + { url = "https://files.pythonhosted.org/packages/42/72/a13ff7ba6c68ccffa35dacdc06373a76c0008fd75777cba84d7491956620/grpcio-1.73.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:610e19b04f452ba6f402ac9aa94eb3d21fbc94553368008af634812c4a85a99e", size = 6308380, upload-time = "2025-06-26T01:52:18.417Z" }, + { url = "https://files.pythonhosted.org/packages/65/ae/d29d948021faa0070ec33245c1ae354e2aefabd97e6a9a7b6dcf0fb8ef6b/grpcio-1.73.1-cp311-cp311-win32.whl", hash = "sha256:d60588ab6ba0ac753761ee0e5b30a29398306401bfbceffe7d68ebb21193f9d4", size = 3679139, upload-time = "2025-06-26T01:52:20.171Z" }, + { url = "https://files.pythonhosted.org/packages/af/66/e1bbb0c95ea222947f0829b3db7692c59b59bcc531df84442e413fa983d9/grpcio-1.73.1-cp311-cp311-win_amd64.whl", hash = "sha256:6957025a4608bb0a5ff42abd75bfbb2ed99eda29d5992ef31d691ab54b753643", size = 4342558, upload-time = "2025-06-26T01:52:22.137Z" }, + { url = "https://files.pythonhosted.org/packages/b8/41/456caf570c55d5ac26f4c1f2db1f2ac1467d5bf3bcd660cba3e0a25b195f/grpcio-1.73.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:921b25618b084e75d424a9f8e6403bfeb7abef074bb6c3174701e0f2542debcf", size = 5334621, upload-time = "2025-06-26T01:52:23.602Z" }, + { url = "https://files.pythonhosted.org/packages/2a/c2/9a15e179e49f235bb5e63b01590658c03747a43c9775e20c4e13ca04f4c4/grpcio-1.73.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:277b426a0ed341e8447fbf6c1d6b68c952adddf585ea4685aa563de0f03df887", size = 10601131, upload-time = "2025-06-26T01:52:25.691Z" }, + { url = "https://files.pythonhosted.org/packages/0c/1d/1d39e90ef6348a0964caa7c5c4d05f3bae2c51ab429eb7d2e21198ac9b6d/grpcio-1.73.1-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:96c112333309493c10e118d92f04594f9055774757f5d101b39f8150f8c25582", size = 5759268, upload-time = "2025-06-26T01:52:27.631Z" }, + { url = "https://files.pythonhosted.org/packages/8a/2b/2dfe9ae43de75616177bc576df4c36d6401e0959833b2e5b2d58d50c1f6b/grpcio-1.73.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f48e862aed925ae987eb7084409a80985de75243389dc9d9c271dd711e589918", size = 6409791, upload-time = "2025-06-26T01:52:29.711Z" }, + { url = "https://files.pythonhosted.org/packages/6e/66/e8fe779b23b5a26d1b6949e5c70bc0a5fd08f61a6ec5ac7760d589229511/grpcio-1.73.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83a6c2cce218e28f5040429835fa34a29319071079e3169f9543c3fbeff166d2", size = 6003728, upload-time = "2025-06-26T01:52:31.352Z" }, + { url = "https://files.pythonhosted.org/packages/a9/39/57a18fcef567784108c4fc3f5441cb9938ae5a51378505aafe81e8e15ecc/grpcio-1.73.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:65b0458a10b100d815a8426b1442bd17001fdb77ea13665b2f7dc9e8587fdc6b", size = 6103364, upload-time = "2025-06-26T01:52:33.028Z" }, + { url = "https://files.pythonhosted.org/packages/c5/46/28919d2aa038712fc399d02fa83e998abd8c1f46c2680c5689deca06d1b2/grpcio-1.73.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:0a9f3ea8dce9eae9d7cb36827200133a72b37a63896e0e61a9d5ec7d61a59ab1", size = 6749194, upload-time = "2025-06-26T01:52:34.734Z" }, + { url = "https://files.pythonhosted.org/packages/3d/56/3898526f1fad588c5d19a29ea0a3a4996fb4fa7d7c02dc1be0c9fd188b62/grpcio-1.73.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:de18769aea47f18e782bf6819a37c1c528914bfd5683b8782b9da356506190c8", size = 6283902, upload-time = "2025-06-26T01:52:36.503Z" }, + { url = "https://files.pythonhosted.org/packages/dc/64/18b77b89c5870d8ea91818feb0c3ffb5b31b48d1b0ee3e0f0d539730fea3/grpcio-1.73.1-cp312-cp312-win32.whl", hash = "sha256:24e06a5319e33041e322d32c62b1e728f18ab8c9dbc91729a3d9f9e3ed336642", size = 3668687, upload-time = "2025-06-26T01:52:38.678Z" }, + { url = "https://files.pythonhosted.org/packages/3c/52/302448ca6e52f2a77166b2e2ed75f5d08feca4f2145faf75cb768cccb25b/grpcio-1.73.1-cp312-cp312-win_amd64.whl", hash = "sha256:303c8135d8ab176f8038c14cc10d698ae1db9c480f2b2823f7a987aa2a4c5646", size = 4334887, upload-time = "2025-06-26T01:52:40.743Z" }, + { url = "https://files.pythonhosted.org/packages/37/bf/4ca20d1acbefabcaba633ab17f4244cbbe8eca877df01517207bd6655914/grpcio-1.73.1-cp313-cp313-linux_armv7l.whl", hash = "sha256:b310824ab5092cf74750ebd8a8a8981c1810cb2b363210e70d06ef37ad80d4f9", size = 5335615, upload-time = "2025-06-26T01:52:42.896Z" }, + { url = "https://files.pythonhosted.org/packages/75/ed/45c345f284abec5d4f6d77cbca9c52c39b554397eb7de7d2fcf440bcd049/grpcio-1.73.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:8f5a6df3fba31a3485096ac85b2e34b9666ffb0590df0cd044f58694e6a1f6b5", size = 10595497, upload-time = "2025-06-26T01:52:44.695Z" }, + { url = "https://files.pythonhosted.org/packages/a4/75/bff2c2728018f546d812b755455014bc718f8cdcbf5c84f1f6e5494443a8/grpcio-1.73.1-cp313-cp313-manylinux_2_17_aarch64.whl", hash = "sha256:052e28fe9c41357da42250a91926a3e2f74c046575c070b69659467ca5aa976b", size = 5765321, upload-time = "2025-06-26T01:52:46.871Z" }, + { url = "https://files.pythonhosted.org/packages/70/3b/14e43158d3b81a38251b1d231dfb45a9b492d872102a919fbf7ba4ac20cd/grpcio-1.73.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c0bf15f629b1497436596b1cbddddfa3234273490229ca29561209778ebe182", size = 6415436, upload-time = "2025-06-26T01:52:49.134Z" }, + { url = "https://files.pythonhosted.org/packages/e5/3f/81d9650ca40b54338336fd360f36773be8cb6c07c036e751d8996eb96598/grpcio-1.73.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ab860d5bfa788c5a021fba264802e2593688cd965d1374d31d2b1a34cacd854", size = 6007012, upload-time = "2025-06-26T01:52:51.076Z" }, + { url = "https://files.pythonhosted.org/packages/55/f4/59edf5af68d684d0f4f7ad9462a418ac517201c238551529098c9aa28cb0/grpcio-1.73.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:ad1d958c31cc91ab050bd8a91355480b8e0683e21176522bacea225ce51163f2", size = 6105209, upload-time = "2025-06-26T01:52:52.773Z" }, + { url = "https://files.pythonhosted.org/packages/e4/a8/700d034d5d0786a5ba14bfa9ce974ed4c976936c2748c2bd87aa50f69b36/grpcio-1.73.1-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:f43ffb3bd415c57224c7427bfb9e6c46a0b6e998754bfa0d00f408e1873dcbb5", size = 6753655, upload-time = "2025-06-26T01:52:55.064Z" }, + { url = "https://files.pythonhosted.org/packages/1f/29/efbd4ac837c23bc48e34bbaf32bd429f0dc9ad7f80721cdb4622144c118c/grpcio-1.73.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:686231cdd03a8a8055f798b2b54b19428cdf18fa1549bee92249b43607c42668", size = 6287288, upload-time = "2025-06-26T01:52:57.33Z" }, + { url = "https://files.pythonhosted.org/packages/d8/61/c6045d2ce16624bbe18b5d169c1a5ce4d6c3a47bc9d0e5c4fa6a50ed1239/grpcio-1.73.1-cp313-cp313-win32.whl", hash = "sha256:89018866a096e2ce21e05eabed1567479713ebe57b1db7cbb0f1e3b896793ba4", size = 3668151, upload-time = "2025-06-26T01:52:59.405Z" }, + { url = "https://files.pythonhosted.org/packages/c2/d7/77ac689216daee10de318db5aa1b88d159432dc76a130948a56b3aa671a2/grpcio-1.73.1-cp313-cp313-win_amd64.whl", hash = "sha256:4a68f8c9966b94dff693670a5cf2b54888a48a5011c5d9ce2295a1a1465ee84f", size = 4335747, upload-time = "2025-06-26T01:53:01.233Z" }, +] + +[[package]] +name = "gymnasium" +version = "0.29.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cloudpickle" }, + { name = "farama-notifications" }, + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.3.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5a/40/77566cb53866adba5ab91f7d59e3d10c8d0cbab59ae0839b05f60c797b6c/gymnasium-0.29.0.tar.gz", hash = "sha256:f012a2001fbbcbf70d0a2bff311aa3173efd6e3131811ab30ae06d43d31e94af", size = 820118, upload-time = "2023-07-14T22:49:04.521Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3f/00/a728a4a8608213482fc38d76d842657d29b546f214e83801a044de074612/gymnasium-0.29.0-py3-none-any.whl", hash = "sha256:14a0e6ea9c4d34c0cd6e42e08c51e281834e9a83dc99b044427c9c6abf3b2a2b", size = 953762, upload-time = "2023-07-14T22:49:02.325Z" }, +] + +[[package]] +name = "idna" +version = "3.10" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", size = 190490, upload-time = "2024-09-15T18:07:39.745Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442, upload-time = "2024-09-15T18:07:37.964Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "markdown" +version = "3.8.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/c2/4ab49206c17f75cb08d6311171f2d65798988db4360c4d1485bd0eedd67c/markdown-3.8.2.tar.gz", hash = "sha256:247b9a70dd12e27f67431ce62523e675b866d254f900c4fe75ce3dda62237c45", size = 362071, upload-time = "2025-06-19T17:12:44.483Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/96/2b/34cc11786bc00d0f04d0f5fdc3a2b1ae0b6239eef72d3d345805f9ad92a1/markdown-3.8.2-py3-none-any.whl", hash = "sha256:5c83764dbd4e00bdd94d85a19b8d55ccca20fe35b2e678a1422b380324dd5f24", size = 106827, upload-time = "2025-06-19T17:12:42.994Z" }, +] + +[[package]] +name = "markdown-it-py" +version = "3.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mdurl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb", size = 74596, upload-time = "2023-06-03T06:41:14.443Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1", size = 87528, upload-time = "2023-06-03T06:41:11.019Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", size = 20537, upload-time = "2024-10-18T15:21:54.129Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/90/d08277ce111dd22f77149fd1a5d4653eeb3b3eaacbdfcbae5afb2600eebd/MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8", size = 14357, upload-time = "2024-10-18T15:20:51.44Z" }, + { url = "https://files.pythonhosted.org/packages/04/e1/6e2194baeae0bca1fae6629dc0cbbb968d4d941469cbab11a3872edff374/MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158", size = 12393, upload-time = "2024-10-18T15:20:52.426Z" }, + { url = "https://files.pythonhosted.org/packages/1d/69/35fa85a8ece0a437493dc61ce0bb6d459dcba482c34197e3efc829aa357f/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579", size = 21732, upload-time = "2024-10-18T15:20:53.578Z" }, + { url = "https://files.pythonhosted.org/packages/22/35/137da042dfb4720b638d2937c38a9c2df83fe32d20e8c8f3185dbfef05f7/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d", size = 20866, upload-time = "2024-10-18T15:20:55.06Z" }, + { url = "https://files.pythonhosted.org/packages/29/28/6d029a903727a1b62edb51863232152fd335d602def598dade38996887f0/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb", size = 20964, upload-time = "2024-10-18T15:20:55.906Z" }, + { url = "https://files.pythonhosted.org/packages/cc/cd/07438f95f83e8bc028279909d9c9bd39e24149b0d60053a97b2bc4f8aa51/MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b", size = 21977, upload-time = "2024-10-18T15:20:57.189Z" }, + { url = "https://files.pythonhosted.org/packages/29/01/84b57395b4cc062f9c4c55ce0df7d3108ca32397299d9df00fedd9117d3d/MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c", size = 21366, upload-time = "2024-10-18T15:20:58.235Z" }, + { url = "https://files.pythonhosted.org/packages/bd/6e/61ebf08d8940553afff20d1fb1ba7294b6f8d279df9fd0c0db911b4bbcfd/MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171", size = 21091, upload-time = "2024-10-18T15:20:59.235Z" }, + { url = "https://files.pythonhosted.org/packages/11/23/ffbf53694e8c94ebd1e7e491de185124277964344733c45481f32ede2499/MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50", size = 15065, upload-time = "2024-10-18T15:21:00.307Z" }, + { url = "https://files.pythonhosted.org/packages/44/06/e7175d06dd6e9172d4a69a72592cb3f7a996a9c396eee29082826449bbc3/MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a", size = 15514, upload-time = "2024-10-18T15:21:01.122Z" }, + { url = "https://files.pythonhosted.org/packages/6b/28/bbf83e3f76936960b850435576dd5e67034e200469571be53f69174a2dfd/MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d", size = 14353, upload-time = "2024-10-18T15:21:02.187Z" }, + { url = "https://files.pythonhosted.org/packages/6c/30/316d194b093cde57d448a4c3209f22e3046c5bb2fb0820b118292b334be7/MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93", size = 12392, upload-time = "2024-10-18T15:21:02.941Z" }, + { url = "https://files.pythonhosted.org/packages/f2/96/9cdafba8445d3a53cae530aaf83c38ec64c4d5427d975c974084af5bc5d2/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832", size = 23984, upload-time = "2024-10-18T15:21:03.953Z" }, + { url = "https://files.pythonhosted.org/packages/f1/a4/aefb044a2cd8d7334c8a47d3fb2c9f328ac48cb349468cc31c20b539305f/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84", size = 23120, upload-time = "2024-10-18T15:21:06.495Z" }, + { url = "https://files.pythonhosted.org/packages/8d/21/5e4851379f88f3fad1de30361db501300d4f07bcad047d3cb0449fc51f8c/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca", size = 23032, upload-time = "2024-10-18T15:21:07.295Z" }, + { url = "https://files.pythonhosted.org/packages/00/7b/e92c64e079b2d0d7ddf69899c98842f3f9a60a1ae72657c89ce2655c999d/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798", size = 24057, upload-time = "2024-10-18T15:21:08.073Z" }, + { url = "https://files.pythonhosted.org/packages/f9/ac/46f960ca323037caa0a10662ef97d0a4728e890334fc156b9f9e52bcc4ca/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e", size = 23359, upload-time = "2024-10-18T15:21:09.318Z" }, + { url = "https://files.pythonhosted.org/packages/69/84/83439e16197337b8b14b6a5b9c2105fff81d42c2a7c5b58ac7b62ee2c3b1/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4", size = 23306, upload-time = "2024-10-18T15:21:10.185Z" }, + { url = "https://files.pythonhosted.org/packages/9a/34/a15aa69f01e2181ed8d2b685c0d2f6655d5cca2c4db0ddea775e631918cd/MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d", size = 15094, upload-time = "2024-10-18T15:21:11.005Z" }, + { url = "https://files.pythonhosted.org/packages/da/b8/3a3bd761922d416f3dc5d00bfbed11f66b1ab89a0c2b6e887240a30b0f6b/MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b", size = 15521, upload-time = "2024-10-18T15:21:12.911Z" }, + { url = "https://files.pythonhosted.org/packages/22/09/d1f21434c97fc42f09d290cbb6350d44eb12f09cc62c9476effdb33a18aa/MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", size = 14274, upload-time = "2024-10-18T15:21:13.777Z" }, + { url = "https://files.pythonhosted.org/packages/6b/b0/18f76bba336fa5aecf79d45dcd6c806c280ec44538b3c13671d49099fdd0/MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", size = 12348, upload-time = "2024-10-18T15:21:14.822Z" }, + { url = "https://files.pythonhosted.org/packages/e0/25/dd5c0f6ac1311e9b40f4af06c78efde0f3b5cbf02502f8ef9501294c425b/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", size = 24149, upload-time = "2024-10-18T15:21:15.642Z" }, + { url = "https://files.pythonhosted.org/packages/f3/f0/89e7aadfb3749d0f52234a0c8c7867877876e0a20b60e2188e9850794c17/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", size = 23118, upload-time = "2024-10-18T15:21:17.133Z" }, + { url = "https://files.pythonhosted.org/packages/d5/da/f2eeb64c723f5e3777bc081da884b414671982008c47dcc1873d81f625b6/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", size = 22993, upload-time = "2024-10-18T15:21:18.064Z" }, + { url = "https://files.pythonhosted.org/packages/da/0e/1f32af846df486dce7c227fe0f2398dc7e2e51d4a370508281f3c1c5cddc/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", size = 24178, upload-time = "2024-10-18T15:21:18.859Z" }, + { url = "https://files.pythonhosted.org/packages/c4/f6/bb3ca0532de8086cbff5f06d137064c8410d10779c4c127e0e47d17c0b71/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", size = 23319, upload-time = "2024-10-18T15:21:19.671Z" }, + { url = "https://files.pythonhosted.org/packages/a2/82/8be4c96ffee03c5b4a034e60a31294daf481e12c7c43ab8e34a1453ee48b/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", size = 23352, upload-time = "2024-10-18T15:21:20.971Z" }, + { url = "https://files.pythonhosted.org/packages/51/ae/97827349d3fcffee7e184bdf7f41cd6b88d9919c80f0263ba7acd1bbcb18/MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", size = 15097, upload-time = "2024-10-18T15:21:22.646Z" }, + { url = "https://files.pythonhosted.org/packages/c1/80/a61f99dc3a936413c3ee4e1eecac96c0da5ed07ad56fd975f1a9da5bc630/MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", size = 15601, upload-time = "2024-10-18T15:21:23.499Z" }, + { url = "https://files.pythonhosted.org/packages/83/0e/67eb10a7ecc77a0c2bbe2b0235765b98d164d81600746914bebada795e97/MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", size = 14274, upload-time = "2024-10-18T15:21:24.577Z" }, + { url = "https://files.pythonhosted.org/packages/2b/6d/9409f3684d3335375d04e5f05744dfe7e9f120062c9857df4ab490a1031a/MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", size = 12352, upload-time = "2024-10-18T15:21:25.382Z" }, + { url = "https://files.pythonhosted.org/packages/d2/f5/6eadfcd3885ea85fe2a7c128315cc1bb7241e1987443d78c8fe712d03091/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", size = 24122, upload-time = "2024-10-18T15:21:26.199Z" }, + { url = "https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", size = 23085, upload-time = "2024-10-18T15:21:27.029Z" }, + { url = "https://files.pythonhosted.org/packages/c2/cf/c9d56af24d56ea04daae7ac0940232d31d5a8354f2b457c6d856b2057d69/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", size = 22978, upload-time = "2024-10-18T15:21:27.846Z" }, + { url = "https://files.pythonhosted.org/packages/2a/9f/8619835cd6a711d6272d62abb78c033bda638fdc54c4e7f4272cf1c0962b/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", size = 24208, upload-time = "2024-10-18T15:21:28.744Z" }, + { url = "https://files.pythonhosted.org/packages/f9/bf/176950a1792b2cd2102b8ffeb5133e1ed984547b75db47c25a67d3359f77/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", size = 23357, upload-time = "2024-10-18T15:21:29.545Z" }, + { url = "https://files.pythonhosted.org/packages/ce/4f/9a02c1d335caabe5c4efb90e1b6e8ee944aa245c1aaaab8e8a618987d816/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", size = 23344, upload-time = "2024-10-18T15:21:30.366Z" }, + { url = "https://files.pythonhosted.org/packages/ee/55/c271b57db36f748f0e04a759ace9f8f759ccf22b4960c270c78a394f58be/MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", size = 15101, upload-time = "2024-10-18T15:21:31.207Z" }, + { url = "https://files.pythonhosted.org/packages/29/88/07df22d2dd4df40aba9f3e402e6dc1b8ee86297dddbad4872bd5e7b0094f/MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", size = 15603, upload-time = "2024-10-18T15:21:32.032Z" }, + { url = "https://files.pythonhosted.org/packages/62/6a/8b89d24db2d32d433dffcd6a8779159da109842434f1dd2f6e71f32f738c/MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", size = 14510, upload-time = "2024-10-18T15:21:33.625Z" }, + { url = "https://files.pythonhosted.org/packages/7a/06/a10f955f70a2e5a9bf78d11a161029d278eeacbd35ef806c3fd17b13060d/MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", size = 12486, upload-time = "2024-10-18T15:21:34.611Z" }, + { url = "https://files.pythonhosted.org/packages/34/cf/65d4a571869a1a9078198ca28f39fba5fbb910f952f9dbc5220afff9f5e6/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", size = 25480, upload-time = "2024-10-18T15:21:35.398Z" }, + { url = "https://files.pythonhosted.org/packages/0c/e3/90e9651924c430b885468b56b3d597cabf6d72be4b24a0acd1fa0e12af67/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", size = 23914, upload-time = "2024-10-18T15:21:36.231Z" }, + { url = "https://files.pythonhosted.org/packages/66/8c/6c7cf61f95d63bb866db39085150df1f2a5bd3335298f14a66b48e92659c/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", size = 23796, upload-time = "2024-10-18T15:21:37.073Z" }, + { url = "https://files.pythonhosted.org/packages/bb/35/cbe9238ec3f47ac9a7c8b3df7a808e7cb50fe149dc7039f5f454b3fba218/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", size = 25473, upload-time = "2024-10-18T15:21:37.932Z" }, + { url = "https://files.pythonhosted.org/packages/e6/32/7621a4382488aa283cc05e8984a9c219abad3bca087be9ec77e89939ded9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", size = 24114, upload-time = "2024-10-18T15:21:39.799Z" }, + { url = "https://files.pythonhosted.org/packages/0d/80/0985960e4b89922cb5a0bac0ed39c5b96cbc1a536a99f30e8c220a996ed9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", size = 24098, upload-time = "2024-10-18T15:21:40.813Z" }, + { url = "https://files.pythonhosted.org/packages/82/78/fedb03c7d5380df2427038ec8d973587e90561b2d90cd472ce9254cf348b/MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", size = 15208, upload-time = "2024-10-18T15:21:41.814Z" }, + { url = "https://files.pythonhosted.org/packages/4f/65/6079a46068dfceaeabb5dcad6d674f5f5c61a6fa5673746f42a9f4c233b3/MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", size = 15739, upload-time = "2024-10-18T15:21:42.784Z" }, +] + +[[package]] +name = "mdurl" +version = "0.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" }, +] + +[[package]] +name = "memory-gym" +version = "1.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "gymnasium" }, + { name = "pygame" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7f/ee/2ed9bd277ef3e627392db33ca189386f8e747962e1818b064aca3d9d3b6a/memory_gym-1.0.2.tar.gz", hash = "sha256:ce159f6f8c4c3d1a55ee4e08385e948bb9add68350cd3ed0fcd8cf82a0589c2a", size = 48845, upload-time = "2024-04-19T12:32:47.657Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/18/9c4c7c9c94bd8ca21128648c075e52254ae1f13724c3aa6619c6cd726978/memory_gym-1.0.2-py3-none-any.whl", hash = "sha256:f012f2ffa91dbd2f9f2c5972f41ef7a96f5992a4cb5fdcf72f13eeec836dfbe4", size = 68950, upload-time = "2024-04-19T12:32:44.203Z" }, +] + +[[package]] +name = "minigrid" +version = "2.5.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "gymnasium" }, + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.3.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "pygame" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/16/35/71b4c872a0c36ca674b6ab82fe08c0e72c6f616d91cf3091da2f49118e82/minigrid-2.5.0.tar.gz", hash = "sha256:c3739d872ef96ce72ad0bd01e913604fca6c1cf397b45634ab4c093176cba57e", size = 103644, upload-time = "2024-11-17T14:53:39.406Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ba/f1/1d028de6840042473ead874eaa711fac678c43795ef4c4e9d888ac6b6425/minigrid-2.5.0-py3-none-any.whl", hash = "sha256:3972219a032504b5eca4347fbba321334e80fa72d5d13986601b44cce846e189", size = 136681, upload-time = "2024-11-17T14:53:37.555Z" }, +] + +[[package]] +name = "mpmath" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f", size = 508106, upload-time = "2023-03-07T16:47:11.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c", size = 536198, upload-time = "2023-03-07T16:47:09.197Z" }, +] + +[[package]] +name = "networkx" +version = "3.4.2" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11' and sys_platform == 'darwin'", + "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux'", + "python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux'", +] +sdist = { url = "https://files.pythonhosted.org/packages/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz", hash = "sha256:307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1", size = 2151368, upload-time = "2024-10-21T12:39:38.695Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b9/54/dd730b32ea14ea797530a4479b2ed46a6fb250f682a9cfb997e968bf0261/networkx-3.4.2-py3-none-any.whl", hash = "sha256:df5d4365b724cf81b8c6a7312509d0c22386097011ad1abe274afd5e9d3bbc5f", size = 1723263, upload-time = "2024-10-21T12:39:36.247Z" }, +] + +[[package]] +name = "networkx" +version = "3.5" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12' and sys_platform == 'darwin'", + "python_full_version >= '3.12' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version >= '3.12' and platform_machine != 'aarch64' and sys_platform == 'linux'", + "python_full_version >= '3.12' and sys_platform != 'darwin' and sys_platform != 'linux'", + "python_full_version == '3.11.*' and sys_platform == 'darwin'", + "python_full_version == '3.11.*' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version == '3.11.*' and platform_machine != 'aarch64' and sys_platform == 'linux'", + "python_full_version == '3.11.*' and sys_platform != 'darwin' and sys_platform != 'linux'", +] +sdist = { url = "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz", hash = "sha256:d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037", size = 2471065, upload-time = "2025-05-29T11:35:07.804Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/eb/8d/776adee7bbf76365fdd7f2552710282c79a4ead5d2a46408c9043a2b70ba/networkx-3.5-py3-none-any.whl", hash = "sha256:0030d386a9a06dee3565298b4a734b68589749a544acbb6c412dc9e2489ec6ec", size = 2034406, upload-time = "2025-05-29T11:35:04.961Z" }, +] + +[[package]] +name = "numpy" +version = "2.2.6" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11' and sys_platform == 'darwin'", + "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux'", + "python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux'", +] +sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245, upload-time = "2025-05-17T21:27:58.555Z" }, + { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048, upload-time = "2025-05-17T21:28:21.406Z" }, + { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542, upload-time = "2025-05-17T21:28:30.931Z" }, + { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301, upload-time = "2025-05-17T21:28:41.613Z" }, + { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320, upload-time = "2025-05-17T21:29:02.78Z" }, + { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050, upload-time = "2025-05-17T21:29:27.675Z" }, + { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034, upload-time = "2025-05-17T21:29:51.102Z" }, + { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185, upload-time = "2025-05-17T21:30:18.703Z" }, + { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149, upload-time = "2025-05-17T21:30:29.788Z" }, + { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620, upload-time = "2025-05-17T21:30:48.994Z" }, + { url = "https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae", size = 21176963, upload-time = "2025-05-17T21:31:19.36Z" }, + { url = "https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a", size = 14406743, upload-time = "2025-05-17T21:31:41.087Z" }, + { url = "https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42", size = 5352616, upload-time = "2025-05-17T21:31:50.072Z" }, + { url = "https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491", size = 6889579, upload-time = "2025-05-17T21:32:01.712Z" }, + { url = "https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a", size = 14312005, upload-time = "2025-05-17T21:32:23.332Z" }, + { url = "https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf", size = 16821570, upload-time = "2025-05-17T21:32:47.991Z" }, + { url = "https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1", size = 15818548, upload-time = "2025-05-17T21:33:11.728Z" }, + { url = "https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab", size = 18620521, upload-time = "2025-05-17T21:33:39.139Z" }, + { url = "https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl", hash = "sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47", size = 6525866, upload-time = "2025-05-17T21:33:50.273Z" }, + { url = "https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303", size = 12907455, upload-time = "2025-05-17T21:34:09.135Z" }, + { url = "https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff", size = 20875348, upload-time = "2025-05-17T21:34:39.648Z" }, + { url = "https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c", size = 14119362, upload-time = "2025-05-17T21:35:01.241Z" }, + { url = "https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3", size = 5084103, upload-time = "2025-05-17T21:35:10.622Z" }, + { url = "https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282", size = 6625382, upload-time = "2025-05-17T21:35:21.414Z" }, + { url = "https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87", size = 14018462, upload-time = "2025-05-17T21:35:42.174Z" }, + { url = "https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249", size = 16527618, upload-time = "2025-05-17T21:36:06.711Z" }, + { url = "https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49", size = 15505511, upload-time = "2025-05-17T21:36:29.965Z" }, + { url = "https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de", size = 18313783, upload-time = "2025-05-17T21:36:56.883Z" }, + { url = "https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl", hash = "sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4", size = 6246506, upload-time = "2025-05-17T21:37:07.368Z" }, + { url = "https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl", hash = "sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2", size = 12614190, upload-time = "2025-05-17T21:37:26.213Z" }, + { url = "https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84", size = 20867828, upload-time = "2025-05-17T21:37:56.699Z" }, + { url = "https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b", size = 14143006, upload-time = "2025-05-17T21:38:18.291Z" }, + { url = "https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d", size = 5076765, upload-time = "2025-05-17T21:38:27.319Z" }, + { url = "https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566", size = 6617736, upload-time = "2025-05-17T21:38:38.141Z" }, + { url = "https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f", size = 14010719, upload-time = "2025-05-17T21:38:58.433Z" }, + { url = "https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f", size = 16526072, upload-time = "2025-05-17T21:39:22.638Z" }, + { url = "https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868", size = 15503213, upload-time = "2025-05-17T21:39:45.865Z" }, + { url = "https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d", size = 18316632, upload-time = "2025-05-17T21:40:13.331Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl", hash = "sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd", size = 6244532, upload-time = "2025-05-17T21:43:46.099Z" }, + { url = "https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl", hash = "sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c", size = 12610885, upload-time = "2025-05-17T21:44:05.145Z" }, + { url = "https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6", size = 20963467, upload-time = "2025-05-17T21:40:44Z" }, + { url = "https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda", size = 14225144, upload-time = "2025-05-17T21:41:05.695Z" }, + { url = "https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40", size = 5200217, upload-time = "2025-05-17T21:41:15.903Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8", size = 6712014, upload-time = "2025-05-17T21:41:27.321Z" }, + { url = "https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f", size = 14077935, upload-time = "2025-05-17T21:41:49.738Z" }, + { url = "https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa", size = 16600122, upload-time = "2025-05-17T21:42:14.046Z" }, + { url = "https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571", size = 15586143, upload-time = "2025-05-17T21:42:37.464Z" }, + { url = "https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1", size = 18385260, upload-time = "2025-05-17T21:43:05.189Z" }, + { url = "https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl", hash = "sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff", size = 6377225, upload-time = "2025-05-17T21:43:16.254Z" }, + { url = "https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl", hash = "sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06", size = 12771374, upload-time = "2025-05-17T21:43:35.479Z" }, + { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391, upload-time = "2025-05-17T21:44:35.948Z" }, + { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754, upload-time = "2025-05-17T21:44:47.446Z" }, + { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476, upload-time = "2025-05-17T21:45:11.871Z" }, + { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666, upload-time = "2025-05-17T21:45:31.426Z" }, +] + +[[package]] +name = "numpy" +version = "2.3.1" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.12' and sys_platform == 'darwin'", + "python_full_version >= '3.12' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version >= '3.12' and platform_machine != 'aarch64' and sys_platform == 'linux'", + "python_full_version >= '3.12' and sys_platform != 'darwin' and sys_platform != 'linux'", + "python_full_version == '3.11.*' and sys_platform == 'darwin'", + "python_full_version == '3.11.*' and platform_machine == 'aarch64' and sys_platform == 'linux'", + "python_full_version == '3.11.*' and platform_machine != 'aarch64' and sys_platform == 'linux'", + "python_full_version == '3.11.*' and sys_platform != 'darwin' and sys_platform != 'linux'", +] +sdist = { url = "https://files.pythonhosted.org/packages/2e/19/d7c972dfe90a353dbd3efbbe1d14a5951de80c99c9dc1b93cd998d51dc0f/numpy-2.3.1.tar.gz", hash = "sha256:1ec9ae20a4226da374362cca3c62cd753faf2f951440b0e3b98e93c235441d2b", size = 20390372, upload-time = "2025-06-21T12:28:33.469Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b0/c7/87c64d7ab426156530676000c94784ef55676df2f13b2796f97722464124/numpy-2.3.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6ea9e48336a402551f52cd8f593343699003d2353daa4b72ce8d34f66b722070", size = 21199346, upload-time = "2025-06-21T11:47:47.57Z" }, + { url = "https://files.pythonhosted.org/packages/58/0e/0966c2f44beeac12af8d836e5b5f826a407cf34c45cb73ddcdfce9f5960b/numpy-2.3.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5ccb7336eaf0e77c1635b232c141846493a588ec9ea777a7c24d7166bb8533ae", size = 14361143, upload-time = "2025-06-21T11:48:10.766Z" }, + { url = "https://files.pythonhosted.org/packages/7d/31/6e35a247acb1bfc19226791dfc7d4c30002cd4e620e11e58b0ddf836fe52/numpy-2.3.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:0bb3a4a61e1d327e035275d2a993c96fa786e4913aa089843e6a2d9dd205c66a", size = 5378989, upload-time = "2025-06-21T11:48:19.998Z" }, + { url = "https://files.pythonhosted.org/packages/b0/25/93b621219bb6f5a2d4e713a824522c69ab1f06a57cd571cda70e2e31af44/numpy-2.3.1-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:e344eb79dab01f1e838ebb67aab09965fb271d6da6b00adda26328ac27d4a66e", size = 6912890, upload-time = "2025-06-21T11:48:31.376Z" }, + { url = "https://files.pythonhosted.org/packages/ef/60/6b06ed98d11fb32e27fb59468b42383f3877146d3ee639f733776b6ac596/numpy-2.3.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:467db865b392168ceb1ef1ffa6f5a86e62468c43e0cfb4ab6da667ede10e58db", size = 14569032, upload-time = "2025-06-21T11:48:52.563Z" }, + { url = "https://files.pythonhosted.org/packages/75/c9/9bec03675192077467a9c7c2bdd1f2e922bd01d3a69b15c3a0fdcd8548f6/numpy-2.3.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:afed2ce4a84f6b0fc6c1ce734ff368cbf5a5e24e8954a338f3bdffa0718adffb", size = 16930354, upload-time = "2025-06-21T11:49:17.473Z" }, + { url = "https://files.pythonhosted.org/packages/6a/e2/5756a00cabcf50a3f527a0c968b2b4881c62b1379223931853114fa04cda/numpy-2.3.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0025048b3c1557a20bc80d06fdeb8cc7fc193721484cca82b2cfa072fec71a93", size = 15879605, upload-time = "2025-06-21T11:49:41.161Z" }, + { url = "https://files.pythonhosted.org/packages/ff/86/a471f65f0a86f1ca62dcc90b9fa46174dd48f50214e5446bc16a775646c5/numpy-2.3.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a5ee121b60aa509679b682819c602579e1df14a5b07fe95671c8849aad8f2115", size = 18666994, upload-time = "2025-06-21T11:50:08.516Z" }, + { url = "https://files.pythonhosted.org/packages/43/a6/482a53e469b32be6500aaf61cfafd1de7a0b0d484babf679209c3298852e/numpy-2.3.1-cp311-cp311-win32.whl", hash = "sha256:a8b740f5579ae4585831b3cf0e3b0425c667274f82a484866d2adf9570539369", size = 6603672, upload-time = "2025-06-21T11:50:19.584Z" }, + { url = "https://files.pythonhosted.org/packages/6b/fb/bb613f4122c310a13ec67585c70e14b03bfc7ebabd24f4d5138b97371d7c/numpy-2.3.1-cp311-cp311-win_amd64.whl", hash = "sha256:d4580adadc53311b163444f877e0789f1c8861e2698f6b2a4ca852fda154f3ff", size = 13024015, upload-time = "2025-06-21T11:50:39.139Z" }, + { url = "https://files.pythonhosted.org/packages/51/58/2d842825af9a0c041aca246dc92eb725e1bc5e1c9ac89712625db0c4e11c/numpy-2.3.1-cp311-cp311-win_arm64.whl", hash = "sha256:ec0bdafa906f95adc9a0c6f26a4871fa753f25caaa0e032578a30457bff0af6a", size = 10456989, upload-time = "2025-06-21T11:50:55.616Z" }, + { url = "https://files.pythonhosted.org/packages/c6/56/71ad5022e2f63cfe0ca93559403d0edef14aea70a841d640bd13cdba578e/numpy-2.3.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2959d8f268f3d8ee402b04a9ec4bb7604555aeacf78b360dc4ec27f1d508177d", size = 20896664, upload-time = "2025-06-21T12:15:30.845Z" }, + { url = "https://files.pythonhosted.org/packages/25/65/2db52ba049813670f7f987cc5db6dac9be7cd95e923cc6832b3d32d87cef/numpy-2.3.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:762e0c0c6b56bdedfef9a8e1d4538556438288c4276901ea008ae44091954e29", size = 14131078, upload-time = "2025-06-21T12:15:52.23Z" }, + { url = "https://files.pythonhosted.org/packages/57/dd/28fa3c17b0e751047ac928c1e1b6990238faad76e9b147e585b573d9d1bd/numpy-2.3.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:867ef172a0976aaa1f1d1b63cf2090de8b636a7674607d514505fb7276ab08fc", size = 5112554, upload-time = "2025-06-21T12:16:01.434Z" }, + { url = "https://files.pythonhosted.org/packages/c9/fc/84ea0cba8e760c4644b708b6819d91784c290288c27aca916115e3311d17/numpy-2.3.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:4e602e1b8682c2b833af89ba641ad4176053aaa50f5cacda1a27004352dde943", size = 6646560, upload-time = "2025-06-21T12:16:11.895Z" }, + { url = "https://files.pythonhosted.org/packages/61/b2/512b0c2ddec985ad1e496b0bd853eeb572315c0f07cd6997473ced8f15e2/numpy-2.3.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:8e333040d069eba1652fb08962ec5b76af7f2c7bce1df7e1418c8055cf776f25", size = 14260638, upload-time = "2025-06-21T12:16:32.611Z" }, + { url = "https://files.pythonhosted.org/packages/6e/45/c51cb248e679a6c6ab14b7a8e3ead3f4a3fe7425fc7a6f98b3f147bec532/numpy-2.3.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:e7cbf5a5eafd8d230a3ce356d892512185230e4781a361229bd902ff403bc660", size = 16632729, upload-time = "2025-06-21T12:16:57.439Z" }, + { url = "https://files.pythonhosted.org/packages/e4/ff/feb4be2e5c09a3da161b412019caf47183099cbea1132fd98061808c2df2/numpy-2.3.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5f1b8f26d1086835f442286c1d9b64bb3974b0b1e41bb105358fd07d20872952", size = 15565330, upload-time = "2025-06-21T12:17:20.638Z" }, + { url = "https://files.pythonhosted.org/packages/bc/6d/ceafe87587101e9ab0d370e4f6e5f3f3a85b9a697f2318738e5e7e176ce3/numpy-2.3.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ee8340cb48c9b7a5899d1149eece41ca535513a9698098edbade2a8e7a84da77", size = 18361734, upload-time = "2025-06-21T12:17:47.938Z" }, + { url = "https://files.pythonhosted.org/packages/2b/19/0fb49a3ea088be691f040c9bf1817e4669a339d6e98579f91859b902c636/numpy-2.3.1-cp312-cp312-win32.whl", hash = "sha256:e772dda20a6002ef7061713dc1e2585bc1b534e7909b2030b5a46dae8ff077ab", size = 6320411, upload-time = "2025-06-21T12:17:58.475Z" }, + { url = "https://files.pythonhosted.org/packages/b1/3e/e28f4c1dd9e042eb57a3eb652f200225e311b608632bc727ae378623d4f8/numpy-2.3.1-cp312-cp312-win_amd64.whl", hash = "sha256:cfecc7822543abdea6de08758091da655ea2210b8ffa1faf116b940693d3df76", size = 12734973, upload-time = "2025-06-21T12:18:17.601Z" }, + { url = "https://files.pythonhosted.org/packages/04/a8/8a5e9079dc722acf53522b8f8842e79541ea81835e9b5483388701421073/numpy-2.3.1-cp312-cp312-win_arm64.whl", hash = "sha256:7be91b2239af2658653c5bb6f1b8bccafaf08226a258caf78ce44710a0160d30", size = 10191491, upload-time = "2025-06-21T12:18:33.585Z" }, + { url = "https://files.pythonhosted.org/packages/d4/bd/35ad97006d8abff8631293f8ea6adf07b0108ce6fec68da3c3fcca1197f2/numpy-2.3.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:25a1992b0a3fdcdaec9f552ef10d8103186f5397ab45e2d25f8ac51b1a6b97e8", size = 20889381, upload-time = "2025-06-21T12:19:04.103Z" }, + { url = "https://files.pythonhosted.org/packages/f1/4f/df5923874d8095b6062495b39729178eef4a922119cee32a12ee1bd4664c/numpy-2.3.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7dea630156d39b02a63c18f508f85010230409db5b2927ba59c8ba4ab3e8272e", size = 14152726, upload-time = "2025-06-21T12:19:25.599Z" }, + { url = "https://files.pythonhosted.org/packages/8c/0f/a1f269b125806212a876f7efb049b06c6f8772cf0121139f97774cd95626/numpy-2.3.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:bada6058dd886061f10ea15f230ccf7dfff40572e99fef440a4a857c8728c9c0", size = 5105145, upload-time = "2025-06-21T12:19:34.782Z" }, + { url = "https://files.pythonhosted.org/packages/6d/63/a7f7fd5f375b0361682f6ffbf686787e82b7bbd561268e4f30afad2bb3c0/numpy-2.3.1-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:a894f3816eb17b29e4783e5873f92faf55b710c2519e5c351767c51f79d8526d", size = 6639409, upload-time = "2025-06-21T12:19:45.228Z" }, + { url = "https://files.pythonhosted.org/packages/bf/0d/1854a4121af895aab383f4aa233748f1df4671ef331d898e32426756a8a6/numpy-2.3.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:18703df6c4a4fee55fd3d6e5a253d01c5d33a295409b03fda0c86b3ca2ff41a1", size = 14257630, upload-time = "2025-06-21T12:20:06.544Z" }, + { url = "https://files.pythonhosted.org/packages/50/30/af1b277b443f2fb08acf1c55ce9d68ee540043f158630d62cef012750f9f/numpy-2.3.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:5902660491bd7a48b2ec16c23ccb9124b8abfd9583c5fdfa123fe6b421e03de1", size = 16627546, upload-time = "2025-06-21T12:20:31.002Z" }, + { url = "https://files.pythonhosted.org/packages/6e/ec/3b68220c277e463095342d254c61be8144c31208db18d3fd8ef02712bcd6/numpy-2.3.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:36890eb9e9d2081137bd78d29050ba63b8dab95dff7912eadf1185e80074b2a0", size = 15562538, upload-time = "2025-06-21T12:20:54.322Z" }, + { url = "https://files.pythonhosted.org/packages/77/2b/4014f2bcc4404484021c74d4c5ee8eb3de7e3f7ac75f06672f8dcf85140a/numpy-2.3.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a780033466159c2270531e2b8ac063704592a0bc62ec4a1b991c7c40705eb0e8", size = 18360327, upload-time = "2025-06-21T12:21:21.053Z" }, + { url = "https://files.pythonhosted.org/packages/40/8d/2ddd6c9b30fcf920837b8672f6c65590c7d92e43084c25fc65edc22e93ca/numpy-2.3.1-cp313-cp313-win32.whl", hash = "sha256:39bff12c076812595c3a306f22bfe49919c5513aa1e0e70fac756a0be7c2a2b8", size = 6312330, upload-time = "2025-06-21T12:25:07.447Z" }, + { url = "https://files.pythonhosted.org/packages/dd/c8/beaba449925988d415efccb45bf977ff8327a02f655090627318f6398c7b/numpy-2.3.1-cp313-cp313-win_amd64.whl", hash = "sha256:8d5ee6eec45f08ce507a6570e06f2f879b374a552087a4179ea7838edbcbfa42", size = 12731565, upload-time = "2025-06-21T12:25:26.444Z" }, + { url = "https://files.pythonhosted.org/packages/0b/c3/5c0c575d7ec78c1126998071f58facfc124006635da75b090805e642c62e/numpy-2.3.1-cp313-cp313-win_arm64.whl", hash = "sha256:0c4d9e0a8368db90f93bd192bfa771ace63137c3488d198ee21dfb8e7771916e", size = 10190262, upload-time = "2025-06-21T12:25:42.196Z" }, + { url = "https://files.pythonhosted.org/packages/ea/19/a029cd335cf72f79d2644dcfc22d90f09caa86265cbbde3b5702ccef6890/numpy-2.3.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:b0b5397374f32ec0649dd98c652a1798192042e715df918c20672c62fb52d4b8", size = 20987593, upload-time = "2025-06-21T12:21:51.664Z" }, + { url = "https://files.pythonhosted.org/packages/25/91/8ea8894406209107d9ce19b66314194675d31761fe2cb3c84fe2eeae2f37/numpy-2.3.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c5bdf2015ccfcee8253fb8be695516ac4457c743473a43290fd36eba6a1777eb", size = 14300523, upload-time = "2025-06-21T12:22:13.583Z" }, + { url = "https://files.pythonhosted.org/packages/a6/7f/06187b0066eefc9e7ce77d5f2ddb4e314a55220ad62dd0bfc9f2c44bac14/numpy-2.3.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:d70f20df7f08b90a2062c1f07737dd340adccf2068d0f1b9b3d56e2038979fee", size = 5227993, upload-time = "2025-06-21T12:22:22.53Z" }, + { url = "https://files.pythonhosted.org/packages/e8/ec/a926c293c605fa75e9cfb09f1e4840098ed46d2edaa6e2152ee35dc01ed3/numpy-2.3.1-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:2fb86b7e58f9ac50e1e9dd1290154107e47d1eef23a0ae9145ded06ea606f992", size = 6736652, upload-time = "2025-06-21T12:22:33.629Z" }, + { url = "https://files.pythonhosted.org/packages/e3/62/d68e52fb6fde5586650d4c0ce0b05ff3a48ad4df4ffd1b8866479d1d671d/numpy-2.3.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:23ab05b2d241f76cb883ce8b9a93a680752fbfcbd51c50eff0b88b979e471d8c", size = 14331561, upload-time = "2025-06-21T12:22:55.056Z" }, + { url = "https://files.pythonhosted.org/packages/fc/ec/b74d3f2430960044bdad6900d9f5edc2dc0fb8bf5a0be0f65287bf2cbe27/numpy-2.3.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:ce2ce9e5de4703a673e705183f64fd5da5bf36e7beddcb63a25ee2286e71ca48", size = 16693349, upload-time = "2025-06-21T12:23:20.53Z" }, + { url = "https://files.pythonhosted.org/packages/0d/15/def96774b9d7eb198ddadfcbd20281b20ebb510580419197e225f5c55c3e/numpy-2.3.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c4913079974eeb5c16ccfd2b1f09354b8fed7e0d6f2cab933104a09a6419b1ee", size = 15642053, upload-time = "2025-06-21T12:23:43.697Z" }, + { url = "https://files.pythonhosted.org/packages/2b/57/c3203974762a759540c6ae71d0ea2341c1fa41d84e4971a8e76d7141678a/numpy-2.3.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:010ce9b4f00d5c036053ca684c77441f2f2c934fd23bee058b4d6f196efd8280", size = 18434184, upload-time = "2025-06-21T12:24:10.708Z" }, + { url = "https://files.pythonhosted.org/packages/22/8a/ccdf201457ed8ac6245187850aff4ca56a79edbea4829f4e9f14d46fa9a5/numpy-2.3.1-cp313-cp313t-win32.whl", hash = "sha256:6269b9edfe32912584ec496d91b00b6d34282ca1d07eb10e82dfc780907d6c2e", size = 6440678, upload-time = "2025-06-21T12:24:21.596Z" }, + { url = "https://files.pythonhosted.org/packages/f1/7e/7f431d8bd8eb7e03d79294aed238b1b0b174b3148570d03a8a8a8f6a0da9/numpy-2.3.1-cp313-cp313t-win_amd64.whl", hash = "sha256:2a809637460e88a113e186e87f228d74ae2852a2e0c44de275263376f17b5bdc", size = 12870697, upload-time = "2025-06-21T12:24:40.644Z" }, + { url = "https://files.pythonhosted.org/packages/d4/ca/af82bf0fad4c3e573c6930ed743b5308492ff19917c7caaf2f9b6f9e2e98/numpy-2.3.1-cp313-cp313t-win_arm64.whl", hash = "sha256:eccb9a159db9aed60800187bc47a6d3451553f0e1b08b068d8b277ddfbb9b244", size = 10260376, upload-time = "2025-06-21T12:24:56.884Z" }, + { url = "https://files.pythonhosted.org/packages/e8/34/facc13b9b42ddca30498fc51f7f73c3d0f2be179943a4b4da8686e259740/numpy-2.3.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ad506d4b09e684394c42c966ec1527f6ebc25da7f4da4b1b056606ffe446b8a3", size = 21070637, upload-time = "2025-06-21T12:26:12.518Z" }, + { url = "https://files.pythonhosted.org/packages/65/b6/41b705d9dbae04649b529fc9bd3387664c3281c7cd78b404a4efe73dcc45/numpy-2.3.1-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:ebb8603d45bc86bbd5edb0d63e52c5fd9e7945d3a503b77e486bd88dde67a19b", size = 5304087, upload-time = "2025-06-21T12:26:22.294Z" }, + { url = "https://files.pythonhosted.org/packages/7a/b4/fe3ac1902bff7a4934a22d49e1c9d71a623204d654d4cc43c6e8fe337fcb/numpy-2.3.1-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:15aa4c392ac396e2ad3d0a2680c0f0dee420f9fed14eef09bdb9450ee6dcb7b7", size = 6817588, upload-time = "2025-06-21T12:26:32.939Z" }, + { url = "https://files.pythonhosted.org/packages/ae/ee/89bedf69c36ace1ac8f59e97811c1f5031e179a37e4821c3a230bf750142/numpy-2.3.1-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c6e0bf9d1a2f50d2b65a7cf56db37c095af17b59f6c132396f7c6d5dd76484df", size = 14399010, upload-time = "2025-06-21T12:26:54.086Z" }, + { url = "https://files.pythonhosted.org/packages/15/08/e00e7070ede29b2b176165eba18d6f9784d5349be3c0c1218338e79c27fd/numpy-2.3.1-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:eabd7e8740d494ce2b4ea0ff05afa1b7b291e978c0ae075487c51e8bd93c0c68", size = 16752042, upload-time = "2025-06-21T12:27:19.018Z" }, + { url = "https://files.pythonhosted.org/packages/48/6b/1c6b515a83d5564b1698a61efa245727c8feecf308f4091f565988519d20/numpy-2.3.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:e610832418a2bc09d974cc9fecebfa51e9532d6190223bc5ef6a7402ebf3b5cb", size = 12927246, upload-time = "2025-06-21T12:27:38.618Z" }, +] + +[[package]] +name = "nvidia-cublas-cu11" +version = "11.11.3.6" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/46/be/c222e33e60d28ecd496a46fc4d78ccae0ee28e1fd7dc705b6288b4cad27e/nvidia_cublas_cu11-11.11.3.6-py3-none-manylinux1_x86_64.whl", hash = "sha256:39fb40e8f486dd8a2ddb8fdeefe1d5b28f5b99df01c87ab3676f057a74a5a6f3", size = 417870452, upload-time = "2022-10-18T21:17:48.638Z" }, + { url = "https://files.pythonhosted.org/packages/ea/2e/9d99c60771d275ecf6c914a612e9a577f740a615bc826bec132368e1d3ae/nvidia_cublas_cu11-11.11.3.6-py3-none-manylinux2014_x86_64.whl", hash = "sha256:60252822adea5d0b10cd990a7dc7bedf7435f30ae40083c7a624a85a43225abc", size = 417870460, upload-time = "2024-08-17T00:00:26.889Z" }, +] + +[[package]] +name = "nvidia-cuda-cupti-cu11" +version = "11.8.87" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/c9/b4b15f709a694ea9f84871c6c4fbeeb54bab225962d852665a2c6f77f90d/nvidia_cuda_cupti_cu11-11.8.87-py3-none-manylinux1_x86_64.whl", hash = "sha256:0e50c707df56c75a2c0703dc6b886f3c97a22f37d6f63839f75b7418ba672a8d", size = 13093657, upload-time = "2022-10-03T21:46:12.544Z" }, + { url = "https://files.pythonhosted.org/packages/74/42/9f5c5cc084ce6f3073048c4f6806f45ba4c8c73f227c9587215d9c372e05/nvidia_cuda_cupti_cu11-11.8.87-py3-none-manylinux2014_x86_64.whl", hash = "sha256:4191a17913a706b5098681280cd089cd7d8d3df209a6f5cb79384974a96d24f2", size = 13093662, upload-time = "2024-08-16T23:56:38.082Z" }, +] + +[[package]] +name = "nvidia-cuda-nvrtc-cu11" +version = "11.8.89" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/83/08/a9833e4e9f9165bedb7f36033b47aa399b053b9cb2eaf7b84d1e28705cf7/nvidia_cuda_nvrtc_cu11-11.8.89-py3-none-manylinux1_x86_64.whl", hash = "sha256:1f27d67b0f72902e9065ae568b4f6268dfe49ba3ed269c9a3da99bb86d1d2008", size = 23173264, upload-time = "2022-10-03T21:47:00.705Z" }, + { url = "https://files.pythonhosted.org/packages/60/44/202e027c224c26e15a53f01c5c7604c7f6b4fd368882d3164ea08fead207/nvidia_cuda_nvrtc_cu11-11.8.89-py3-none-manylinux2014_x86_64.whl", hash = "sha256:a8d02f3cba345be56b1ffc3e74d8f61f02bb758dd31b0f20e12277a5a244f756", size = 23173745, upload-time = "2024-08-16T23:58:16.539Z" }, +] + +[[package]] +name = "nvidia-cuda-runtime-cu11" +version = "11.8.89" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/45/3e/84db02be49fe6d6df6e42f69fd64501c22d0f9ada9c9877f885612085d20/nvidia_cuda_runtime_cu11-11.8.89-py3-none-manylinux1_x86_64.whl", hash = "sha256:f587bd726eb2f7612cf77ce38a2c1e65cf23251ff49437f6161ce0d647f64f7c", size = 875585, upload-time = "2022-10-03T21:46:03.05Z" }, + { url = "https://files.pythonhosted.org/packages/a6/ec/a540f28b31de7bc1ed49eecc72035d4cb77db88ead1d42f7bfa5ae407ac6/nvidia_cuda_runtime_cu11-11.8.89-py3-none-manylinux2014_x86_64.whl", hash = "sha256:92d04069a987e1fbc9213f8376d265df0f7bb42617d44f5eda1f496acea7f2d1", size = 875592, upload-time = "2024-08-16T23:56:18.774Z" }, +] + +[[package]] +name = "nvidia-cudnn-cu11" +version = "9.1.0.70" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nvidia-cublas-cu11", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/00/3b/0b776f04e364cd99e4cf152c2a9eadb5934c67c9a91429da55169a9447fd/nvidia_cudnn_cu11-9.1.0.70-py3-none-manylinux2014_x86_64.whl", hash = "sha256:e6135ac63fe9d5b0b89cfb35c3fc1c1349f2b995becadf2e9dc21bca89d9633d", size = 663919573, upload-time = "2024-04-22T15:20:24.839Z" }, +] + +[[package]] +name = "nvidia-cufft-cu11" +version = "10.9.0.58" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/74/79/b912a77e38e41f15a0581a59f5c3548d1ddfdda3225936fb67c342719e7a/nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux1_x86_64.whl", hash = "sha256:222f9da70c80384632fd6035e4c3f16762d64ea7a843829cb278f98b3cb7dd81", size = 168405414, upload-time = "2022-10-03T23:29:47.505Z" }, + { url = "https://files.pythonhosted.org/packages/64/c8/133717b43182ba063803e983e7680a94826a9f4ff5734af0ca315803f1b3/nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux2014_x86_64.whl", hash = "sha256:e21037259995243cc370dd63c430d77ae9280bedb68d5b5a18226bfc92e5d748", size = 168405419, upload-time = "2024-08-17T00:02:03.562Z" }, +] + +[[package]] +name = "nvidia-curand-cu11" +version = "10.3.0.86" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/49/28/c47f8e2439ddbcbeae3cf74d43ed572b651d630ea72863d5357f3759eb66/nvidia_curand_cu11-10.3.0.86-py3-none-manylinux1_x86_64.whl", hash = "sha256:ac439548c88580269a1eb6aeb602a5aed32f0dbb20809a31d9ed7d01d77f6bf5", size = 58124493, upload-time = "2022-10-03T23:30:05.413Z" }, + { url = "https://files.pythonhosted.org/packages/58/e5/ce5806afc48a6e4e0dddd25316ac60b6fa94fd1791bdbf4ca17bf52696ea/nvidia_curand_cu11-10.3.0.86-py3-none-manylinux2014_x86_64.whl", hash = "sha256:cd4cffbf78bb06580206b4814d5dc696d1161c902aae37b2bba00056832379e6", size = 58124497, upload-time = "2024-08-17T00:03:01.833Z" }, +] + +[[package]] +name = "nvidia-cusolver-cu11" +version = "11.4.1.48" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nvidia-cublas-cu11", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/55/ee/939ff0104991dd7bdabb4c9767994c612ba0e1c9a55672a1ddd42f5e5b16/nvidia_cusolver_cu11-11.4.1.48-py3-none-manylinux1_x86_64.whl", hash = "sha256:ca538f545645b7e6629140786d3127fe067b3d5a085bd794cde5bfe877c8926f", size = 128240842, upload-time = "2022-10-03T23:30:24.348Z" }, + { url = "https://files.pythonhosted.org/packages/52/fe/866e87e6e6a1b0a5fcf8524a058042656702f2057e22bfdb8899a7c38e10/nvidia_cusolver_cu11-11.4.1.48-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ea9fb1ad8c644ca9ed55af13cc39af3b7ba4c3eb5aef18471fe1fe77d94383cb", size = 128246438, upload-time = "2024-08-17T00:03:52.432Z" }, +] + +[[package]] +name = "nvidia-cusparse-cu11" +version = "11.7.5.86" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c1/e0/21b829c535d569831835a4ca5d049a19ba00d3e91f3e12ab4ad27bd7385f/nvidia_cusparse_cu11-11.7.5.86-py3-none-manylinux1_x86_64.whl", hash = "sha256:4ae709fe78d3f23f60acaba8c54b8ad556cf16ca486e0cc1aa92dca7555d2d2b", size = 204126221, upload-time = "2022-10-18T21:19:28.04Z" }, + { url = "https://files.pythonhosted.org/packages/ed/5c/b0333b07c51ced77397c2fb0d9826072cea0da9d421aa7e792aa0f8ecc72/nvidia_cusparse_cu11-11.7.5.86-py3-none-manylinux2014_x86_64.whl", hash = "sha256:8d7cf1628fd8d462b5d2ba6678fae34733a48ecb80495b9c68672ec6a6dde5ef", size = 204126227, upload-time = "2024-08-17T00:05:20.798Z" }, +] + +[[package]] +name = "nvidia-nccl-cu11" +version = "2.21.5" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ac/9a/8b6a28b3b87d5fddab0e92cd835339eb8fbddaa71ae67518c8c1b3d05bae/nvidia_nccl_cu11-2.21.5-py3-none-manylinux2014_x86_64.whl", hash = "sha256:49d8350629c7888701d1fd200934942671cb5c728f49acc5a0b3a768820bed29", size = 147811630, upload-time = "2024-04-03T15:33:12.879Z" }, +] + +[[package]] +name = "nvidia-nvtx-cu11" +version = "11.8.86" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d5/a2/23214c23118784dc2189ac2d2e48190df3e4206e2f73eb17d47140797a2b/nvidia_nvtx_cu11-11.8.86-py3-none-manylinux1_x86_64.whl", hash = "sha256:890656d8bd9b4e280231c832e1f0d03459200ba4824ddda3dcb59b1e1989b9f5", size = 99125, upload-time = "2022-10-03T21:47:19.565Z" }, + { url = "https://files.pythonhosted.org/packages/b5/ad/973a187b137a3d45dc3faac421ef1275fb41fc169fd3889e2d5ceb0daa54/nvidia_nvtx_cu11-11.8.86-py3-none-manylinux2014_x86_64.whl", hash = "sha256:979f5b2aef5da164c5c53c64c85c3dfa61b8b4704f4f963bb568bf98fa8472e8", size = 99130, upload-time = "2024-08-16T23:58:33.479Z" }, +] + +[[package]] +name = "opencv-python" +version = "4.11.0.86" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.3.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/17/06/68c27a523103dad5837dc5b87e71285280c4f098c60e4fe8a8db6486ab09/opencv-python-4.11.0.86.tar.gz", hash = "sha256:03d60ccae62304860d232272e4a4fda93c39d595780cb40b161b310244b736a4", size = 95171956, upload-time = "2025-01-16T13:52:24.737Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/05/4d/53b30a2a3ac1f75f65a59eb29cf2ee7207ce64867db47036ad61743d5a23/opencv_python-4.11.0.86-cp37-abi3-macosx_13_0_arm64.whl", hash = "sha256:432f67c223f1dc2824f5e73cdfcd9db0efc8710647d4e813012195dc9122a52a", size = 37326322, upload-time = "2025-01-16T13:52:25.887Z" }, + { url = "https://files.pythonhosted.org/packages/3b/84/0a67490741867eacdfa37bc18df96e08a9d579583b419010d7f3da8ff503/opencv_python-4.11.0.86-cp37-abi3-macosx_13_0_x86_64.whl", hash = "sha256:9d05ef13d23fe97f575153558653e2d6e87103995d54e6a35db3f282fe1f9c66", size = 56723197, upload-time = "2025-01-16T13:55:21.222Z" }, + { url = "https://files.pythonhosted.org/packages/f3/bd/29c126788da65c1fb2b5fb621b7fed0ed5f9122aa22a0868c5e2c15c6d23/opencv_python-4.11.0.86-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b92ae2c8852208817e6776ba1ea0d6b1e0a1b5431e971a2a0ddd2a8cc398202", size = 42230439, upload-time = "2025-01-16T13:51:35.822Z" }, + { url = "https://files.pythonhosted.org/packages/2c/8b/90eb44a40476fa0e71e05a0283947cfd74a5d36121a11d926ad6f3193cc4/opencv_python-4.11.0.86-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b02611523803495003bd87362db3e1d2a0454a6a63025dc6658a9830570aa0d", size = 62986597, upload-time = "2025-01-16T13:52:08.836Z" }, + { url = "https://files.pythonhosted.org/packages/fb/d7/1d5941a9dde095468b288d989ff6539dd69cd429dbf1b9e839013d21b6f0/opencv_python-4.11.0.86-cp37-abi3-win32.whl", hash = "sha256:810549cb2a4aedaa84ad9a1c92fbfdfc14090e2749cedf2c1589ad8359aa169b", size = 29384337, upload-time = "2025-01-16T13:52:13.549Z" }, + { url = "https://files.pythonhosted.org/packages/a4/7d/f1c30a92854540bf789e9cd5dde7ef49bbe63f855b85a2e6b3db8135c591/opencv_python-4.11.0.86-cp37-abi3-win_amd64.whl", hash = "sha256:085ad9b77c18853ea66283e98affefe2de8cc4c1f43eda4c100cf9b2721142ec", size = 39488044, upload-time = "2025-01-16T13:52:21.928Z" }, +] + +[[package]] +name = "packaging" +version = "25.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, +] + +[[package]] +name = "ppo-trxl" +version = "1.0.1" +source = { editable = "." } +dependencies = [ + { name = "einops" }, + { name = "memory-gym" }, + { name = "minigrid" }, + { name = "opencv-python" }, + { name = "reprint" }, + { name = "tensorboard" }, + { name = "torch" }, + { name = "torchaudio" }, + { name = "tyro" }, + { name = "wandb" }, +] + +[package.metadata] +requires-dist = [ + { name = "einops", specifier = ">=0.7.0,<0.8" }, + { name = "memory-gym", specifier = ">=1.0.2,<2" }, + { name = "minigrid", specifier = ">=2.3.1,<3" }, + { name = "opencv-python", specifier = ">=4.9.0.80,<5" }, + { name = "reprint", specifier = ">=0.6.0,<0.7" }, + { name = "tensorboard", specifier = ">=2.16.2,<3" }, + { name = "torch", specifier = ">=2.0.0,<3", index = "https://download.pytorch.org/whl/cu118" }, + { name = "torchaudio", specifier = ">=2.0.0,<3", index = "https://download.pytorch.org/whl/cu118" }, + { name = "tyro", specifier = ">=0.8.3,<0.9" }, + { name = "wandb", specifier = ">=0.16.6,<0.17" }, +] + +[[package]] +name = "protobuf" +version = "4.25.8" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/df/01/34c8d2b6354906d728703cb9d546a0e534de479e25f1b581e4094c4a85cc/protobuf-4.25.8.tar.gz", hash = "sha256:6135cf8affe1fc6f76cced2641e4ea8d3e59518d1f24ae41ba97bcad82d397cd", size = 380920, upload-time = "2025-05-28T14:22:25.153Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/45/ff/05f34305fe6b85bbfbecbc559d423a5985605cad5eda4f47eae9e9c9c5c5/protobuf-4.25.8-cp310-abi3-win32.whl", hash = "sha256:504435d831565f7cfac9f0714440028907f1975e4bed228e58e72ecfff58a1e0", size = 392745, upload-time = "2025-05-28T14:22:10.524Z" }, + { url = "https://files.pythonhosted.org/packages/08/35/8b8a8405c564caf4ba835b1fdf554da869954712b26d8f2a98c0e434469b/protobuf-4.25.8-cp310-abi3-win_amd64.whl", hash = "sha256:bd551eb1fe1d7e92c1af1d75bdfa572eff1ab0e5bf1736716814cdccdb2360f9", size = 413736, upload-time = "2025-05-28T14:22:13.156Z" }, + { url = "https://files.pythonhosted.org/packages/28/d7/ab27049a035b258dab43445eb6ec84a26277b16105b277cbe0a7698bdc6c/protobuf-4.25.8-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:ca809b42f4444f144f2115c4c1a747b9a404d590f18f37e9402422033e464e0f", size = 394537, upload-time = "2025-05-28T14:22:14.768Z" }, + { url = "https://files.pythonhosted.org/packages/bd/6d/a4a198b61808dd3d1ee187082ccc21499bc949d639feb948961b48be9a7e/protobuf-4.25.8-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:9ad7ef62d92baf5a8654fbb88dac7fa5594cfa70fd3440488a5ca3bfc6d795a7", size = 294005, upload-time = "2025-05-28T14:22:16.052Z" }, + { url = "https://files.pythonhosted.org/packages/d6/c6/c9deaa6e789b6fc41b88ccbdfe7a42d2b82663248b715f55aa77fbc00724/protobuf-4.25.8-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:83e6e54e93d2b696a92cad6e6efc924f3850f82b52e1563778dfab8b355101b0", size = 294924, upload-time = "2025-05-28T14:22:17.105Z" }, + { url = "https://files.pythonhosted.org/packages/0c/c1/6aece0ab5209981a70cd186f164c133fdba2f51e124ff92b73de7fd24d78/protobuf-4.25.8-py3-none-any.whl", hash = "sha256:15a0af558aa3b13efef102ae6e4f3efac06f1eea11afb3a57db2901447d9fb59", size = 156757, upload-time = "2025-05-28T14:22:24.135Z" }, +] + +[[package]] +name = "psutil" +version = "7.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz", hash = "sha256:7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456", size = 497003, upload-time = "2025-02-13T21:54:07.946Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ed/e6/2d26234410f8b8abdbf891c9da62bee396583f713fb9f3325a4760875d22/psutil-7.0.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:101d71dc322e3cffd7cea0650b09b3d08b8e7c4109dd6809fe452dfd00e58b25", size = 238051, upload-time = "2025-02-13T21:54:12.36Z" }, + { url = "https://files.pythonhosted.org/packages/04/8b/30f930733afe425e3cbfc0e1468a30a18942350c1a8816acfade80c005c4/psutil-7.0.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:39db632f6bb862eeccf56660871433e111b6ea58f2caea825571951d4b6aa3da", size = 239535, upload-time = "2025-02-13T21:54:16.07Z" }, + { url = "https://files.pythonhosted.org/packages/2a/ed/d362e84620dd22876b55389248e522338ed1bf134a5edd3b8231d7207f6d/psutil-7.0.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1fcee592b4c6f146991ca55919ea3d1f8926497a713ed7faaf8225e174581e91", size = 275004, upload-time = "2025-02-13T21:54:18.662Z" }, + { url = "https://files.pythonhosted.org/packages/bf/b9/b0eb3f3cbcb734d930fdf839431606844a825b23eaf9a6ab371edac8162c/psutil-7.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b1388a4f6875d7e2aff5c4ca1cc16c545ed41dd8bb596cefea80111db353a34", size = 277986, upload-time = "2025-02-13T21:54:21.811Z" }, + { url = "https://files.pythonhosted.org/packages/eb/a2/709e0fe2f093556c17fbafda93ac032257242cabcc7ff3369e2cb76a97aa/psutil-7.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5f098451abc2828f7dc6b58d44b532b22f2088f4999a937557b603ce72b1993", size = 279544, upload-time = "2025-02-13T21:54:24.68Z" }, + { url = "https://files.pythonhosted.org/packages/50/e6/eecf58810b9d12e6427369784efe814a1eec0f492084ce8eb8f4d89d6d61/psutil-7.0.0-cp37-abi3-win32.whl", hash = "sha256:ba3fcef7523064a6c9da440fc4d6bd07da93ac726b5733c29027d7dc95b39d99", size = 241053, upload-time = "2025-02-13T21:54:34.31Z" }, + { url = "https://files.pythonhosted.org/packages/50/1b/6921afe68c74868b4c9fa424dad3be35b095e16687989ebbb50ce4fceb7c/psutil-7.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:4cf3d4eb1aa9b348dec30105c55cd9b7d4629285735a102beb4441e38db90553", size = 244885, upload-time = "2025-02-13T21:54:37.486Z" }, +] + +[[package]] +name = "pygame" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b9/42/154038c4988d750ded799dc5d6ca4e631db93888e3d76084625b0588dfd2/pygame-2.4.0.tar.gz", hash = "sha256:e3603e70e96ee30af1954ce57d4922a059402f368013e7138e90f1c03d185267", size = 13203507, upload-time = "2023-04-30T16:47:15.4Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c4/64/f5e3c6dfe181746f35feb4d3817d88c1aadc655cfe558e28335cb8803e53/pygame-2.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:63591f381e5b28b90e115ac7a96f8ce5ecb917facb42d79d4f89714f89cc6d8e", size = 13039153, upload-time = "2023-04-30T16:29:10.797Z" }, + { url = "https://files.pythonhosted.org/packages/4b/96/4a489c11a4f8fef4cb6e8a4fcf9deda3dfba9fcbb98da77881f028f9671c/pygame-2.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:13511c7c29f0fc23636f3b95a96ab45f964e84073e7e27dc602a479cd274d89a", size = 12200537, upload-time = "2023-04-30T16:29:37.041Z" }, + { url = "https://files.pythonhosted.org/packages/3c/85/4e0e78c9d3559dbaa104c868afc83889d707dc0f0454ad4c3ae9cd8ec660/pygame-2.4.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1b7201a44869eb420dd56c8e003251c9e7422c5304b3e78508e767a5634ab31b", size = 12761582, upload-time = "2023-04-30T19:34:28.064Z" }, + { url = "https://files.pythonhosted.org/packages/4e/b4/3381ad1024885436f2095aae3053159dfda993baa29c0a7c924fded003c0/pygame-2.4.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3ab14e06c302921f33d25180813711a920acef386d3992fc21731d2d5e8e86f0", size = 12678459, upload-time = "2023-04-30T19:34:32.67Z" }, + { url = "https://files.pythonhosted.org/packages/00/e8/691b773b559f08f9eb052fab652c0e34853f11f352144969cd5c0a0b5b10/pygame-2.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:418659c2d42f6a2356e2691006d79b6e07fd4992f9e904a2638c51c992f3e41b", size = 13458245, upload-time = "2023-04-30T16:47:49.714Z" }, + { url = "https://files.pythonhosted.org/packages/54/da/b0b10b973d2bd43363e27c183230ce0f50d7604985c3e1ce043e847c08b0/pygame-2.4.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e70fd71e0321a805001192e08ae4af45b86c68f155670230c3f6f4dd25089e70", size = 14157435, upload-time = "2023-04-30T19:34:37.203Z" }, + { url = "https://files.pythonhosted.org/packages/48/0c/44ab02609d845a48d489ec833b061dfdc3f9e959a078610a75bbb15f877e/pygame-2.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab8115af26a9e95f39b08fff416f097803480f265500b218a5ca065d6e73124f", size = 13818278, upload-time = "2023-04-30T19:34:41.315Z" }, + { url = "https://files.pythonhosted.org/packages/32/ea/4f653b14611f0e22b472ac832fa999ce944bc9433ad819c82e1e5505e953/pygame-2.4.0-cp310-cp310-win32.whl", hash = "sha256:4ffec9661731fb674ccc88d1de92709219047af3d8198d0e6203c21f3f1b54a7", size = 10227784, upload-time = "2023-04-30T16:04:07.317Z" }, + { url = "https://files.pythonhosted.org/packages/42/4e/014a718ffd67210cf2545d2e5ce1fadd846adad2f46d3c17cf712509ea96/pygame-2.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:bb5a39320d00fa781959d2d0151e6f0293dd1398c6dc9dc934112ecce7b4fb52", size = 10581493, upload-time = "2023-04-30T16:19:40.965Z" }, + { url = "https://files.pythonhosted.org/packages/13/36/97b13be0f1f715b70afa9d13a70c1709959611507de03696d1db2ca60b1b/pygame-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:23543e2d206d8de7d6db4f7b1c74e6fea6c01ead63caf7252e63341e1cdb09f6", size = 13033426, upload-time = "2023-04-30T16:30:05.184Z" }, + { url = "https://files.pythonhosted.org/packages/4c/53/29ba6c1472b1285d4925e29dda6b7ca8248c12e5702708caedf8b1ac9fb9/pygame-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4b562cfdd8caa76ba47ca2a9211fee6b0a95ceb95c9da94cf60a3909b2300854", size = 12191197, upload-time = "2023-04-30T16:30:33.011Z" }, + { url = "https://files.pythonhosted.org/packages/e1/0e/eeab91cbd69df04115069dd89a5d14c0a37a558212eeb2b7c30497ec0a30/pygame-2.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:751bc57e4c3b7cd92762344562dcbd405e2b54488de1d7a1e083a470bdbc5ae9", size = 13459399, upload-time = "2023-04-30T16:47:53.231Z" }, + { url = "https://files.pythonhosted.org/packages/4e/42/0da08d51a25f4ac6cd8978aad2c42a685eb27d5964fb551c765a1d9bbbed/pygame-2.4.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d9b1127f085d09c7c0a976d440e8fc2f7adc579d62abcfc20c23c2699bbe2dc1", size = 14140971, upload-time = "2023-04-30T19:34:44.669Z" }, + { url = "https://files.pythonhosted.org/packages/c5/e8/a034bbcdcb611ed60b030d9ac72cb1135693be319d367c218725dff233e8/pygame-2.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47fd096ceb68d966681f8d0e820f7305bf05b30421ca562cfdb3c89a5aef26e5", size = 13817209, upload-time = "2023-04-30T19:34:49.1Z" }, + { url = "https://files.pythonhosted.org/packages/75/ef/8a2f68857149860bd74be79395dfd0c4556f8c6a40f75efc20d783dd3f59/pygame-2.4.0-cp311-cp311-win32.whl", hash = "sha256:de963a4b8787d93a9fba8f4052d9dde8b12adbeac5781e48035be1557dfadb20", size = 10225629, upload-time = "2023-04-30T16:07:04.4Z" }, + { url = "https://files.pythonhosted.org/packages/09/0a/7ba8a50463c289763ab67cde3edf76bfdf9d095b578f9e0782a47ec89c76/pygame-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:75ef535ebe541b74a160bb59c3e520f543250d19f69d5973350ec1b9706e1469", size = 10577519, upload-time = "2023-04-30T16:22:21.768Z" }, +] + +[[package]] +name = "pygments" +version = "2.19.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e", size = 130631, upload-time = "2024-08-06T20:33:50.674Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9b/95/a3fac87cb7158e231b5a6012e438c647e1a87f09f8e0d123acec8ab8bf71/PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086", size = 184199, upload-time = "2024-08-06T20:31:40.178Z" }, + { url = "https://files.pythonhosted.org/packages/c7/7a/68bd47624dab8fd4afbfd3c48e3b79efe09098ae941de5b58abcbadff5cb/PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf", size = 171758, upload-time = "2024-08-06T20:31:42.173Z" }, + { url = "https://files.pythonhosted.org/packages/49/ee/14c54df452143b9ee9f0f29074d7ca5516a36edb0b4cc40c3f280131656f/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237", size = 718463, upload-time = "2024-08-06T20:31:44.263Z" }, + { url = "https://files.pythonhosted.org/packages/4d/61/de363a97476e766574650d742205be468921a7b532aa2499fcd886b62530/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b", size = 719280, upload-time = "2024-08-06T20:31:50.199Z" }, + { url = "https://files.pythonhosted.org/packages/6b/4e/1523cb902fd98355e2e9ea5e5eb237cbc5f3ad5f3075fa65087aa0ecb669/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed", size = 751239, upload-time = "2024-08-06T20:31:52.292Z" }, + { url = "https://files.pythonhosted.org/packages/b7/33/5504b3a9a4464893c32f118a9cc045190a91637b119a9c881da1cf6b7a72/PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180", size = 695802, upload-time = "2024-08-06T20:31:53.836Z" }, + { url = "https://files.pythonhosted.org/packages/5c/20/8347dcabd41ef3a3cdc4f7b7a2aff3d06598c8779faa189cdbf878b626a4/PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68", size = 720527, upload-time = "2024-08-06T20:31:55.565Z" }, + { url = "https://files.pythonhosted.org/packages/be/aa/5afe99233fb360d0ff37377145a949ae258aaab831bde4792b32650a4378/PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99", size = 144052, upload-time = "2024-08-06T20:31:56.914Z" }, + { url = "https://files.pythonhosted.org/packages/b5/84/0fa4b06f6d6c958d207620fc60005e241ecedceee58931bb20138e1e5776/PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e", size = 161774, upload-time = "2024-08-06T20:31:58.304Z" }, + { url = "https://files.pythonhosted.org/packages/f8/aa/7af4e81f7acba21a4c6be026da38fd2b872ca46226673c89a758ebdc4fd2/PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774", size = 184612, upload-time = "2024-08-06T20:32:03.408Z" }, + { url = "https://files.pythonhosted.org/packages/8b/62/b9faa998fd185f65c1371643678e4d58254add437edb764a08c5a98fb986/PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee", size = 172040, upload-time = "2024-08-06T20:32:04.926Z" }, + { url = "https://files.pythonhosted.org/packages/ad/0c/c804f5f922a9a6563bab712d8dcc70251e8af811fce4524d57c2c0fd49a4/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c", size = 736829, upload-time = "2024-08-06T20:32:06.459Z" }, + { url = "https://files.pythonhosted.org/packages/51/16/6af8d6a6b210c8e54f1406a6b9481febf9c64a3109c541567e35a49aa2e7/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317", size = 764167, upload-time = "2024-08-06T20:32:08.338Z" }, + { url = "https://files.pythonhosted.org/packages/75/e4/2c27590dfc9992f73aabbeb9241ae20220bd9452df27483b6e56d3975cc5/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85", size = 762952, upload-time = "2024-08-06T20:32:14.124Z" }, + { url = "https://files.pythonhosted.org/packages/9b/97/ecc1abf4a823f5ac61941a9c00fe501b02ac3ab0e373c3857f7d4b83e2b6/PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4", size = 735301, upload-time = "2024-08-06T20:32:16.17Z" }, + { url = "https://files.pythonhosted.org/packages/45/73/0f49dacd6e82c9430e46f4a027baa4ca205e8b0a9dce1397f44edc23559d/PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e", size = 756638, upload-time = "2024-08-06T20:32:18.555Z" }, + { url = "https://files.pythonhosted.org/packages/22/5f/956f0f9fc65223a58fbc14459bf34b4cc48dec52e00535c79b8db361aabd/PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5", size = 143850, upload-time = "2024-08-06T20:32:19.889Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/8da0bbe2ab9dcdd11f4f4557ccaf95c10b9811b13ecced089d43ce59c3c8/PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44", size = 161980, upload-time = "2024-08-06T20:32:21.273Z" }, + { url = "https://files.pythonhosted.org/packages/86/0c/c581167fc46d6d6d7ddcfb8c843a4de25bdd27e4466938109ca68492292c/PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab", size = 183873, upload-time = "2024-08-06T20:32:25.131Z" }, + { url = "https://files.pythonhosted.org/packages/a8/0c/38374f5bb272c051e2a69281d71cba6fdb983413e6758b84482905e29a5d/PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725", size = 173302, upload-time = "2024-08-06T20:32:26.511Z" }, + { url = "https://files.pythonhosted.org/packages/c3/93/9916574aa8c00aa06bbac729972eb1071d002b8e158bd0e83a3b9a20a1f7/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5", size = 739154, upload-time = "2024-08-06T20:32:28.363Z" }, + { url = "https://files.pythonhosted.org/packages/95/0f/b8938f1cbd09739c6da569d172531567dbcc9789e0029aa070856f123984/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425", size = 766223, upload-time = "2024-08-06T20:32:30.058Z" }, + { url = "https://files.pythonhosted.org/packages/b9/2b/614b4752f2e127db5cc206abc23a8c19678e92b23c3db30fc86ab731d3bd/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476", size = 767542, upload-time = "2024-08-06T20:32:31.881Z" }, + { url = "https://files.pythonhosted.org/packages/d4/00/dd137d5bcc7efea1836d6264f049359861cf548469d18da90cd8216cf05f/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48", size = 731164, upload-time = "2024-08-06T20:32:37.083Z" }, + { url = "https://files.pythonhosted.org/packages/c9/1f/4f998c900485e5c0ef43838363ba4a9723ac0ad73a9dc42068b12aaba4e4/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b", size = 756611, upload-time = "2024-08-06T20:32:38.898Z" }, + { url = "https://files.pythonhosted.org/packages/df/d1/f5a275fdb252768b7a11ec63585bc38d0e87c9e05668a139fea92b80634c/PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4", size = 140591, upload-time = "2024-08-06T20:32:40.241Z" }, + { url = "https://files.pythonhosted.org/packages/0c/e8/4f648c598b17c3d06e8753d7d13d57542b30d56e6c2dedf9c331ae56312e/PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8", size = 156338, upload-time = "2024-08-06T20:32:41.93Z" }, + { url = "https://files.pythonhosted.org/packages/ef/e3/3af305b830494fa85d95f6d95ef7fa73f2ee1cc8ef5b495c7c3269fb835f/PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba", size = 181309, upload-time = "2024-08-06T20:32:43.4Z" }, + { url = "https://files.pythonhosted.org/packages/45/9f/3b1c20a0b7a3200524eb0076cc027a970d320bd3a6592873c85c92a08731/PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1", size = 171679, upload-time = "2024-08-06T20:32:44.801Z" }, + { url = "https://files.pythonhosted.org/packages/7c/9a/337322f27005c33bcb656c655fa78325b730324c78620e8328ae28b64d0c/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133", size = 733428, upload-time = "2024-08-06T20:32:46.432Z" }, + { url = "https://files.pythonhosted.org/packages/a3/69/864fbe19e6c18ea3cc196cbe5d392175b4cf3d5d0ac1403ec3f2d237ebb5/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484", size = 763361, upload-time = "2024-08-06T20:32:51.188Z" }, + { url = "https://files.pythonhosted.org/packages/04/24/b7721e4845c2f162d26f50521b825fb061bc0a5afcf9a386840f23ea19fa/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5", size = 759523, upload-time = "2024-08-06T20:32:53.019Z" }, + { url = "https://files.pythonhosted.org/packages/2b/b2/e3234f59ba06559c6ff63c4e10baea10e5e7df868092bf9ab40e5b9c56b6/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc", size = 726660, upload-time = "2024-08-06T20:32:54.708Z" }, + { url = "https://files.pythonhosted.org/packages/fe/0f/25911a9f080464c59fab9027482f822b86bf0608957a5fcc6eaac85aa515/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652", size = 751597, upload-time = "2024-08-06T20:32:56.985Z" }, + { url = "https://files.pythonhosted.org/packages/14/0d/e2c3b43bbce3cf6bd97c840b46088a3031085179e596d4929729d8d68270/PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183", size = 140527, upload-time = "2024-08-06T20:33:03.001Z" }, + { url = "https://files.pythonhosted.org/packages/fa/de/02b54f42487e3d3c6efb3f89428677074ca7bf43aae402517bc7cca949f3/PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563", size = 156446, upload-time = "2024-08-06T20:33:04.33Z" }, +] + +[[package]] +name = "reprint" +version = "0.6.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "backports-shutil-get-terminal-size" }, + { name = "colorama" }, + { name = "six" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/ab/30/a742e69e37d4148dfa89acb6aa2a82ea298d1dfea02c6e9b2a43d4ed1065/reprint-0.6.0-py2.py3-none-any.whl", hash = "sha256:0ebc4dc21aefc810205f3fcc21783ea91bb96292a8500663482e864989bff54d", size = 6012, upload-time = "2021-02-08T11:44:52.215Z" }, +] + +[[package]] +name = "requests" +version = "2.32.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz", hash = "sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422", size = 135258, upload-time = "2025-06-09T16:43:07.34Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7c/e4/56027c4a6b4ae70ca9de302488c5ca95ad4a39e190093d6c1a8ace08341b/requests-2.32.4-py3-none-any.whl", hash = "sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c", size = 64847, upload-time = "2025-06-09T16:43:05.728Z" }, +] + +[[package]] +name = "rich" +version = "14.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown-it-py" }, + { name = "pygments" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz", hash = "sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725", size = 224078, upload-time = "2025-03-30T14:15:14.23Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0d/9b/63f4c7ebc259242c89b3acafdb37b41d1185c07ff0011164674e9076b491/rich-14.0.0-py3-none-any.whl", hash = "sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0", size = 243229, upload-time = "2025-03-30T14:15:12.283Z" }, +] + +[[package]] +name = "sentry-sdk" +version = "2.32.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/10/59/eb90c45cb836cf8bec973bba10230ddad1c55e2b2e9ffa9d7d7368948358/sentry_sdk-2.32.0.tar.gz", hash = "sha256:9016c75d9316b0f6921ac14c8cd4fb938f26002430ac5be9945ab280f78bec6b", size = 334932, upload-time = "2025-06-27T08:10:02.89Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/01/a1/fc4856bd02d2097324fb7ce05b3021fb850f864b83ca765f6e37e92ff8ca/sentry_sdk-2.32.0-py2.py3-none-any.whl", hash = "sha256:6cf51521b099562d7ce3606da928c473643abe99b00ce4cb5626ea735f4ec345", size = 356122, upload-time = "2025-06-27T08:10:01.424Z" }, +] + +[[package]] +name = "setproctitle" +version = "1.3.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9e/af/56efe21c53ac81ac87e000b15e60b3d8104224b4313b6eacac3597bd183d/setproctitle-1.3.6.tar.gz", hash = "sha256:c9f32b96c700bb384f33f7cf07954bb609d35dd82752cef57fb2ee0968409169", size = 26889, upload-time = "2025-04-29T13:35:00.184Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7d/db/8214810cae49e2e474ea741aaa7d6111486f27377e864f0eb6d297c9be56/setproctitle-1.3.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ebcf34b69df4ca0eabaaaf4a3d890f637f355fed00ba806f7ebdd2d040658c26", size = 17412, upload-time = "2025-04-29T13:32:38.795Z" }, + { url = "https://files.pythonhosted.org/packages/a4/45/909b0dcd68b16d2e58de0e861c0c0b67748ccc87ff9b59136e9710b528b1/setproctitle-1.3.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1aa1935aa2195b76f377e5cb018290376b7bf085f0b53f5a95c0c21011b74367", size = 11966, upload-time = "2025-04-29T13:32:41.289Z" }, + { url = "https://files.pythonhosted.org/packages/8a/f4/f1cd54fedae1cdacf1d1db833dc096bfb1f029451f60e68563e4c26ed2f7/setproctitle-1.3.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13624d9925bb481bc0ccfbc7f533da38bfbfe6e80652314f789abc78c2e513bd", size = 31350, upload-time = "2025-04-29T13:32:43.013Z" }, + { url = "https://files.pythonhosted.org/packages/5a/5f/f159b22d286a349633d4090090b8e6632fb84575a64f189b68e70a613c65/setproctitle-1.3.6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97a138fa875c6f281df7720dac742259e85518135cd0e3551aba1c628103d853", size = 32704, upload-time = "2025-04-29T13:32:44.215Z" }, + { url = "https://files.pythonhosted.org/packages/9c/25/e5ea2673d951dafc04b6544d7b33dd9283733d715c8f40e93d39ae35d6a0/setproctitle-1.3.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c86e9e82bfab579327dbe9b82c71475165fbc8b2134d24f9a3b2edaf200a5c3d", size = 29833, upload-time = "2025-04-29T13:32:45.882Z" }, + { url = "https://files.pythonhosted.org/packages/67/2b/c3cbd4a4462c1143465d8c151f1d51bbfb418e60a96a754329d28d416575/setproctitle-1.3.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6af330ddc2ec05a99c3933ab3cba9365357c0b8470a7f2fa054ee4b0984f57d1", size = 30884, upload-time = "2025-04-29T13:32:47.515Z" }, + { url = "https://files.pythonhosted.org/packages/27/04/b43a622a9fbf0f216a50b523067d3b07739ede2106a7226223e33abf6659/setproctitle-1.3.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:109fc07b1cd6cef9c245b2028e3e98e038283342b220def311d0239179810dbe", size = 30798, upload-time = "2025-04-29T13:32:48.717Z" }, + { url = "https://files.pythonhosted.org/packages/41/60/8eb197b56b0a3110eef2a1d2ddb61b3f5809dbab9d975aa40c86e5d4b312/setproctitle-1.3.6-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:7df5fcc48588f82b6cc8073db069609ddd48a49b1e9734a20d0efb32464753c4", size = 29758, upload-time = "2025-04-29T13:32:50.3Z" }, + { url = "https://files.pythonhosted.org/packages/db/1d/c394322a5425c12f4ada0696eb6d194768752d4e3acaca0c9d593025feb4/setproctitle-1.3.6-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:2407955dc359d735a20ac6e797ad160feb33d529a2ac50695c11a1ec680eafab", size = 32157, upload-time = "2025-04-29T13:32:52.026Z" }, + { url = "https://files.pythonhosted.org/packages/e7/24/ce080682b144f057814efbe95daac09149e90f7689e2515897817a941686/setproctitle-1.3.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:38ca045626af693da042ac35d7332e7b9dbd52e6351d6973b310612e3acee6d6", size = 30291, upload-time = "2025-04-29T13:32:53.737Z" }, + { url = "https://files.pythonhosted.org/packages/a7/4f/4db265493567865428dcec376f8142a9c65d27c10c3ac915d173b4053afb/setproctitle-1.3.6-cp310-cp310-win32.whl", hash = "sha256:9483aa336687463f5497dd37a070094f3dff55e2c888994f8440fcf426a1a844", size = 11492, upload-time = "2025-04-29T13:32:55.271Z" }, + { url = "https://files.pythonhosted.org/packages/38/b0/64c3948f7957db44b4c5edfe9c197de493144dc915ddf95cf36aeca0dc52/setproctitle-1.3.6-cp310-cp310-win_amd64.whl", hash = "sha256:4efc91b437f6ff2578e89e3f17d010c0a0ff01736606473d082913ecaf7859ba", size = 12204, upload-time = "2025-04-29T13:32:56.711Z" }, + { url = "https://files.pythonhosted.org/packages/27/3b/8288d0cd969a63500dd62fc2c99ce6980f9909ccef0770ab1f86c361e0bf/setproctitle-1.3.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a1d856b0f4e4a33e31cdab5f50d0a14998f3a2d726a3fd5cb7c4d45a57b28d1b", size = 17412, upload-time = "2025-04-29T13:32:58.135Z" }, + { url = "https://files.pythonhosted.org/packages/39/37/43a5a3e25ca1048dbbf4db0d88d346226f5f1acd131bb8e660f4bfe2799f/setproctitle-1.3.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:50706b9c0eda55f7de18695bfeead5f28b58aa42fd5219b3b1692d554ecbc9ec", size = 11963, upload-time = "2025-04-29T13:32:59.17Z" }, + { url = "https://files.pythonhosted.org/packages/5b/47/f103c40e133154783c91a10ab08ac9fc410ed835aa85bcf7107cb882f505/setproctitle-1.3.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:af188f3305f0a65c3217c30c6d4c06891e79144076a91e8b454f14256acc7279", size = 31718, upload-time = "2025-04-29T13:33:00.36Z" }, + { url = "https://files.pythonhosted.org/packages/1f/13/7325dd1c008dd6c0ebd370ddb7505977054a87e406f142318e395031a792/setproctitle-1.3.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cce0ed8b3f64c71c140f0ec244e5fdf8ecf78ddf8d2e591d4a8b6aa1c1214235", size = 33027, upload-time = "2025-04-29T13:33:01.499Z" }, + { url = "https://files.pythonhosted.org/packages/0c/0a/6075bfea05a71379d77af98a9ac61163e8b6e5ef1ae58cd2b05871b2079c/setproctitle-1.3.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70100e2087fe05359f249a0b5f393127b3a1819bf34dec3a3e0d4941138650c9", size = 30223, upload-time = "2025-04-29T13:33:03.259Z" }, + { url = "https://files.pythonhosted.org/packages/cc/41/fbf57ec52f4f0776193bd94334a841f0bc9d17e745f89c7790f336420c65/setproctitle-1.3.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1065ed36bd03a3fd4186d6c6de5f19846650b015789f72e2dea2d77be99bdca1", size = 31204, upload-time = "2025-04-29T13:33:04.455Z" }, + { url = "https://files.pythonhosted.org/packages/97/b5/f799fb7a00de29fb0ac1dfd015528dea425b9e31a8f1068a0b3df52d317f/setproctitle-1.3.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4adf6a0013fe4e0844e3ba7583ec203ca518b9394c6cc0d3354df2bf31d1c034", size = 31181, upload-time = "2025-04-29T13:33:05.697Z" }, + { url = "https://files.pythonhosted.org/packages/b5/b7/81f101b612014ec61723436022c31146178813d6ca6b947f7b9c84e9daf4/setproctitle-1.3.6-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:eb7452849f6615871eabed6560ffedfe56bc8af31a823b6be4ce1e6ff0ab72c5", size = 30101, upload-time = "2025-04-29T13:33:07.223Z" }, + { url = "https://files.pythonhosted.org/packages/67/23/681232eed7640eab96719daa8647cc99b639e3daff5c287bd270ef179a73/setproctitle-1.3.6-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a094b7ce455ca341b59a0f6ce6be2e11411ba6e2860b9aa3dbb37468f23338f4", size = 32438, upload-time = "2025-04-29T13:33:08.538Z" }, + { url = "https://files.pythonhosted.org/packages/19/f8/4d075a7bdc3609ac71535b849775812455e4c40aedfbf0778a6f123b1774/setproctitle-1.3.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ad1c2c2baaba62823a7f348f469a967ece0062140ca39e7a48e4bbb1f20d54c4", size = 30625, upload-time = "2025-04-29T13:33:09.707Z" }, + { url = "https://files.pythonhosted.org/packages/5f/73/a2a8259ebee166aee1ca53eead75de0e190b3ddca4f716e5c7470ebb7ef6/setproctitle-1.3.6-cp311-cp311-win32.whl", hash = "sha256:8050c01331135f77ec99d99307bfbc6519ea24d2f92964b06f3222a804a3ff1f", size = 11488, upload-time = "2025-04-29T13:33:10.953Z" }, + { url = "https://files.pythonhosted.org/packages/c9/15/52cf5e1ff0727d53704cfdde2858eaf237ce523b0b04db65faa84ff83e13/setproctitle-1.3.6-cp311-cp311-win_amd64.whl", hash = "sha256:9b73cf0fe28009a04a35bb2522e4c5b5176cc148919431dcb73fdbdfaab15781", size = 12201, upload-time = "2025-04-29T13:33:12.389Z" }, + { url = "https://files.pythonhosted.org/packages/8f/fb/99456fd94d4207c5f6c40746a048a33a52b4239cd7d9c8d4889e2210ec82/setproctitle-1.3.6-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:af44bb7a1af163806bbb679eb8432fa7b4fb6d83a5d403b541b675dcd3798638", size = 17399, upload-time = "2025-04-29T13:33:13.406Z" }, + { url = "https://files.pythonhosted.org/packages/d5/48/9699191fe6062827683c43bfa9caac33a2c89f8781dd8c7253fa3dba85fd/setproctitle-1.3.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3cca16fd055316a48f0debfcbfb6af7cea715429fc31515ab3fcac05abd527d8", size = 11966, upload-time = "2025-04-29T13:33:14.976Z" }, + { url = "https://files.pythonhosted.org/packages/33/03/b085d192b9ecb9c7ce6ad6ef30ecf4110b7f39430b58a56245569827fcf4/setproctitle-1.3.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ea002088d5554fd75e619742cefc78b84a212ba21632e59931b3501f0cfc8f67", size = 32017, upload-time = "2025-04-29T13:33:16.163Z" }, + { url = "https://files.pythonhosted.org/packages/ae/68/c53162e645816f97212002111420d1b2f75bf6d02632e37e961dc2cd6d8b/setproctitle-1.3.6-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb465dd5825356c1191a038a86ee1b8166e3562d6e8add95eec04ab484cfb8a2", size = 33419, upload-time = "2025-04-29T13:33:18.239Z" }, + { url = "https://files.pythonhosted.org/packages/ac/0d/119a45d15a816a6cf5ccc61b19729f82620095b27a47e0a6838216a95fae/setproctitle-1.3.6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d2c8e20487b3b73c1fa72c56f5c89430617296cd380373e7af3a538a82d4cd6d", size = 30711, upload-time = "2025-04-29T13:33:19.571Z" }, + { url = "https://files.pythonhosted.org/packages/e3/fb/5e9b5068df9e9f31a722a775a5e8322a29a638eaaa3eac5ea7f0b35e6314/setproctitle-1.3.6-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0d6252098e98129a1decb59b46920d4eca17b0395f3d71b0d327d086fefe77d", size = 31742, upload-time = "2025-04-29T13:33:21.172Z" }, + { url = "https://files.pythonhosted.org/packages/35/88/54de1e73e8fce87d587889c7eedb48fc4ee2bbe4e4ca6331690d03024f86/setproctitle-1.3.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:cf355fbf0d4275d86f9f57be705d8e5eaa7f8ddb12b24ced2ea6cbd68fdb14dc", size = 31925, upload-time = "2025-04-29T13:33:22.427Z" }, + { url = "https://files.pythonhosted.org/packages/f3/01/65948d7badd66e63e3db247b923143da142790fa293830fdecf832712c2d/setproctitle-1.3.6-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e288f8a162d663916060beb5e8165a8551312b08efee9cf68302687471a6545d", size = 30981, upload-time = "2025-04-29T13:33:23.739Z" }, + { url = "https://files.pythonhosted.org/packages/22/20/c495e61786f1d38d5dc340b9d9077fee9be3dfc7e89f515afe12e1526dbc/setproctitle-1.3.6-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:b2e54f4a2dc6edf0f5ea5b1d0a608d2af3dcb5aa8c8eeab9c8841b23e1b054fe", size = 33209, upload-time = "2025-04-29T13:33:24.915Z" }, + { url = "https://files.pythonhosted.org/packages/98/3f/a457b8550fbd34d5b482fe20b8376b529e76bf1fbf9a474a6d9a641ab4ad/setproctitle-1.3.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b6f4abde9a2946f57e8daaf1160b2351bcf64274ef539e6675c1d945dbd75e2a", size = 31587, upload-time = "2025-04-29T13:33:26.123Z" }, + { url = "https://files.pythonhosted.org/packages/44/fe/743517340e5a635e3f1c4310baea20c16c66202f96a6f4cead222ffd6d84/setproctitle-1.3.6-cp312-cp312-win32.whl", hash = "sha256:db608db98ccc21248370d30044a60843b3f0f3d34781ceeea67067c508cd5a28", size = 11487, upload-time = "2025-04-29T13:33:27.403Z" }, + { url = "https://files.pythonhosted.org/packages/60/9a/d88f1c1f0f4efff1bd29d9233583ee341114dda7d9613941453984849674/setproctitle-1.3.6-cp312-cp312-win_amd64.whl", hash = "sha256:082413db8a96b1f021088e8ec23f0a61fec352e649aba20881895815388b66d3", size = 12208, upload-time = "2025-04-29T13:33:28.852Z" }, + { url = "https://files.pythonhosted.org/packages/89/76/f1a2fdbf9b9602945a7489ba5c52e9863de37381ef1a85a2b9ed0ff8bc79/setproctitle-1.3.6-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e2a9e62647dc040a76d55563580bf3bb8fe1f5b6ead08447c2ed0d7786e5e794", size = 17392, upload-time = "2025-04-29T13:33:30.925Z" }, + { url = "https://files.pythonhosted.org/packages/5c/5b/4e0db8b10b4543afcb3dbc0827793d46e43ec1de6b377e313af3703d08e0/setproctitle-1.3.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:751ba352ed922e0af60458e961167fa7b732ac31c0ddd1476a2dfd30ab5958c5", size = 11951, upload-time = "2025-04-29T13:33:32.296Z" }, + { url = "https://files.pythonhosted.org/packages/dc/fe/d5d00aaa700fe1f6160b6e95c225b29c01f4d9292176d48fd968815163ea/setproctitle-1.3.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7890e291bf4708e3b61db9069ea39b3ab0651e42923a5e1f4d78a7b9e4b18301", size = 32087, upload-time = "2025-04-29T13:33:33.469Z" }, + { url = "https://files.pythonhosted.org/packages/9f/b3/894b827b93ef813c082479bebf88185860f01ac243df737823dd705e7fff/setproctitle-1.3.6-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b2b17855ed7f994f3f259cf2dfbfad78814538536fa1a91b50253d84d87fd88d", size = 33502, upload-time = "2025-04-29T13:33:34.831Z" }, + { url = "https://files.pythonhosted.org/packages/b2/cd/5330734cca1a4cfcb721432c22cb7899ff15a4101ba868b2ef452ffafea1/setproctitle-1.3.6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e51ec673513465663008ce402171192a053564865c2fc6dc840620871a9bd7c", size = 30713, upload-time = "2025-04-29T13:33:36.739Z" }, + { url = "https://files.pythonhosted.org/packages/fa/d3/c2590c5daa2e9a008d3f2b16c0f4a351826193be55f147cb32af49c6d814/setproctitle-1.3.6-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63cc10352dc6cf35a33951656aa660d99f25f574eb78132ce41a85001a638aa7", size = 31792, upload-time = "2025-04-29T13:33:37.974Z" }, + { url = "https://files.pythonhosted.org/packages/e6/b1/c553ed5af8cfcecd5ae7737e63af58a17a03d26f3d61868c7eb20bf7e3cf/setproctitle-1.3.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0dba8faee2e4a96e934797c9f0f2d093f8239bf210406a99060b3eabe549628e", size = 31927, upload-time = "2025-04-29T13:33:39.203Z" }, + { url = "https://files.pythonhosted.org/packages/70/78/2d5385206540127a3dca0ff83225b1ac66873f5cc89d4a6d3806c92f5ae2/setproctitle-1.3.6-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:e3e44d08b61de0dd6f205528498f834a51a5c06689f8fb182fe26f3a3ce7dca9", size = 30981, upload-time = "2025-04-29T13:33:40.431Z" }, + { url = "https://files.pythonhosted.org/packages/31/62/e3e4a4e006d0e549748e53cded4ff3b667be0602860fc61b7de8b412b667/setproctitle-1.3.6-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:de004939fc3fd0c1200d26ea9264350bfe501ffbf46c8cf5dc7f345f2d87a7f1", size = 33244, upload-time = "2025-04-29T13:33:41.817Z" }, + { url = "https://files.pythonhosted.org/packages/aa/05/4b223fd4ef94e105dc7aff27fa502fb7200cf52be2bb0c064bd2406b5611/setproctitle-1.3.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3f8194b4d631b003a1176a75d1acd545e04b1f54b821638e098a93e6e62830ef", size = 31630, upload-time = "2025-04-29T13:33:43.093Z" }, + { url = "https://files.pythonhosted.org/packages/1b/ba/5f68eb969f7336f54b54a599fd3ffbd7662f9733b080bc8598705971b3dd/setproctitle-1.3.6-cp313-cp313-win32.whl", hash = "sha256:d714e002dd3638170fe7376dc1b686dbac9cb712cde3f7224440af722cc9866a", size = 11480, upload-time = "2025-04-29T13:34:01.257Z" }, + { url = "https://files.pythonhosted.org/packages/ba/f5/7f47f0ca35c9c357f16187cee9229f3eda0237bc6fdd3061441336f361c0/setproctitle-1.3.6-cp313-cp313-win_amd64.whl", hash = "sha256:b70c07409d465f3a8b34d52f863871fb8a00755370791d2bd1d4f82b3cdaf3d5", size = 12198, upload-time = "2025-04-29T13:34:02.293Z" }, + { url = "https://files.pythonhosted.org/packages/39/ad/c3941b8fc6b32a976c9e2d9615a90ae793b69cd010ca8c3575dbc822104f/setproctitle-1.3.6-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:23a57d3b8f1549515c2dbe4a2880ebc1f27780dc126c5e064167563e015817f5", size = 17401, upload-time = "2025-04-29T13:33:44.186Z" }, + { url = "https://files.pythonhosted.org/packages/04/38/a184f857b988d3a9c401e470a4e38182a5c99ee77bf90432d7665e9d35a3/setproctitle-1.3.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:81c443310831e29fabbd07b75ebbfa29d0740b56f5907c6af218482d51260431", size = 11959, upload-time = "2025-04-29T13:33:45.71Z" }, + { url = "https://files.pythonhosted.org/packages/b7/b9/4878ef9d8483adfd1edf6bf95151362aaec0d05aac306a97ff0383f491b5/setproctitle-1.3.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d88c63bd395c787b0aa81d8bbc22c1809f311032ce3e823a6517b711129818e4", size = 33463, upload-time = "2025-04-29T13:33:46.913Z" }, + { url = "https://files.pythonhosted.org/packages/cc/60/3ef49d1931aff2a36a7324a49cca10d77ef03e0278452fd468c33a52d7e3/setproctitle-1.3.6-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d73f14b86d0e2858ece6bf5807c9889670e392c001d414b4293d0d9b291942c3", size = 34959, upload-time = "2025-04-29T13:33:48.216Z" }, + { url = "https://files.pythonhosted.org/packages/81/c6/dee0a973acecefb0db6c9c2e0ea7f18b7e4db773a72e534741ebdee8bbb8/setproctitle-1.3.6-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3393859eb8f19f5804049a685bf286cb08d447e28ba5c6d8543c7bf5500d5970", size = 32055, upload-time = "2025-04-29T13:33:49.443Z" }, + { url = "https://files.pythonhosted.org/packages/ea/a5/5dd5c4192cf18d16349a32a07f728a9a48a2a05178e16966cabd6645903e/setproctitle-1.3.6-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:785cd210c0311d9be28a70e281a914486d62bfd44ac926fcd70cf0b4d65dff1c", size = 32986, upload-time = "2025-04-29T13:33:51.519Z" }, + { url = "https://files.pythonhosted.org/packages/df/a6/1508d37eb8008670d33f13fcdb91cbd8ef54697276469abbfdd3d4428c59/setproctitle-1.3.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c051f46ed1e13ba8214b334cbf21902102807582fbfaf0fef341b9e52f0fafbf", size = 32736, upload-time = "2025-04-29T13:33:52.852Z" }, + { url = "https://files.pythonhosted.org/packages/1a/73/c84ec8880d543766a12fcd6b65dbd013770974a40577889f357409b0441e/setproctitle-1.3.6-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:49498ebf68ca3e75321ffe634fcea5cc720502bfaa79bd6b03ded92ce0dc3c24", size = 31945, upload-time = "2025-04-29T13:33:54.665Z" }, + { url = "https://files.pythonhosted.org/packages/95/0a/126b9ff7a406a69a62825fe5bd6d1ba8671919a7018c4f9e2c63f49bfcb6/setproctitle-1.3.6-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:4431629c178193f23c538cb1de3da285a99ccc86b20ee91d81eb5f1a80e0d2ba", size = 34333, upload-time = "2025-04-29T13:33:56.101Z" }, + { url = "https://files.pythonhosted.org/packages/9a/fd/5474b04f1c013ff460129d2bc774557dd6e186da4667865efef9a83bf378/setproctitle-1.3.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:d136fbf8ad4321716e44d6d6b3d8dffb4872626010884e07a1db54b7450836cf", size = 32508, upload-time = "2025-04-29T13:33:57.43Z" }, + { url = "https://files.pythonhosted.org/packages/32/21/2503e38520cb076a7ecaef6a35d6a6fa89cf02af3541c84c811fd7500d20/setproctitle-1.3.6-cp313-cp313t-win32.whl", hash = "sha256:d483cc23cc56ab32911ea0baa0d2d9ea7aa065987f47de847a0a93a58bf57905", size = 11482, upload-time = "2025-04-29T13:33:58.602Z" }, + { url = "https://files.pythonhosted.org/packages/65/23/7833d75a27fba25ddc5cd3b54cd03c4bf8e18b8e2dbec622eb6326278ce8/setproctitle-1.3.6-cp313-cp313t-win_amd64.whl", hash = "sha256:74973aebea3543ad033b9103db30579ec2b950a466e09f9c2180089e8346e0ec", size = 12209, upload-time = "2025-04-29T13:33:59.727Z" }, + { url = "https://files.pythonhosted.org/packages/d0/2b/f19977b646b64c1440dade2c385c89c39f74ce5254defa102dfd9c163e0b/setproctitle-1.3.6-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:3cde5b83ec4915cd5e6ae271937fd60d14113c8f7769b4a20d51769fe70d8717", size = 11471, upload-time = "2025-04-29T13:34:42.665Z" }, + { url = "https://files.pythonhosted.org/packages/78/46/db58cf700f1408cf0f63d3f939f7b077bd450da8e037310f70e74c41262f/setproctitle-1.3.6-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:797f2846b546a8741413c57d9fb930ad5aa939d925c9c0fa6186d77580035af7", size = 13520, upload-time = "2025-04-29T13:34:44.287Z" }, + { url = "https://files.pythonhosted.org/packages/5c/46/0b89e7ebe77543e721c67077ad93fc8c7c3c31a8db3b12e00d02950f6adc/setproctitle-1.3.6-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ac3eb04bcf0119aadc6235a2c162bae5ed5f740e3d42273a7228b915722de20", size = 13094, upload-time = "2025-04-29T13:34:45.605Z" }, + { url = "https://files.pythonhosted.org/packages/f7/78/03f2e42eb83bce6f853d7751ae95f8a3ae7408145a0b6cdd717be01497d7/setproctitle-1.3.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0e6b5633c94c5111f7137f875e8f1ff48f53b991d5d5b90932f27dc8c1fa9ae4", size = 12241, upload-time = "2025-04-29T13:34:46.996Z" }, +] + +[[package]] +name = "setuptools" +version = "80.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz", hash = "sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c", size = 1319958, upload-time = "2025-05-27T00:56:51.443Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a3/dc/17031897dae0efacfea57dfd3a82fdd2a2aeb58e0ff71b77b87e44edc772/setuptools-80.9.0-py3-none-any.whl", hash = "sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922", size = 1201486, upload-time = "2025-05-27T00:56:49.664Z" }, +] + +[[package]] +name = "shtab" +version = "1.7.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/3e/837067b970c1d2ffa936c72f384a63fdec4e186b74da781e921354a94024/shtab-1.7.2.tar.gz", hash = "sha256:8c16673ade76a2d42417f03e57acf239bfb5968e842204c17990cae357d07d6f", size = 45751, upload-time = "2025-04-12T20:28:03.271Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/74/03/3271b7bb470fbab4adf5bd30b0d32143909d96f3608d815b447357f47f2b/shtab-1.7.2-py3-none-any.whl", hash = "sha256:858a5805f6c137bb0cda4f282d27d08fd44ca487ab4a6a36d2a400263cd0b5c1", size = 14214, upload-time = "2025-04-12T20:28:01.82Z" }, +] + +[[package]] +name = "six" +version = "1.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, +] + +[[package]] +name = "smmap" +version = "5.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz", hash = "sha256:26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5", size = 22329, upload-time = "2025-01-02T07:14:40.909Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/be/d09147ad1ec7934636ad912901c5fd7667e1c858e19d355237db0d0cd5e4/smmap-5.0.2-py3-none-any.whl", hash = "sha256:b30115f0def7d7531d22a0fb6502488d879e75b260a9db4d0819cfb25403af5e", size = 24303, upload-time = "2025-01-02T07:14:38.724Z" }, +] + +[[package]] +name = "sympy" +version = "1.14.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mpmath" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517", size = 7793921, upload-time = "2025-04-27T18:05:01.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", size = 6299353, upload-time = "2025-04-27T18:04:59.103Z" }, +] + +[[package]] +name = "tensorboard" +version = "2.19.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "absl-py" }, + { name = "grpcio" }, + { name = "markdown" }, + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.3.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "packaging" }, + { name = "protobuf" }, + { name = "setuptools" }, + { name = "six" }, + { name = "tensorboard-data-server" }, + { name = "werkzeug" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/5d/12/4f70e8e2ba0dbe72ea978429d8530b0333f0ed2140cc571a48802878ef99/tensorboard-2.19.0-py3-none-any.whl", hash = "sha256:5e71b98663a641a7ce8a6e70b0be8e1a4c0c45d48760b076383ac4755c35b9a0", size = 5503412, upload-time = "2025-02-12T08:17:27.21Z" }, +] + +[[package]] +name = "tensorboard-data-server" +version = "0.7.2" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7a/13/e503968fefabd4c6b2650af21e110aa8466fe21432cd7c43a84577a89438/tensorboard_data_server-0.7.2-py3-none-any.whl", hash = "sha256:7e0610d205889588983836ec05dc098e80f97b7e7bbff7e994ebb78f578d0ddb", size = 2356, upload-time = "2023-10-23T21:23:32.16Z" }, + { url = "https://files.pythonhosted.org/packages/b7/85/dabeaf902892922777492e1d253bb7e1264cadce3cea932f7ff599e53fea/tensorboard_data_server-0.7.2-py3-none-macosx_10_9_x86_64.whl", hash = "sha256:9fe5d24221b29625dbc7328b0436ca7fc1c23de4acf4d272f1180856e32f9f60", size = 4823598, upload-time = "2023-10-23T21:23:33.714Z" }, + { url = "https://files.pythonhosted.org/packages/73/c6/825dab04195756cf8ff2e12698f22513b3db2f64925bdd41671bfb33aaa5/tensorboard_data_server-0.7.2-py3-none-manylinux_2_31_x86_64.whl", hash = "sha256:ef687163c24185ae9754ed5650eb5bc4d84ff257aabdc33f0cc6f74d8ba54530", size = 6590363, upload-time = "2023-10-23T21:23:35.583Z" }, +] + +[[package]] +name = "torch" +version = "2.7.1+cu118" +source = { registry = "https://download.pytorch.org/whl/cu118" } +dependencies = [ + { name = "filelock" }, + { name = "fsspec" }, + { name = "jinja2" }, + { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "networkx", version = "3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "nvidia-cublas-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cuda-cupti-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cuda-nvrtc-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cuda-runtime-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cudnn-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cufft-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-curand-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cusolver-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-cusparse-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-nccl-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "nvidia-nvtx-cu11", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "setuptools", marker = "python_full_version >= '3.12'" }, + { name = "sympy" }, + { name = "triton", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" }, + { name = "typing-extensions" }, +] +wheels = [ + { url = "https://download.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:89433c62b02ec802d4c0887c867d935887ae8f00d7cc549ecf1c2640d096bd4c" }, + { url = "https://download.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp310-cp310-win_amd64.whl", hash = "sha256:af4833e36a8e964681a4dad7775f559cf043bd42c9d0c0b5e0619f9d0e44cb56" }, + { url = "https://download.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a596d91c747d1fa601724e85b9c8797c8d7c62140aa1acf245773e911254bc45" }, + { url = "https://download.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp311-cp311-win_amd64.whl", hash = "sha256:584e5ee99d29286b93be2fba3b3f1f5b9d7a4b9055a288eb31b33100a1f09ed9" }, + { url = "https://download.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:91454dcfdb81f181fdf216d6d6d9912fbd8795578b90384b3b8b8132737072bb" }, + { url = "https://download.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp312-cp312-win_amd64.whl", hash = "sha256:80855ec840b7b06372ff43535d01393a8ec101842618d1f9ed629572b52aed71" }, + { url = "https://download.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:a3f02b2795165eaf6dfe18c963519049a45a9c588488795cebc5015dac77ab46" }, + { url = "https://download.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp313-cp313-win_amd64.whl", hash = "sha256:3122e59a5fe4e9ee991e7ad4e7002afa549b2873e421759df6454f20f53a6c74" }, + { url = "https://download.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:627b7248b429d97b3955f1d0375aad1192b8f20f37556384848b6c622e491eb5" }, + { url = "https://download.pytorch.org/whl/cu118/torch-2.7.1%2Bcu118-cp313-cp313t-win_amd64.whl", hash = "sha256:e06a205f15b3a045924d72f788af0664ca5f20e610eaac7162189721cf31a771" }, +] + +[[package]] +name = "torchaudio" +version = "2.7.1+cu118" +source = { registry = "https://download.pytorch.org/whl/cu118" } +dependencies = [ + { name = "torch" }, +] +wheels = [ + { url = "https://download.pytorch.org/whl/cu118/torchaudio-2.7.1%2Bcu118-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:effef2c79a95830d11b481f6fbe461312988b49b4c0b3dbe893d0b56d5ce032f" }, + { url = "https://download.pytorch.org/whl/cu118/torchaudio-2.7.1%2Bcu118-cp310-cp310-win_amd64.whl", hash = "sha256:da55035d325d4523981c48413da8e34321ef6d9306fa71b04b96dc04b3ed8318" }, + { url = "https://download.pytorch.org/whl/cu118/torchaudio-2.7.1%2Bcu118-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:76629345b5e095b5b9dd6abbeb1919e50dd8f3c2082d89b54ad5cd7d25158de9" }, + { url = "https://download.pytorch.org/whl/cu118/torchaudio-2.7.1%2Bcu118-cp311-cp311-win_amd64.whl", hash = "sha256:c33d68f7a0c35810dbd74150f8994ef850c54813d0f8c5b7b1e5d71f2b6c7159" }, + { url = "https://download.pytorch.org/whl/cu118/torchaudio-2.7.1%2Bcu118-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:6b64a313866b2a5bb43d4c6906e8820d3dc844f89a97c00dc5c8b92e6b70fe17" }, + { url = "https://download.pytorch.org/whl/cu118/torchaudio-2.7.1%2Bcu118-cp312-cp312-win_amd64.whl", hash = "sha256:e214b04cd40be5e733f5915879f8cbe2de889661ca179fd86998bbadf3740f44" }, + { url = "https://download.pytorch.org/whl/cu118/torchaudio-2.7.1%2Bcu118-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:550f0c97348d02e5e18d708a4b29f54b63920d5263b56467f0592ab7544b1772" }, + { url = "https://download.pytorch.org/whl/cu118/torchaudio-2.7.1%2Bcu118-cp313-cp313-win_amd64.whl", hash = "sha256:15a3bc02bd0ecf6a3a90c7aa06b54f2b89862deac220eac2421794347eaf9737" }, + { url = "https://download.pytorch.org/whl/cu118/torchaudio-2.7.1%2Bcu118-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:29da4e463bc2f94dcf2b46c0ba05dee3751efa7f880278cbfdf38b147e359a3d" }, + { url = "https://download.pytorch.org/whl/cu118/torchaudio-2.7.1%2Bcu118-cp313-cp313t-win_amd64.whl", hash = "sha256:28b31c05d75b0b35e34e8627409f30def4bc8f2ebebd2dc75956999e690ed007" }, +] + +[[package]] +name = "triton" +version = "3.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "setuptools", marker = "(platform_machine != 'aarch64' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/8d/a9/549e51e9b1b2c9b854fd761a1d23df0ba2fbc60bd0c13b489ffa518cfcb7/triton-3.3.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b74db445b1c562844d3cfad6e9679c72e93fdfb1a90a24052b03bb5c49d1242e", size = 155600257, upload-time = "2025-05-29T23:39:36.085Z" }, + { url = "https://files.pythonhosted.org/packages/21/2f/3e56ea7b58f80ff68899b1dbe810ff257c9d177d288c6b0f55bf2fe4eb50/triton-3.3.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b31e3aa26f8cb3cc5bf4e187bf737cbacf17311e1112b781d4a059353dfd731b", size = 155689937, upload-time = "2025-05-29T23:39:44.182Z" }, + { url = "https://files.pythonhosted.org/packages/24/5f/950fb373bf9c01ad4eb5a8cd5eaf32cdf9e238c02f9293557a2129b9c4ac/triton-3.3.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9999e83aba21e1a78c1f36f21bce621b77bcaa530277a50484a7cb4a822f6e43", size = 155669138, upload-time = "2025-05-29T23:39:51.771Z" }, + { url = "https://files.pythonhosted.org/packages/74/1f/dfb531f90a2d367d914adfee771babbd3f1a5b26c3f5fbc458dee21daa78/triton-3.3.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b89d846b5a4198317fec27a5d3a609ea96b6d557ff44b56c23176546023c4240", size = 155673035, upload-time = "2025-05-29T23:40:02.468Z" }, + { url = "https://files.pythonhosted.org/packages/28/71/bd20ffcb7a64c753dc2463489a61bf69d531f308e390ad06390268c4ea04/triton-3.3.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a3198adb9d78b77818a5388bff89fa72ff36f9da0bc689db2f0a651a67ce6a42", size = 155735832, upload-time = "2025-05-29T23:40:10.522Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.14.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/98/5a/da40306b885cc8c09109dc2e1abd358d5684b1425678151cdaed4731c822/typing_extensions-4.14.1.tar.gz", hash = "sha256:38b39f4aeeab64884ce9f74c94263ef78f3c22467c8724005483154c26648d36", size = 107673, upload-time = "2025-07-04T13:28:34.16Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b5/00/d631e67a838026495268c2f6884f3711a15a9a2a96cd244fdaea53b823fb/typing_extensions-4.14.1-py3-none-any.whl", hash = "sha256:d1e1e3b58374dc93031d6eda2420a48ea44a36c2b4766a4fdeb3710755731d76", size = 43906, upload-time = "2025-07-04T13:28:32.743Z" }, +] + +[[package]] +name = "tyro" +version = "0.8.14" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "docstring-parser" }, + { name = "rich" }, + { name = "shtab" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/91/9a/a471d988dd9ac8ea657714734c6834c056dad9928c270652c4f0e030a226/tyro-0.8.14.tar.gz", hash = "sha256:2516e34d21763575159459c3b15fe4a13472a2166dff32169c9d7aab70853058", size = 141970, upload-time = "2024-10-23T10:04:44.327Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/60/ec/e34d546cfd9c5b906d1d534bb75557be9f2b179609d60bb9e97ec07e8ead/tyro-0.8.14-py3-none-any.whl", hash = "sha256:1904bffb0e4d5e16c5eb50c518c89a368a44d56405f79b316c58e1206c102e87", size = 109833, upload-time = "2024-10-23T10:04:42.534Z" }, +] + +[[package]] +name = "urllib3" +version = "2.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760", size = 393185, upload-time = "2025-06-18T14:07:41.644Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc", size = 129795, upload-time = "2025-06-18T14:07:40.39Z" }, +] + +[[package]] +name = "wandb" +version = "0.16.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "appdirs" }, + { name = "click" }, + { name = "docker-pycreds" }, + { name = "gitpython" }, + { name = "protobuf" }, + { name = "psutil" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "sentry-sdk" }, + { name = "setproctitle" }, + { name = "setuptools" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e5/d2/fdd399df703539233fcb99182067be0e16f7fbdbd00e83e372982faeeac0/wandb-0.16.6.tar.gz", hash = "sha256:86f491e3012d715e0d7d7421a4d6de41abef643b7403046261f962f3e512fe1c", size = 1848334, upload-time = "2024-04-03T20:09:01.148Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8b/8d/bb05a4ecdeac6b2256d98ac10bae8723af5d7a8c1a4c2384b3ae0f80370e/wandb-0.16.6-py3-none-any.whl", hash = "sha256:5810019a3b981c796e98ea58557a7c380f18834e0c6bdaed15df115522e5616e", size = 2206580, upload-time = "2024-04-03T20:08:57.537Z" }, +] + +[[package]] +name = "werkzeug" +version = "3.1.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746", size = 806925, upload-time = "2024-11-08T15:52:18.093Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/52/24/ab44c871b0f07f491e5d2ad12c9bd7358e527510618cb1b803a88e986db1/werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e", size = 224498, upload-time = "2024-11-08T15:52:16.132Z" }, +] diff --git a/cleanrl/cleanrl/pqn_atari_envpool.py b/cleanrl/cleanrl/pqn_atari_envpool.py new file mode 100644 index 0000000000000000000000000000000000000000..9602640e14c6d6af2caabbd2f8d3667b51ee05df --- /dev/null +++ b/cleanrl/cleanrl/pqn_atari_envpool.py @@ -0,0 +1,291 @@ +# docs and experiment results can be found at https://docs.cleanrl.dev/rl-algorithms/pqn/#pqn_atari_envpoolpy +import os +import random +import time +from collections import deque +from dataclasses import dataclass + +import envpool +import gym +import numpy as np +import torch +import torch.nn as nn +import torch.nn.functional as F +import torch.optim as optim +import tyro +from torch.utils.tensorboard import SummaryWriter + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + """the name of this experiment""" + seed: int = 1 + """seed of the experiment""" + torch_deterministic: bool = True + """if toggled, `torch.backends.cudnn.deterministic=False`""" + cuda: bool = True + """if toggled, cuda will be enabled by default""" + track: bool = False + """if toggled, this experiment will be tracked with Weights and Biases""" + wandb_project_name: str = "cleanRL" + """the wandb's project name""" + wandb_entity: str = None + """the entity (team) of wandb's project""" + capture_video: bool = False + """whether to capture videos of the agent performances (check out `videos` folder)""" + + # Algorithm specific arguments + env_id: str = "Breakout-v5" + """the id of the environment""" + total_timesteps: int = 10000000 + """total timesteps of the experiments""" + learning_rate: float = 2.5e-4 + """the learning rate of the optimizer""" + num_envs: int = 8 + """the number of parallel game environments""" + num_steps: int = 128 + """the number of steps to run in each environment per policy rollout""" + anneal_lr: bool = True + """Toggle learning rate annealing for policy and value networks""" + gamma: float = 0.99 + """the discount factor gamma""" + num_minibatches: int = 4 + """the number of mini-batches""" + update_epochs: int = 4 + """the K epochs to update the policy""" + max_grad_norm: float = 10.0 + """the maximum norm for the gradient clipping""" + start_e: float = 1 + """the starting epsilon for exploration""" + end_e: float = 0.01 + """the ending epsilon for exploration""" + exploration_fraction: float = 0.10 + """the fraction of `total_timesteps` it takes from start_e to end_e""" + q_lambda: float = 0.65 + """the lambda for the Q-Learning algorithm""" + + # to be filled in runtime + batch_size: int = 0 + """the batch size (computed in runtime)""" + minibatch_size: int = 0 + """the mini-batch size (computed in runtime)""" + num_iterations: int = 0 + """the number of iterations (computed in runtime)""" + + +class RecordEpisodeStatistics(gym.Wrapper): + def __init__(self, env, deque_size=100): + super().__init__(env) + self.num_envs = getattr(env, "num_envs", 1) + self.episode_returns = None + self.episode_lengths = None + + def reset(self, **kwargs): + observations = super().reset(**kwargs) + self.episode_returns = np.zeros(self.num_envs, dtype=np.float32) + self.episode_lengths = np.zeros(self.num_envs, dtype=np.int32) + self.lives = np.zeros(self.num_envs, dtype=np.int32) + self.returned_episode_returns = np.zeros(self.num_envs, dtype=np.float32) + self.returned_episode_lengths = np.zeros(self.num_envs, dtype=np.int32) + return observations + + def step(self, action): + observations, rewards, dones, infos = super().step(action) + self.episode_returns += infos["reward"] + self.episode_lengths += 1 + self.returned_episode_returns[:] = self.episode_returns + self.returned_episode_lengths[:] = self.episode_lengths + self.episode_returns *= 1 - infos["terminated"] + self.episode_lengths *= 1 - infos["terminated"] + infos["r"] = self.returned_episode_returns + infos["l"] = self.returned_episode_lengths + return ( + observations, + rewards, + dones, + infos, + ) + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class QNetwork(nn.Module): + def __init__(self, env): + super().__init__() + self.network = nn.Sequential( + layer_init(nn.Conv2d(4, 32, 8, stride=4)), + nn.LayerNorm([32, 20, 20]), + nn.ReLU(), + layer_init(nn.Conv2d(32, 64, 4, stride=2)), + nn.LayerNorm([64, 9, 9]), + nn.ReLU(), + layer_init(nn.Conv2d(64, 64, 3, stride=1)), + nn.LayerNorm([64, 7, 7]), + nn.ReLU(), + nn.Flatten(), + layer_init(nn.Linear(3136, 512)), + nn.LayerNorm(512), + nn.ReLU(), + layer_init(nn.Linear(512, env.single_action_space.n)), + ) + + def forward(self, x): + return self.network(x / 255.0) + + +def linear_schedule(start_e: float, end_e: float, duration: int, t: int): + slope = (end_e - start_e) / duration + return max(slope * t + start_e, end_e) + + +if __name__ == "__main__": + args = tyro.cli(Args) + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + args.num_iterations = args.total_timesteps // args.batch_size + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + if args.track: + import wandb + + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + sync_tensorboard=True, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + writer = SummaryWriter(f"runs/{run_name}") + writer.add_text( + "hyperparameters", + "|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])), + ) + + # TRY NOT TO MODIFY: seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + # env setup + envs = envpool.make( + args.env_id, + env_type="gym", + num_envs=args.num_envs, + episodic_life=True, + reward_clip=True, + seed=args.seed, + ) + envs.num_envs = args.num_envs + envs.single_action_space = envs.action_space + envs.single_observation_space = envs.observation_space + envs = RecordEpisodeStatistics(envs) + assert isinstance(envs.action_space, gym.spaces.Discrete), "only discrete action space is supported" + + q_network = QNetwork(envs).to(device) + optimizer = optim.RAdam(q_network.parameters(), lr=args.learning_rate) + + # ALGO Logic: Storage setup + obs = torch.zeros((args.num_steps, args.num_envs) + envs.single_observation_space.shape).to(device) + actions = torch.zeros((args.num_steps, args.num_envs) + envs.single_action_space.shape).to(device) + rewards = torch.zeros((args.num_steps, args.num_envs)).to(device) + dones = torch.zeros((args.num_steps, args.num_envs)).to(device) + values = torch.zeros((args.num_steps, args.num_envs)).to(device) + avg_returns = deque(maxlen=20) + + # TRY NOT TO MODIFY: start the game + global_step = 0 + start_time = time.time() + next_obs = torch.Tensor(envs.reset()).to(device) + next_done = torch.zeros(args.num_envs).to(device) + + for iteration in range(1, args.num_iterations + 1): + # Annealing the rate if instructed to do so. + if args.anneal_lr: + frac = 1.0 - (iteration - 1.0) / args.num_iterations + lrnow = frac * args.learning_rate + optimizer.param_groups[0]["lr"] = lrnow + + for step in range(0, args.num_steps): + global_step += args.num_envs + obs[step] = next_obs + dones[step] = next_done + + epsilon = linear_schedule(args.start_e, args.end_e, args.exploration_fraction * args.total_timesteps, global_step) + + random_actions = torch.randint(0, envs.single_action_space.n, (args.num_envs,)).to(device) + with torch.no_grad(): + q_values = q_network(next_obs) + max_actions = torch.argmax(q_values, dim=1) + values[step] = q_values[torch.arange(args.num_envs), max_actions].flatten() + + explore = torch.rand((args.num_envs,)).to(device) < epsilon + action = torch.where(explore, random_actions, max_actions) + actions[step] = action + + # TRY NOT TO MODIFY: execute the game and log data. + next_obs, reward, next_done, info = envs.step(action.cpu().numpy()) + rewards[step] = torch.tensor(reward).to(device).view(-1) + next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(next_done).to(device) + + for idx, d in enumerate(next_done): + if d and info["lives"][idx] == 0: + print(f"global_step={global_step}, episodic_return={info['r'][idx]}") + avg_returns.append(info["r"][idx]) + writer.add_scalar("charts/avg_episodic_return", np.average(avg_returns), global_step) + writer.add_scalar("charts/episodic_return", info["r"][idx], global_step) + writer.add_scalar("charts/episodic_length", info["l"][idx], global_step) + + # Compute Q(lambda) targets + with torch.no_grad(): + returns = torch.zeros_like(rewards).to(device) + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + next_value, _ = torch.max(q_network(next_obs), dim=-1) + nextnonterminal = 1.0 - next_done + returns[t] = rewards[t] + args.gamma * next_value * nextnonterminal + else: + nextnonterminal = 1.0 - dones[t + 1] + next_value = values[t + 1] + returns[t] = ( + rewards[t] + + args.gamma * (args.q_lambda * returns[t + 1] + (1 - args.q_lambda) * next_value) * nextnonterminal + ) + + # flatten the batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_returns = returns.reshape(-1) + + # Optimizing the Q-network + b_inds = np.arange(args.batch_size) + for epoch in range(args.update_epochs): + np.random.shuffle(b_inds) + for start in range(0, args.batch_size, args.minibatch_size): + end = start + args.minibatch_size + mb_inds = b_inds[start:end] + + old_val = q_network(b_obs[mb_inds]).gather(1, b_actions[mb_inds].unsqueeze(-1).long()).squeeze() + loss = F.mse_loss(b_returns[mb_inds], old_val) + + # optimize the model + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(q_network.parameters(), args.max_grad_norm) + optimizer.step() + + writer.add_scalar("losses/td_loss", loss, global_step) + writer.add_scalar("losses/q_values", old_val.mean().item(), global_step) + print("SPS:", int(global_step / (time.time() - start_time))) + writer.add_scalar("charts/SPS", int(global_step / (time.time() - start_time)), global_step) + + envs.close() + writer.close() diff --git a/cleanrl/cleanrl/qdagger_dqn_atari_jax_impalacnn.py b/cleanrl/cleanrl/qdagger_dqn_atari_jax_impalacnn.py new file mode 100644 index 0000000000000000000000000000000000000000..04e1af491fd1f7d847f984e28aded32b3c60efd6 --- /dev/null +++ b/cleanrl/cleanrl/qdagger_dqn_atari_jax_impalacnn.py @@ -0,0 +1,475 @@ +# docs and experiment results can be found at https://docs.cleanrl.dev/rl-algorithms/qdagger/#qdagger_dqn_atari_jax_impalacnnpy +import os +import random +import time +from collections import deque +from dataclasses import dataclass +from typing import Sequence + +# see https://github.com/google/jax/discussions/6332#discussioncomment-1279991 +os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.7" + +import flax +import flax.linen as nn +import gymnasium as gym +import jax +import jax.numpy as jnp +import numpy as np +import optax +import tyro +from flax.training.train_state import TrainState +from huggingface_hub import hf_hub_download +from rich.progress import track +from torch.utils.tensorboard import SummaryWriter + +from cleanrl.dqn_atari_jax import QNetwork as TeacherModel +from cleanrl_utils.atari_wrappers import ( + ClipRewardEnv, + EpisodicLifeEnv, + FireResetEnv, + MaxAndSkipEnv, + NoopResetEnv, +) +from cleanrl_utils.buffers import ReplayBuffer +from cleanrl_utils.evals.dqn_jax_eval import evaluate + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + """the name of this experiment""" + seed: int = 1 + """seed of the experiment""" + track: bool = False + """if toggled, this experiment will be tracked with Weights and Biases""" + wandb_project_name: str = "cleanRL" + """the wandb's project name""" + wandb_entity: str = None + """the entity (team) of wandb's project""" + capture_video: bool = False + """whether to capture videos of the agent performances (check out `videos` folder)""" + save_model: bool = False + """whether to save model into the `runs/{run_name}` folder""" + upload_model: bool = False + """whether to upload the saved model to huggingface""" + hf_entity: str = "" + """the user or org name of the model repository from the Hugging Face Hub""" + + # Algorithm specific arguments + env_id: str = "BreakoutNoFrameskip-v4" + """the id of the environment""" + total_timesteps: int = 10000000 + """total timesteps of the experiments""" + learning_rate: float = 1e-4 + """the learning rate of the optimizer""" + num_envs: int = 1 + """the number of parallel game environments""" + buffer_size: int = 1000000 + """the replay memory buffer size""" + gamma: float = 0.99 + """the discount factor gamma""" + tau: float = 1.0 + """the target network update rate""" + target_network_frequency: int = 1000 + """the timesteps it takes to update the target network""" + batch_size: int = 32 + """the batch size of sample from the reply memory""" + start_e: float = 1.0 + """the starting epsilon for exploration""" + end_e: float = 0.01 + """the ending epsilon for exploration""" + exploration_fraction: float = 0.10 + """the fraction of `total-timesteps` it takes from start-e to go end-e""" + learning_starts: int = 80000 + """timestep to start learning""" + train_frequency: int = 4 + """the frequency of training""" + + # QDagger specific arguments + teacher_policy_hf_repo: str = None + """the huggingface repo of the teacher policy""" + teacher_model_exp_name: str = "dqn_atari_jax" + """the experiment name of the teacher model""" + teacher_eval_episodes: int = 10 + """the number of episodes to run the teacher policy evaluate""" + teacher_steps: int = 500000 + """the number of steps to run the teacher policy to generate the replay buffer""" + offline_steps: int = 500000 + """the number of steps to run the student policy with the teacher's replay buffer""" + temperature: float = 1.0 + """the temperature parameter for qdagger""" + + +def make_env(env_id, seed, idx, capture_video, run_name): + def thunk(): + if capture_video and idx == 0: + env = gym.make(env_id, render_mode="rgb_array") + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + else: + env = gym.make(env_id) + env = gym.wrappers.RecordEpisodeStatistics(env) + env = NoopResetEnv(env, noop_max=30) + env = MaxAndSkipEnv(env, skip=4) + env = EpisodicLifeEnv(env) + if "FIRE" in env.unwrapped.get_action_meanings(): + env = FireResetEnv(env) + env = ClipRewardEnv(env) + env = gym.wrappers.ResizeObservation(env, (84, 84)) + env = gym.wrappers.GrayScaleObservation(env) + env = gym.wrappers.FrameStack(env, 4) + env.action_space.seed(seed) + + return env + + return thunk + + +# taken from https://github.com/AIcrowd/neurips2020-procgen-starter-kit/blob/142d09586d2272a17f44481a115c4bd817cf6a94/models/impala_cnn_torch.py +class ResidualBlock(nn.Module): + channels: int + + @nn.compact + def __call__(self, x): + inputs = x + x = nn.relu(x) + x = nn.Conv( + self.channels, + kernel_size=(3, 3), + )(x) + x = nn.relu(x) + x = nn.Conv( + self.channels, + kernel_size=(3, 3), + )(x) + return x + inputs + + +class ConvSequence(nn.Module): + channels: int + + @nn.compact + def __call__(self, x): + x = nn.Conv( + self.channels, + kernel_size=(3, 3), + )(x) + x = nn.max_pool(x, window_shape=(3, 3), strides=(2, 2), padding="SAME") + x = ResidualBlock(self.channels)(x) + x = ResidualBlock(self.channels)(x) + return x + + +# ALGO LOGIC: initialize agent here: +class QNetwork(nn.Module): + action_dim: int + channelss: Sequence[int] = (16, 32, 32) + + @nn.compact + def __call__(self, x): + x = jnp.transpose(x, (0, 2, 3, 1)) + x = x / (255.0) + for channels in self.channelss: + x = ConvSequence(channels)(x) + x = nn.relu(x) + x = x.reshape((x.shape[0], -1)) + x = nn.Dense(256)(x) + x = nn.relu(x) + x = nn.Dense(self.action_dim)(x) + return x + + +class TrainState(TrainState): + target_params: flax.core.FrozenDict + + +def linear_schedule(start_e: float, end_e: float, duration: int, t: int): + slope = (end_e - start_e) / duration + return max(slope * t + start_e, end_e) + + +if __name__ == "__main__": + args = tyro.cli(Args) + assert args.num_envs == 1, "vectorized envs are not supported at the moment" + if args.teacher_policy_hf_repo is None: + args.teacher_policy_hf_repo = f"cleanrl/{args.env_id}-{args.teacher_model_exp_name}-seed1" + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + if args.track: + import wandb + + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + sync_tensorboard=True, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + writer = SummaryWriter(f"runs/{run_name}") + writer.add_text( + "hyperparameters", + "|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])), + ) + + # TRY NOT TO MODIFY: seeding + random.seed(args.seed) + np.random.seed(args.seed) + key = jax.random.PRNGKey(args.seed) + key, q_key = jax.random.split(key, 2) + + # env setup + envs = gym.vector.SyncVectorEnv( + [make_env(args.env_id, args.seed + i, i, args.capture_video, run_name) for i in range(args.num_envs)] + ) + assert isinstance(envs.single_action_space, gym.spaces.Discrete), "only discrete action space is supported" + + q_network = QNetwork(channelss=(16, 32, 32), action_dim=envs.single_action_space.n) + + q_state = TrainState.create( + apply_fn=q_network.apply, + params=q_network.init(q_key, envs.observation_space.sample()), + target_params=q_network.init(q_key, envs.observation_space.sample()), + tx=optax.adam(learning_rate=args.learning_rate), + ) + q_network.apply = jax.jit(q_network.apply) + + # QDAGGER LOGIC: + teacher_model_path = hf_hub_download( + repo_id=args.teacher_policy_hf_repo, filename=f"{args.teacher_model_exp_name}.cleanrl_model" + ) + teacher_model = TeacherModel(action_dim=envs.single_action_space.n) + teacher_model_key = jax.random.PRNGKey(args.seed) + teacher_params = teacher_model.init(teacher_model_key, envs.observation_space.sample()) + with open(teacher_model_path, "rb") as f: + teacher_params = flax.serialization.from_bytes(teacher_params, f.read()) + teacher_model.apply = jax.jit(teacher_model.apply) + + # evaluate the teacher model + teacher_episodic_returns = evaluate( + teacher_model_path, + make_env, + args.env_id, + eval_episodes=args.teacher_eval_episodes, + run_name=f"{run_name}-teacher-eval", + Model=TeacherModel, + epsilon=args.end_e, + capture_video=False, + ) + writer.add_scalar("charts/teacher/avg_episodic_return", np.mean(teacher_episodic_returns), 0) + + # collect teacher data for args.teacher_steps + # we assume we don't have access to the teacher's replay buffer + # see Fig. A.19 in Agarwal et al. 2022 for more detail + teacher_rb = ReplayBuffer( + args.buffer_size, + envs.single_observation_space, + envs.single_action_space, + "cpu", + optimize_memory_usage=True, + handle_timeout_termination=False, + ) + + obs, _ = envs.reset(seed=args.seed) + for global_step in track(range(args.teacher_steps), description="filling teacher's replay buffer"): + epsilon = linear_schedule(args.start_e, args.end_e, args.teacher_steps, global_step) + if random.random() < epsilon: + actions = np.array([envs.single_action_space.sample() for _ in range(envs.num_envs)]) + else: + q_values = teacher_model.apply(teacher_params, obs) + actions = q_values.argmax(axis=-1) + actions = jax.device_get(actions) + next_obs, rewards, terminated, truncated, infos = envs.step(actions) + real_next_obs = next_obs.copy() + for idx, d in enumerate(truncated): + if d: + real_next_obs[idx] = infos["final_observation"][idx] + teacher_rb.add(obs, real_next_obs, actions, rewards, terminated, infos) + obs = next_obs + + def kl_divergence_with_logits(target_logits, prediction_logits): + """Implementation of on-policy distillation loss.""" + out = -nn.softmax(target_logits) * (nn.log_softmax(prediction_logits) - nn.log_softmax(target_logits)) + return jnp.sum(out) + + @jax.jit + def update(q_state, observations, actions, next_observations, rewards, dones, distill_coeff): + q_next_target = q_network.apply(q_state.target_params, next_observations) # (batch_size, num_actions) + q_next_target = jnp.max(q_next_target, axis=-1) # (batch_size,) + td_target = rewards + (1 - dones) * args.gamma * q_next_target + teacher_q_values = teacher_model.apply(teacher_params, observations) + + def loss(params, td_target, teacher_q_values, distill_coeff): + student_q_values = q_network.apply(params, observations) # (batch_size, num_actions) + q_pred = student_q_values[np.arange(student_q_values.shape[0]), actions.squeeze()] # (batch_size,) + q_loss = ((q_pred - td_target) ** 2).mean() + teacher_q_values = teacher_q_values / args.temperature + student_q_values = student_q_values / args.temperature + distill_loss = jnp.mean(jax.vmap(kl_divergence_with_logits)(teacher_q_values, student_q_values)) + overall_loss = q_loss + distill_coeff * distill_loss + return overall_loss, (q_loss, q_pred, distill_loss) + + (loss_value, (q_loss, q_pred, distill_loss)), grads = jax.value_and_grad(loss, has_aux=True)( + q_state.params, td_target, teacher_q_values, distill_coeff + ) + q_state = q_state.apply_gradients(grads=grads) + return loss_value, q_loss, q_pred, distill_loss, q_state + + # offline training phase: train the student model using the qdagger loss + for global_step in track(range(args.offline_steps), description="offline student training"): + data = teacher_rb.sample(args.batch_size) + # perform a gradient-descent step + loss, q_loss, old_val, distill_loss, q_state = update( + q_state, + data.observations.numpy(), + data.actions.numpy(), + data.next_observations.numpy(), + data.rewards.flatten().numpy(), + data.dones.flatten().numpy(), + 1.0, + ) + + # update the target network + if global_step % args.target_network_frequency == 0: + q_state = q_state.replace(target_params=optax.incremental_update(q_state.params, q_state.target_params, args.tau)) + + if global_step % 100 == 0: + writer.add_scalar("charts/offline/loss", jax.device_get(loss), global_step) + writer.add_scalar("charts/offline/q_loss", jax.device_get(q_loss), global_step) + writer.add_scalar("charts/offline/distill_loss", jax.device_get(distill_loss), global_step) + + if global_step % 100000 == 0: + # evaluate the student model + model_path = f"runs/{run_name}/{args.exp_name}-offline-{global_step}.cleanrl_model" + with open(model_path, "wb") as f: + f.write(flax.serialization.to_bytes(q_state.params)) + print(f"model saved to {model_path}") + + episodic_returns = evaluate( + model_path, + make_env, + args.env_id, + eval_episodes=10, + run_name=f"{run_name}-eval", + Model=QNetwork, + epsilon=args.end_e, + ) + print(episodic_returns) + writer.add_scalar("charts/offline/avg_episodic_return", np.mean(episodic_returns), global_step) + + rb = ReplayBuffer( + args.buffer_size, + envs.single_observation_space, + envs.single_action_space, + "cpu", + optimize_memory_usage=True, + handle_timeout_termination=False, + ) + start_time = time.time() + + # TRY NOT TO MODIFY: start the game + envs = gym.vector.SyncVectorEnv( + [make_env(args.env_id, args.seed + i, i, args.capture_video, run_name) for i in range(args.num_envs)] + ) + obs, _ = envs.reset(seed=args.seed) + episodic_returns = deque(maxlen=10) + # online training phase + for global_step in track(range(args.total_timesteps), description="online student training"): + global_step += args.offline_steps + # ALGO LOGIC: put action logic here + epsilon = linear_schedule(args.start_e, args.end_e, args.exploration_fraction * args.total_timesteps, global_step) + if random.random() < epsilon: + actions = np.array([envs.single_action_space.sample() for _ in range(envs.num_envs)]) + else: + q_values = q_network.apply(q_state.params, obs) + actions = q_values.argmax(axis=-1) + actions = jax.device_get(actions) + + # TRY NOT TO MODIFY: execute the game and log data. + next_obs, rewards, terminated, truncated, infos = envs.step(actions) + + # TRY NOT TO MODIFY: record rewards for plotting purposes + if "final_info" in infos: + for info in infos["final_info"]: + # Skip the envs that are not done + if "episode" not in info: + continue + print(f"global_step={global_step}, episodic_return={info['episode']['r']}") + writer.add_scalar("charts/episodic_return", info["episode"]["r"], global_step) + writer.add_scalar("charts/episodic_length", info["episode"]["l"], global_step) + writer.add_scalar("charts/epsilon", epsilon, global_step) + episodic_returns.append(info["episode"]["r"]) + break + + # TRY NOT TO MODIFY: save data to reply buffer; handle `final_observation` + real_next_obs = next_obs.copy() + for idx, d in enumerate(truncated): + if d: + real_next_obs[idx] = infos["final_observation"][idx] + rb.add(obs, real_next_obs, actions, rewards, terminated, infos) + + # TRY NOT TO MODIFY: CRUCIAL step easy to overlook + obs = next_obs + + # ALGO LOGIC: training. + if global_step > args.learning_starts: + if global_step % args.train_frequency == 0: + data = rb.sample(args.batch_size) + # perform a gradient-descent step + if len(episodic_returns) < 10: + distill_coeff = 1.0 + else: + distill_coeff = max(1 - np.mean(episodic_returns) / np.mean(teacher_episodic_returns), 0) + loss, q_loss, old_val, distill_loss, q_state = update( + q_state, + data.observations.numpy(), + data.actions.numpy(), + data.next_observations.numpy(), + data.rewards.flatten().numpy(), + data.dones.flatten().numpy(), + distill_coeff, + ) + + if global_step % 100 == 0: + writer.add_scalar("losses/loss", jax.device_get(loss), global_step) + writer.add_scalar("losses/td_loss", jax.device_get(q_loss), global_step) + writer.add_scalar("losses/distill_loss", jax.device_get(distill_loss), global_step) + writer.add_scalar("losses/q_values", jax.device_get(old_val).mean(), global_step) + writer.add_scalar("charts/distill_coeff", distill_coeff, global_step) + print("SPS:", int(global_step / (time.time() - start_time))) + print(distill_coeff) + writer.add_scalar("charts/SPS", int(global_step / (time.time() - start_time)), global_step) + + # update the target network + if global_step % args.target_network_frequency == 0: + q_state = q_state.replace( + target_params=optax.incremental_update(q_state.params, q_state.target_params, args.tau) + ) + + if args.save_model: + model_path = f"runs/{run_name}/{args.exp_name}.cleanrl_model" + with open(model_path, "wb") as f: + f.write(flax.serialization.to_bytes(q_state.params)) + print(f"model saved to {model_path}") + from cleanrl_utils.evals.dqn_jax_eval import evaluate + + episodic_returns = evaluate( + model_path, + make_env, + args.env_id, + eval_episodes=10, + run_name=f"{run_name}-eval", + Model=QNetwork, + epsilon=args.end_e, + ) + for idx, episodic_return in enumerate(episodic_returns): + writer.add_scalar("eval/episodic_return", episodic_return, idx) + + if args.upload_model: + from cleanrl_utils.huggingface import push_to_hub + + repo_name = f"{args.env_id}-{args.exp_name}-seed{args.seed}" + repo_id = f"{args.hf_entity}/{repo_name}" if args.hf_entity else repo_name + push_to_hub(args, episodic_returns, repo_id, "Qdagger", f"runs/{run_name}", f"videos/{run_name}-eval") + + envs.close() + writer.close() diff --git a/cleanrl/cleanrl/rainbow_atari.py b/cleanrl/cleanrl/rainbow_atari.py new file mode 100644 index 0000000000000000000000000000000000000000..71e5a15e083d089a97024a8a1dd3581e150a48de --- /dev/null +++ b/cleanrl/cleanrl/rainbow_atari.py @@ -0,0 +1,529 @@ +# docs and experiment results can be found at https://docs.cleanrl.dev/rl-algorithms/rainbow/#rainbow_ataripy +import collections +import math +import os +import random +import time +from collections import deque +from dataclasses import dataclass + +import gymnasium as gym +import numpy as np +import torch +import torch.nn as nn +import torch.nn.functional as F +import torch.optim as optim +import tyro +from torch.utils.tensorboard import SummaryWriter + +from cleanrl_utils.atari_wrappers import ( + ClipRewardEnv, + EpisodicLifeEnv, + FireResetEnv, + MaxAndSkipEnv, + NoopResetEnv, +) + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + """the name of this experiment""" + seed: int = 1 + """seed of the experiment""" + torch_deterministic: bool = True + """if toggled, `torch.backends.cudnn.deterministic=False`""" + cuda: bool = True + """if toggled, cuda will be enabled by default""" + track: bool = False + """if toggled, this experiment will be tracked with Weights and Biases""" + wandb_project_name: str = "cleanRL" + """the wandb's project name""" + wandb_entity: str = None + """the entity (team) of wandb's project""" + capture_video: bool = False + """whether to capture videos of the agent performances (check out `videos` folder)""" + save_model: bool = False + """whether to save model into the `runs/{run_name}` folder""" + upload_model: bool = False + """whether to upload the saved model to huggingface""" + hf_entity: str = "" + """the user or org name of the model repository from the Hugging Face Hub""" + + env_id: str = "BreakoutNoFrameskip-v4" + """the id of the environment""" + total_timesteps: int = 10000000 + """total timesteps of the experiments""" + learning_rate: float = 0.0000625 + """the learning rate of the optimizer""" + num_envs: int = 1 + """the number of parallel game environments""" + buffer_size: int = 1000000 + """the replay memory buffer size""" + gamma: float = 0.99 + """the discount factor gamma""" + tau: float = 1.0 + """the target network update rate""" + target_network_frequency: int = 8000 + """the timesteps it takes to update the target network""" + batch_size: int = 32 + """the batch size of sample from the reply memory""" + start_e: float = 1 + """the starting epsilon for exploration""" + end_e: float = 0.01 + """the ending epsilon for exploration""" + exploration_fraction: float = 0.10 + """the fraction of `total-timesteps` it takes from start-e to go end-e""" + learning_starts: int = 80000 + """timestep to start learning""" + train_frequency: int = 4 + """the frequency of training""" + n_step: int = 3 + """the number of steps to look ahead for n-step Q learning""" + prioritized_replay_alpha: float = 0.5 + """alpha parameter for prioritized replay buffer""" + prioritized_replay_beta: float = 0.4 + """beta parameter for prioritized replay buffer""" + prioritized_replay_eps: float = 1e-6 + """epsilon parameter for prioritized replay buffer""" + n_atoms: int = 51 + """the number of atoms""" + v_min: float = -10 + """the return lower bound""" + v_max: float = 10 + """the return upper bound""" + + +def make_env(env_id, seed, idx, capture_video, run_name): + def thunk(): + if capture_video and idx == 0: + env = gym.make(env_id, render_mode="rgb_array") + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + else: + env = gym.make(env_id) + env = gym.wrappers.RecordEpisodeStatistics(env) + + env = NoopResetEnv(env, noop_max=30) + env = MaxAndSkipEnv(env, skip=4) + env = EpisodicLifeEnv(env) + if "FIRE" in env.unwrapped.get_action_meanings(): + env = FireResetEnv(env) + env = ClipRewardEnv(env) + env = gym.wrappers.ResizeObservation(env, (84, 84)) + env = gym.wrappers.GrayScaleObservation(env) + env = gym.wrappers.FrameStack(env, 4) + + env.action_space.seed(seed) + return env + + return thunk + + +class NoisyLinear(nn.Module): + def __init__(self, in_features, out_features, std_init=0.5): + super().__init__() + self.in_features = in_features + self.out_features = out_features + self.std_init = std_init + + self.weight_mu = nn.Parameter(torch.FloatTensor(out_features, in_features)) + self.weight_sigma = nn.Parameter(torch.FloatTensor(out_features, in_features)) + self.register_buffer("weight_epsilon", torch.FloatTensor(out_features, in_features)) + self.bias_mu = nn.Parameter(torch.FloatTensor(out_features)) + self.bias_sigma = nn.Parameter(torch.FloatTensor(out_features)) + self.register_buffer("bias_epsilon", torch.FloatTensor(out_features)) + # factorized gaussian noise + self.reset_parameters() + self.reset_noise() + + def reset_parameters(self): + mu_range = 1 / math.sqrt(self.in_features) + self.weight_mu.data.uniform_(-mu_range, mu_range) + self.weight_sigma.data.fill_(self.std_init / math.sqrt(self.in_features)) + self.bias_mu.data.uniform_(-mu_range, mu_range) + self.bias_sigma.data.fill_(self.std_init / math.sqrt(self.out_features)) + + def reset_noise(self): + self.weight_epsilon.normal_() + self.bias_epsilon.normal_() + + def forward(self, input): + if self.training: + weight = self.weight_mu + self.weight_sigma * self.weight_epsilon + bias = self.bias_mu + self.bias_sigma * self.bias_epsilon + else: + weight = self.weight_mu + bias = self.bias_mu + return F.linear(input, weight, bias) + + +# ALGO LOGIC: initialize agent here: +class NoisyDuelingDistributionalNetwork(nn.Module): + def __init__(self, env, n_atoms, v_min, v_max): + super().__init__() + self.n_atoms = n_atoms + self.v_min = v_min + self.v_max = v_max + self.delta_z = (v_max - v_min) / (n_atoms - 1) + self.n_actions = env.single_action_space.n + self.register_buffer("support", torch.linspace(v_min, v_max, n_atoms)) + + self.network = nn.Sequential( + nn.Conv2d(4, 32, 8, stride=4), + nn.ReLU(), + nn.Conv2d(32, 64, 4, stride=2), + nn.ReLU(), + nn.Conv2d(64, 64, 3, stride=1), + nn.ReLU(), + nn.Flatten(), + ) + conv_output_size = 3136 + + self.value_head = nn.Sequential(NoisyLinear(conv_output_size, 512), nn.ReLU(), NoisyLinear(512, n_atoms)) + + self.advantage_head = nn.Sequential( + NoisyLinear(conv_output_size, 512), nn.ReLU(), NoisyLinear(512, n_atoms * self.n_actions) + ) + + def forward(self, x): + h = self.network(x / 255.0) + value = self.value_head(h).view(-1, 1, self.n_atoms) + advantage = self.advantage_head(h).view(-1, self.n_actions, self.n_atoms) + q_atoms = value + advantage - advantage.mean(dim=1, keepdim=True) + q_dist = F.softmax(q_atoms, dim=2) + return q_dist + + def reset_noise(self): + for layer in self.value_head: + if isinstance(layer, NoisyLinear): + layer.reset_noise() + for layer in self.advantage_head: + if isinstance(layer, NoisyLinear): + layer.reset_noise() + + +PrioritizedBatch = collections.namedtuple( + "PrioritizedBatch", ["observations", "actions", "rewards", "next_observations", "dones", "indices", "weights"] +) + + +# adapted from: https://github.com/openai/baselines/blob/master/baselines/common/segment_tree.py +class SumSegmentTree: + def __init__(self, capacity): + self.capacity = capacity + self.tree_size = 2 * capacity - 1 + self.tree = np.zeros(self.tree_size, dtype=np.float32) + + def _propagate(self, idx): + parent = (idx - 1) // 2 + while parent >= 0: + self.tree[parent] = self.tree[parent * 2 + 1] + self.tree[parent * 2 + 2] + parent = (parent - 1) // 2 + + def update(self, idx, value): + tree_idx = idx + self.capacity - 1 + self.tree[tree_idx] = value + self._propagate(tree_idx) + + def total(self): + return self.tree[0] + + def retrieve(self, value): + idx = 0 + while idx * 2 + 1 < self.tree_size: + left = idx * 2 + 1 + right = left + 1 + if value <= self.tree[left]: + idx = left + else: + value -= self.tree[left] + idx = right + return idx - (self.capacity - 1) + + +# adapted from: https://github.com/openai/baselines/blob/master/baselines/common/segment_tree.py +class MinSegmentTree: + def __init__(self, capacity): + self.capacity = capacity + self.tree_size = 2 * capacity - 1 + self.tree = np.full(self.tree_size, float("inf"), dtype=np.float32) + + def _propagate(self, idx): + parent = (idx - 1) // 2 + while parent >= 0: + self.tree[parent] = min(self.tree[parent * 2 + 1], self.tree[parent * 2 + 2]) + parent = (parent - 1) // 2 + + def update(self, idx, value): + tree_idx = idx + self.capacity - 1 + self.tree[tree_idx] = value + self._propagate(tree_idx) + + def min(self): + return self.tree[0] + + +class PrioritizedReplayBuffer: + def __init__(self, capacity, obs_shape, device, n_step, gamma, alpha=0.6, beta=0.4, eps=1e-6): + self.capacity = capacity + self.device = device + self.n_step = n_step + self.gamma = gamma + self.alpha = alpha + self.beta = beta + self.eps = eps + + self.buffer_obs = np.zeros((capacity,) + obs_shape, dtype=np.uint8) + self.buffer_next_obs = np.zeros((capacity,) + obs_shape, dtype=np.uint8) + self.buffer_actions = np.zeros(capacity, dtype=np.int64) + self.buffer_rewards = np.zeros(capacity, dtype=np.float32) + self.buffer_dones = np.zeros(capacity, dtype=np.bool_) + + self.pos = 0 + self.size = 0 + self.max_priority = 1.0 + + self.sum_tree = SumSegmentTree(capacity) + self.min_tree = MinSegmentTree(capacity) + + # For n-step returns + self.n_step_buffer = deque(maxlen=n_step) + + def _get_n_step_info(self): + reward = 0.0 + next_obs = self.n_step_buffer[-1][3] + done = self.n_step_buffer[-1][4] + + for i in range(len(self.n_step_buffer)): + reward += self.gamma**i * self.n_step_buffer[i][2] + if self.n_step_buffer[i][4]: + next_obs = self.n_step_buffer[i][3] + done = True + break + return reward, next_obs, done + + def add(self, obs, action, reward, next_obs, done): + self.n_step_buffer.append((obs, action, reward, next_obs, done)) + + if len(self.n_step_buffer) < self.n_step: + return + + reward, next_obs, done = self._get_n_step_info() + obs = self.n_step_buffer[0][0] + action = self.n_step_buffer[0][1] + + idx = self.pos + self.buffer_obs[idx] = obs + self.buffer_next_obs[idx] = next_obs + self.buffer_actions[idx] = action + self.buffer_rewards[idx] = reward + self.buffer_dones[idx] = done + + priority = self.max_priority**self.alpha + self.sum_tree.update(idx, priority) + self.min_tree.update(idx, priority) + + self.pos = (self.pos + 1) % self.capacity + self.size = min(self.size + 1, self.capacity) + + if done: + self.n_step_buffer.clear() + + def sample(self, batch_size): + indices = [] + p_total = self.sum_tree.total() + segment = p_total / batch_size + + for i in range(batch_size): + a = segment * i + b = segment * (i + 1) + upperbound = np.random.uniform(a, b) + idx = self.sum_tree.retrieve(upperbound) + indices.append(idx) + + samples = { + "observations": torch.from_numpy(self.buffer_obs[indices]).to(self.device), + "actions": torch.from_numpy(self.buffer_actions[indices]).to(self.device).unsqueeze(1), + "rewards": torch.from_numpy(self.buffer_rewards[indices]).to(self.device).unsqueeze(1), + "next_observations": torch.from_numpy(self.buffer_next_obs[indices]).to(self.device), + "dones": torch.from_numpy(self.buffer_dones[indices]).to(self.device).unsqueeze(1), + } + + probs = np.array([self.sum_tree.tree[idx + self.capacity - 1] for idx in indices]) + weights = (self.size * probs / p_total) ** -self.beta + weights = weights / weights.max() + samples["weights"] = torch.from_numpy(weights).to(self.device).unsqueeze(1) + samples["indices"] = indices + + return PrioritizedBatch(**samples) + + def update_priorities(self, indices, priorities): + priorities = np.abs(priorities) + self.eps + self.max_priority = max(self.max_priority, priorities.max()) + + for idx, priority in zip(indices, priorities): + priority = priority**self.alpha + self.sum_tree.update(idx, priority) + self.min_tree.update(idx, priority) + + +if __name__ == "__main__": + args = tyro.cli(Args) + assert args.num_envs == 1, "vectorized envs are not supported at the moment" + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + if args.track: + import wandb + + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + sync_tensorboard=True, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + writer = SummaryWriter(f"runs/{run_name}") + writer.add_text( + "hyperparameters", + "|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])), + ) + + # TRY NOT TO MODIFY: seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + # env setup + envs = gym.vector.SyncVectorEnv( + [make_env(args.env_id, args.seed + i, i, args.capture_video, run_name) for i in range(args.num_envs)] + ) + assert isinstance(envs.single_action_space, gym.spaces.Discrete), "only discrete action space is supported" + + q_network = NoisyDuelingDistributionalNetwork(envs, args.n_atoms, args.v_min, args.v_max).to(device) + optimizer = optim.Adam(q_network.parameters(), lr=args.learning_rate, eps=1.5e-4) + target_network = NoisyDuelingDistributionalNetwork(envs, args.n_atoms, args.v_min, args.v_max).to(device) + target_network.load_state_dict(q_network.state_dict()) + + rb = PrioritizedReplayBuffer( + args.buffer_size, + envs.single_observation_space.shape, + device, + args.n_step, + args.gamma, + args.prioritized_replay_alpha, + args.prioritized_replay_beta, + args.prioritized_replay_eps, + ) + + start_time = time.time() + + # TRY NOT TO MODIFY: start the game + obs, _ = envs.reset(seed=args.seed) + for global_step in range(args.total_timesteps): + # anneal PER beta to 1 + rb.beta = min( + 1.0, args.prioritized_replay_beta + global_step * (1.0 - args.prioritized_replay_beta) / args.total_timesteps + ) + + # ALGO LOGIC: put action logic here + with torch.no_grad(): + q_dist = q_network(torch.Tensor(obs).to(device)) + q_values = torch.sum(q_dist * q_network.support, dim=2) + actions = torch.argmax(q_values, dim=1).cpu().numpy() + + # TRY NOT TO MODIFY: execute the game and log data. + next_obs, rewards, terminations, truncations, infos = envs.step(actions) + + if "final_info" in infos: + for info in infos["final_info"]: + if info and "episode" in info: + print(f"global_step={global_step}, episodic_return={info['episode']['r']}") + writer.add_scalar("charts/episodic_return", info["episode"]["r"], global_step) + writer.add_scalar("charts/episodic_length", info["episode"]["l"], global_step) + + # TRY NOT TO MODIFY: save data to reply buffer; handle `final_observation` + real_next_obs = next_obs.copy() + for idx, trunc in enumerate(truncations): + if trunc: + real_next_obs[idx] = infos["final_observation"][idx] + rb.add(obs, actions, rewards, real_next_obs, terminations) + + # TRY NOT TO MODIFY: CRUCIAL step easy to overlook + obs = next_obs + + # ALGO LOGIC: training. + if global_step > args.learning_starts: + if global_step % args.train_frequency == 0: + # reset the noise for both networks + q_network.reset_noise() + target_network.reset_noise() + data = rb.sample(args.batch_size) + + with torch.no_grad(): + next_dist = target_network(data.next_observations) # [B, num_actions, n_atoms] + support = target_network.support # [n_atoms] + next_q_values = torch.sum(next_dist * support, dim=2) # [B, num_actions] + + # double q-learning + next_dist_online = q_network(data.next_observations) # [B, num_actions, n_atoms] + next_q_online = torch.sum(next_dist_online * support, dim=2) # [B, num_actions] + best_actions = torch.argmax(next_q_online, dim=1) # [B] + next_pmfs = next_dist[torch.arange(args.batch_size), best_actions] # [B, n_atoms] + + # compute the n-step Bellman update. + gamma_n = args.gamma**args.n_step + next_atoms = data.rewards + gamma_n * support * (1 - data.dones.float()) + tz = next_atoms.clamp(q_network.v_min, q_network.v_max) + + # projection + delta_z = q_network.delta_z + b = (tz - q_network.v_min) / delta_z # shape: [B, n_atoms] + l = b.floor().clamp(0, args.n_atoms - 1) + u = b.ceil().clamp(0, args.n_atoms - 1) + + # (l == u).float() handles the case where bj is exactly an integer + # example bj = 1, then the upper ceiling should be uj= 2, and lj= 1 + d_m_l = (u.float() + (l == b).float() - b) * next_pmfs # [B, n_atoms] + d_m_u = (b - l) * next_pmfs # [B, n_atoms] + + target_pmfs = torch.zeros_like(next_pmfs) + for i in range(target_pmfs.size(0)): + target_pmfs[i].index_add_(0, l[i].long(), d_m_l[i]) + target_pmfs[i].index_add_(0, u[i].long(), d_m_u[i]) + + dist = q_network(data.observations) # [B, num_actions, n_atoms] + pred_dist = dist.gather(1, data.actions.unsqueeze(-1).expand(-1, -1, args.n_atoms)).squeeze(1) + log_pred = torch.log(pred_dist.clamp(min=1e-5, max=1 - 1e-5)) + + loss_per_sample = -(target_pmfs * log_pred).sum(dim=1) + loss = (loss_per_sample * data.weights.squeeze()).mean() + + # update priorities + new_priorities = loss_per_sample.detach().cpu().numpy() + rb.update_priorities(data.indices, new_priorities) + + if global_step % 100 == 0: + writer.add_scalar("losses/td_loss", loss.item(), global_step) + q_values = (pred_dist * q_network.support).sum(dim=1) # [B] + writer.add_scalar("losses/q_values", q_values.mean().item(), global_step) + sps = int(global_step / (time.time() - start_time)) + print("SPS:", sps) + writer.add_scalar("charts/SPS", sps, global_step) + writer.add_scalar("charts/beta", rb.beta, global_step) + + # optimize the model + optimizer.zero_grad() + loss.backward() + optimizer.step() + + # update target network + if global_step % args.target_network_frequency == 0: + for target_param, param in zip(target_network.parameters(), q_network.parameters()): + target_param.data.copy_(args.tau * param.data + (1.0 - args.tau) * target_param.data) + + envs.close() + writer.close() diff --git a/cleanrl/cleanrl/scout_dqn/noisy_dqn_2048_5000score.py b/cleanrl/cleanrl/scout_dqn/noisy_dqn_2048_5000score.py new file mode 100644 index 0000000000000000000000000000000000000000..e672a7b9ccc668bea4271f5dd65000447593f484 --- /dev/null +++ b/cleanrl/cleanrl/scout_dqn/noisy_dqn_2048_5000score.py @@ -0,0 +1,737 @@ +# NoisyNet DQN (dueling CNN) for RAGEN 2048 +import os +import random +import time +from dataclasses import dataclass +from pathlib import Path +from typing import Dict, Any, Tuple +from collections import deque + +import gymnasium as gym +import numpy as np +import torch +import torch.nn as nn +import torch.optim as optim +import tyro +import json + +import sys +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../')) + +from ragen.env.game_2048.env import Game2048Env +from ragen.env.game_2048.config import Game2048EnvConfig + + +class Game2048Wrapper(gym.Env): + metadata = {"render_modes": ["text"]} + + def __init__(self, env: Game2048Env, n_channels: int = 16): + super().__init__() + self._env = env + self._n_channels = int(n_channels) + self.observation_space = gym.spaces.Box(low=0.0, high=1.0, shape=(self._n_channels, 4, 4), dtype=np.float32) + self.action_space = self._env.action_space + self._last_info: Dict[str, Any] | None = None + + def _encode_grid(self, grid: np.ndarray) -> np.ndarray: + grid_flat = grid.flatten() + with np.errstate(divide='ignore'): + power_grid = np.log2(grid_flat, where=(grid_flat > 0)).astype(int) + power_grid[grid_flat == 0] = 0 + power_grid = np.clip(power_grid, 0, self._n_channels - 1) + one_hot = np.eye(self._n_channels)[power_grid] + obs = one_hot.reshape(4, 4, self._n_channels).transpose(2, 0, 1) + return obs.astype(np.float32) + + def reset(self, *, seed: int | None = None, options: Dict[str, Any] | None = None): + text_obs, info = self._env.reset(seed=seed, options=options) + self._last_info = info + grid = info.get('grid', np.zeros((4, 4), dtype=np.int64)) + obs = self._encode_grid(grid) + # augment info with max_tile for downstream logging + ret_info = {k: v for k, v in (info or {}).items() if k != 'grid'} + try: + ret_info['max_tile'] = int(np.max(grid)) + except Exception: + ret_info['max_tile'] = int(ret_info.get('max_tile', 0)) + return obs, ret_info + + def step(self, action: int): + # text_obs, reward, terminated, truncated, info = self._env.step(int(action)) + text_obs, reward, done, info = self._env.step(int(action)) + self._last_info = info + grid = info.get('grid', np.zeros((4, 4), dtype=np.int64)) + obs = self._encode_grid(grid) + # augment info with max_tile for downstream logging + ret_info = {k: v for k, v in (info or {}).items() if k != 'grid'} + try: + ret_info['max_tile'] = int(np.max(grid)) + except Exception: + ret_info['max_tile'] = int(ret_info.get('max_tile', 0)) + # return obs, float(reward), bool(terminated), bool(truncated), ret_info + terminated = bool(done) + truncated = False + return obs, float(reward), terminated, truncated, ret_info + + def get_action_mask(self) -> np.ndarray: + if self._last_info is None: + return np.ones((4,), dtype=bool) + mask = self._last_info.get('action_mask', None) + if mask is None: + return np.ones((4,), dtype=bool) + return np.asarray(mask, dtype=bool) + + def render(self): + return self._env.render() + + def close(self): + self._env.close() + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + seed: int = 1 + torch_deterministic: bool = True + cuda: bool = True + track: bool = True + wandb_project_name: str = "2048-RL" + wandb_entity: str | None = None + capture_video: bool = False + + # Algorithm + env_id: str = "Game2048NoisyDQN" + total_timesteps: int = 3_000_000 + learning_rate: float = 2.5e-4 + gamma: float = 0.997 + batch_size: int = 256 + buffer_size: int = 300_000 + target_network_frequency: int = 8000 + train_frequency: int = 4 + learning_starts: int = 20_000 + + # Epsilon-greedy (used lightly for warmup; noisy nets handle exploration) + start_e: float = 1.0 + end_e: float = 0.05 + exploration_fraction: float = 0.8 + + # Model + dueling: bool = True + # reward_transform 和 clip 由 Environment Config 控制,此处仅作 Args 占位 + reward_clip_abs: float | None = None + reward_transform: str = "log2" # choices: "none", "log2" + + # n-step and PER + n_step: int = 3 + per_alpha: float = 0.6 + per_beta_start: float = 0.4 + per_beta_frames: int = 1_000_000 + per_eps: float = 1e-6 + + # Env config + two_prob: float = 0.9 + max_steps_env: int = 1000 + + # Eval config + eval_splits: int = 1 + eval_episodes: int = 400 + + +def make_env(run_name: str, seed: int, args: Args, capture_video: bool = False): + # === Adapt: 开启环境内部 Log Reward === + cfg = Game2048EnvConfig(size=4, two_prob=args.two_prob, use_log_reward=True) + base = Game2048Env(cfg) + env = Game2048Wrapper(base) + env = gym.wrappers.TimeLimit(env, max_episode_steps=args.max_steps_env) + env = gym.wrappers.RecordEpisodeStatistics(env) + if capture_video: + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + return env + + +class NoisyLinear(nn.Module): + def __init__(self, in_features: int, out_features: int, std_init: float = 0.5): + super().__init__() + self.in_features = in_features + self.out_features = out_features + self.weight_mu = nn.Parameter(torch.empty(out_features, in_features)) + self.weight_sigma = nn.Parameter(torch.empty(out_features, in_features)) + self.register_buffer('weight_epsilon', torch.empty(out_features, in_features)) + self.bias_mu = nn.Parameter(torch.empty(out_features)) + self.bias_sigma = nn.Parameter(torch.empty(out_features)) + self.register_buffer('bias_epsilon', torch.empty(out_features)) + self.std_init = std_init / np.sqrt(in_features) + self.reset_parameters() + self.reset_noise() + + def reset_parameters(self): + mu_range = 1 / np.sqrt(self.in_features) + self.weight_mu.data.uniform_(-mu_range, mu_range) + self.weight_sigma.data.fill_(self.std_init) + self.bias_mu.data.uniform_(-mu_range, mu_range) + self.bias_sigma.data.fill_(self.std_init) + + def reset_noise(self): + epsilon_in = torch.randn(self.in_features, device=self.weight_mu.device) + epsilon_out = torch.randn(self.out_features, device=self.weight_mu.device) + self.weight_epsilon.copy_(epsilon_out.ger(epsilon_in)) + self.bias_epsilon.copy_(epsilon_out) + + def forward(self, x): + if self.training: + w = self.weight_mu + self.weight_sigma * self.weight_epsilon + b = self.bias_mu + self.bias_sigma * self.bias_epsilon + else: + w = self.weight_mu + b = self.bias_mu + return torch.nn.functional.linear(x, w, b) + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + if isinstance(layer, NoisyLinear): + nn.init.orthogonal_(layer.weight_mu, std) + nn.init.constant_(layer.bias_mu, bias_const) + layer.weight_sigma.data.fill_(layer.std_init) + layer.bias_sigma.data.fill_(layer.std_init) + else: + nn.init.orthogonal_(layer.weight, std) + nn.init.constant_(layer.bias, bias_const) + return layer + + +class QConvNoisy(nn.Module): + def __init__(self, obs_shape: Tuple[int, int, int], act_dim: int, dueling: bool = True): + super().__init__() + c, h, w = obs_shape + self.dueling = dueling + self._act_dim = act_dim + self.features = nn.Sequential( + layer_init(nn.Conv2d(c, 64, 2, 1, 0)), + nn.ReLU(), + layer_init(nn.Conv2d(64, 128, 2, 1, 1)), + nn.ReLU(), + layer_init(nn.Conv2d(128, 128, 2, 1, 0)), + nn.ReLU(), + nn.Flatten(), + ) + # compute fc_in via dummy + with torch.no_grad(): + dummy = torch.zeros(1, c, h, w) + fc_in = int(self.features(dummy).shape[1]) + if self.dueling: + self.adv_head = nn.Sequential( + layer_init(NoisyLinear(fc_in, 512)), + nn.ReLU(), + layer_init(NoisyLinear(512, act_dim), std=0.01), + ) + self.val_head = nn.Sequential( + layer_init(NoisyLinear(fc_in, 512)), + nn.ReLU(), + layer_init(NoisyLinear(512, 1), std=0.01), + ) + else: + self.head = nn.Sequential( + layer_init(NoisyLinear(fc_in, 512)), + nn.ReLU(), + layer_init(NoisyLinear(512, act_dim), std=0.01), + ) + + def reset_noise(self): + for m in self.modules(): + if isinstance(m, NoisyLinear): + m.reset_noise() + + def forward(self, x: torch.Tensor) -> torch.Tensor: + x = self.features(x) + if self.dueling: + adv = self.adv_head(x) + val = self.val_head(x) + q = val + adv - adv.mean(dim=1, keepdim=True) + return q + else: + q = self.head(x) + return q + + +class SumTree: + def __init__(self, capacity: int): + self.capacity = 1 + while self.capacity < capacity: + self.capacity *= 2 + self.tree = np.zeros(2 * self.capacity, dtype=np.float32) + self.size = 0 + self.ptr = 0 + + def add(self, p: float): + idx = self.ptr + self.capacity + self.update(idx, p) + self.ptr = (self.ptr + 1) % self.capacity + self.size = min(self.size + 1, self.capacity) + return idx + + def update(self, idx: int, p: float): + change = p - self.tree[idx] + self.tree[idx] = p + idx //= 2 + while idx >= 1: + self.tree[idx] += change + idx //= 2 + + def total(self) -> float: + return float(self.tree[1]) + + def get(self, s: float) -> int: + idx = 1 + while idx < self.capacity: + left = 2 * idx + if s <= self.tree[left]: + idx = left + else: + s -= self.tree[left] + idx = left + 1 + return idx + + +class PrioritizedReplayBuffer: + def __init__(self, capacity: int, obs_shape: Tuple[int, int, int], alpha: float = 0.6, eps: float = 1e-6): + self.capacity = capacity + self.alpha = alpha + self.eps = eps + self.tree = SumTree(capacity) + self.obs_buf = np.zeros((capacity,) + obs_shape, dtype=np.float32) + self.next_obs_buf = np.zeros((capacity,) + obs_shape, dtype=np.float32) + self.act_buf = np.zeros((capacity,), dtype=np.int64) + self.rew_buf = np.zeros((capacity,), dtype=np.float32) + self.done_buf = np.zeros((capacity,), dtype=np.float32) + self.max_prio = 1.0 + + def _store_index(self) -> int: + idx_leaf = self.tree.add(self.max_prio ** self.alpha) + idx = (idx_leaf - self.tree.capacity) % self.capacity + return idx, idx_leaf + + def add(self, obs: np.ndarray, act: int, rew: float, done: bool, next_obs: np.ndarray): + idx, idx_leaf = self._store_index() + self.obs_buf[idx] = obs + self.next_obs_buf[idx] = next_obs + self.act_buf[idx] = act + self.rew_buf[idx] = rew + self.done_buf[idx] = 1.0 if done else 0.0 + return idx_leaf + + def can_sample(self, batch_size: int) -> bool: + return self.tree.size >= batch_size + + def sample(self, batch_size: int, beta: float): + total_p = self.tree.total() + if (not np.isfinite(total_p)) or (total_p <= 0.0): + size = max(1, self.tree.size) + idxs = np.random.randint(0, size, size=batch_size) + idx_leaves = (idxs + self.tree.capacity).astype(np.int64) + weights = np.ones((batch_size,), dtype=np.float32) + return ( + self.obs_buf[idxs], + self.act_buf[idxs], + self.rew_buf[idxs], + self.done_buf[idxs], + self.next_obs_buf[idxs], + idx_leaves, + weights, + ) + seg = total_p / float(batch_size) + idx_leaves = [] + idxs = [] + priorities = [] + for i in range(batch_size): + a = seg * i + b = seg * (i + 1) + s = np.random.uniform(a, b) + idx_leaf = self.tree.get(s) + idx = (idx_leaf - self.tree.capacity) % self.capacity + p = float(self.tree.tree[idx_leaf]) + idx_leaves.append(idx_leaf) + idxs.append(idx) + priorities.append(p) + probs = np.asarray(priorities, dtype=np.float32) / float(total_p) + probs = np.clip(probs, 1e-12, None) + weights = (self.tree.size * probs) ** (-beta) + weights = weights / (weights.max() + 1e-8) + return ( + self.obs_buf[idxs], + self.act_buf[idxs], + self.rew_buf[idxs], + self.done_buf[idxs], + self.next_obs_buf[idxs], + np.asarray(idx_leaves, dtype=np.int64), + np.asarray(weights, dtype=np.float32), + ) + + def update_priorities(self, idx_leaves: np.ndarray, td_errors: np.ndarray): + td = np.abs(td_errors) + td = np.where(np.isfinite(td), td, self.eps) + td = np.clip(td + self.eps, self.eps, 1e3) + self.max_prio = max(self.max_prio, float(td.max())) + for idx_leaf, p in zip(idx_leaves, td): + self.tree.update(int(idx_leaf), float(p) ** self.alpha) + + +class NStepBuffer: + def __init__(self, n: int, gamma: float): + self.n = int(max(1, n)) + self.gamma = float(gamma) + self.states = [] + self.actions = [] + self.rewards = [] + self.dones = [] + self.next_states = [] + + def push(self, s, a, r, d, next_s): + self.states.append(s) + self.actions.append(a) + self.rewards.append(r) + self.dones.append(d) + self.next_states.append(next_s) + if len(self.states) >= self.n: + return self._pop() + return None + + def _pop(self): + m = min(self.n, len(self.states)) + R = 0.0 + cut = m + for i in range(m): + R += (self.gamma ** i) * self.rewards[i] + if self.dones[i]: + cut = i + 1 + break + s0 = self.states[0] + a0 = self.actions[0] + dN = any(self.dones[: cut]) + last_idx = cut - 1 + sN = self.next_states[last_idx] + self.states.pop(0) + self.actions.pop(0) + self.rewards.pop(0) + self.dones.pop(0) + self.next_states.pop(0) + return s0, a0, R, dN, sN + + def flush(self): + out = [] + while len(self.states) > 0: + out_tr = self._pop() + if out_tr is not None: + out.append(out_tr) + return out + + +if __name__ == "__main__": + args = tyro.cli(Args) + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + + if args.track: + import wandb + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + try: + wandb.define_metric("global_step") + for prefix in ["train/*", "rollout/*", "eval/*", "losses/*", "charts/*", "perf/*"]: + wandb.define_metric(prefix, step_metric="global_step") + except Exception: + pass + + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + env = make_env(run_name, args.seed, args, args.capture_video) + obs_shape = env.observation_space.shape + act_dim = env.action_space.n + + policy_net = QConvNoisy(obs_shape, act_dim, dueling=args.dueling).to(device) + target_net = QConvNoisy(obs_shape, act_dim, dueling=args.dueling).to(device) + target_net.load_state_dict(policy_net.state_dict()) + target_net.eval() + + optimizer = optim.Adam(policy_net.parameters(), lr=args.learning_rate) + + rb = PrioritizedReplayBuffer(args.buffer_size, obs_shape, alpha=args.per_alpha, eps=args.per_eps) + nbuf = NStepBuffer(args.n_step, args.gamma) + + def collect_eval_trajectories(agent_model, make_env_fn, n_episodes: int, step_tag: int): + out_dir = Path(f"runs/{run_name}/trajectories/step_{step_tag}") + out_dir.mkdir(parents=True, exist_ok=True) + out_path = out_dir / "trajectories.jsonl" + env_eval = make_env_fn() + collected = 0 + summary_returns = [] + summary_success = [] + with out_path.open("w") as f: + while collected < n_episodes: + state, info = env_eval.reset(seed=args.seed + 100000 + collected) + current_info = info or {} + traj_states = [np.asarray(state).tolist()] + traj_actions = [] + traj_rewards = [] + traj_dones = [] + traj_success = [] + done = False + step_count = 0 + max_eval_steps = getattr(env_eval, '_max_episode_steps', None) or args.max_steps_env + while not done: + with torch.no_grad(): + q = agent_model(torch.tensor(state, dtype=torch.float32, device=device).unsqueeze(0)) + mask_np = current_info.get('action_mask', np.ones(act_dim, dtype=bool)) + mask = torch.tensor(mask_np, device=device, dtype=torch.bool).unsqueeze(0) + masked_q = torch.where(mask, q, torch.full_like(q, -1e9)) + action = int(torch.argmax(masked_q, dim=1).item()) + next_state, reward, terminated, truncated, info = env_eval.step(action) + traj_actions.append(int(action)) + + # === Adapt: 使用 Raw Reward (Pre-regularization) === + # 确保 Eval 阶段记录的是原始分数 + raw_r = info.get('raw_reward', reward) if info else reward + traj_rewards.append(float(raw_r)) + + step_count += 1 + d = bool(terminated) or bool(truncated) or (step_count >= max_eval_steps) + traj_dones.append(d) + traj_success.append(bool((info or {}).get('success', False))) + state = next_state + current_info = info or {} + traj_states.append(np.asarray(state).tolist()) + done = d + ep_ret = float(sum(traj_rewards)) + ep_succ = bool(any(traj_success)) + record = { + "states": traj_states, + "actions": traj_actions, + "rewards": traj_rewards, + "dones": traj_dones, + "success": traj_success, + "episode_return": ep_ret, + "episode_success": ep_succ, + } + f.write(json.dumps(record) + "\n") + collected += 1 + summary_returns.append(ep_ret) + summary_success.append(1.0 if ep_succ else 0.0) + env_eval.close() + try: + metrics = { + "global_step": int(step_tag), + "episodes": int(n_episodes), + "success_rate": float(np.mean(summary_success)) if len(summary_success) else 0.0, + "avg_return": float(np.mean(summary_returns)) if len(summary_returns) else 0.0, + "std_return": float(np.std(summary_returns)) if len(summary_returns) else 0.0, + } + with (out_dir / "metrics.json").open("w") as mf: + json.dump(metrics, mf) + except Exception as e: + print(f"Warning: failed to write eval metrics: {e}") + + exploration_steps = max(1, int(args.exploration_fraction * args.total_timesteps)) + + def epsilon_by_step(t: int): + return args.end_e + (args.start_e - args.end_e) * max(0.0, (exploration_steps - t) / exploration_steps) + + global_step = 0 + start_time = time.time() + + obs, info = env.reset(seed=args.seed) + current_info = info or {} + ep_return = 0.0 + ep_len = 0 + ep_success_window = deque(maxlen=100) + ep_return_window = deque(maxlen=100) + step_reward_window = deque(maxlen=2048) + + eval_every_steps = max(1, args.total_timesteps // args.eval_splits) + + while global_step < args.total_timesteps: + epsilon = epsilon_by_step(global_step) + with torch.no_grad(): + q_values = policy_net(torch.tensor(obs, dtype=torch.float32, device=device).unsqueeze(0)) + mask_np = current_info.get('action_mask', np.ones(act_dim, dtype=bool)) + mask = torch.tensor(mask_np, device=device, dtype=torch.bool).unsqueeze(0) + masked_q = torch.where(mask, q_values, torch.full_like(q_values, -1e9)) + action_greedy = int(torch.argmax(masked_q, dim=1).item()) + if (global_step < args.learning_starts) and (np.random.rand() < 0.5): + valid = np.where(mask_np)[0] + if len(valid) > 0: + action = int(np.random.choice(valid)) + else: + action = int(np.random.randint(0, act_dim)) + else: + action = action_greedy + + next_obs, reward, terminated, truncated, info = env.step(action) + done = bool(terminated) or bool(truncated) + + # === Adapt: 移除手动正则化,直接使用 Env 返回的 reward === + r = float(reward) + # (已删除原有的 if/elif 手动 log2/clip 逻辑,防止双重 log) + + n_out = nbuf.push(obs.astype(np.float32), int(action), float(r), bool(done), next_obs.astype(np.float32)) + if n_out is not None: + s0, a0, Rn, dN, sN = n_out + rb.add(s0, a0, Rn, dN, sN) + + obs = next_obs + current_info = info or {} + + # === Adapt: 记录 Raw Score (来自 info) === + raw_r = float(info.get('raw_reward', reward)) + ep_return += raw_r + + try: + step_reward_window.append(float(reward)) # Keep tracking training reward stability + except Exception: + pass + ep_len += 1 + global_step += 1 + + if (global_step > args.learning_starts) and rb.can_sample(args.batch_size) and (global_step % args.train_frequency == 0): + frac = min(1.0, global_step / float(max(1, args.per_beta_frames))) + beta = args.per_beta_start + (1.0 - args.per_beta_start) * frac + + batch_obs, batch_act, batch_rew, batch_done, batch_next_obs, idx_leaves, weights = rb.sample(args.batch_size, beta) + b_obs = torch.tensor(batch_obs, dtype=torch.float32, device=device) + b_act = torch.tensor(batch_act, dtype=torch.int64, device=device) + b_rew = torch.tensor(batch_rew, dtype=torch.float32, device=device) + b_done = torch.tensor(batch_done, dtype=torch.float32, device=device) + b_next_obs = torch.tensor(batch_next_obs, dtype=torch.float32, device=device) + b_w = torch.tensor(weights, dtype=torch.float32, device=device) + + with torch.no_grad(): + next_actions = policy_net(b_next_obs).argmax(dim=1) + next_q = target_net(b_next_obs).gather(1, next_actions.view(-1, 1)).squeeze(1) + target_q = b_rew + (args.gamma ** args.n_step) * (1.0 - b_done) * next_q + + current_q = policy_net(b_obs).gather(1, b_act.view(-1, 1)).squeeze(1) + td_error = target_q - current_q + per_loss = torch.abs(td_error).detach().cpu().numpy() + loss_unreduced = torch.nn.functional.smooth_l1_loss(current_q, target_q, reduction='none') + loss = (b_w * loss_unreduced).mean() + + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(policy_net.parameters(), max_norm=10.0) + optimizer.step() + + policy_net.reset_noise() + target_net.reset_noise() + + rb.update_priorities(idx_leaves, td_error.detach().cpu().numpy()) + + if args.track: + try: + import wandb + # compute PPO-compatible metrics (use None where N/A) + try: + avg_reward_val = float(np.mean(step_reward_window)) if len(step_reward_window) > 0 else 0.0 + except Exception: + avg_reward_val = 0.0 + wandb.log({ + "global_step": int(global_step), + "train/loss": float(loss.item()), + # PPO-compatible keys below (None when not applicable to DQN) + "train/value_loss": None, + "train/policy_loss": None, + "train/entropy": None, + "losses/explained_variance": None, + "charts/avg_reward": avg_reward_val, + "charts/avg_value": None, + "train/learning_rate": float(optimizer.param_groups[0]["lr"]), + "charts/epsilon": float(epsilon), + "perf/SPS": int(global_step / (time.time() - start_time)), + }, step=global_step) + except Exception: + pass + + if global_step % args.target_network_frequency == 0: + target_net.load_state_dict(policy_net.state_dict()) + + if done: + succ = bool((info or {}).get('success', False)) + max_tile = int((info or {}).get('max_tile', 0)) + ep_success_window.append(1.0 if succ else 0.0) + ep_return_window.append(float(ep_return)) + for out_tr in nbuf.flush(): + s0, a0, Rn, dN, sN = out_tr + rb.add(s0, a0, Rn, dN, sN) + # print per-episode process metrics (match PPO format) + try: + if max_tile is not None: + print(f"global_step={global_step}, episodic_return={ep_return:.1f}, length={ep_len}, max_tile={int(max_tile)}, success={succ}") + else: + print(f"global_step={global_step}, episodic_return={ep_return:.1f}, length={ep_len}, success={succ}") + except Exception: + pass + if args.track: + try: + import wandb + # average episode return over recent 100 episodes + try: + avg_ep_ret = float(np.mean(ep_return_window)) if len(ep_return_window) > 0 else 0.0 + except Exception: + avg_ep_ret = float(ep_return) + wandb.log({ + "global_step": int(global_step), + "rollout/episodic_return": float(ep_return), + "rollout/episodic_length": int(ep_len), + "rollout/success": float(1.0 if succ else 0.0), + "rollout/max_tile": int(max_tile), + "rollout/success_rate_100": float(np.mean(ep_success_window)) if len(ep_success_window) > 0 else None, + # mirror PPO charts/* keys + "charts/episodic_return": float(ep_return), + "charts/episodic_length": int(ep_len), + "charts/success": float(1.0 if succ else 0.0), + "charts/max_tile": int(max_tile), + "charts/avg_episode_return": avg_ep_ret, + }, step=global_step) + except Exception: + pass + obs, info = env.reset() + current_info = info or {} + ep_return, ep_len = 0.0, 0 + + if global_step % 1000 == 0: + sps = int(global_step / (time.time() - start_time)) + sr100 = float(np.mean(ep_success_window)) if len(ep_success_window) > 0 else 0.0 + print(f"Step {global_step} | SPS: {sps} | Epsilon: {epsilon:.3f} | SR@100: {sr100:.3f}") + + if (global_step % eval_every_steps == 0): + try: + def eval_thunk(): + return make_env(run_name, args.seed + 9999, args, False) + collect_eval_trajectories(policy_net, eval_thunk, n_episodes=args.eval_episodes, step_tag=global_step) + if args.track: + try: + import wandb + mpath = Path(f"runs/{run_name}/trajectories/step_{global_step}/metrics.json") + if mpath.exists(): + with mpath.open("r") as mf: + metrics = json.load(mf) + wandb.log({ + "eval/success_rate": metrics.get("success_rate"), + "eval/avg_return": metrics.get("avg_return"), + "eval/std_return": metrics.get("std_return"), + "eval/episodes": metrics.get("episodes"), + }, step=global_step) + except Exception: + pass + print(f"Collected {args.eval_episodes} eval trajectories at step {global_step}") + except Exception as e: + print(f"Warning: eval trajectory collection failed at step {global_step}: {e}") + + env.close() \ No newline at end of file diff --git a/cleanrl/cleanrl/scout_ppo/ppo_frozenlake_nochangeenv.py b/cleanrl/cleanrl/scout_ppo/ppo_frozenlake_nochangeenv.py new file mode 100644 index 0000000000000000000000000000000000000000..e6384c4edd4a83d152afd3f60d8534c86f996c8d --- /dev/null +++ b/cleanrl/cleanrl/scout_ppo/ppo_frozenlake_nochangeenv.py @@ -0,0 +1,494 @@ +# PPO with small MLP for RAGEN FrozenLake using the existing env (no env edits) +import os +import random +import time +from dataclasses import dataclass +from pathlib import Path +from typing import Tuple, Dict, Any +import json + +import gymnasium as gym +import numpy as np +import torch +import torch.nn as nn +import torch.optim as optim +import tyro +from torch.distributions.categorical import Categorical + +import sys +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../')) + +from ragen.env.frozen_lake.env import FrozenLakeEnv +from ragen.env.frozen_lake.config import FrozenLakeEnvConfig + +# python /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/ppo_frozenlake_nochangeenv.py --total-timesteps 2000000 --num-envs 8 --num-steps 128 --grid-size 4 --is-slippery --track +class FrozenLakeWrapper(gym.Env): + """ + Adapter to use ragen FrozenLakeEnv with Gymnasium vector API. + - Converts text observation to one-hot grid vector (6 tokens per cell). + - Maps agent actions [0..3] to env actions [1..4]. + - Exposes proper observation_space and action_space. + """ + metadata = {"render_modes": ["rgb_array", "human", "ansi"]} + + def __init__(self, env: FrozenLakeEnv): + super().__init__() + self._env = env + self._size = int(self._env.nrow) # square grid + self._tokens = ['P', '_', 'O', 'G', 'X', '√'] + self._token_to_idx = {t: i for i, t in enumerate(self._tokens)} + self.observation_space = gym.spaces.Box(low=0.0, high=1.0, shape=(self._size * self._size * len(self._tokens),), dtype=np.float32) + self.action_space = gym.spaces.Discrete(4) + + def _encode_obs(self, text_obs: str) -> np.ndarray: + # text_obs is multi-line grid with tokens above + rows = text_obs.split('\n') + # handle any accidental extra whitespace + rows = [list(r) for r in rows if len(r) > 0] + h = len(rows) + w = len(rows[0]) if h > 0 else self._size + grid = np.zeros((h, w, len(self._tokens)), dtype=np.float32) + for i in range(h): + for j in range(w): + ch = rows[i][j] + idx = self._token_to_idx.get(ch, 0) + grid[i, j, idx] = 1.0 + return grid.reshape(-1) + + def reset(self, *, seed: int | None = None, options: Dict[str, Any] | None = None): + text_obs = self._env.reset(seed=seed) + obs = self._encode_obs(text_obs) + return obs, {} + + def step(self, action: int): + # map 0..3 -> 1..4 for the underlying env + mapped = int(action) + 1 + text_obs, reward, done, info = self._env.step(mapped) + obs = self._encode_obs(text_obs) + terminated = bool(done) + truncated = False + # propagate success if present + return obs, float(reward), terminated, truncated, info or {} + + def render(self): + return self._env.render() + + def close(self): + self._env.close() + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + seed: int = 1 + torch_deterministic: bool = True + cuda: bool = True + track: bool = True + wandb_project_name: str = "cleanRL" + wandb_entity: str | None = None + capture_video: bool = False + + # Algorithm + env_id: str = "FrozenLake" + total_timesteps: int = 200_000 + learning_rate: float = 2.5e-4 + num_envs: int = 8 + num_steps: int = 128 + anneal_lr: bool = True + gamma: float = 0.99 + gae_lambda: float = 0.95 + num_minibatches: int = 4 + update_epochs: int = 4 + norm_adv: bool = True + clip_coef: float = 0.2 + clip_vloss: bool = True + ent_coef: float = 0.01 + vf_coef: float = 0.5 + max_grad_norm: float = 0.5 + target_kl: float | None = None + + # FrozenLake specific + grid_size: int = 4 + is_slippery: bool = True + + # runtime filled + batch_size: int = 0 + minibatch_size: int = 0 + num_iterations: int = 0 + # eval config to mirror reference script + eval_splits: int = 2 + eval_episodes: int = 4 + + +def make_env(idx, run_name, seed, grid_size, is_slippery, capture_video=False): + def thunk(): + config = FrozenLakeEnvConfig(size=grid_size, p=0.9, success_rate = 0.8, is_slippery=is_slippery, map_seed=seed + idx, render_mode='text') + # import pdb;pdb.set_trace() + env = FrozenLakeEnv(config) + env = FrozenLakeWrapper(env) + max_steps = int(grid_size * grid_size * 4) + env = gym.wrappers.TimeLimit(env, max_episode_steps=max_steps) + env = gym.wrappers.RecordEpisodeStatistics(env) + if capture_video and idx == 0: + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + return env + return thunk + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class Agent(nn.Module): + def __init__(self, envs): + super().__init__() + obs_shape = int(np.array(envs.single_observation_space.shape).prod()) + hidden = 64 + self.critic = nn.Sequential( + layer_init(nn.Linear(obs_shape, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, 1), std=1.0), + ) + self.actor = nn.Sequential( + layer_init(nn.Linear(obs_shape, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, hidden)), + nn.Tanh(), + layer_init(nn.Linear(hidden, envs.single_action_space.n), std=0.01), + ) + + def get_value(self, x): + return self.critic(x) + + def get_action_and_value(self, x, action=None): + logits = self.actor(x) + probs = Categorical(logits=logits) + if action is None: + action = probs.sample() + return action, probs.log_prob(action), probs.entropy(), self.critic(x) + + +if __name__ == "__main__": + args = tyro.cli(Args) + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + args.num_iterations = args.total_timesteps // args.batch_size + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + + if args.track: + import wandb + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + try: + wandb.define_metric("global_step") + for prefix in ["train/*", "rollout/*", "eval/*", "losses/*", "charts/*", "perf/*"]: + wandb.define_metric(prefix, step_metric="global_step") + except Exception: + pass + + # seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + # envs + envs = gym.vector.SyncVectorEnv([ + make_env(i, run_name, args.seed, args.grid_size, args.is_slippery, args.capture_video) + for i in range(args.num_envs) + ]) + assert isinstance(envs.single_action_space, gym.spaces.Discrete) + + agent = Agent(envs).to(device) + optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5) + + # storage + obs = torch.zeros((args.num_steps, args.num_envs) + envs.single_observation_space.shape).to(device) + actions = torch.zeros((args.num_steps, args.num_envs) + envs.single_action_space.shape).to(device) + logprobs = torch.zeros((args.num_steps, args.num_envs)).to(device) + rewards = torch.zeros((args.num_steps, args.num_envs)).to(device) + dones = torch.zeros((args.num_steps, args.num_envs)).to(device) + values = torch.zeros((args.num_steps, args.num_envs)).to(device) + + # start + global_step = 0 + start_time = time.time() + next_obs, _ = envs.reset(seed=args.seed) + next_obs = torch.Tensor(next_obs).to(device) + next_done = torch.zeros(args.num_envs).to(device) + + episode_returns = [] + episode_steps = [] + episode_successes = [] + + # Eval helper identical to reference + def collect_eval_trajectories(agent_model, make_env_fn, n_episodes, step_tag): + out_dir = Path(f"runs/{run_name}/trajectories/step_{step_tag}") + out_dir.mkdir(parents=True, exist_ok=True) + out_path = out_dir / "trajectories.jsonl" + env = make_env_fn() + collected = 0 + summary_returns = [] + summary_success = [] + with out_path.open("w") as f: + while collected < n_episodes: + state, _ = env.reset(seed=args.seed + 100000 + collected) + traj_states = [state.tolist()] + traj_actions = [] + traj_rewards = [] + traj_dones = [] + traj_success = [] + done = False + step_count = 0 + max_eval_steps = getattr(env, '_max_episode_steps', None) or int(args.grid_size * args.grid_size * 4) + while not done: + with torch.no_grad(): + logits = agent_model.actor(torch.tensor(state, dtype=torch.float32, device=device).unsqueeze(0)) + action = int(torch.argmax(logits, dim=1).item()) + next_state, reward, terminated, truncated, info = env.step(action) + traj_actions.append(int(action)) + traj_rewards.append(float(reward)) + step_count += 1 + d = bool(terminated) or bool(truncated) or (step_count >= max_eval_steps) + traj_dones.append(d) + traj_success.append(bool(info.get('success', False))) + state = next_state + traj_states.append(state.tolist()) + done = d + ep_ret = float(sum(traj_rewards)) + ep_succ = bool(any(traj_success)) + record = { + "states": traj_states, + "actions": traj_actions, + "rewards": traj_rewards, + "dones": traj_dones, + "success": traj_success, + "episode_return": ep_ret, + "episode_success": ep_succ, + } + f.write(json.dumps(record) + "\n") + collected += 1 + summary_returns.append(ep_ret) + summary_success.append(1.0 if ep_succ else 0.0) + env.close() + try: + metrics = { + "global_step": int(step_tag), + "episodes": int(n_episodes), + "success_rate": float(np.mean(summary_success)) if len(summary_success) else 0.0, + "avg_return": float(np.mean(summary_returns)) if len(summary_returns) else 0.0, + "std_return": float(np.std(summary_returns)) if len(summary_returns) else 0.0, + } + with (out_dir / "metrics.json").open("w") as mf: + json.dump(metrics, mf) + except Exception as e: + print(f"Warning: failed to write eval metrics: {e}") + + eval_every_iters = max(1, args.num_iterations // args.eval_splits) + for iteration in range(1, args.num_iterations + 1): + # Anneal LR + if args.anneal_lr: + frac = 1.0 - (iteration - 1.0) / args.num_iterations + lrnow = frac * args.learning_rate + optimizer.param_groups[0]["lr"] = lrnow + + for step in range(0, args.num_steps): + global_step += args.num_envs + obs[step] = next_obs + dones[step] = next_done + + with torch.no_grad(): + action, logprob, _, value = agent.get_action_and_value(next_obs) + values[step] = value.flatten() + actions[step] = action + logprobs[step] = logprob + + next_obs, reward, terminations, truncations, infos = envs.step(action.cpu().numpy()) + next_done = np.logical_or(terminations, truncations) + rewards[step] = torch.tensor(reward).to(device).view(-1) + next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(next_done).to(device) + # Episode stats logging as in reference + try: + mask = None + if isinstance(infos, dict): + if "_episode" in infos: + mask = np.asarray(infos["_episode"]).astype(bool) + elif "episode" in infos and isinstance(infos["episode"], dict) and "_l" in infos["episode"]: + mask = np.asarray(infos["episode"]["_l"]).astype(bool) + if mask is not None and np.any(mask): + r_arr = np.asarray(infos.get("episode", {}).get("r", np.zeros_like(mask, dtype=float))) + l_arr = np.asarray(infos.get("episode", {}).get("l", np.zeros_like(mask, dtype=int))) + succ_arr = np.asarray(infos.get("success", np.zeros_like(mask, dtype=bool))).astype(float) + for i in np.where(mask)[0]: + ep_r = float(r_arr[i]) + ep_l = int(l_arr[i]) + ep_succ = float(succ_arr[i]) + episode_returns.append(ep_r) + episode_steps.append(global_step) + episode_successes.append(ep_succ) + if args.track: + try: + import wandb + log_dict = { + "global_step": int(global_step), + "rollout/ep_rew_mean": float(np.mean(r_arr[mask])) if np.any(mask) else None, + "rollout/ep_len_mean": float(np.mean(l_arr[mask])) if np.any(mask) else None, + "rollout/success_rate": float(np.mean(succ_arr[mask])) if np.any(mask) else None, + } + if np.any(mask): + last_idx = np.where(mask)[0][-1] + log_dict.update({ + "train/episodic_return": float(r_arr[last_idx]), + "train/episodic_length": int(l_arr[last_idx]), + "train/success": float(succ_arr[last_idx]), + "train/success_rate_100": float(np.mean(episode_successes[-100:])) if len(episode_successes) >= 100 else None, + }) + wandb.log(log_dict, step=global_step) + except Exception: + pass + except Exception: + pass + + # GAE + with torch.no_grad(): + next_value = agent.get_value(next_obs).reshape(1, -1) + advantages = torch.zeros_like(rewards).to(device) + lastgaelam = 0 + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + nextnonterminal = 1.0 - next_done + nextvalues = next_value + else: + nextnonterminal = 1.0 - dones[t + 1] + nextvalues = values[t + 1] + delta = rewards[t] + args.gamma * nextvalues * nextnonterminal - values[t] + advantages[t] = lastgaelam = delta + args.gamma * args.gae_lambda * nextnonterminal * lastgaelam + returns = advantages + values + + # flatten batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_logprobs = logprobs.reshape(-1) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_advantages = advantages.reshape(-1) + b_returns = returns.reshape(-1) + b_values = values.reshape(-1) + + # update + b_inds = np.arange(args.batch_size) + clipfracs = [] + for epoch in range(args.update_epochs): + np.random.shuffle(b_inds) + for start in range(0, args.batch_size, args.minibatch_size): + end = start + args.minibatch_size + mb_inds = b_inds[start:end] + + _, newlogprob, entropy, newvalue = agent.get_action_and_value(b_obs[mb_inds], b_actions.long()[mb_inds]) + logratio = newlogprob - b_logprobs[mb_inds] + ratio = logratio.exp() + + with torch.no_grad(): + old_approx_kl = (-logratio).mean() + approx_kl = ((ratio - 1) - logratio).mean() + clipfracs += [((ratio - 1.0).abs() > args.clip_coef).float().mean().item()] + + mb_advantages = b_advantages[mb_inds] + if args.norm_adv: + mb_advantages = (mb_advantages - mb_advantages.mean()) / (mb_advantages.std() + 1e-8) + + pg_loss1 = -mb_advantages * ratio + pg_loss2 = -mb_advantages * torch.clamp(ratio, 1 - args.clip_coef, 1 + args.clip_coef) + pg_loss = torch.max(pg_loss1, pg_loss2).mean() + + newvalue = newvalue.view(-1) + if args.clip_vloss: + v_loss_unclipped = (newvalue - b_returns[mb_inds]) ** 2 + v_clipped = b_values[mb_inds] + torch.clamp( + newvalue - b_values[mb_inds], -args.clip_coef, args.clip_coef, + ) + v_loss_clipped = (v_clipped - b_returns[mb_inds]) ** 2 + v_loss = 0.5 * torch.max(v_loss_unclipped, v_loss_clipped).mean() + else: + v_loss = 0.5 * ((newvalue - b_returns[mb_inds]) ** 2).mean() + + entropy_loss = entropy.mean() + loss = pg_loss - args.ent_coef * entropy_loss + v_loss * args.vf_coef + + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(agent.parameters(), args.max_grad_norm) + optimizer.step() + + if args.target_kl is not None and approx_kl > args.target_kl: + break + + y_pred, y_true = b_values.cpu().numpy(), b_returns.cpu().numpy() + var_y = np.var(y_true) + explained_var = np.nan if var_y == 0 else 1 - np.var(y_true - y_pred) / var_y + + sps = int(global_step / (time.time() - start_time)) + progress = 100 * iteration / args.num_iterations + print(f"[{progress:5.1f}%] Iter {iteration:4d}/{args.num_iterations} | " + f"SPS: {sps:5d} | " + f"Reward: {rewards.mean().item():6.3f} | " + f"Value: {values.mean().item():6.3f} | " + f"VLoss: {v_loss.item():.4f} | " + f"PLoss: {pg_loss.item():.4f} | " + f"Ent: {entropy_loss.item():.4f}") + if args.track: + try: + import wandb + wandb.log({ + "global_step": int(global_step), + "train/value_loss": float(v_loss.item()), + "train/policy_loss": float(pg_loss.item()), + "train/entropy": float(entropy_loss.item()), + "train/old_approx_kl": float(old_approx_kl.item()), + "train/approx_kl": float(approx_kl.item()), + "train/clipfrac": float(np.mean(clipfracs)), + "losses/explained_variance": float(explained_var), + "charts/avg_reward": float(rewards.mean().item()), + "charts/avg_value": float(values.mean().item()), + "perf/SPS": int(sps), + "train/learning_rate": float(optimizer.param_groups[0]["lr"]), + }, step=global_step) + except Exception: + pass + + # periodic evaluation collection + if iteration==1 or iteration % eval_every_iters == 0: + try: + eval_thunk = make_env(0, run_name, args.seed + 9999, args.grid_size, args.is_slippery, False) + collect_eval_trajectories(agent, eval_thunk, n_episodes=args.eval_episodes, step_tag=global_step) + if args.track: + try: + import json as _json + from pathlib import Path as _Path + mpath = _Path(f"runs/{run_name}/trajectories/step_{global_step}/metrics.json") + if mpath.exists(): + with mpath.open("r") as mf: + metrics = _json.load(mf) + wandb.log({ + "eval/success_rate": metrics.get("success_rate"), + "eval/avg_return": metrics.get("avg_return"), + "eval/std_return": metrics.get("std_return"), + "eval/episodes": metrics.get("episodes"), + }, step=global_step) + except Exception: + pass + print(f"Collected {args.eval_episodes} eval trajectories at global_step {global_step}") + except Exception as e: + print(f"Warning: eval trajectory collection failed at step {global_step}: {e}") + + envs.close() diff --git a/cleanrl/cleanrl/wandb/run-20251107_100619-gm3bobw8/logs/debug-internal.log b/cleanrl/cleanrl/wandb/run-20251107_100619-gm3bobw8/logs/debug-internal.log new file mode 100644 index 0000000000000000000000000000000000000000..c9003e147335b17d24999e7c8be59d3064475201 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_100619-gm3bobw8/logs/debug-internal.log @@ -0,0 +1,31 @@ +{"time":"2025-11-07T10:06:19.994658211+08:00","level":"INFO","msg":"stream: starting","core version":"0.22.3"} +{"time":"2025-11-07T10:06:20.365926969+08:00","level":"INFO","msg":"stream: created new stream","id":"gm3bobw8"} +{"time":"2025-11-07T10:06:20.366125989+08:00","level":"INFO","msg":"handler: started","stream_id":"gm3bobw8"} +{"time":"2025-11-07T10:06:20.369029103+08:00","level":"INFO","msg":"stream: started","id":"gm3bobw8"} +{"time":"2025-11-07T10:06:20.36904409+08:00","level":"INFO","msg":"writer: started","stream_id":"gm3bobw8"} +{"time":"2025-11-07T10:06:20.36904757+08:00","level":"INFO","msg":"sender: started","stream_id":"gm3bobw8"} +{"time":"2025-11-07T10:06:20.813587305+08:00","level":"ERROR","msg":"git repo not found","error":"repository does not exist"} +{"time":"2025-11-07T10:06:30.950807532+08:00","level":"WARN","msg":"tensorboard: no root directory","error":"timed out after 10s"} +{"time":"2025-11-07T10:06:30.951607455+08:00","level":"INFO","msg":"tensorboard: tracking new log directory","rootDir":{},"logDir":"LocalOrCloudPath(LocalPath=\"/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/runs/Bandit__ppo_bandit__1__1762481172\")","namespace":""} +{"time":"2025-11-07T10:06:30.95391652+08:00","level":"INFO","msg":"tensorboard: saving file","fileLocation":"/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/runs/Bandit__ppo_bandit__1__1762481172/events.out.tfevents.1762481180.pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0.131343.0","runPath":"runs/Bandit__ppo_bandit__1__1762481172/events.out.tfevents.1762481180.pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0.131343.0"} +{"time":"2025-11-07T10:06:30.957133707+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":71} +{"time":"2025-11-07T10:06:30.961555078+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":472} +{"time":"2025-11-07T10:06:35.966080652+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":596} +{"time":"2025-11-07T10:06:36.315508554+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":318} +{"time":"2025-11-07T10:06:40.972626238+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":964} +{"time":"2025-11-07T10:06:40.972681395+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:06:40.973207934+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":996} +{"time":"2025-11-07T10:06:40.975801472+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":246} +{"time":"2025-11-07T10:06:50.990421903+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":1662} +{"time":"2025-11-07T10:06:51.298917777+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":279} +{"time":"2025-11-07T10:06:55.996470006+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":1991} +{"time":"2025-11-07T10:06:55.996583551+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:06:55.997028739+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2023} +{"time":"2025-11-07T10:06:55.999621336+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":246} +{"time":"2025-11-07T10:06:59.151408238+08:00","level":"INFO","msg":"stream: closing","id":"gm3bobw8"} +{"time":"2025-11-07T10:06:59.154021485+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2314} +{"time":"2025-11-07T10:06:59.156923599+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":201} +{"time":"2025-11-07T10:07:00.878858934+08:00","level":"INFO","msg":"fileTransfer: Close: file transfer manager closed"} +{"time":"2025-11-07T10:07:01.313956448+08:00","level":"INFO","msg":"handler: closed","stream_id":"gm3bobw8"} +{"time":"2025-11-07T10:07:01.315667095+08:00","level":"INFO","msg":"sender: closed","stream_id":"gm3bobw8"} +{"time":"2025-11-07T10:07:01.31578248+08:00","level":"INFO","msg":"stream: closed","id":"gm3bobw8"} diff --git a/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/code/cleanrl/ppo_bandit.py b/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/code/cleanrl/ppo_bandit.py new file mode 100644 index 0000000000000000000000000000000000000000..774d6818f22295e308a42ecfb543626ae37b7518 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/code/cleanrl/ppo_bandit.py @@ -0,0 +1,335 @@ +# PPO implementation for RAGEN Bandit environment +import os +import random +import time +from dataclasses import dataclass + +import gymnasium as gym +import numpy as np +import torch +import torch.nn as nn +import torch.optim as optim +import tyro +from torch.distributions.categorical import Categorical +from torch.utils.tensorboard import SummaryWriter + +import sys +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../')) + +from ragen.env.bandit.env import BanditEnv +from ragen.env.bandit.config import BanditEnvConfig +from ragen_wrappers import BanditWrapper + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + """the name of this experiment""" + seed: int = 1 + """seed of the experiment""" + torch_deterministic: bool = True + """if toggled, `torch.backends.cudnn.deterministic=False`""" + cuda: bool = True + """if toggled, cuda will be enabled by default""" + track: bool = True + """if toggled, this experiment will be tracked with Weights and Biases""" + wandb_project_name: str = "cleanRL" + """the wandb's project name""" + wandb_entity: str = None + """the entity (team) of wandb's project""" + capture_video: bool = False + """whether to capture videos of the agent performances (check out `videos` folder)""" + + # Algorithm specific arguments + env_id: str = "Bandit" + """the id of the environment""" + total_timesteps: int = 10000000 + """total timesteps of the experiments""" + learning_rate: float = 2.5e-4 + """the learning rate of the optimizer""" + num_envs: int = 32 + """the number of parallel game environments""" + num_steps: int = 512 + """the number of steps to run in each environment per policy rollout""" + anneal_lr: bool = True + """Toggle learning rate annealing for policy and value networks""" + gamma: float = 0.99 + """the discount factor gamma""" + gae_lambda: float = 0.95 + """the lambda for the general advantage estimation""" + num_minibatches: int = 4 + """the number of mini-batches""" + update_epochs: int = 4 + """the K epochs to update the policy""" + norm_adv: bool = True + """Toggles advantages normalization""" + clip_coef: float = 0.2 + """the surrogate clipping coefficient""" + clip_vloss: bool = True + """Toggles whether or not to use a clipped loss for the value function, as per the paper.""" + ent_coef: float = 0.01 + """coefficient of the entropy""" + vf_coef: float = 0.5 + """coefficient of the value function""" + max_grad_norm: float = 0.5 + """the maximum norm for the gradient clipping""" + target_kl: float = None + """the target KL divergence threshold""" + + # to be filled in runtime + batch_size: int = 0 + """the batch size (computed in runtime)""" + minibatch_size: int = 0 + """the mini-batch size (computed in runtime)""" + num_iterations: int = 0 + """the number of iterations (computed in runtime)""" + + +def make_env(env_id, idx, capture_video, run_name, seed): + def thunk(): + config = BanditEnvConfig() + env = BanditEnv(config) + env = BanditWrapper(env) + env = gym.wrappers.RecordEpisodeStatistics(env) + if capture_video and idx == 0: + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + return env + return thunk + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class Agent(nn.Module): + def __init__(self, envs): + super().__init__() + obs_shape = np.array(envs.single_observation_space.shape).prod() + self.critic = nn.Sequential( + layer_init(nn.Linear(obs_shape, 64)), + nn.Tanh(), + layer_init(nn.Linear(64, 64)), + nn.Tanh(), + layer_init(nn.Linear(64, 1), std=1.0), + ) + self.actor = nn.Sequential( + layer_init(nn.Linear(obs_shape, 64)), + nn.Tanh(), + layer_init(nn.Linear(64, 64)), + nn.Tanh(), + layer_init(nn.Linear(64, envs.single_action_space.n), std=0.01), + ) + + def get_value(self, x): + return self.critic(x) + + def get_action_and_value(self, x, action=None): + logits = self.actor(x) + probs = Categorical(logits=logits) + if action is None: + action = probs.sample() + return action, probs.log_prob(action), probs.entropy(), self.critic(x) + + +if __name__ == "__main__": + args = tyro.cli(Args) + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + args.num_iterations = args.total_timesteps // args.batch_size + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + if args.track: + import wandb + + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + sync_tensorboard=True, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + writer = SummaryWriter(f"runs/{run_name}") + writer.add_text( + "hyperparameters", + "|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])), + ) + + # TRY NOT TO MODIFY: seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + # env setup + envs = gym.vector.SyncVectorEnv( + [make_env(args.env_id, i, args.capture_video, run_name, args.seed + i) for i in range(args.num_envs)], + ) + assert isinstance(envs.single_action_space, gym.spaces.Discrete), "only discrete action space is supported" + + agent = Agent(envs).to(device) + optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5) + + # ALGO Logic: Storage setup + obs = torch.zeros((args.num_steps, args.num_envs) + envs.single_observation_space.shape).to(device) + actions = torch.zeros((args.num_steps, args.num_envs) + envs.single_action_space.shape).to(device) + logprobs = torch.zeros((args.num_steps, args.num_envs)).to(device) + rewards = torch.zeros((args.num_steps, args.num_envs)).to(device) + dones = torch.zeros((args.num_steps, args.num_envs)).to(device) + values = torch.zeros((args.num_steps, args.num_envs)).to(device) + + # TRY NOT TO MODIFY: start the game + global_step = 0 + start_time = time.time() + next_obs, _ = envs.reset(seed=args.seed) + next_obs = torch.Tensor(next_obs).to(device) + next_done = torch.zeros(args.num_envs).to(device) + + for iteration in range(1, args.num_iterations + 1): + # Annealing the rate if instructed to do so. + if args.anneal_lr: + frac = 1.0 - (iteration - 1.0) / args.num_iterations + lrnow = frac * args.learning_rate + optimizer.param_groups[0]["lr"] = lrnow + + for step in range(0, args.num_steps): + global_step += args.num_envs + obs[step] = next_obs + dones[step] = next_done + + # ALGO LOGIC: action logic + with torch.no_grad(): + action, logprob, _, value = agent.get_action_and_value(next_obs) + values[step] = value.flatten() + actions[step] = action + logprobs[step] = logprob + + # TRY NOT TO MODIFY: execute the game and log data. + next_obs, reward, terminations, truncations, infos = envs.step(action.cpu().numpy()) + next_done = np.logical_or(terminations, truncations) + rewards[step] = torch.tensor(reward).to(device).view(-1) + next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(next_done).to(device) + + if "final_info" in infos: + for info in infos["final_info"]: + if info and "episode" in info: + print(f"global_step={global_step}, episodic_return={info['episode']['r']}") + writer.add_scalar("charts/episodic_return", info["episode"]["r"], global_step) + writer.add_scalar("charts/episodic_length", info["episode"]["l"], global_step) + + # bootstrap value if not done + with torch.no_grad(): + next_value = agent.get_value(next_obs).reshape(1, -1) + advantages = torch.zeros_like(rewards).to(device) + lastgaelam = 0 + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + nextnonterminal = 1.0 - next_done + nextvalues = next_value + else: + nextnonterminal = 1.0 - dones[t + 1] + nextvalues = values[t + 1] + delta = rewards[t] + args.gamma * nextvalues * nextnonterminal - values[t] + advantages[t] = lastgaelam = delta + args.gamma * args.gae_lambda * nextnonterminal * lastgaelam + returns = advantages + values + + # flatten the batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_logprobs = logprobs.reshape(-1) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_advantages = advantages.reshape(-1) + b_returns = returns.reshape(-1) + b_values = values.reshape(-1) + + # Optimizing the policy and value network + b_inds = np.arange(args.batch_size) + clipfracs = [] + for epoch in range(args.update_epochs): + np.random.shuffle(b_inds) + for start in range(0, args.batch_size, args.minibatch_size): + end = start + args.minibatch_size + mb_inds = b_inds[start:end] + + _, newlogprob, entropy, newvalue = agent.get_action_and_value(b_obs[mb_inds], b_actions.long()[mb_inds]) + logratio = newlogprob - b_logprobs[mb_inds] + ratio = logratio.exp() + + with torch.no_grad(): + # calculate approx_kl http://joschu.net/blog/kl-approx.html + old_approx_kl = (-logratio).mean() + approx_kl = ((ratio - 1) - logratio).mean() + clipfracs += [((ratio - 1.0).abs() > args.clip_coef).float().mean().item()] + + mb_advantages = b_advantages[mb_inds] + if args.norm_adv: + mb_advantages = (mb_advantages - mb_advantages.mean()) / (mb_advantages.std() + 1e-8) + + # Policy loss + pg_loss1 = -mb_advantages * ratio + pg_loss2 = -mb_advantages * torch.clamp(ratio, 1 - args.clip_coef, 1 + args.clip_coef) + pg_loss = torch.max(pg_loss1, pg_loss2).mean() + + # Value loss + newvalue = newvalue.view(-1) + if args.clip_vloss: + v_loss_unclipped = (newvalue - b_returns[mb_inds]) ** 2 + v_clipped = b_values[mb_inds] + torch.clamp( + newvalue - b_values[mb_inds], + -args.clip_coef, + args.clip_coef, + ) + v_loss_clipped = (v_clipped - b_returns[mb_inds]) ** 2 + v_loss_max = torch.max(v_loss_unclipped, v_loss_clipped) + v_loss = 0.5 * v_loss_max.mean() + else: + v_loss = 0.5 * ((newvalue - b_returns[mb_inds]) ** 2).mean() + + entropy_loss = entropy.mean() + loss = pg_loss - args.ent_coef * entropy_loss + v_loss * args.vf_coef + + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(agent.parameters(), args.max_grad_norm) + optimizer.step() + + if args.target_kl is not None and approx_kl > args.target_kl: + break + + y_pred, y_true = b_values.cpu().numpy(), b_returns.cpu().numpy() + var_y = np.var(y_true) + explained_var = np.nan if var_y == 0 else 1 - np.var(y_true - y_pred) / var_y + + # TRY NOT TO MODIFY: record rewards for plotting purposes + writer.add_scalar("charts/learning_rate", optimizer.param_groups[0]["lr"], global_step) + writer.add_scalar("losses/value_loss", v_loss.item(), global_step) + writer.add_scalar("losses/policy_loss", pg_loss.item(), global_step) + writer.add_scalar("losses/entropy", entropy_loss.item(), global_step) + writer.add_scalar("losses/old_approx_kl", old_approx_kl.item(), global_step) + writer.add_scalar("losses/approx_kl", approx_kl.item(), global_step) + writer.add_scalar("losses/clipfrac", np.mean(clipfracs), global_step) + writer.add_scalar("losses/explained_variance", explained_var, global_step) + + # Additional useful metrics + writer.add_scalar("charts/avg_reward", rewards.mean().item(), global_step) + writer.add_scalar("charts/avg_value", values.mean().item(), global_step) + writer.add_scalar("charts/max_reward", rewards.max().item(), global_step) + writer.add_scalar("charts/min_reward", rewards.min().item(), global_step) + + # Console output with key metrics + sps = int(global_step / (time.time() - start_time)) + progress = 100 * iteration / args.num_iterations + print(f"[{progress:5.1f}%] Iter {iteration:4d}/{args.num_iterations} | " + f"SPS: {sps:5d} | " + f"Reward: {rewards.mean().item():6.3f} | " + f"Value: {values.mean().item():6.3f} | " + f"VLoss: {v_loss.item():.4f} | " + f"PLoss: {pg_loss.item():.4f} | " + f"Ent: {entropy_loss.item():.4f}") + writer.add_scalar("charts/SPS", sps, global_step) + + envs.close() + writer.close() diff --git a/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/config.yaml b/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..901500b9056f5b6e1be09352a09215f049be0e98 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/config.yaml @@ -0,0 +1,153 @@ +_wandb: + value: + cli_version: 0.22.3 + code_path: code/cleanrl/ppo_bandit.py + e: + afa72m1ss75e8tywa8la2dtqpijhj6o8: + args: + - --track + - --wandb-project-name + - ragen-bandit + codePath: cleanrl/ppo_bandit.py + codePathLocal: ppo_bandit.py + cpu_count: 64 + cpu_count_logical: 128 + cudaVersion: "12.4" + disk: + /: + total: "5153960755200" + used: "30509883392" + email: haoyu-wa22@mails.tsinghua.edu.cn + executable: /root/local/miniconda3/envs/ragen/bin/python + git: + commit: 004f8a086a892a2a180f4dd332b90d83a968aa7a + remote: https://github.com/vwxyzjn/cleanrl.git + gpu: NVIDIA H100 80GB HBM3 + gpu_count: 8 + gpu_nvidia: + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-35e2d43d-4067-82ce-90d4-def9e389bf28 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-af4135e3-88f2-e9ac-518d-502c75a85429 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-d7fdeeba-fe9b-ec03-d9f7-6724fe4266b5 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-ccc4f668-3882-5a8e-2c07-c5cd08f6f666 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-7b73c0cf-d3d5-e10c-7176-a43be1e41001 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-81b58d94-5d1f-8ec2-f9d2-fd56172ed177 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-03e8bc66-3b44-6794-49fd-5392fbdda6d1 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-b7cf0ec6-7c29-1179-dceb-09565da51890 + host: pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0 + memory: + total: "2163642122240" + os: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.35 + program: /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/ppo_bandit.py + python: CPython 3.12.12 + root: /mnt/general/wanghy/RAGEN/cleanrl/cleanrl + startedAt: "2025-11-07T02:09:11.693292Z" + writerId: afa72m1ss75e8tywa8la2dtqpijhj6o8 + m: [] + python_version: 3.12.12 + t: + "1": + - 1 + - 49 + - 51 + - 105 + "2": + - 1 + - 49 + - 51 + - 105 + "3": + - 13 + - 16 + - 35 + "4": 3.12.12 + "5": 0.22.3 + "12": 0.22.3 + "13": linux-x86_64 +anneal_lr: + value: true +batch_size: + value: 16384 +capture_video: + value: false +clip_coef: + value: 0.2 +clip_vloss: + value: true +cuda: + value: true +ent_coef: + value: 0.01 +env_id: + value: Bandit +exp_name: + value: ppo_bandit +gae_lambda: + value: 0.95 +gamma: + value: 0.99 +learning_rate: + value: 0.00025 +max_grad_norm: + value: 0.5 +minibatch_size: + value: 4096 +norm_adv: + value: true +num_envs: + value: 32 +num_iterations: + value: 610 +num_minibatches: + value: 4 +num_steps: + value: 512 +seed: + value: 1 +target_kl: + value: null +torch_deterministic: + value: true +total_timesteps: + value: 10000000 +track: + value: true +update_epochs: + value: 4 +vf_coef: + value: 0.5 +wandb_entity: + value: null +wandb_project_name: + value: ragen-bandit diff --git a/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/wandb-metadata.json b/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/wandb-metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..bbd0ffe54d431e28274216d8ac1c1aa745e1f2ed --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/wandb-metadata.json @@ -0,0 +1,94 @@ +{ + "os": "Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.35", + "python": "CPython 3.12.12", + "startedAt": "2025-11-07T02:09:11.693292Z", + "args": [ + "--track", + "--wandb-project-name", + "ragen-bandit" + ], + "program": "/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/ppo_bandit.py", + "codePath": "cleanrl/ppo_bandit.py", + "codePathLocal": "ppo_bandit.py", + "git": { + "remote": "https://github.com/vwxyzjn/cleanrl.git", + "commit": "004f8a086a892a2a180f4dd332b90d83a968aa7a" + }, + "email": "haoyu-wa22@mails.tsinghua.edu.cn", + "root": "/mnt/general/wanghy/RAGEN/cleanrl/cleanrl", + "host": "pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0", + "executable": "/root/local/miniconda3/envs/ragen/bin/python", + "cpu_count": 64, + "cpu_count_logical": 128, + "gpu": "NVIDIA H100 80GB HBM3", + "gpu_count": 8, + "disk": { + "/": { + "total": "5153960755200", + "used": "30509883392" + } + }, + "memory": { + "total": "2163642122240" + }, + "gpu_nvidia": [ + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-35e2d43d-4067-82ce-90d4-def9e389bf28" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-af4135e3-88f2-e9ac-518d-502c75a85429" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-d7fdeeba-fe9b-ec03-d9f7-6724fe4266b5" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-ccc4f668-3882-5a8e-2c07-c5cd08f6f666" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-7b73c0cf-d3d5-e10c-7176-a43be1e41001" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-81b58d94-5d1f-8ec2-f9d2-fd56172ed177" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-03e8bc66-3b44-6794-49fd-5392fbdda6d1" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-b7cf0ec6-7c29-1179-dceb-09565da51890" + } + ], + "cudaVersion": "12.4", + "writerId": "afa72m1ss75e8tywa8la2dtqpijhj6o8" +} \ No newline at end of file diff --git a/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/wandb-summary.json b/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/wandb-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..29392ccb6a6c7ef14d8ab9e9ec0a979796b5e6c6 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/files/wandb-summary.json @@ -0,0 +1 @@ +{"_step":7929,"losses/approx_kl":1.38243195e-08,"losses/policy_loss":1.4365651e-07,"losses/clipfrac":0,"global_step":9994240,"charts/learning_rate":4.0983608e-07,"charts/avg_reward":0.08695068,"charts/max_reward":1,"charts/SPS":27464,"_runtime":365,"losses/entropy":0.6929781,"losses/value_loss":0.043968797,"losses/old_approx_kl":7.185736e-08,"charts/avg_value":0.17424533,"losses/explained_variance":-2.8371811e-05,"charts/min_reward":0,"_timestamp":1.7624817181982253e+09,"_wandb":{"runtime":365}} \ No newline at end of file diff --git a/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/logs/debug.log b/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/logs/debug.log new file mode 100644 index 0000000000000000000000000000000000000000..3fd149fc367f89787c20a151e84a9af9a881b1a0 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/logs/debug.log @@ -0,0 +1,24 @@ +2025-11-07 10:09:11,744 INFO MainThread:131665 [wandb_setup.py:_flush():81] Current SDK version is 0.22.3 +2025-11-07 10:09:11,745 INFO MainThread:131665 [wandb_setup.py:_flush():81] Configure stats pid to 131665 +2025-11-07 10:09:11,745 INFO MainThread:131665 [wandb_setup.py:_flush():81] Loading settings from /root/.config/wandb/settings +2025-11-07 10:09:11,745 INFO MainThread:131665 [wandb_setup.py:_flush():81] Loading settings from /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/settings +2025-11-07 10:09:11,745 INFO MainThread:131665 [wandb_setup.py:_flush():81] Loading settings from environment variables +2025-11-07 10:09:11,745 INFO MainThread:131665 [wandb_init.py:setup_run_log_directory():706] Logging user logs to /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/logs/debug.log +2025-11-07 10:09:11,746 INFO MainThread:131665 [wandb_init.py:setup_run_log_directory():707] Logging internal logs to /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/run-20251107_100911-8xuf7idy/logs/debug-internal.log +2025-11-07 10:09:11,747 INFO MainThread:131665 [wandb_init.py:init():833] calling init triggers +2025-11-07 10:09:11,747 INFO MainThread:131665 [wandb_init.py:init():838] wandb.init called with sweep_config: {} +config: {'exp_name': 'ppo_bandit', 'seed': 1, 'torch_deterministic': True, 'cuda': True, 'track': True, 'wandb_project_name': 'ragen-bandit', 'wandb_entity': None, 'capture_video': False, 'env_id': 'Bandit', 'total_timesteps': 10000000, 'learning_rate': 0.00025, 'num_envs': 32, 'num_steps': 512, 'anneal_lr': True, 'gamma': 0.99, 'gae_lambda': 0.95, 'num_minibatches': 4, 'update_epochs': 4, 'norm_adv': True, 'clip_coef': 0.2, 'clip_vloss': True, 'ent_coef': 0.01, 'vf_coef': 0.5, 'max_grad_norm': 0.5, 'target_kl': None, 'batch_size': 16384, 'minibatch_size': 4096, 'num_iterations': 610, '_wandb': {'code_path': 'code/cleanrl/ppo_bandit.py'}} +2025-11-07 10:09:11,747 INFO MainThread:131665 [wandb_init.py:init():881] starting backend +2025-11-07 10:09:11,953 INFO MainThread:131665 [wandb_init.py:init():884] sending inform_init request +2025-11-07 10:09:11,964 INFO MainThread:131665 [wandb_init.py:init():892] backend started and connected +2025-11-07 10:09:11,966 INFO MainThread:131665 [wandb_init.py:init():962] updated telemetry +2025-11-07 10:09:12,000 INFO MainThread:131665 [wandb_init.py:init():986] communicating run to backend with 90.0 second timeout +2025-11-07 10:09:12,663 INFO MainThread:131665 [wandb_init.py:init():1033] starting run threads in backend +2025-11-07 10:09:12,806 INFO MainThread:131665 [wandb_run.py:_console_start():2506] atexit reg +2025-11-07 10:09:12,806 INFO MainThread:131665 [wandb_run.py:_redirect():2354] redirect: wrap_raw +2025-11-07 10:09:12,807 INFO MainThread:131665 [wandb_run.py:_redirect():2423] Wrapping output streams. +2025-11-07 10:09:12,807 INFO MainThread:131665 [wandb_run.py:_redirect():2446] Redirects installed. +2025-11-07 10:09:12,809 INFO MainThread:131665 [wandb_init.py:init():1073] run started, returning control to user process +2025-11-07 10:09:12,809 INFO MainThread:131665 [wandb_run.py:_tensorboard_callback():1598] tensorboard callback: runs/Bandit__ppo_bandit__1__1762481344, True +2025-11-07 10:15:18,220 INFO wandb-AsyncioManager-main:131665 [service_client.py:_forward_responses():80] Reached EOF. +2025-11-07 10:15:18,220 INFO wandb-AsyncioManager-main:131665 [mailbox.py:close():137] Closing mailbox, abandoning 1 handles. diff --git a/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/code/cleanrl/ppo_bandit.py b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/code/cleanrl/ppo_bandit.py new file mode 100644 index 0000000000000000000000000000000000000000..774d6818f22295e308a42ecfb543626ae37b7518 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/code/cleanrl/ppo_bandit.py @@ -0,0 +1,335 @@ +# PPO implementation for RAGEN Bandit environment +import os +import random +import time +from dataclasses import dataclass + +import gymnasium as gym +import numpy as np +import torch +import torch.nn as nn +import torch.optim as optim +import tyro +from torch.distributions.categorical import Categorical +from torch.utils.tensorboard import SummaryWriter + +import sys +sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../')) + +from ragen.env.bandit.env import BanditEnv +from ragen.env.bandit.config import BanditEnvConfig +from ragen_wrappers import BanditWrapper + + +@dataclass +class Args: + exp_name: str = os.path.basename(__file__)[: -len(".py")] + """the name of this experiment""" + seed: int = 1 + """seed of the experiment""" + torch_deterministic: bool = True + """if toggled, `torch.backends.cudnn.deterministic=False`""" + cuda: bool = True + """if toggled, cuda will be enabled by default""" + track: bool = True + """if toggled, this experiment will be tracked with Weights and Biases""" + wandb_project_name: str = "cleanRL" + """the wandb's project name""" + wandb_entity: str = None + """the entity (team) of wandb's project""" + capture_video: bool = False + """whether to capture videos of the agent performances (check out `videos` folder)""" + + # Algorithm specific arguments + env_id: str = "Bandit" + """the id of the environment""" + total_timesteps: int = 10000000 + """total timesteps of the experiments""" + learning_rate: float = 2.5e-4 + """the learning rate of the optimizer""" + num_envs: int = 32 + """the number of parallel game environments""" + num_steps: int = 512 + """the number of steps to run in each environment per policy rollout""" + anneal_lr: bool = True + """Toggle learning rate annealing for policy and value networks""" + gamma: float = 0.99 + """the discount factor gamma""" + gae_lambda: float = 0.95 + """the lambda for the general advantage estimation""" + num_minibatches: int = 4 + """the number of mini-batches""" + update_epochs: int = 4 + """the K epochs to update the policy""" + norm_adv: bool = True + """Toggles advantages normalization""" + clip_coef: float = 0.2 + """the surrogate clipping coefficient""" + clip_vloss: bool = True + """Toggles whether or not to use a clipped loss for the value function, as per the paper.""" + ent_coef: float = 0.01 + """coefficient of the entropy""" + vf_coef: float = 0.5 + """coefficient of the value function""" + max_grad_norm: float = 0.5 + """the maximum norm for the gradient clipping""" + target_kl: float = None + """the target KL divergence threshold""" + + # to be filled in runtime + batch_size: int = 0 + """the batch size (computed in runtime)""" + minibatch_size: int = 0 + """the mini-batch size (computed in runtime)""" + num_iterations: int = 0 + """the number of iterations (computed in runtime)""" + + +def make_env(env_id, idx, capture_video, run_name, seed): + def thunk(): + config = BanditEnvConfig() + env = BanditEnv(config) + env = BanditWrapper(env) + env = gym.wrappers.RecordEpisodeStatistics(env) + if capture_video and idx == 0: + env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") + return env + return thunk + + +def layer_init(layer, std=np.sqrt(2), bias_const=0.0): + torch.nn.init.orthogonal_(layer.weight, std) + torch.nn.init.constant_(layer.bias, bias_const) + return layer + + +class Agent(nn.Module): + def __init__(self, envs): + super().__init__() + obs_shape = np.array(envs.single_observation_space.shape).prod() + self.critic = nn.Sequential( + layer_init(nn.Linear(obs_shape, 64)), + nn.Tanh(), + layer_init(nn.Linear(64, 64)), + nn.Tanh(), + layer_init(nn.Linear(64, 1), std=1.0), + ) + self.actor = nn.Sequential( + layer_init(nn.Linear(obs_shape, 64)), + nn.Tanh(), + layer_init(nn.Linear(64, 64)), + nn.Tanh(), + layer_init(nn.Linear(64, envs.single_action_space.n), std=0.01), + ) + + def get_value(self, x): + return self.critic(x) + + def get_action_and_value(self, x, action=None): + logits = self.actor(x) + probs = Categorical(logits=logits) + if action is None: + action = probs.sample() + return action, probs.log_prob(action), probs.entropy(), self.critic(x) + + +if __name__ == "__main__": + args = tyro.cli(Args) + args.batch_size = int(args.num_envs * args.num_steps) + args.minibatch_size = int(args.batch_size // args.num_minibatches) + args.num_iterations = args.total_timesteps // args.batch_size + run_name = f"{args.env_id}__{args.exp_name}__{args.seed}__{int(time.time())}" + if args.track: + import wandb + + wandb.init( + project=args.wandb_project_name, + entity=args.wandb_entity, + sync_tensorboard=True, + config=vars(args), + name=run_name, + monitor_gym=True, + save_code=True, + ) + writer = SummaryWriter(f"runs/{run_name}") + writer.add_text( + "hyperparameters", + "|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])), + ) + + # TRY NOT TO MODIFY: seeding + random.seed(args.seed) + np.random.seed(args.seed) + torch.manual_seed(args.seed) + torch.backends.cudnn.deterministic = args.torch_deterministic + + device = torch.device("cuda" if torch.cuda.is_available() and args.cuda else "cpu") + + # env setup + envs = gym.vector.SyncVectorEnv( + [make_env(args.env_id, i, args.capture_video, run_name, args.seed + i) for i in range(args.num_envs)], + ) + assert isinstance(envs.single_action_space, gym.spaces.Discrete), "only discrete action space is supported" + + agent = Agent(envs).to(device) + optimizer = optim.Adam(agent.parameters(), lr=args.learning_rate, eps=1e-5) + + # ALGO Logic: Storage setup + obs = torch.zeros((args.num_steps, args.num_envs) + envs.single_observation_space.shape).to(device) + actions = torch.zeros((args.num_steps, args.num_envs) + envs.single_action_space.shape).to(device) + logprobs = torch.zeros((args.num_steps, args.num_envs)).to(device) + rewards = torch.zeros((args.num_steps, args.num_envs)).to(device) + dones = torch.zeros((args.num_steps, args.num_envs)).to(device) + values = torch.zeros((args.num_steps, args.num_envs)).to(device) + + # TRY NOT TO MODIFY: start the game + global_step = 0 + start_time = time.time() + next_obs, _ = envs.reset(seed=args.seed) + next_obs = torch.Tensor(next_obs).to(device) + next_done = torch.zeros(args.num_envs).to(device) + + for iteration in range(1, args.num_iterations + 1): + # Annealing the rate if instructed to do so. + if args.anneal_lr: + frac = 1.0 - (iteration - 1.0) / args.num_iterations + lrnow = frac * args.learning_rate + optimizer.param_groups[0]["lr"] = lrnow + + for step in range(0, args.num_steps): + global_step += args.num_envs + obs[step] = next_obs + dones[step] = next_done + + # ALGO LOGIC: action logic + with torch.no_grad(): + action, logprob, _, value = agent.get_action_and_value(next_obs) + values[step] = value.flatten() + actions[step] = action + logprobs[step] = logprob + + # TRY NOT TO MODIFY: execute the game and log data. + next_obs, reward, terminations, truncations, infos = envs.step(action.cpu().numpy()) + next_done = np.logical_or(terminations, truncations) + rewards[step] = torch.tensor(reward).to(device).view(-1) + next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(next_done).to(device) + + if "final_info" in infos: + for info in infos["final_info"]: + if info and "episode" in info: + print(f"global_step={global_step}, episodic_return={info['episode']['r']}") + writer.add_scalar("charts/episodic_return", info["episode"]["r"], global_step) + writer.add_scalar("charts/episodic_length", info["episode"]["l"], global_step) + + # bootstrap value if not done + with torch.no_grad(): + next_value = agent.get_value(next_obs).reshape(1, -1) + advantages = torch.zeros_like(rewards).to(device) + lastgaelam = 0 + for t in reversed(range(args.num_steps)): + if t == args.num_steps - 1: + nextnonterminal = 1.0 - next_done + nextvalues = next_value + else: + nextnonterminal = 1.0 - dones[t + 1] + nextvalues = values[t + 1] + delta = rewards[t] + args.gamma * nextvalues * nextnonterminal - values[t] + advantages[t] = lastgaelam = delta + args.gamma * args.gae_lambda * nextnonterminal * lastgaelam + returns = advantages + values + + # flatten the batch + b_obs = obs.reshape((-1,) + envs.single_observation_space.shape) + b_logprobs = logprobs.reshape(-1) + b_actions = actions.reshape((-1,) + envs.single_action_space.shape) + b_advantages = advantages.reshape(-1) + b_returns = returns.reshape(-1) + b_values = values.reshape(-1) + + # Optimizing the policy and value network + b_inds = np.arange(args.batch_size) + clipfracs = [] + for epoch in range(args.update_epochs): + np.random.shuffle(b_inds) + for start in range(0, args.batch_size, args.minibatch_size): + end = start + args.minibatch_size + mb_inds = b_inds[start:end] + + _, newlogprob, entropy, newvalue = agent.get_action_and_value(b_obs[mb_inds], b_actions.long()[mb_inds]) + logratio = newlogprob - b_logprobs[mb_inds] + ratio = logratio.exp() + + with torch.no_grad(): + # calculate approx_kl http://joschu.net/blog/kl-approx.html + old_approx_kl = (-logratio).mean() + approx_kl = ((ratio - 1) - logratio).mean() + clipfracs += [((ratio - 1.0).abs() > args.clip_coef).float().mean().item()] + + mb_advantages = b_advantages[mb_inds] + if args.norm_adv: + mb_advantages = (mb_advantages - mb_advantages.mean()) / (mb_advantages.std() + 1e-8) + + # Policy loss + pg_loss1 = -mb_advantages * ratio + pg_loss2 = -mb_advantages * torch.clamp(ratio, 1 - args.clip_coef, 1 + args.clip_coef) + pg_loss = torch.max(pg_loss1, pg_loss2).mean() + + # Value loss + newvalue = newvalue.view(-1) + if args.clip_vloss: + v_loss_unclipped = (newvalue - b_returns[mb_inds]) ** 2 + v_clipped = b_values[mb_inds] + torch.clamp( + newvalue - b_values[mb_inds], + -args.clip_coef, + args.clip_coef, + ) + v_loss_clipped = (v_clipped - b_returns[mb_inds]) ** 2 + v_loss_max = torch.max(v_loss_unclipped, v_loss_clipped) + v_loss = 0.5 * v_loss_max.mean() + else: + v_loss = 0.5 * ((newvalue - b_returns[mb_inds]) ** 2).mean() + + entropy_loss = entropy.mean() + loss = pg_loss - args.ent_coef * entropy_loss + v_loss * args.vf_coef + + optimizer.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(agent.parameters(), args.max_grad_norm) + optimizer.step() + + if args.target_kl is not None and approx_kl > args.target_kl: + break + + y_pred, y_true = b_values.cpu().numpy(), b_returns.cpu().numpy() + var_y = np.var(y_true) + explained_var = np.nan if var_y == 0 else 1 - np.var(y_true - y_pred) / var_y + + # TRY NOT TO MODIFY: record rewards for plotting purposes + writer.add_scalar("charts/learning_rate", optimizer.param_groups[0]["lr"], global_step) + writer.add_scalar("losses/value_loss", v_loss.item(), global_step) + writer.add_scalar("losses/policy_loss", pg_loss.item(), global_step) + writer.add_scalar("losses/entropy", entropy_loss.item(), global_step) + writer.add_scalar("losses/old_approx_kl", old_approx_kl.item(), global_step) + writer.add_scalar("losses/approx_kl", approx_kl.item(), global_step) + writer.add_scalar("losses/clipfrac", np.mean(clipfracs), global_step) + writer.add_scalar("losses/explained_variance", explained_var, global_step) + + # Additional useful metrics + writer.add_scalar("charts/avg_reward", rewards.mean().item(), global_step) + writer.add_scalar("charts/avg_value", values.mean().item(), global_step) + writer.add_scalar("charts/max_reward", rewards.max().item(), global_step) + writer.add_scalar("charts/min_reward", rewards.min().item(), global_step) + + # Console output with key metrics + sps = int(global_step / (time.time() - start_time)) + progress = 100 * iteration / args.num_iterations + print(f"[{progress:5.1f}%] Iter {iteration:4d}/{args.num_iterations} | " + f"SPS: {sps:5d} | " + f"Reward: {rewards.mean().item():6.3f} | " + f"Value: {values.mean().item():6.3f} | " + f"VLoss: {v_loss.item():.4f} | " + f"PLoss: {pg_loss.item():.4f} | " + f"Ent: {entropy_loss.item():.4f}") + writer.add_scalar("charts/SPS", sps, global_step) + + envs.close() + writer.close() diff --git a/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/output.log b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/output.log new file mode 100644 index 0000000000000000000000000000000000000000..0e8c48d2545f68f7364411a36ddf7605ee827983 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/output.log @@ -0,0 +1,610 @@ +[ 0.2%] Iter 1/610 | SPS: 17989 | Reward: 0.087 | Value: -0.004 | VLoss: 0.0479 | PLoss: -0.0007 | Ent: 0.6929 +[ 0.3%] Iter 2/610 | SPS: 22081 | Reward: 0.084 | Value: 0.127 | VLoss: 0.0450 | PLoss: 0.0001 | Ent: 0.6925 +[ 0.5%] Iter 3/610 | SPS: 23843 | Reward: 0.087 | Value: 0.138 | VLoss: 0.0471 | PLoss: -0.0001 | Ent: 0.6924 +[ 0.7%] Iter 4/610 | SPS: 24871 | Reward: 0.088 | Value: 0.149 | VLoss: 0.0454 | PLoss: -0.0002 | Ent: 0.6919 +[ 0.8%] Iter 5/610 | SPS: 25514 | Reward: 0.088 | Value: 0.167 | VLoss: 0.0455 | PLoss: -0.0000 | Ent: 0.6916 +[ 1.0%] Iter 6/610 | SPS: 25956 | Reward: 0.086 | Value: 0.172 | VLoss: 0.0475 | PLoss: -0.0001 | Ent: 0.6915 +[ 1.1%] Iter 7/610 | SPS: 26293 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0482 | PLoss: -0.0002 | Ent: 0.6912 +[ 1.3%] Iter 8/610 | SPS: 26556 | Reward: 0.089 | Value: 0.176 | VLoss: 0.0472 | PLoss: -0.0001 | Ent: 0.6913 +[ 1.5%] Iter 9/610 | SPS: 26765 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0476 | PLoss: 0.0001 | Ent: 0.6912 +[ 1.6%] Iter 10/610 | SPS: 26925 | Reward: 0.084 | Value: 0.177 | VLoss: 0.0453 | PLoss: -0.0000 | Ent: 0.6911 +[ 1.8%] Iter 11/610 | SPS: 27059 | Reward: 0.091 | Value: 0.166 | VLoss: 0.0489 | PLoss: 0.0000 | Ent: 0.6908 +[ 2.0%] Iter 12/610 | SPS: 27177 | Reward: 0.086 | Value: 0.183 | VLoss: 0.0469 | PLoss: -0.0001 | Ent: 0.6910 +[ 2.1%] Iter 13/610 | SPS: 27282 | Reward: 0.084 | Value: 0.169 | VLoss: 0.0464 | PLoss: -0.0002 | Ent: 0.6913 +[ 2.3%] Iter 14/610 | SPS: 27352 | Reward: 0.086 | Value: 0.169 | VLoss: 0.0449 | PLoss: -0.0000 | Ent: 0.6918 +[ 2.5%] Iter 15/610 | SPS: 27379 | Reward: 0.086 | Value: 0.170 | VLoss: 0.0459 | PLoss: -0.0000 | Ent: 0.6923 +[ 2.6%] Iter 16/610 | SPS: 27451 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0493 | PLoss: -0.0001 | Ent: 0.6926 +[ 2.8%] Iter 17/610 | SPS: 27516 | Reward: 0.087 | Value: 0.173 | VLoss: 0.0467 | PLoss: -0.0000 | Ent: 0.6929 +[ 3.0%] Iter 18/610 | SPS: 27566 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0460 | PLoss: -0.0001 | Ent: 0.6930 +[ 3.1%] Iter 19/610 | SPS: 27600 | Reward: 0.090 | Value: 0.169 | VLoss: 0.0492 | PLoss: -0.0001 | Ent: 0.6931 +[ 3.3%] Iter 20/610 | SPS: 27645 | Reward: 0.088 | Value: 0.180 | VLoss: 0.0461 | PLoss: -0.0002 | Ent: 0.6930 +[ 3.4%] Iter 21/610 | SPS: 27677 | Reward: 0.086 | Value: 0.174 | VLoss: 0.0461 | PLoss: 0.0001 | Ent: 0.6927 +[ 3.6%] Iter 22/610 | SPS: 27715 | Reward: 0.092 | Value: 0.171 | VLoss: 0.0507 | PLoss: -0.0000 | Ent: 0.6926 +[ 3.8%] Iter 23/610 | SPS: 27750 | Reward: 0.083 | Value: 0.184 | VLoss: 0.0424 | PLoss: -0.0001 | Ent: 0.6927 +[ 3.9%] Iter 24/610 | SPS: 27776 | Reward: 0.084 | Value: 0.165 | VLoss: 0.0449 | PLoss: -0.0000 | Ent: 0.6926 +[ 4.1%] Iter 25/610 | SPS: 27777 | Reward: 0.086 | Value: 0.167 | VLoss: 0.0449 | PLoss: -0.0001 | Ent: 0.6926 +[ 4.3%] Iter 26/610 | SPS: 27803 | Reward: 0.088 | Value: 0.170 | VLoss: 0.0460 | PLoss: 0.0001 | Ent: 0.6927 +[ 4.4%] Iter 27/610 | SPS: 27826 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0478 | PLoss: -0.0001 | Ent: 0.6928 +[ 4.6%] Iter 28/610 | SPS: 27848 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0484 | PLoss: -0.0000 | Ent: 0.6929 +[ 4.8%] Iter 29/610 | SPS: 27869 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0449 | PLoss: -0.0001 | Ent: 0.6927 +[ 4.9%] Iter 30/610 | SPS: 27890 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0483 | PLoss: 0.0001 | Ent: 0.6925 +[ 5.1%] Iter 31/610 | SPS: 27887 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0487 | PLoss: -0.0000 | Ent: 0.6927 +[ 5.2%] Iter 32/610 | SPS: 27879 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0491 | PLoss: -0.0000 | Ent: 0.6927 +[ 5.4%] Iter 33/610 | SPS: 27880 | Reward: 0.085 | Value: 0.175 | VLoss: 0.0437 | PLoss: -0.0001 | Ent: 0.6925 +[ 5.6%] Iter 34/610 | SPS: 27888 | Reward: 0.087 | Value: 0.169 | VLoss: 0.0451 | PLoss: -0.0002 | Ent: 0.6924 +[ 5.7%] Iter 35/610 | SPS: 27892 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0476 | PLoss: -0.0000 | Ent: 0.6923 +[ 5.9%] Iter 36/610 | SPS: 27898 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0450 | PLoss: -0.0001 | Ent: 0.6922 +[ 6.1%] Iter 37/610 | SPS: 27879 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0455 | PLoss: -0.0000 | Ent: 0.6920 +[ 6.2%] Iter 38/610 | SPS: 27886 | Reward: 0.089 | Value: 0.176 | VLoss: 0.0474 | PLoss: -0.0004 | Ent: 0.6915 +[ 6.4%] Iter 39/610 | SPS: 27891 | Reward: 0.089 | Value: 0.176 | VLoss: 0.0485 | PLoss: 0.0002 | Ent: 0.6904 +[ 6.6%] Iter 40/610 | SPS: 27898 | Reward: 0.085 | Value: 0.177 | VLoss: 0.0454 | PLoss: -0.0000 | Ent: 0.6907 +[ 6.7%] Iter 41/610 | SPS: 27905 | Reward: 0.087 | Value: 0.170 | VLoss: 0.0475 | PLoss: 0.0001 | Ent: 0.6916 +[ 6.9%] Iter 42/610 | SPS: 27907 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0462 | PLoss: 0.0000 | Ent: 0.6917 +[ 7.0%] Iter 43/610 | SPS: 27908 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0475 | PLoss: -0.0003 | Ent: 0.6912 +[ 7.2%] Iter 44/610 | SPS: 27910 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0477 | PLoss: -0.0001 | Ent: 0.6913 +[ 7.4%] Iter 45/610 | SPS: 27911 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0458 | PLoss: -0.0005 | Ent: 0.6919 +[ 7.5%] Iter 46/610 | SPS: 27914 | Reward: 0.089 | Value: 0.171 | VLoss: 0.0482 | PLoss: -0.0001 | Ent: 0.6922 +[ 7.7%] Iter 47/610 | SPS: 27920 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0452 | PLoss: -0.0002 | Ent: 0.6924 +[ 7.9%] Iter 48/610 | SPS: 27921 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0478 | PLoss: -0.0001 | Ent: 0.6927 +[ 8.0%] Iter 49/610 | SPS: 27910 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0465 | PLoss: 0.0000 | Ent: 0.6929 +[ 8.2%] Iter 50/610 | SPS: 27906 | Reward: 0.084 | Value: 0.174 | VLoss: 0.0429 | PLoss: 0.0000 | Ent: 0.6930 +[ 8.4%] Iter 51/610 | SPS: 27910 | Reward: 0.086 | Value: 0.167 | VLoss: 0.0459 | PLoss: 0.0002 | Ent: 0.6930 +[ 8.5%] Iter 52/610 | SPS: 27913 | Reward: 0.090 | Value: 0.170 | VLoss: 0.0470 | PLoss: -0.0000 | Ent: 0.6930 +[ 8.7%] Iter 53/610 | SPS: 27915 | Reward: 0.089 | Value: 0.179 | VLoss: 0.0489 | PLoss: -0.0002 | Ent: 0.6929 +[ 8.9%] Iter 54/610 | SPS: 27918 | Reward: 0.089 | Value: 0.179 | VLoss: 0.0484 | PLoss: -0.0003 | Ent: 0.6930 +[ 9.0%] Iter 55/610 | SPS: 27922 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0465 | PLoss: -0.0001 | Ent: 0.6931 +[ 9.2%] Iter 56/610 | SPS: 27925 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0461 | PLoss: -0.0002 | Ent: 0.6931 +[ 9.3%] Iter 57/610 | SPS: 27921 | Reward: 0.085 | Value: 0.173 | VLoss: 0.0458 | PLoss: 0.0001 | Ent: 0.6930 +[ 9.5%] Iter 58/610 | SPS: 27923 | Reward: 0.087 | Value: 0.171 | VLoss: 0.0459 | PLoss: -0.0002 | Ent: 0.6928 +[ 9.7%] Iter 59/610 | SPS: 27926 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0457 | PLoss: -0.0000 | Ent: 0.6926 +[ 9.8%] Iter 60/610 | SPS: 27924 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0491 | PLoss: -0.0000 | Ent: 0.6925 +[ 10.0%] Iter 61/610 | SPS: 27919 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0483 | PLoss: -0.0001 | Ent: 0.6922 +[ 10.2%] Iter 62/610 | SPS: 27923 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0457 | PLoss: -0.0000 | Ent: 0.6921 +[ 10.3%] Iter 63/610 | SPS: 27925 | Reward: 0.085 | Value: 0.174 | VLoss: 0.0458 | PLoss: -0.0003 | Ent: 0.6920 +[ 10.5%] Iter 64/610 | SPS: 27928 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0469 | PLoss: -0.0002 | Ent: 0.6916 +[ 10.7%] Iter 65/610 | SPS: 27930 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0487 | PLoss: -0.0001 | Ent: 0.6915 +[ 10.8%] Iter 66/610 | SPS: 27894 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0459 | PLoss: -0.0001 | Ent: 0.6917 +[ 11.0%] Iter 67/610 | SPS: 27895 | Reward: 0.082 | Value: 0.175 | VLoss: 0.0431 | PLoss: -0.0001 | Ent: 0.6917 +[ 11.1%] Iter 68/610 | SPS: 27896 | Reward: 0.088 | Value: 0.165 | VLoss: 0.0473 | PLoss: -0.0001 | Ent: 0.6914 +[ 11.3%] Iter 69/610 | SPS: 27900 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0456 | PLoss: -0.0001 | Ent: 0.6909 +[ 11.5%] Iter 70/610 | SPS: 27902 | Reward: 0.084 | Value: 0.177 | VLoss: 0.0460 | PLoss: -0.0001 | Ent: 0.6904 +[ 11.6%] Iter 71/610 | SPS: 27904 | Reward: 0.088 | Value: 0.170 | VLoss: 0.0477 | PLoss: -0.0000 | Ent: 0.6908 +[ 11.8%] Iter 72/610 | SPS: 27908 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0454 | PLoss: 0.0002 | Ent: 0.6917 +[ 12.0%] Iter 73/610 | SPS: 27910 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0447 | PLoss: -0.0003 | Ent: 0.6919 +[ 12.1%] Iter 74/610 | SPS: 27913 | Reward: 0.086 | Value: 0.172 | VLoss: 0.0459 | PLoss: -0.0000 | Ent: 0.6923 +[ 12.3%] Iter 75/610 | SPS: 27915 | Reward: 0.085 | Value: 0.170 | VLoss: 0.0476 | PLoss: -0.0002 | Ent: 0.6924 +[ 12.5%] Iter 76/610 | SPS: 27917 | Reward: 0.089 | Value: 0.169 | VLoss: 0.0460 | PLoss: -0.0001 | Ent: 0.6926 +[ 12.6%] Iter 77/610 | SPS: 27919 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0482 | PLoss: 0.0001 | Ent: 0.6926 +[ 12.8%] Iter 78/610 | SPS: 27923 | Reward: 0.089 | Value: 0.179 | VLoss: 0.0474 | PLoss: 0.0000 | Ent: 0.6927 +[ 13.0%] Iter 79/610 | SPS: 27924 | Reward: 0.092 | Value: 0.177 | VLoss: 0.0491 | PLoss: 0.0002 | Ent: 0.6926 +[ 13.1%] Iter 80/610 | SPS: 27925 | Reward: 0.086 | Value: 0.183 | VLoss: 0.0475 | PLoss: -0.0002 | Ent: 0.6925 +[ 13.3%] Iter 81/610 | SPS: 27926 | Reward: 0.090 | Value: 0.174 | VLoss: 0.0475 | PLoss: 0.0000 | Ent: 0.6925 +[ 13.4%] Iter 82/610 | SPS: 27925 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0474 | PLoss: 0.0000 | Ent: 0.6924 +[ 13.6%] Iter 83/610 | SPS: 27918 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0462 | PLoss: -0.0001 | Ent: 0.6921 +[ 13.8%] Iter 84/610 | SPS: 27916 | Reward: 0.087 | Value: 0.178 | VLoss: 0.0428 | PLoss: -0.0000 | Ent: 0.6922 +[ 13.9%] Iter 85/610 | SPS: 27918 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0462 | PLoss: -0.0001 | Ent: 0.6924 +[ 14.1%] Iter 86/610 | SPS: 27920 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0466 | PLoss: -0.0000 | Ent: 0.6925 +[ 14.3%] Iter 87/610 | SPS: 27920 | Reward: 0.087 | Value: 0.179 | VLoss: 0.0445 | PLoss: 0.0000 | Ent: 0.6926 +[ 14.4%] Iter 88/610 | SPS: 27921 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0472 | PLoss: -0.0000 | Ent: 0.6925 +[ 14.6%] Iter 89/610 | SPS: 27922 | Reward: 0.087 | Value: 0.177 | VLoss: 0.0447 | PLoss: 0.0001 | Ent: 0.6922 +[ 14.8%] Iter 90/610 | SPS: 27925 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0431 | PLoss: -0.0001 | Ent: 0.6920 +[ 14.9%] Iter 91/610 | SPS: 27926 | Reward: 0.091 | Value: 0.175 | VLoss: 0.0493 | PLoss: -0.0001 | Ent: 0.6923 +[ 15.1%] Iter 92/610 | SPS: 27926 | Reward: 0.084 | Value: 0.181 | VLoss: 0.0465 | PLoss: 0.0000 | Ent: 0.6925 +[ 15.2%] Iter 93/610 | SPS: 27928 | Reward: 0.083 | Value: 0.170 | VLoss: 0.0455 | PLoss: 0.0000 | Ent: 0.6926 +[ 15.4%] Iter 94/610 | SPS: 27930 | Reward: 0.088 | Value: 0.162 | VLoss: 0.0452 | PLoss: -0.0001 | Ent: 0.6924 +[ 15.6%] Iter 95/610 | SPS: 27932 | Reward: 0.090 | Value: 0.172 | VLoss: 0.0499 | PLoss: -0.0000 | Ent: 0.6924 +[ 15.7%] Iter 96/610 | SPS: 27935 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0469 | PLoss: 0.0000 | Ent: 0.6927 +[ 15.9%] Iter 97/610 | SPS: 27939 | Reward: 0.090 | Value: 0.177 | VLoss: 0.0497 | PLoss: 0.0000 | Ent: 0.6928 +[ 16.1%] Iter 98/610 | SPS: 27941 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0481 | PLoss: -0.0001 | Ent: 0.6929 +[ 16.2%] Iter 99/610 | SPS: 27941 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0490 | PLoss: -0.0001 | Ent: 0.6929 +[ 16.4%] Iter 100/610 | SPS: 27937 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0495 | PLoss: -0.0000 | Ent: 0.6929 +[ 16.6%] Iter 101/610 | SPS: 27937 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0438 | PLoss: -0.0002 | Ent: 0.6930 +[ 16.7%] Iter 102/610 | SPS: 27939 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0487 | PLoss: -0.0001 | Ent: 0.6930 +[ 16.9%] Iter 103/610 | SPS: 27942 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0466 | PLoss: 0.0001 | Ent: 0.6929 +[ 17.0%] Iter 104/610 | SPS: 27942 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0436 | PLoss: -0.0001 | Ent: 0.6929 +[ 17.2%] Iter 105/610 | SPS: 27945 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0463 | PLoss: -0.0000 | Ent: 0.6929 +[ 17.4%] Iter 106/610 | SPS: 27947 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0463 | PLoss: -0.0000 | Ent: 0.6929 +[ 17.5%] Iter 107/610 | SPS: 27950 | Reward: 0.091 | Value: 0.172 | VLoss: 0.0497 | PLoss: -0.0003 | Ent: 0.6928 +[ 17.7%] Iter 108/610 | SPS: 27953 | Reward: 0.088 | Value: 0.179 | VLoss: 0.0460 | PLoss: -0.0004 | Ent: 0.6924 +[ 17.9%] Iter 109/610 | SPS: 27955 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0451 | PLoss: -0.0000 | Ent: 0.6921 +[ 18.0%] Iter 110/610 | SPS: 27958 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0485 | PLoss: -0.0000 | Ent: 0.6918 +[ 18.2%] Iter 111/610 | SPS: 27963 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0484 | PLoss: -0.0002 | Ent: 0.6911 +[ 18.4%] Iter 112/610 | SPS: 27969 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0469 | PLoss: -0.0001 | Ent: 0.6905 +[ 18.5%] Iter 113/610 | SPS: 27975 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0466 | PLoss: -0.0000 | Ent: 0.6902 +[ 18.7%] Iter 114/610 | SPS: 27981 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0471 | PLoss: -0.0000 | Ent: 0.6909 +[ 18.9%] Iter 115/610 | SPS: 27987 | Reward: 0.086 | Value: 0.174 | VLoss: 0.0469 | PLoss: -0.0001 | Ent: 0.6920 +[ 19.0%] Iter 116/610 | SPS: 27992 | Reward: 0.085 | Value: 0.171 | VLoss: 0.0455 | PLoss: 0.0001 | Ent: 0.6922 +[ 19.2%] Iter 117/610 | SPS: 27994 | Reward: 0.085 | Value: 0.168 | VLoss: 0.0446 | PLoss: -0.0001 | Ent: 0.6923 +[ 19.3%] Iter 118/610 | SPS: 27993 | Reward: 0.088 | Value: 0.170 | VLoss: 0.0482 | PLoss: 0.0000 | Ent: 0.6924 +[ 19.5%] Iter 119/610 | SPS: 27999 | Reward: 0.090 | Value: 0.173 | VLoss: 0.0497 | PLoss: -0.0001 | Ent: 0.6922 +[ 19.7%] Iter 120/610 | SPS: 28005 | Reward: 0.085 | Value: 0.177 | VLoss: 0.0454 | PLoss: 0.0000 | Ent: 0.6921 +[ 19.8%] Iter 121/610 | SPS: 28011 | Reward: 0.087 | Value: 0.170 | VLoss: 0.0494 | PLoss: -0.0000 | Ent: 0.6921 +[ 20.0%] Iter 122/610 | SPS: 28017 | Reward: 0.087 | Value: 0.169 | VLoss: 0.0469 | PLoss: -0.0001 | Ent: 0.6920 +[ 20.2%] Iter 123/610 | SPS: 28022 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0440 | PLoss: -0.0001 | Ent: 0.6920 +[ 20.3%] Iter 124/610 | SPS: 28027 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0488 | PLoss: -0.0000 | Ent: 0.6921 +[ 20.5%] Iter 125/610 | SPS: 28033 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0475 | PLoss: -0.0001 | Ent: 0.6923 +[ 20.7%] Iter 126/610 | SPS: 28037 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0464 | PLoss: -0.0002 | Ent: 0.6926 +[ 20.8%] Iter 127/610 | SPS: 28040 | Reward: 0.089 | Value: 0.176 | VLoss: 0.0489 | PLoss: 0.0000 | Ent: 0.6925 +[ 21.0%] Iter 128/610 | SPS: 28045 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0466 | PLoss: 0.0001 | Ent: 0.6923 +[ 21.1%] Iter 129/610 | SPS: 28050 | Reward: 0.085 | Value: 0.172 | VLoss: 0.0467 | PLoss: -0.0001 | Ent: 0.6923 +[ 21.3%] Iter 130/610 | SPS: 28054 | Reward: 0.084 | Value: 0.170 | VLoss: 0.0436 | PLoss: -0.0001 | Ent: 0.6920 +[ 21.5%] Iter 131/610 | SPS: 28058 | Reward: 0.088 | Value: 0.166 | VLoss: 0.0476 | PLoss: -0.0001 | Ent: 0.6921 +[ 21.6%] Iter 132/610 | SPS: 28063 | Reward: 0.091 | Value: 0.172 | VLoss: 0.0480 | PLoss: -0.0002 | Ent: 0.6924 +[ 21.8%] Iter 133/610 | SPS: 28067 | Reward: 0.087 | Value: 0.180 | VLoss: 0.0454 | PLoss: 0.0000 | Ent: 0.6924 +[ 22.0%] Iter 134/610 | SPS: 28071 | Reward: 0.090 | Value: 0.175 | VLoss: 0.0487 | PLoss: -0.0000 | Ent: 0.6923 +[ 22.1%] Iter 135/610 | SPS: 28064 | Reward: 0.085 | Value: 0.179 | VLoss: 0.0457 | PLoss: -0.0001 | Ent: 0.6920 +[ 22.3%] Iter 136/610 | SPS: 28063 | Reward: 0.086 | Value: 0.171 | VLoss: 0.0473 | PLoss: -0.0001 | Ent: 0.6916 +[ 22.5%] Iter 137/610 | SPS: 28063 | Reward: 0.086 | Value: 0.168 | VLoss: 0.0473 | PLoss: 0.0000 | Ent: 0.6916 +[ 22.6%] Iter 138/610 | SPS: 28062 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0465 | PLoss: 0.0001 | Ent: 0.6918 +[ 22.8%] Iter 139/610 | SPS: 28062 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0444 | PLoss: -0.0001 | Ent: 0.6917 +[ 23.0%] Iter 140/610 | SPS: 28063 | Reward: 0.085 | Value: 0.173 | VLoss: 0.0464 | PLoss: -0.0001 | Ent: 0.6916 +[ 23.1%] Iter 141/610 | SPS: 28064 | Reward: 0.089 | Value: 0.171 | VLoss: 0.0479 | PLoss: -0.0000 | Ent: 0.6914 +[ 23.3%] Iter 142/610 | SPS: 28065 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0478 | PLoss: -0.0001 | Ent: 0.6915 +[ 23.4%] Iter 143/610 | SPS: 28066 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0490 | PLoss: -0.0000 | Ent: 0.6909 +[ 23.6%] Iter 144/610 | SPS: 28066 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0472 | PLoss: 0.0000 | Ent: 0.6908 +[ 23.8%] Iter 145/610 | SPS: 28067 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0470 | PLoss: -0.0000 | Ent: 0.6909 +[ 23.9%] Iter 146/610 | SPS: 28066 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0506 | PLoss: -0.0001 | Ent: 0.6911 +[ 24.1%] Iter 147/610 | SPS: 28067 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0479 | PLoss: -0.0001 | Ent: 0.6915 +[ 24.3%] Iter 148/610 | SPS: 28067 | Reward: 0.084 | Value: 0.173 | VLoss: 0.0424 | PLoss: -0.0000 | Ent: 0.6916 +[ 24.4%] Iter 149/610 | SPS: 28068 | Reward: 0.086 | Value: 0.168 | VLoss: 0.0473 | PLoss: -0.0000 | Ent: 0.6914 +[ 24.6%] Iter 150/610 | SPS: 28068 | Reward: 0.087 | Value: 0.168 | VLoss: 0.0483 | PLoss: -0.0004 | Ent: 0.6914 +[ 24.8%] Iter 151/610 | SPS: 28069 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0455 | PLoss: -0.0000 | Ent: 0.6916 +[ 24.9%] Iter 152/610 | SPS: 28066 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0492 | PLoss: -0.0002 | Ent: 0.6917 +[ 25.1%] Iter 153/610 | SPS: 28063 | Reward: 0.092 | Value: 0.176 | VLoss: 0.0498 | PLoss: -0.0000 | Ent: 0.6918 +[ 25.2%] Iter 154/610 | SPS: 28066 | Reward: 0.089 | Value: 0.181 | VLoss: 0.0446 | PLoss: -0.0001 | Ent: 0.6919 +[ 25.4%] Iter 155/610 | SPS: 28069 | Reward: 0.085 | Value: 0.179 | VLoss: 0.0435 | PLoss: -0.0000 | Ent: 0.6919 +[ 25.6%] Iter 156/610 | SPS: 28071 | Reward: 0.086 | Value: 0.172 | VLoss: 0.0453 | PLoss: 0.0001 | Ent: 0.6920 +[ 25.7%] Iter 157/610 | SPS: 28074 | Reward: 0.090 | Value: 0.172 | VLoss: 0.0492 | PLoss: -0.0001 | Ent: 0.6921 +[ 25.9%] Iter 158/610 | SPS: 28076 | Reward: 0.088 | Value: 0.179 | VLoss: 0.0463 | PLoss: -0.0000 | Ent: 0.6921 +[ 26.1%] Iter 159/610 | SPS: 28080 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0472 | PLoss: -0.0000 | Ent: 0.6921 +[ 26.2%] Iter 160/610 | SPS: 28082 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0455 | PLoss: 0.0000 | Ent: 0.6920 +[ 26.4%] Iter 161/610 | SPS: 28085 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0478 | PLoss: 0.0000 | Ent: 0.6915 +[ 26.6%] Iter 162/610 | SPS: 28088 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0476 | PLoss: 0.0000 | Ent: 0.6912 +[ 26.7%] Iter 163/610 | SPS: 28090 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0467 | PLoss: 0.0000 | Ent: 0.6909 +[ 26.9%] Iter 164/610 | SPS: 28093 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0466 | PLoss: -0.0001 | Ent: 0.6905 +[ 27.0%] Iter 165/610 | SPS: 28093 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0486 | PLoss: -0.0002 | Ent: 0.6908 +[ 27.2%] Iter 166/610 | SPS: 28093 | Reward: 0.089 | Value: 0.171 | VLoss: 0.0492 | PLoss: 0.0000 | Ent: 0.6914 +[ 27.4%] Iter 167/610 | SPS: 28093 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0469 | PLoss: -0.0001 | Ent: 0.6918 +[ 27.5%] Iter 168/610 | SPS: 28093 | Reward: 0.086 | Value: 0.178 | VLoss: 0.0448 | PLoss: -0.0001 | Ent: 0.6921 +[ 27.7%] Iter 169/610 | SPS: 28091 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0472 | PLoss: -0.0003 | Ent: 0.6923 +[ 27.9%] Iter 170/610 | SPS: 28089 | Reward: 0.089 | Value: 0.170 | VLoss: 0.0475 | PLoss: -0.0001 | Ent: 0.6925 +[ 28.0%] Iter 171/610 | SPS: 28089 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0457 | PLoss: 0.0001 | Ent: 0.6927 +[ 28.2%] Iter 172/610 | SPS: 28090 | Reward: 0.085 | Value: 0.172 | VLoss: 0.0464 | PLoss: 0.0001 | Ent: 0.6926 +[ 28.4%] Iter 173/610 | SPS: 28091 | Reward: 0.088 | Value: 0.169 | VLoss: 0.0453 | PLoss: -0.0001 | Ent: 0.6924 +[ 28.5%] Iter 174/610 | SPS: 28094 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0461 | PLoss: -0.0001 | Ent: 0.6923 +[ 28.7%] Iter 175/610 | SPS: 28097 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0456 | PLoss: -0.0000 | Ent: 0.6924 +[ 28.9%] Iter 176/610 | SPS: 28101 | Reward: 0.089 | Value: 0.172 | VLoss: 0.0468 | PLoss: -0.0002 | Ent: 0.6925 +[ 29.0%] Iter 177/610 | SPS: 28103 | Reward: 0.087 | Value: 0.177 | VLoss: 0.0457 | PLoss: 0.0000 | Ent: 0.6926 +[ 29.2%] Iter 178/610 | SPS: 28106 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0452 | PLoss: 0.0000 | Ent: 0.6927 +[ 29.3%] Iter 179/610 | SPS: 28109 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0500 | PLoss: -0.0001 | Ent: 0.6928 +[ 29.5%] Iter 180/610 | SPS: 28111 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0439 | PLoss: -0.0001 | Ent: 0.6927 +[ 29.7%] Iter 181/610 | SPS: 28114 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0456 | PLoss: 0.0001 | Ent: 0.6928 +[ 29.8%] Iter 182/610 | SPS: 28117 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0459 | PLoss: 0.0001 | Ent: 0.6928 +[ 30.0%] Iter 183/610 | SPS: 28120 | Reward: 0.091 | Value: 0.172 | VLoss: 0.0504 | PLoss: -0.0001 | Ent: 0.6930 +[ 30.2%] Iter 184/610 | SPS: 28122 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0493 | PLoss: -0.0002 | Ent: 0.6930 +[ 30.3%] Iter 185/610 | SPS: 28125 | Reward: 0.084 | Value: 0.174 | VLoss: 0.0448 | PLoss: -0.0000 | Ent: 0.6930 +[ 30.5%] Iter 186/610 | SPS: 28128 | Reward: 0.087 | Value: 0.169 | VLoss: 0.0476 | PLoss: 0.0000 | Ent: 0.6930 +[ 30.7%] Iter 187/610 | SPS: 28113 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0455 | PLoss: -0.0000 | Ent: 0.6930 +[ 30.8%] Iter 188/610 | SPS: 28117 | Reward: 0.085 | Value: 0.175 | VLoss: 0.0447 | PLoss: -0.0000 | Ent: 0.6930 +[ 31.0%] Iter 189/610 | SPS: 28121 | Reward: 0.087 | Value: 0.170 | VLoss: 0.0474 | PLoss: 0.0000 | Ent: 0.6931 +[ 31.1%] Iter 190/610 | SPS: 28125 | Reward: 0.087 | Value: 0.171 | VLoss: 0.0484 | PLoss: -0.0001 | Ent: 0.6931 +[ 31.3%] Iter 191/610 | SPS: 28129 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0461 | PLoss: -0.0001 | Ent: 0.6930 +[ 31.5%] Iter 192/610 | SPS: 28132 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0451 | PLoss: -0.0000 | Ent: 0.6930 +[ 31.6%] Iter 193/610 | SPS: 28135 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6930 +[ 31.8%] Iter 194/610 | SPS: 28139 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0471 | PLoss: 0.0000 | Ent: 0.6929 +[ 32.0%] Iter 195/610 | SPS: 28142 | Reward: 0.086 | Value: 0.177 | VLoss: 0.0445 | PLoss: -0.0002 | Ent: 0.6929 +[ 32.1%] Iter 196/610 | SPS: 28145 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0479 | PLoss: -0.0000 | Ent: 0.6930 +[ 32.3%] Iter 197/610 | SPS: 28149 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0481 | PLoss: -0.0000 | Ent: 0.6930 +[ 32.5%] Iter 198/610 | SPS: 28152 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0488 | PLoss: -0.0004 | Ent: 0.6930 +[ 32.6%] Iter 199/610 | SPS: 28155 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0487 | PLoss: -0.0006 | Ent: 0.6928 +[ 32.8%] Iter 200/610 | SPS: 28159 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0476 | PLoss: 0.0000 | Ent: 0.6927 +[ 33.0%] Iter 201/610 | SPS: 28162 | Reward: 0.087 | Value: 0.171 | VLoss: 0.0483 | PLoss: -0.0001 | Ent: 0.6927 +[ 33.1%] Iter 202/610 | SPS: 28165 | Reward: 0.089 | Value: 0.172 | VLoss: 0.0487 | PLoss: -0.0001 | Ent: 0.6927 +[ 33.3%] Iter 203/610 | SPS: 28169 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0475 | PLoss: 0.0000 | Ent: 0.6926 +[ 33.4%] Iter 204/610 | SPS: 28169 | Reward: 0.086 | Value: 0.177 | VLoss: 0.0458 | PLoss: 0.0000 | Ent: 0.6928 +[ 33.6%] Iter 205/610 | SPS: 28166 | Reward: 0.089 | Value: 0.172 | VLoss: 0.0466 | PLoss: -0.0000 | Ent: 0.6926 +[ 33.8%] Iter 206/610 | SPS: 28166 | Reward: 0.085 | Value: 0.177 | VLoss: 0.0433 | PLoss: -0.0001 | Ent: 0.6925 +[ 33.9%] Iter 207/610 | SPS: 28166 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0462 | PLoss: -0.0001 | Ent: 0.6926 +[ 34.1%] Iter 208/610 | SPS: 28167 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0446 | PLoss: -0.0001 | Ent: 0.6925 +[ 34.3%] Iter 209/610 | SPS: 28167 | Reward: 0.090 | Value: 0.173 | VLoss: 0.0517 | PLoss: 0.0001 | Ent: 0.6924 +[ 34.4%] Iter 210/610 | SPS: 28168 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0413 | PLoss: -0.0000 | Ent: 0.6925 +[ 34.6%] Iter 211/610 | SPS: 28169 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0480 | PLoss: -0.0002 | Ent: 0.6924 +[ 34.8%] Iter 212/610 | SPS: 28169 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0463 | PLoss: -0.0001 | Ent: 0.6921 +[ 34.9%] Iter 213/610 | SPS: 28169 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0481 | PLoss: -0.0000 | Ent: 0.6920 +[ 35.1%] Iter 214/610 | SPS: 28169 | Reward: 0.085 | Value: 0.175 | VLoss: 0.0455 | PLoss: -0.0003 | Ent: 0.6924 +[ 35.2%] Iter 215/610 | SPS: 28168 | Reward: 0.087 | Value: 0.169 | VLoss: 0.0445 | PLoss: 0.0000 | Ent: 0.6925 +[ 35.4%] Iter 216/610 | SPS: 28167 | Reward: 0.086 | Value: 0.170 | VLoss: 0.0457 | PLoss: -0.0001 | Ent: 0.6924 +[ 35.6%] Iter 217/610 | SPS: 28166 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0473 | PLoss: -0.0001 | Ent: 0.6921 +[ 35.7%] Iter 218/610 | SPS: 28166 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0491 | PLoss: 0.0000 | Ent: 0.6920 +[ 35.9%] Iter 219/610 | SPS: 28166 | Reward: 0.085 | Value: 0.175 | VLoss: 0.0456 | PLoss: -0.0002 | Ent: 0.6919 +[ 36.1%] Iter 220/610 | SPS: 28167 | Reward: 0.089 | Value: 0.170 | VLoss: 0.0464 | PLoss: 0.0000 | Ent: 0.6915 +[ 36.2%] Iter 221/610 | SPS: 28167 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0448 | PLoss: -0.0004 | Ent: 0.6906 +[ 36.4%] Iter 222/610 | SPS: 28164 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0482 | PLoss: -0.0001 | Ent: 0.6901 +[ 36.6%] Iter 223/610 | SPS: 28164 | Reward: 0.090 | Value: 0.175 | VLoss: 0.0478 | PLoss: 0.0001 | Ent: 0.6906 +[ 36.7%] Iter 224/610 | SPS: 28164 | Reward: 0.091 | Value: 0.178 | VLoss: 0.0479 | PLoss: -0.0002 | Ent: 0.6915 +[ 36.9%] Iter 225/610 | SPS: 28164 | Reward: 0.090 | Value: 0.183 | VLoss: 0.0489 | PLoss: 0.0000 | Ent: 0.6918 +[ 37.0%] Iter 226/610 | SPS: 28164 | Reward: 0.087 | Value: 0.179 | VLoss: 0.0468 | PLoss: -0.0002 | Ent: 0.6920 +[ 37.2%] Iter 227/610 | SPS: 28164 | Reward: 0.084 | Value: 0.175 | VLoss: 0.0471 | PLoss: -0.0001 | Ent: 0.6918 +[ 37.4%] Iter 228/610 | SPS: 28164 | Reward: 0.089 | Value: 0.167 | VLoss: 0.0493 | PLoss: -0.0000 | Ent: 0.6918 +[ 37.5%] Iter 229/610 | SPS: 28163 | Reward: 0.084 | Value: 0.173 | VLoss: 0.0466 | PLoss: 0.0000 | Ent: 0.6918 +[ 37.7%] Iter 230/610 | SPS: 28163 | Reward: 0.087 | Value: 0.168 | VLoss: 0.0471 | PLoss: -0.0001 | Ent: 0.6922 +[ 37.9%] Iter 231/610 | SPS: 28162 | Reward: 0.083 | Value: 0.169 | VLoss: 0.0432 | PLoss: -0.0002 | Ent: 0.6924 +[ 38.0%] Iter 232/610 | SPS: 28162 | Reward: 0.087 | Value: 0.167 | VLoss: 0.0477 | PLoss: -0.0002 | Ent: 0.6922 +[ 38.2%] Iter 233/610 | SPS: 28161 | Reward: 0.090 | Value: 0.170 | VLoss: 0.0493 | PLoss: -0.0001 | Ent: 0.6921 +[ 38.4%] Iter 234/610 | SPS: 28161 | Reward: 0.087 | Value: 0.178 | VLoss: 0.0470 | PLoss: -0.0000 | Ent: 0.6919 +[ 38.5%] Iter 235/610 | SPS: 28161 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0482 | PLoss: -0.0000 | Ent: 0.6920 +[ 38.7%] Iter 236/610 | SPS: 28161 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0495 | PLoss: -0.0000 | Ent: 0.6922 +[ 38.9%] Iter 237/610 | SPS: 28160 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0487 | PLoss: 0.0000 | Ent: 0.6923 +[ 39.0%] Iter 238/610 | SPS: 28158 | Reward: 0.085 | Value: 0.175 | VLoss: 0.0449 | PLoss: -0.0001 | Ent: 0.6922 +[ 39.2%] Iter 239/610 | SPS: 28154 | Reward: 0.087 | Value: 0.169 | VLoss: 0.0461 | PLoss: 0.0000 | Ent: 0.6922 +[ 39.3%] Iter 240/610 | SPS: 28153 | Reward: 0.089 | Value: 0.170 | VLoss: 0.0478 | PLoss: -0.0001 | Ent: 0.6922 +[ 39.5%] Iter 241/610 | SPS: 28152 | Reward: 0.085 | Value: 0.176 | VLoss: 0.0444 | PLoss: -0.0001 | Ent: 0.6922 +[ 39.7%] Iter 242/610 | SPS: 28152 | Reward: 0.087 | Value: 0.171 | VLoss: 0.0459 | PLoss: -0.0000 | Ent: 0.6924 +[ 39.8%] Iter 243/610 | SPS: 28152 | Reward: 0.089 | Value: 0.172 | VLoss: 0.0461 | PLoss: 0.0000 | Ent: 0.6925 +[ 40.0%] Iter 244/610 | SPS: 28151 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0465 | PLoss: -0.0001 | Ent: 0.6925 +[ 40.2%] Iter 245/610 | SPS: 28151 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0487 | PLoss: 0.0000 | Ent: 0.6925 +[ 40.3%] Iter 246/610 | SPS: 28151 | Reward: 0.087 | Value: 0.177 | VLoss: 0.0466 | PLoss: -0.0002 | Ent: 0.6926 +[ 40.5%] Iter 247/610 | SPS: 28150 | Reward: 0.091 | Value: 0.174 | VLoss: 0.0485 | PLoss: 0.0000 | Ent: 0.6926 +[ 40.7%] Iter 248/610 | SPS: 28150 | Reward: 0.087 | Value: 0.179 | VLoss: 0.0463 | PLoss: -0.0001 | Ent: 0.6925 +[ 40.8%] Iter 249/610 | SPS: 28148 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0462 | PLoss: 0.0000 | Ent: 0.6924 +[ 41.0%] Iter 250/610 | SPS: 28148 | Reward: 0.085 | Value: 0.177 | VLoss: 0.0449 | PLoss: -0.0001 | Ent: 0.6923 +[ 41.1%] Iter 251/610 | SPS: 28146 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6921 +[ 41.3%] Iter 252/610 | SPS: 28146 | Reward: 0.091 | Value: 0.174 | VLoss: 0.0484 | PLoss: -0.0000 | Ent: 0.6919 +[ 41.5%] Iter 253/610 | SPS: 28145 | Reward: 0.088 | Value: 0.182 | VLoss: 0.0487 | PLoss: -0.0001 | Ent: 0.6919 +[ 41.6%] Iter 254/610 | SPS: 28145 | Reward: 0.086 | Value: 0.177 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6919 +[ 41.8%] Iter 255/610 | SPS: 28143 | Reward: 0.090 | Value: 0.169 | VLoss: 0.0436 | PLoss: -0.0000 | Ent: 0.6919 +[ 42.0%] Iter 256/610 | SPS: 28142 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0454 | PLoss: -0.0001 | Ent: 0.6919 +[ 42.1%] Iter 257/610 | SPS: 28144 | Reward: 0.086 | Value: 0.178 | VLoss: 0.0454 | PLoss: -0.0001 | Ent: 0.6918 +[ 42.3%] Iter 258/610 | SPS: 28145 | Reward: 0.085 | Value: 0.171 | VLoss: 0.0428 | PLoss: -0.0001 | Ent: 0.6918 +[ 42.5%] Iter 259/610 | SPS: 28147 | Reward: 0.087 | Value: 0.169 | VLoss: 0.0457 | PLoss: -0.0001 | Ent: 0.6917 +[ 42.6%] Iter 260/610 | SPS: 28148 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0448 | PLoss: -0.0000 | Ent: 0.6919 +[ 42.8%] Iter 261/610 | SPS: 28149 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0468 | PLoss: 0.0000 | Ent: 0.6919 +[ 43.0%] Iter 262/610 | SPS: 28150 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0459 | PLoss: -0.0000 | Ent: 0.6919 +[ 43.1%] Iter 263/610 | SPS: 28152 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0465 | PLoss: -0.0001 | Ent: 0.6918 +[ 43.3%] Iter 264/610 | SPS: 28153 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0498 | PLoss: -0.0000 | Ent: 0.6917 +[ 43.4%] Iter 265/610 | SPS: 28155 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0459 | PLoss: -0.0000 | Ent: 0.6917 +[ 43.6%] Iter 266/610 | SPS: 28157 | Reward: 0.085 | Value: 0.174 | VLoss: 0.0461 | PLoss: -0.0002 | Ent: 0.6920 +[ 43.8%] Iter 267/610 | SPS: 28159 | Reward: 0.089 | Value: 0.167 | VLoss: 0.0503 | PLoss: 0.0000 | Ent: 0.6921 +[ 43.9%] Iter 268/610 | SPS: 28160 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0484 | PLoss: -0.0002 | Ent: 0.6924 +[ 44.1%] Iter 269/610 | SPS: 28162 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0457 | PLoss: 0.0000 | Ent: 0.6926 +[ 44.3%] Iter 270/610 | SPS: 28163 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0446 | PLoss: -0.0000 | Ent: 0.6926 +[ 44.4%] Iter 271/610 | SPS: 28165 | Reward: 0.085 | Value: 0.173 | VLoss: 0.0441 | PLoss: -0.0001 | Ent: 0.6927 +[ 44.6%] Iter 272/610 | SPS: 28167 | Reward: 0.084 | Value: 0.170 | VLoss: 0.0446 | PLoss: -0.0001 | Ent: 0.6923 +[ 44.8%] Iter 273/610 | SPS: 28167 | Reward: 0.086 | Value: 0.168 | VLoss: 0.0458 | PLoss: 0.0001 | Ent: 0.6918 +[ 44.9%] Iter 274/610 | SPS: 28168 | Reward: 0.087 | Value: 0.171 | VLoss: 0.0478 | PLoss: 0.0000 | Ent: 0.6913 +[ 45.1%] Iter 275/610 | SPS: 28170 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0463 | PLoss: -0.0001 | Ent: 0.6905 +[ 45.2%] Iter 276/610 | SPS: 28171 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0477 | PLoss: 0.0000 | Ent: 0.6905 +[ 45.4%] Iter 277/610 | SPS: 28172 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0462 | PLoss: -0.0001 | Ent: 0.6908 +[ 45.6%] Iter 278/610 | SPS: 28173 | Reward: 0.087 | Value: 0.171 | VLoss: 0.0470 | PLoss: 0.0001 | Ent: 0.6910 +[ 45.7%] Iter 279/610 | SPS: 28175 | Reward: 0.090 | Value: 0.170 | VLoss: 0.0495 | PLoss: -0.0001 | Ent: 0.6911 +[ 45.9%] Iter 280/610 | SPS: 28177 | Reward: 0.087 | Value: 0.178 | VLoss: 0.0437 | PLoss: -0.0002 | Ent: 0.6910 +[ 46.1%] Iter 281/610 | SPS: 28178 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0453 | PLoss: -0.0000 | Ent: 0.6905 +[ 46.2%] Iter 282/610 | SPS: 28180 | Reward: 0.086 | Value: 0.171 | VLoss: 0.0440 | PLoss: -0.0001 | Ent: 0.6901 +[ 46.4%] Iter 283/610 | SPS: 28182 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0468 | PLoss: -0.0001 | Ent: 0.6897 +[ 46.6%] Iter 284/610 | SPS: 28183 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0443 | PLoss: -0.0000 | Ent: 0.6901 +[ 46.7%] Iter 285/610 | SPS: 28185 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0459 | PLoss: -0.0002 | Ent: 0.6908 +[ 46.9%] Iter 286/610 | SPS: 28187 | Reward: 0.086 | Value: 0.174 | VLoss: 0.0443 | PLoss: 0.0000 | Ent: 0.6913 +[ 47.0%] Iter 287/610 | SPS: 28189 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0478 | PLoss: -0.0000 | Ent: 0.6914 +[ 47.2%] Iter 288/610 | SPS: 28190 | Reward: 0.086 | Value: 0.171 | VLoss: 0.0465 | PLoss: -0.0000 | Ent: 0.6916 +[ 47.4%] Iter 289/610 | SPS: 28192 | Reward: 0.087 | Value: 0.169 | VLoss: 0.0468 | PLoss: -0.0001 | Ent: 0.6919 +[ 47.5%] Iter 290/610 | SPS: 28193 | Reward: 0.085 | Value: 0.171 | VLoss: 0.0448 | PLoss: -0.0000 | Ent: 0.6918 +[ 47.7%] Iter 291/610 | SPS: 28193 | Reward: 0.089 | Value: 0.170 | VLoss: 0.0455 | PLoss: 0.0000 | Ent: 0.6916 +[ 47.9%] Iter 292/610 | SPS: 28180 | Reward: 0.089 | Value: 0.176 | VLoss: 0.0478 | PLoss: -0.0000 | Ent: 0.6918 +[ 48.0%] Iter 293/610 | SPS: 28182 | Reward: 0.092 | Value: 0.178 | VLoss: 0.0483 | PLoss: -0.0000 | Ent: 0.6918 +[ 48.2%] Iter 294/610 | SPS: 28185 | Reward: 0.088 | Value: 0.185 | VLoss: 0.0492 | PLoss: -0.0001 | Ent: 0.6920 +[ 48.4%] Iter 295/610 | SPS: 28187 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0474 | PLoss: -0.0003 | Ent: 0.6923 +[ 48.5%] Iter 296/610 | SPS: 28190 | Reward: 0.089 | Value: 0.170 | VLoss: 0.0474 | PLoss: -0.0000 | Ent: 0.6925 +[ 48.7%] Iter 297/610 | SPS: 28192 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0485 | PLoss: -0.0000 | Ent: 0.6926 +[ 48.9%] Iter 298/610 | SPS: 28194 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0460 | PLoss: -0.0000 | Ent: 0.6927 +[ 49.0%] Iter 299/610 | SPS: 28197 | Reward: 0.087 | Value: 0.178 | VLoss: 0.0487 | PLoss: -0.0000 | Ent: 0.6927 +[ 49.2%] Iter 300/610 | SPS: 28198 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0443 | PLoss: -0.0000 | Ent: 0.6928 +[ 49.3%] Iter 301/610 | SPS: 28199 | Reward: 0.086 | Value: 0.172 | VLoss: 0.0447 | PLoss: -0.0001 | Ent: 0.6928 +[ 49.5%] Iter 302/610 | SPS: 28200 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0460 | PLoss: -0.0003 | Ent: 0.6929 +[ 49.7%] Iter 303/610 | SPS: 28202 | Reward: 0.084 | Value: 0.177 | VLoss: 0.0429 | PLoss: 0.0000 | Ent: 0.6929 +[ 49.8%] Iter 304/610 | SPS: 28203 | Reward: 0.088 | Value: 0.169 | VLoss: 0.0466 | PLoss: -0.0001 | Ent: 0.6929 +[ 50.0%] Iter 305/610 | SPS: 28205 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0483 | PLoss: -0.0000 | Ent: 0.6929 +[ 50.2%] Iter 306/610 | SPS: 28207 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0474 | PLoss: -0.0000 | Ent: 0.6929 +[ 50.3%] Iter 307/610 | SPS: 28208 | Reward: 0.087 | Value: 0.177 | VLoss: 0.0450 | PLoss: -0.0001 | Ent: 0.6929 +[ 50.5%] Iter 308/610 | SPS: 28206 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6928 +[ 50.7%] Iter 309/610 | SPS: 28207 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0456 | PLoss: -0.0000 | Ent: 0.6929 +[ 50.8%] Iter 310/610 | SPS: 28209 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0482 | PLoss: -0.0001 | Ent: 0.6928 +[ 51.0%] Iter 311/610 | SPS: 28210 | Reward: 0.087 | Value: 0.177 | VLoss: 0.0458 | PLoss: -0.0000 | Ent: 0.6928 +[ 51.1%] Iter 312/610 | SPS: 28209 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0458 | PLoss: -0.0000 | Ent: 0.6928 +[ 51.3%] Iter 313/610 | SPS: 28210 | Reward: 0.085 | Value: 0.177 | VLoss: 0.0466 | PLoss: 0.0000 | Ent: 0.6928 +[ 51.5%] Iter 314/610 | SPS: 28211 | Reward: 0.086 | Value: 0.170 | VLoss: 0.0458 | PLoss: 0.0000 | Ent: 0.6927 +[ 51.6%] Iter 315/610 | SPS: 28213 | Reward: 0.089 | Value: 0.170 | VLoss: 0.0469 | PLoss: 0.0000 | Ent: 0.6927 +[ 51.8%] Iter 316/610 | SPS: 28214 | Reward: 0.089 | Value: 0.179 | VLoss: 0.0451 | PLoss: 0.0000 | Ent: 0.6926 +[ 52.0%] Iter 317/610 | SPS: 28215 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0447 | PLoss: -0.0001 | Ent: 0.6926 +[ 52.1%] Iter 318/610 | SPS: 28216 | Reward: 0.086 | Value: 0.177 | VLoss: 0.0450 | PLoss: 0.0000 | Ent: 0.6923 +[ 52.3%] Iter 319/610 | SPS: 28213 | Reward: 0.085 | Value: 0.171 | VLoss: 0.0425 | PLoss: 0.0000 | Ent: 0.6921 +[ 52.5%] Iter 320/610 | SPS: 28214 | Reward: 0.088 | Value: 0.169 | VLoss: 0.0475 | PLoss: -0.0000 | Ent: 0.6921 +[ 52.6%] Iter 321/610 | SPS: 28215 | Reward: 0.092 | Value: 0.176 | VLoss: 0.0518 | PLoss: 0.0001 | Ent: 0.6922 +[ 52.8%] Iter 322/610 | SPS: 28216 | Reward: 0.087 | Value: 0.182 | VLoss: 0.0458 | PLoss: -0.0001 | Ent: 0.6923 +[ 53.0%] Iter 323/610 | SPS: 28217 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0480 | PLoss: -0.0000 | Ent: 0.6924 +[ 53.1%] Iter 324/610 | SPS: 28218 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0480 | PLoss: 0.0000 | Ent: 0.6924 +[ 53.3%] Iter 325/610 | SPS: 28217 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0468 | PLoss: -0.0001 | Ent: 0.6924 +[ 53.4%] Iter 326/610 | SPS: 28217 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0480 | PLoss: -0.0000 | Ent: 0.6924 +[ 53.6%] Iter 327/610 | SPS: 28218 | Reward: 0.090 | Value: 0.170 | VLoss: 0.0500 | PLoss: -0.0000 | Ent: 0.6924 +[ 53.8%] Iter 328/610 | SPS: 28218 | Reward: 0.088 | Value: 0.179 | VLoss: 0.0457 | PLoss: -0.0000 | Ent: 0.6926 +[ 53.9%] Iter 329/610 | SPS: 28219 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0451 | PLoss: -0.0001 | Ent: 0.6927 +[ 54.1%] Iter 330/610 | SPS: 28220 | Reward: 0.088 | Value: 0.169 | VLoss: 0.0465 | PLoss: -0.0000 | Ent: 0.6927 +[ 54.3%] Iter 331/610 | SPS: 28221 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0439 | PLoss: -0.0001 | Ent: 0.6927 +[ 54.4%] Iter 332/610 | SPS: 28223 | Reward: 0.086 | Value: 0.172 | VLoss: 0.0465 | PLoss: -0.0000 | Ent: 0.6927 +[ 54.6%] Iter 333/610 | SPS: 28224 | Reward: 0.085 | Value: 0.169 | VLoss: 0.0498 | PLoss: -0.0000 | Ent: 0.6928 +[ 54.8%] Iter 334/610 | SPS: 28225 | Reward: 0.089 | Value: 0.168 | VLoss: 0.0473 | PLoss: -0.0001 | Ent: 0.6927 +[ 54.9%] Iter 335/610 | SPS: 28226 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0477 | PLoss: -0.0000 | Ent: 0.6927 +[ 55.1%] Iter 336/610 | SPS: 28227 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0475 | PLoss: -0.0001 | Ent: 0.6928 +[ 55.2%] Iter 337/610 | SPS: 28228 | Reward: 0.087 | Value: 0.177 | VLoss: 0.0474 | PLoss: -0.0000 | Ent: 0.6929 +[ 55.4%] Iter 338/610 | SPS: 28229 | Reward: 0.085 | Value: 0.174 | VLoss: 0.0435 | PLoss: -0.0001 | Ent: 0.6928 +[ 55.6%] Iter 339/610 | SPS: 28229 | Reward: 0.087 | Value: 0.169 | VLoss: 0.0453 | PLoss: 0.0000 | Ent: 0.6927 +[ 55.7%] Iter 340/610 | SPS: 28231 | Reward: 0.083 | Value: 0.173 | VLoss: 0.0439 | PLoss: -0.0000 | Ent: 0.6927 +[ 55.9%] Iter 341/610 | SPS: 28231 | Reward: 0.089 | Value: 0.165 | VLoss: 0.0463 | PLoss: -0.0000 | Ent: 0.6928 +[ 56.1%] Iter 342/610 | SPS: 28231 | Reward: 0.087 | Value: 0.178 | VLoss: 0.0490 | PLoss: -0.0001 | Ent: 0.6929 +[ 56.2%] Iter 343/610 | SPS: 28221 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6929 +[ 56.4%] Iter 344/610 | SPS: 28220 | Reward: 0.091 | Value: 0.172 | VLoss: 0.0501 | PLoss: 0.0000 | Ent: 0.6929 +[ 56.6%] Iter 345/610 | SPS: 28218 | Reward: 0.086 | Value: 0.181 | VLoss: 0.0462 | PLoss: -0.0001 | Ent: 0.6928 +[ 56.7%] Iter 346/610 | SPS: 28216 | Reward: 0.089 | Value: 0.172 | VLoss: 0.0470 | PLoss: 0.0000 | Ent: 0.6929 +[ 56.9%] Iter 347/610 | SPS: 28214 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0462 | PLoss: 0.0001 | Ent: 0.6929 +[ 57.0%] Iter 348/610 | SPS: 28212 | Reward: 0.089 | Value: 0.180 | VLoss: 0.0465 | PLoss: 0.0000 | Ent: 0.6930 +[ 57.2%] Iter 349/610 | SPS: 28211 | Reward: 0.085 | Value: 0.177 | VLoss: 0.0461 | PLoss: 0.0001 | Ent: 0.6930 +[ 57.4%] Iter 350/610 | SPS: 28210 | Reward: 0.086 | Value: 0.167 | VLoss: 0.0448 | PLoss: -0.0000 | Ent: 0.6930 +[ 57.5%] Iter 351/610 | SPS: 28208 | Reward: 0.089 | Value: 0.171 | VLoss: 0.0512 | PLoss: 0.0000 | Ent: 0.6930 +[ 57.7%] Iter 352/610 | SPS: 28205 | Reward: 0.085 | Value: 0.179 | VLoss: 0.0463 | PLoss: -0.0002 | Ent: 0.6930 +[ 57.9%] Iter 353/610 | SPS: 28203 | Reward: 0.088 | Value: 0.167 | VLoss: 0.0460 | PLoss: -0.0000 | Ent: 0.6930 +[ 58.0%] Iter 354/610 | SPS: 28201 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0448 | PLoss: 0.0000 | Ent: 0.6930 +[ 58.2%] Iter 355/610 | SPS: 28199 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0474 | PLoss: -0.0000 | Ent: 0.6930 +[ 58.4%] Iter 356/610 | SPS: 28198 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0474 | PLoss: 0.0000 | Ent: 0.6930 +[ 58.5%] Iter 357/610 | SPS: 28196 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0457 | PLoss: -0.0001 | Ent: 0.6930 +[ 58.7%] Iter 358/610 | SPS: 28195 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0457 | PLoss: -0.0001 | Ent: 0.6929 +[ 58.9%] Iter 359/610 | SPS: 28192 | Reward: 0.089 | Value: 0.172 | VLoss: 0.0467 | PLoss: -0.0000 | Ent: 0.6929 +[ 59.0%] Iter 360/610 | SPS: 28188 | Reward: 0.088 | Value: 0.179 | VLoss: 0.0467 | PLoss: -0.0000 | Ent: 0.6930 +[ 59.2%] Iter 361/610 | SPS: 28187 | Reward: 0.089 | Value: 0.176 | VLoss: 0.0485 | PLoss: -0.0000 | Ent: 0.6929 +[ 59.3%] Iter 362/610 | SPS: 28186 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0480 | PLoss: -0.0000 | Ent: 0.6930 +[ 59.5%] Iter 363/610 | SPS: 28184 | Reward: 0.089 | Value: 0.172 | VLoss: 0.0475 | PLoss: -0.0000 | Ent: 0.6930 +[ 59.7%] Iter 364/610 | SPS: 28183 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0470 | PLoss: -0.0000 | Ent: 0.6930 +[ 59.8%] Iter 365/610 | SPS: 28181 | Reward: 0.090 | Value: 0.177 | VLoss: 0.0490 | PLoss: -0.0000 | Ent: 0.6930 +[ 60.0%] Iter 366/610 | SPS: 28180 | Reward: 0.086 | Value: 0.178 | VLoss: 0.0432 | PLoss: -0.0001 | Ent: 0.6930 +[ 60.2%] Iter 367/610 | SPS: 28179 | Reward: 0.087 | Value: 0.170 | VLoss: 0.0482 | PLoss: -0.0000 | Ent: 0.6930 +[ 60.3%] Iter 368/610 | SPS: 28177 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0462 | PLoss: -0.0000 | Ent: 0.6930 +[ 60.5%] Iter 369/610 | SPS: 28175 | Reward: 0.090 | Value: 0.175 | VLoss: 0.0477 | PLoss: -0.0001 | Ent: 0.6930 +[ 60.7%] Iter 370/610 | SPS: 28176 | Reward: 0.085 | Value: 0.182 | VLoss: 0.0464 | PLoss: -0.0001 | Ent: 0.6931 +[ 60.8%] Iter 371/610 | SPS: 28178 | Reward: 0.089 | Value: 0.167 | VLoss: 0.0493 | PLoss: -0.0000 | Ent: 0.6930 +[ 61.0%] Iter 372/610 | SPS: 28180 | Reward: 0.090 | Value: 0.176 | VLoss: 0.0463 | PLoss: -0.0000 | Ent: 0.6930 +[ 61.1%] Iter 373/610 | SPS: 28182 | Reward: 0.088 | Value: 0.180 | VLoss: 0.0472 | PLoss: -0.0000 | Ent: 0.6931 +[ 61.3%] Iter 374/610 | SPS: 28183 | Reward: 0.090 | Value: 0.173 | VLoss: 0.0490 | PLoss: 0.0000 | Ent: 0.6931 +[ 61.5%] Iter 375/610 | SPS: 28185 | Reward: 0.087 | Value: 0.179 | VLoss: 0.0454 | PLoss: -0.0000 | Ent: 0.6931 +[ 61.6%] Iter 376/610 | SPS: 28186 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0446 | PLoss: -0.0001 | Ent: 0.6931 +[ 61.8%] Iter 377/610 | SPS: 28187 | Reward: 0.083 | Value: 0.170 | VLoss: 0.0431 | PLoss: 0.0000 | Ent: 0.6931 +[ 62.0%] Iter 378/610 | SPS: 28187 | Reward: 0.087 | Value: 0.163 | VLoss: 0.0481 | PLoss: 0.0000 | Ent: 0.6931 +[ 62.1%] Iter 379/610 | SPS: 28190 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0452 | PLoss: 0.0000 | Ent: 0.6931 +[ 62.3%] Iter 380/610 | SPS: 28191 | Reward: 0.087 | Value: 0.173 | VLoss: 0.0473 | PLoss: -0.0000 | Ent: 0.6931 +[ 62.5%] Iter 381/610 | SPS: 28193 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0477 | PLoss: -0.0001 | Ent: 0.6931 +[ 62.6%] Iter 382/610 | SPS: 28195 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0460 | PLoss: -0.0000 | Ent: 0.6931 +[ 62.8%] Iter 383/610 | SPS: 28197 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0450 | PLoss: -0.0000 | Ent: 0.6931 +[ 63.0%] Iter 384/610 | SPS: 28199 | Reward: 0.092 | Value: 0.170 | VLoss: 0.0489 | PLoss: -0.0000 | Ent: 0.6931 +[ 63.1%] Iter 385/610 | SPS: 28201 | Reward: 0.083 | Value: 0.184 | VLoss: 0.0446 | PLoss: -0.0001 | Ent: 0.6931 +[ 63.3%] Iter 386/610 | SPS: 28202 | Reward: 0.084 | Value: 0.163 | VLoss: 0.0448 | PLoss: 0.0000 | Ent: 0.6931 +[ 63.4%] Iter 387/610 | SPS: 28204 | Reward: 0.085 | Value: 0.167 | VLoss: 0.0437 | PLoss: -0.0000 | Ent: 0.6931 +[ 63.6%] Iter 388/610 | SPS: 28205 | Reward: 0.090 | Value: 0.171 | VLoss: 0.0466 | PLoss: -0.0000 | Ent: 0.6931 +[ 63.8%] Iter 389/610 | SPS: 28206 | Reward: 0.087 | Value: 0.182 | VLoss: 0.0466 | PLoss: -0.0000 | Ent: 0.6931 +[ 63.9%] Iter 390/610 | SPS: 28207 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0453 | PLoss: -0.0000 | Ent: 0.6931 +[ 64.1%] Iter 391/610 | SPS: 28207 | Reward: 0.090 | Value: 0.175 | VLoss: 0.0501 | PLoss: -0.0001 | Ent: 0.6931 +[ 64.3%] Iter 392/610 | SPS: 28208 | Reward: 0.087 | Value: 0.181 | VLoss: 0.0488 | PLoss: 0.0000 | Ent: 0.6931 +[ 64.4%] Iter 393/610 | SPS: 28206 | Reward: 0.085 | Value: 0.172 | VLoss: 0.0459 | PLoss: -0.0001 | Ent: 0.6931 +[ 64.6%] Iter 394/610 | SPS: 28205 | Reward: 0.088 | Value: 0.168 | VLoss: 0.0487 | PLoss: 0.0000 | Ent: 0.6931 +[ 64.8%] Iter 395/610 | SPS: 28202 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0494 | PLoss: -0.0000 | Ent: 0.6931 +[ 64.9%] Iter 396/610 | SPS: 28202 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0478 | PLoss: -0.0000 | Ent: 0.6931 +[ 65.1%] Iter 397/610 | SPS: 28204 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0461 | PLoss: -0.0000 | Ent: 0.6931 +[ 65.2%] Iter 398/610 | SPS: 28206 | Reward: 0.085 | Value: 0.178 | VLoss: 0.0458 | PLoss: -0.0000 | Ent: 0.6931 +[ 65.4%] Iter 399/610 | SPS: 28208 | Reward: 0.087 | Value: 0.168 | VLoss: 0.0431 | PLoss: 0.0000 | Ent: 0.6931 +[ 65.6%] Iter 400/610 | SPS: 28210 | Reward: 0.083 | Value: 0.173 | VLoss: 0.0448 | PLoss: -0.0000 | Ent: 0.6931 +[ 65.7%] Iter 401/610 | SPS: 28211 | Reward: 0.088 | Value: 0.165 | VLoss: 0.0480 | PLoss: -0.0000 | Ent: 0.6931 +[ 65.9%] Iter 402/610 | SPS: 28213 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0486 | PLoss: 0.0000 | Ent: 0.6930 +[ 66.1%] Iter 403/610 | SPS: 28214 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0479 | PLoss: 0.0000 | Ent: 0.6930 +[ 66.2%] Iter 404/610 | SPS: 28216 | Reward: 0.091 | Value: 0.173 | VLoss: 0.0505 | PLoss: 0.0000 | Ent: 0.6930 +[ 66.4%] Iter 405/610 | SPS: 28218 | Reward: 0.088 | Value: 0.182 | VLoss: 0.0472 | PLoss: -0.0000 | Ent: 0.6930 +[ 66.6%] Iter 406/610 | SPS: 28219 | Reward: 0.084 | Value: 0.172 | VLoss: 0.0464 | PLoss: -0.0000 | Ent: 0.6930 +[ 66.7%] Iter 407/610 | SPS: 28221 | Reward: 0.089 | Value: 0.167 | VLoss: 0.0490 | PLoss: 0.0000 | Ent: 0.6930 +[ 66.9%] Iter 408/610 | SPS: 28223 | Reward: 0.087 | Value: 0.179 | VLoss: 0.0447 | PLoss: -0.0000 | Ent: 0.6930 +[ 67.0%] Iter 409/610 | SPS: 28224 | Reward: 0.085 | Value: 0.173 | VLoss: 0.0445 | PLoss: -0.0000 | Ent: 0.6930 +[ 67.2%] Iter 410/610 | SPS: 28226 | Reward: 0.089 | Value: 0.169 | VLoss: 0.0480 | PLoss: 0.0000 | Ent: 0.6929 +[ 67.4%] Iter 411/610 | SPS: 28227 | Reward: 0.090 | Value: 0.177 | VLoss: 0.0503 | PLoss: -0.0000 | Ent: 0.6930 +[ 67.5%] Iter 412/610 | SPS: 28227 | Reward: 0.085 | Value: 0.180 | VLoss: 0.0460 | PLoss: 0.0000 | Ent: 0.6930 +[ 67.7%] Iter 413/610 | SPS: 28228 | Reward: 0.089 | Value: 0.167 | VLoss: 0.0469 | PLoss: -0.0001 | Ent: 0.6930 +[ 67.9%] Iter 414/610 | SPS: 28230 | Reward: 0.089 | Value: 0.179 | VLoss: 0.0500 | PLoss: -0.0000 | Ent: 0.6929 +[ 68.0%] Iter 415/610 | SPS: 28231 | Reward: 0.090 | Value: 0.176 | VLoss: 0.0501 | PLoss: 0.0000 | Ent: 0.6929 +[ 68.2%] Iter 416/610 | SPS: 28233 | Reward: 0.085 | Value: 0.181 | VLoss: 0.0439 | PLoss: -0.0000 | Ent: 0.6929 +[ 68.4%] Iter 417/610 | SPS: 28234 | Reward: 0.088 | Value: 0.167 | VLoss: 0.0475 | PLoss: -0.0000 | Ent: 0.6929 +[ 68.5%] Iter 418/610 | SPS: 28236 | Reward: 0.087 | Value: 0.179 | VLoss: 0.0474 | PLoss: -0.0000 | Ent: 0.6929 +[ 68.7%] Iter 419/610 | SPS: 28238 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0464 | PLoss: -0.0000 | Ent: 0.6929 +[ 68.9%] Iter 420/610 | SPS: 28239 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0460 | PLoss: -0.0000 | Ent: 0.6928 +[ 69.0%] Iter 421/610 | SPS: 28241 | Reward: 0.090 | Value: 0.176 | VLoss: 0.0475 | PLoss: -0.0000 | Ent: 0.6928 +[ 69.2%] Iter 422/610 | SPS: 28242 | Reward: 0.087 | Value: 0.180 | VLoss: 0.0471 | PLoss: -0.0001 | Ent: 0.6929 +[ 69.3%] Iter 423/610 | SPS: 28244 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0431 | PLoss: -0.0000 | Ent: 0.6928 +[ 69.5%] Iter 424/610 | SPS: 28244 | Reward: 0.087 | Value: 0.177 | VLoss: 0.0436 | PLoss: 0.0000 | Ent: 0.6928 +[ 69.7%] Iter 425/610 | SPS: 28245 | Reward: 0.090 | Value: 0.171 | VLoss: 0.0468 | PLoss: 0.0000 | Ent: 0.6928 +[ 69.8%] Iter 426/610 | SPS: 28246 | Reward: 0.086 | Value: 0.181 | VLoss: 0.0431 | PLoss: -0.0001 | Ent: 0.6928 +[ 70.0%] Iter 427/610 | SPS: 28248 | Reward: 0.088 | Value: 0.168 | VLoss: 0.0479 | PLoss: -0.0000 | Ent: 0.6927 +[ 70.2%] Iter 428/610 | SPS: 28249 | Reward: 0.086 | Value: 0.178 | VLoss: 0.0473 | PLoss: 0.0000 | Ent: 0.6927 +[ 70.3%] Iter 429/610 | SPS: 28249 | Reward: 0.089 | Value: 0.170 | VLoss: 0.0468 | PLoss: -0.0000 | Ent: 0.6927 +[ 70.5%] Iter 430/610 | SPS: 28251 | Reward: 0.087 | Value: 0.179 | VLoss: 0.0460 | PLoss: -0.0000 | Ent: 0.6927 +[ 70.7%] Iter 431/610 | SPS: 28252 | Reward: 0.086 | Value: 0.170 | VLoss: 0.0458 | PLoss: -0.0000 | Ent: 0.6927 +[ 70.8%] Iter 432/610 | SPS: 28253 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0481 | PLoss: -0.0001 | Ent: 0.6927 +[ 71.0%] Iter 433/610 | SPS: 28255 | Reward: 0.085 | Value: 0.173 | VLoss: 0.0431 | PLoss: 0.0000 | Ent: 0.6926 +[ 71.1%] Iter 434/610 | SPS: 28256 | Reward: 0.087 | Value: 0.168 | VLoss: 0.0453 | PLoss: -0.0000 | Ent: 0.6926 +[ 71.3%] Iter 435/610 | SPS: 28258 | Reward: 0.085 | Value: 0.173 | VLoss: 0.0425 | PLoss: 0.0000 | Ent: 0.6926 +[ 71.5%] Iter 436/610 | SPS: 28259 | Reward: 0.087 | Value: 0.167 | VLoss: 0.0482 | PLoss: -0.0000 | Ent: 0.6927 +[ 71.6%] Iter 437/610 | SPS: 28260 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0478 | PLoss: -0.0001 | Ent: 0.6926 +[ 71.8%] Iter 438/610 | SPS: 28262 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0501 | PLoss: -0.0000 | Ent: 0.6926 +[ 72.0%] Iter 439/610 | SPS: 28263 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0467 | PLoss: -0.0000 | Ent: 0.6926 +[ 72.1%] Iter 440/610 | SPS: 28265 | Reward: 0.089 | Value: 0.176 | VLoss: 0.0476 | PLoss: -0.0000 | Ent: 0.6927 +[ 72.3%] Iter 441/610 | SPS: 28266 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0453 | PLoss: -0.0000 | Ent: 0.6927 +[ 72.5%] Iter 442/610 | SPS: 28268 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0478 | PLoss: -0.0000 | Ent: 0.6926 +[ 72.6%] Iter 443/610 | SPS: 28269 | Reward: 0.084 | Value: 0.177 | VLoss: 0.0440 | PLoss: 0.0000 | Ent: 0.6926 +[ 72.8%] Iter 444/610 | SPS: 28270 | Reward: 0.087 | Value: 0.165 | VLoss: 0.0489 | PLoss: -0.0000 | Ent: 0.6926 +[ 73.0%] Iter 445/610 | SPS: 28272 | Reward: 0.086 | Value: 0.174 | VLoss: 0.0477 | PLoss: -0.0000 | Ent: 0.6926 +[ 73.1%] Iter 446/610 | SPS: 28273 | Reward: 0.088 | Value: 0.170 | VLoss: 0.0483 | PLoss: -0.0000 | Ent: 0.6926 +[ 73.3%] Iter 447/610 | SPS: 28273 | Reward: 0.089 | Value: 0.176 | VLoss: 0.0491 | PLoss: -0.0000 | Ent: 0.6926 +[ 73.4%] Iter 448/610 | SPS: 28274 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0452 | PLoss: -0.0001 | Ent: 0.6925 +[ 73.6%] Iter 449/610 | SPS: 28275 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0452 | PLoss: 0.0000 | Ent: 0.6924 +[ 73.8%] Iter 450/610 | SPS: 28276 | Reward: 0.089 | Value: 0.179 | VLoss: 0.0470 | PLoss: -0.0000 | Ent: 0.6924 +[ 73.9%] Iter 451/610 | SPS: 28277 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0486 | PLoss: -0.0001 | Ent: 0.6925 +[ 74.1%] Iter 452/610 | SPS: 28278 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0461 | PLoss: 0.0000 | Ent: 0.6925 +[ 74.3%] Iter 453/610 | SPS: 28279 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0470 | PLoss: -0.0000 | Ent: 0.6925 +[ 74.4%] Iter 454/610 | SPS: 28280 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0481 | PLoss: 0.0000 | Ent: 0.6926 +[ 74.6%] Iter 455/610 | SPS: 28281 | Reward: 0.090 | Value: 0.175 | VLoss: 0.0494 | PLoss: -0.0001 | Ent: 0.6927 +[ 74.8%] Iter 456/610 | SPS: 28282 | Reward: 0.089 | Value: 0.181 | VLoss: 0.0455 | PLoss: -0.0000 | Ent: 0.6927 +[ 74.9%] Iter 457/610 | SPS: 28283 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0485 | PLoss: -0.0000 | Ent: 0.6926 +[ 75.1%] Iter 458/610 | SPS: 28284 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0467 | PLoss: -0.0000 | Ent: 0.6927 +[ 75.2%] Iter 459/610 | SPS: 28285 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0457 | PLoss: -0.0000 | Ent: 0.6927 +[ 75.4%] Iter 460/610 | SPS: 28286 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0461 | PLoss: -0.0000 | Ent: 0.6927 +[ 75.6%] Iter 461/610 | SPS: 28287 | Reward: 0.087 | Value: 0.173 | VLoss: 0.0476 | PLoss: -0.0000 | Ent: 0.6927 +[ 75.7%] Iter 462/610 | SPS: 28288 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0454 | PLoss: 0.0000 | Ent: 0.6927 +[ 75.9%] Iter 463/610 | SPS: 28289 | Reward: 0.087 | Value: 0.178 | VLoss: 0.0472 | PLoss: 0.0000 | Ent: 0.6927 +[ 76.1%] Iter 464/610 | SPS: 28289 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0448 | PLoss: -0.0000 | Ent: 0.6928 +[ 76.2%] Iter 465/610 | SPS: 28290 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0487 | PLoss: -0.0000 | Ent: 0.6927 +[ 76.4%] Iter 466/610 | SPS: 28292 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0439 | PLoss: -0.0000 | Ent: 0.6927 +[ 76.6%] Iter 467/610 | SPS: 28293 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0460 | PLoss: -0.0001 | Ent: 0.6925 +[ 76.7%] Iter 468/610 | SPS: 28294 | Reward: 0.085 | Value: 0.174 | VLoss: 0.0455 | PLoss: 0.0000 | Ent: 0.6925 +[ 76.9%] Iter 469/610 | SPS: 28295 | Reward: 0.088 | Value: 0.168 | VLoss: 0.0465 | PLoss: -0.0000 | Ent: 0.6925 +[ 77.0%] Iter 470/610 | SPS: 28296 | Reward: 0.093 | Value: 0.176 | VLoss: 0.0517 | PLoss: -0.0000 | Ent: 0.6924 +[ 77.2%] Iter 471/610 | SPS: 28297 | Reward: 0.091 | Value: 0.185 | VLoss: 0.0451 | PLoss: -0.0001 | Ent: 0.6924 +[ 77.4%] Iter 472/610 | SPS: 28298 | Reward: 0.086 | Value: 0.180 | VLoss: 0.0455 | PLoss: -0.0001 | Ent: 0.6923 +[ 77.5%] Iter 473/610 | SPS: 28299 | Reward: 0.085 | Value: 0.170 | VLoss: 0.0462 | PLoss: -0.0000 | Ent: 0.6922 +[ 77.7%] Iter 474/610 | SPS: 28300 | Reward: 0.088 | Value: 0.170 | VLoss: 0.0468 | PLoss: 0.0000 | Ent: 0.6922 +[ 77.9%] Iter 475/610 | SPS: 28301 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0467 | PLoss: -0.0000 | Ent: 0.6922 +[ 78.0%] Iter 476/610 | SPS: 28302 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0439 | PLoss: -0.0001 | Ent: 0.6922 +[ 78.2%] Iter 477/610 | SPS: 28303 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0442 | PLoss: -0.0000 | Ent: 0.6922 +[ 78.4%] Iter 478/610 | SPS: 28303 | Reward: 0.087 | Value: 0.170 | VLoss: 0.0484 | PLoss: -0.0000 | Ent: 0.6922 +[ 78.5%] Iter 479/610 | SPS: 28304 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0487 | PLoss: -0.0001 | Ent: 0.6922 +[ 78.7%] Iter 480/610 | SPS: 28305 | Reward: 0.087 | Value: 0.178 | VLoss: 0.0449 | PLoss: -0.0000 | Ent: 0.6923 +[ 78.9%] Iter 481/610 | SPS: 28305 | Reward: 0.086 | Value: 0.171 | VLoss: 0.0455 | PLoss: 0.0000 | Ent: 0.6924 +[ 79.0%] Iter 482/610 | SPS: 28305 | Reward: 0.085 | Value: 0.173 | VLoss: 0.0432 | PLoss: 0.0000 | Ent: 0.6923 +[ 79.2%] Iter 483/610 | SPS: 28305 | Reward: 0.090 | Value: 0.168 | VLoss: 0.0478 | PLoss: -0.0000 | Ent: 0.6923 +[ 79.3%] Iter 484/610 | SPS: 28305 | Reward: 0.088 | Value: 0.180 | VLoss: 0.0461 | PLoss: 0.0000 | Ent: 0.6923 +[ 79.5%] Iter 485/610 | SPS: 28306 | Reward: 0.090 | Value: 0.173 | VLoss: 0.0510 | PLoss: -0.0000 | Ent: 0.6922 +[ 79.7%] Iter 486/610 | SPS: 28306 | Reward: 0.089 | Value: 0.180 | VLoss: 0.0449 | PLoss: -0.0001 | Ent: 0.6921 +[ 79.8%] Iter 487/610 | SPS: 28307 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0471 | PLoss: -0.0000 | Ent: 0.6920 +[ 80.0%] Iter 488/610 | SPS: 28308 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0468 | PLoss: -0.0000 | Ent: 0.6920 +[ 80.2%] Iter 489/610 | SPS: 28308 | Reward: 0.086 | Value: 0.171 | VLoss: 0.0467 | PLoss: -0.0000 | Ent: 0.6921 +[ 80.3%] Iter 490/610 | SPS: 28308 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0484 | PLoss: -0.0000 | Ent: 0.6921 +[ 80.5%] Iter 491/610 | SPS: 28309 | Reward: 0.091 | Value: 0.176 | VLoss: 0.0474 | PLoss: 0.0000 | Ent: 0.6921 +[ 80.7%] Iter 492/610 | SPS: 28309 | Reward: 0.087 | Value: 0.183 | VLoss: 0.0454 | PLoss: -0.0000 | Ent: 0.6921 +[ 80.8%] Iter 493/610 | SPS: 28309 | Reward: 0.086 | Value: 0.172 | VLoss: 0.0440 | PLoss: -0.0000 | Ent: 0.6922 +[ 81.0%] Iter 494/610 | SPS: 28310 | Reward: 0.090 | Value: 0.173 | VLoss: 0.0493 | PLoss: 0.0000 | Ent: 0.6922 +[ 81.1%] Iter 495/610 | SPS: 28310 | Reward: 0.086 | Value: 0.180 | VLoss: 0.0474 | PLoss: -0.0000 | Ent: 0.6923 +[ 81.3%] Iter 496/610 | SPS: 28310 | Reward: 0.088 | Value: 0.170 | VLoss: 0.0460 | PLoss: 0.0000 | Ent: 0.6924 +[ 81.5%] Iter 497/610 | SPS: 28311 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0502 | PLoss: -0.0000 | Ent: 0.6924 +[ 81.6%] Iter 498/610 | SPS: 28311 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0448 | PLoss: -0.0000 | Ent: 0.6924 +[ 81.8%] Iter 499/610 | SPS: 28311 | Reward: 0.086 | Value: 0.170 | VLoss: 0.0458 | PLoss: -0.0000 | Ent: 0.6924 +[ 82.0%] Iter 500/610 | SPS: 28311 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0473 | PLoss: 0.0000 | Ent: 0.6924 +[ 82.1%] Iter 501/610 | SPS: 28311 | Reward: 0.084 | Value: 0.176 | VLoss: 0.0475 | PLoss: -0.0000 | Ent: 0.6924 +[ 82.3%] Iter 502/610 | SPS: 28312 | Reward: 0.091 | Value: 0.166 | VLoss: 0.0502 | PLoss: -0.0000 | Ent: 0.6924 +[ 82.5%] Iter 503/610 | SPS: 28312 | Reward: 0.088 | Value: 0.183 | VLoss: 0.0486 | PLoss: -0.0000 | Ent: 0.6924 +[ 82.6%] Iter 504/610 | SPS: 28313 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0490 | PLoss: 0.0000 | Ent: 0.6924 +[ 82.8%] Iter 505/610 | SPS: 28313 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0495 | PLoss: 0.0000 | Ent: 0.6924 +[ 83.0%] Iter 506/610 | SPS: 28313 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0436 | PLoss: 0.0000 | Ent: 0.6925 +[ 83.1%] Iter 507/610 | SPS: 28314 | Reward: 0.090 | Value: 0.172 | VLoss: 0.0485 | PLoss: 0.0000 | Ent: 0.6924 +[ 83.3%] Iter 508/610 | SPS: 28314 | Reward: 0.089 | Value: 0.181 | VLoss: 0.0468 | PLoss: -0.0000 | Ent: 0.6924 +[ 83.4%] Iter 509/610 | SPS: 28314 | Reward: 0.085 | Value: 0.178 | VLoss: 0.0486 | PLoss: -0.0000 | Ent: 0.6924 +[ 83.6%] Iter 510/610 | SPS: 28314 | Reward: 0.089 | Value: 0.168 | VLoss: 0.0453 | PLoss: -0.0000 | Ent: 0.6924 +[ 83.8%] Iter 511/610 | SPS: 28314 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0479 | PLoss: -0.0000 | Ent: 0.6924 +[ 83.9%] Iter 512/610 | SPS: 28314 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0483 | PLoss: 0.0000 | Ent: 0.6924 +[ 84.1%] Iter 513/610 | SPS: 28314 | Reward: 0.086 | Value: 0.174 | VLoss: 0.0470 | PLoss: -0.0000 | Ent: 0.6923 +[ 84.3%] Iter 514/610 | SPS: 28315 | Reward: 0.090 | Value: 0.173 | VLoss: 0.0479 | PLoss: -0.0000 | Ent: 0.6922 +[ 84.4%] Iter 515/610 | SPS: 28316 | Reward: 0.085 | Value: 0.180 | VLoss: 0.0436 | PLoss: -0.0000 | Ent: 0.6923 +[ 84.6%] Iter 516/610 | SPS: 28317 | Reward: 0.090 | Value: 0.168 | VLoss: 0.0462 | PLoss: 0.0000 | Ent: 0.6924 +[ 84.8%] Iter 517/610 | SPS: 28317 | Reward: 0.085 | Value: 0.178 | VLoss: 0.0453 | PLoss: -0.0000 | Ent: 0.6925 +[ 84.9%] Iter 518/610 | SPS: 28317 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6925 +[ 85.1%] Iter 519/610 | SPS: 28319 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0481 | PLoss: -0.0001 | Ent: 0.6926 +[ 85.2%] Iter 520/610 | SPS: 28319 | Reward: 0.086 | Value: 0.174 | VLoss: 0.0450 | PLoss: -0.0000 | Ent: 0.6926 +[ 85.4%] Iter 521/610 | SPS: 28320 | Reward: 0.086 | Value: 0.171 | VLoss: 0.0444 | PLoss: -0.0000 | Ent: 0.6926 +[ 85.6%] Iter 522/610 | SPS: 28321 | Reward: 0.088 | Value: 0.172 | VLoss: 0.0470 | PLoss: -0.0000 | Ent: 0.6926 +[ 85.7%] Iter 523/610 | SPS: 28321 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0469 | PLoss: 0.0000 | Ent: 0.6926 +[ 85.9%] Iter 524/610 | SPS: 28322 | Reward: 0.088 | Value: 0.175 | VLoss: 0.0466 | PLoss: 0.0000 | Ent: 0.6926 +[ 86.1%] Iter 525/610 | SPS: 28323 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0470 | PLoss: 0.0000 | Ent: 0.6926 +[ 86.2%] Iter 526/610 | SPS: 28324 | Reward: 0.086 | Value: 0.171 | VLoss: 0.0452 | PLoss: -0.0000 | Ent: 0.6926 +[ 86.4%] Iter 527/610 | SPS: 28325 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0477 | PLoss: 0.0000 | Ent: 0.6926 +[ 86.6%] Iter 528/610 | SPS: 28326 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0451 | PLoss: -0.0000 | Ent: 0.6927 +[ 86.7%] Iter 529/610 | SPS: 28327 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0455 | PLoss: 0.0000 | Ent: 0.6927 +[ 86.9%] Iter 530/610 | SPS: 28327 | Reward: 0.087 | Value: 0.170 | VLoss: 0.0457 | PLoss: -0.0000 | Ent: 0.6927 +[ 87.0%] Iter 531/610 | SPS: 28328 | Reward: 0.091 | Value: 0.173 | VLoss: 0.0493 | PLoss: -0.0000 | Ent: 0.6927 +[ 87.2%] Iter 532/610 | SPS: 28329 | Reward: 0.089 | Value: 0.181 | VLoss: 0.0453 | PLoss: -0.0000 | Ent: 0.6926 +[ 87.4%] Iter 533/610 | SPS: 28329 | Reward: 0.086 | Value: 0.177 | VLoss: 0.0459 | PLoss: -0.0000 | Ent: 0.6927 +[ 87.5%] Iter 534/610 | SPS: 28330 | Reward: 0.088 | Value: 0.169 | VLoss: 0.0459 | PLoss: -0.0000 | Ent: 0.6927 +[ 87.7%] Iter 535/610 | SPS: 28331 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0494 | PLoss: -0.0000 | Ent: 0.6926 +[ 87.9%] Iter 536/610 | SPS: 28332 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0456 | PLoss: 0.0000 | Ent: 0.6926 +[ 88.0%] Iter 537/610 | SPS: 28333 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0483 | PLoss: -0.0000 | Ent: 0.6926 +[ 88.2%] Iter 538/610 | SPS: 28334 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0500 | PLoss: -0.0000 | Ent: 0.6926 +[ 88.4%] Iter 539/610 | SPS: 28335 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0462 | PLoss: 0.0000 | Ent: 0.6926 +[ 88.5%] Iter 540/610 | SPS: 28337 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0480 | PLoss: 0.0000 | Ent: 0.6926 +[ 88.7%] Iter 541/610 | SPS: 28338 | Reward: 0.090 | Value: 0.176 | VLoss: 0.0465 | PLoss: -0.0000 | Ent: 0.6926 +[ 88.9%] Iter 542/610 | SPS: 28339 | Reward: 0.090 | Value: 0.179 | VLoss: 0.0485 | PLoss: -0.0000 | Ent: 0.6926 +[ 89.0%] Iter 543/610 | SPS: 28339 | Reward: 0.087 | Value: 0.179 | VLoss: 0.0456 | PLoss: -0.0000 | Ent: 0.6926 +[ 89.2%] Iter 544/610 | SPS: 28340 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6926 +[ 89.3%] Iter 545/610 | SPS: 28341 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0474 | PLoss: -0.0000 | Ent: 0.6925 +[ 89.5%] Iter 546/610 | SPS: 28342 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0457 | PLoss: 0.0000 | Ent: 0.6925 +[ 89.7%] Iter 547/610 | SPS: 28343 | Reward: 0.087 | Value: 0.177 | VLoss: 0.0480 | PLoss: -0.0000 | Ent: 0.6925 +[ 89.8%] Iter 548/610 | SPS: 28344 | Reward: 0.087 | Value: 0.173 | VLoss: 0.0464 | PLoss: -0.0000 | Ent: 0.6924 +[ 90.0%] Iter 549/610 | SPS: 28344 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0456 | PLoss: 0.0000 | Ent: 0.6924 +[ 90.2%] Iter 550/610 | SPS: 28345 | Reward: 0.087 | Value: 0.177 | VLoss: 0.0473 | PLoss: -0.0000 | Ent: 0.6924 +[ 90.3%] Iter 551/610 | SPS: 28346 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0454 | PLoss: -0.0000 | Ent: 0.6925 +[ 90.5%] Iter 552/610 | SPS: 28346 | Reward: 0.085 | Value: 0.171 | VLoss: 0.0424 | PLoss: -0.0000 | Ent: 0.6925 +[ 90.7%] Iter 553/610 | SPS: 28347 | Reward: 0.086 | Value: 0.170 | VLoss: 0.0459 | PLoss: -0.0000 | Ent: 0.6925 +[ 90.8%] Iter 554/610 | SPS: 28348 | Reward: 0.088 | Value: 0.171 | VLoss: 0.0440 | PLoss: -0.0000 | Ent: 0.6926 +[ 91.0%] Iter 555/610 | SPS: 28349 | Reward: 0.092 | Value: 0.174 | VLoss: 0.0494 | PLoss: 0.0000 | Ent: 0.6926 +[ 91.1%] Iter 556/610 | SPS: 28350 | Reward: 0.088 | Value: 0.181 | VLoss: 0.0460 | PLoss: -0.0000 | Ent: 0.6925 +[ 91.3%] Iter 557/610 | SPS: 28351 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6925 +[ 91.5%] Iter 558/610 | SPS: 28352 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0460 | PLoss: -0.0000 | Ent: 0.6925 +[ 91.6%] Iter 559/610 | SPS: 28352 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0471 | PLoss: 0.0000 | Ent: 0.6925 +[ 91.8%] Iter 560/610 | SPS: 28353 | Reward: 0.087 | Value: 0.176 | VLoss: 0.0468 | PLoss: -0.0000 | Ent: 0.6925 +[ 92.0%] Iter 561/610 | SPS: 28354 | Reward: 0.090 | Value: 0.174 | VLoss: 0.0484 | PLoss: 0.0000 | Ent: 0.6925 +[ 92.1%] Iter 562/610 | SPS: 28355 | Reward: 0.090 | Value: 0.178 | VLoss: 0.0492 | PLoss: -0.0000 | Ent: 0.6925 +[ 92.3%] Iter 563/610 | SPS: 28356 | Reward: 0.087 | Value: 0.179 | VLoss: 0.0466 | PLoss: 0.0000 | Ent: 0.6925 +[ 92.5%] Iter 564/610 | SPS: 28357 | Reward: 0.089 | Value: 0.175 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6925 +[ 92.6%] Iter 565/610 | SPS: 28358 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0483 | PLoss: -0.0000 | Ent: 0.6925 +[ 92.8%] Iter 566/610 | SPS: 28358 | Reward: 0.086 | Value: 0.177 | VLoss: 0.0478 | PLoss: -0.0000 | Ent: 0.6925 +[ 93.0%] Iter 567/610 | SPS: 28359 | Reward: 0.087 | Value: 0.173 | VLoss: 0.0466 | PLoss: -0.0000 | Ent: 0.6925 +[ 93.1%] Iter 568/610 | SPS: 28360 | Reward: 0.084 | Value: 0.173 | VLoss: 0.0449 | PLoss: 0.0000 | Ent: 0.6925 +[ 93.3%] Iter 569/610 | SPS: 28359 | Reward: 0.091 | Value: 0.170 | VLoss: 0.0456 | PLoss: -0.0000 | Ent: 0.6925 +[ 93.4%] Iter 570/610 | SPS: 28357 | Reward: 0.084 | Value: 0.176 | VLoss: 0.0484 | PLoss: 0.0000 | Ent: 0.6925 +[ 93.6%] Iter 571/610 | SPS: 28357 | Reward: 0.085 | Value: 0.173 | VLoss: 0.0442 | PLoss: -0.0000 | Ent: 0.6925 +[ 93.8%] Iter 572/610 | SPS: 28358 | Reward: 0.092 | Value: 0.169 | VLoss: 0.0506 | PLoss: -0.0000 | Ent: 0.6925 +[ 93.9%] Iter 573/610 | SPS: 28359 | Reward: 0.088 | Value: 0.177 | VLoss: 0.0441 | PLoss: -0.0000 | Ent: 0.6925 +[ 94.1%] Iter 574/610 | SPS: 28360 | Reward: 0.088 | Value: 0.178 | VLoss: 0.0476 | PLoss: 0.0000 | Ent: 0.6925 +[ 94.3%] Iter 575/610 | SPS: 28361 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0467 | PLoss: -0.0000 | Ent: 0.6925 +[ 94.4%] Iter 576/610 | SPS: 28362 | Reward: 0.087 | Value: 0.173 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6925 +[ 94.6%] Iter 577/610 | SPS: 28363 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0462 | PLoss: 0.0000 | Ent: 0.6925 +[ 94.8%] Iter 578/610 | SPS: 28364 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0468 | PLoss: -0.0000 | Ent: 0.6924 +[ 94.9%] Iter 579/610 | SPS: 28364 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0469 | PLoss: -0.0000 | Ent: 0.6924 +[ 95.1%] Iter 580/610 | SPS: 28366 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0479 | PLoss: 0.0000 | Ent: 0.6924 +[ 95.2%] Iter 581/610 | SPS: 28367 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0442 | PLoss: -0.0000 | Ent: 0.6924 +[ 95.4%] Iter 582/610 | SPS: 28368 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0457 | PLoss: 0.0000 | Ent: 0.6924 +[ 95.6%] Iter 583/610 | SPS: 28368 | Reward: 0.087 | Value: 0.173 | VLoss: 0.0483 | PLoss: -0.0000 | Ent: 0.6924 +[ 95.7%] Iter 584/610 | SPS: 28369 | Reward: 0.088 | Value: 0.173 | VLoss: 0.0463 | PLoss: -0.0000 | Ent: 0.6924 +[ 95.9%] Iter 585/610 | SPS: 28370 | Reward: 0.086 | Value: 0.174 | VLoss: 0.0456 | PLoss: -0.0000 | Ent: 0.6924 +[ 96.1%] Iter 586/610 | SPS: 28370 | Reward: 0.087 | Value: 0.173 | VLoss: 0.0458 | PLoss: -0.0000 | Ent: 0.6924 +[ 96.2%] Iter 587/610 | SPS: 28370 | Reward: 0.087 | Value: 0.173 | VLoss: 0.0476 | PLoss: 0.0000 | Ent: 0.6924 +[ 96.4%] Iter 588/610 | SPS: 28371 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0456 | PLoss: 0.0000 | Ent: 0.6924 +[ 96.6%] Iter 589/610 | SPS: 28372 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0499 | PLoss: 0.0000 | Ent: 0.6923 +[ 96.7%] Iter 590/610 | SPS: 28373 | Reward: 0.090 | Value: 0.174 | VLoss: 0.0490 | PLoss: -0.0000 | Ent: 0.6923 +[ 96.9%] Iter 591/610 | SPS: 28375 | Reward: 0.088 | Value: 0.176 | VLoss: 0.0478 | PLoss: -0.0000 | Ent: 0.6923 +[ 97.0%] Iter 592/610 | SPS: 28376 | Reward: 0.089 | Value: 0.177 | VLoss: 0.0460 | PLoss: -0.0000 | Ent: 0.6923 +[ 97.2%] Iter 593/610 | SPS: 28376 | Reward: 0.087 | Value: 0.177 | VLoss: 0.0471 | PLoss: 0.0000 | Ent: 0.6923 +[ 97.4%] Iter 594/610 | SPS: 28377 | Reward: 0.090 | Value: 0.176 | VLoss: 0.0491 | PLoss: 0.0000 | Ent: 0.6923 +[ 97.5%] Iter 595/610 | SPS: 28378 | Reward: 0.086 | Value: 0.176 | VLoss: 0.0478 | PLoss: 0.0000 | Ent: 0.6923 +[ 97.7%] Iter 596/610 | SPS: 28379 | Reward: 0.087 | Value: 0.175 | VLoss: 0.0450 | PLoss: -0.0000 | Ent: 0.6923 +[ 97.9%] Iter 597/610 | SPS: 28380 | Reward: 0.088 | Value: 0.174 | VLoss: 0.0486 | PLoss: 0.0000 | Ent: 0.6923 +[ 98.0%] Iter 598/610 | SPS: 28381 | Reward: 0.085 | Value: 0.174 | VLoss: 0.0472 | PLoss: -0.0000 | Ent: 0.6924 +[ 98.2%] Iter 599/610 | SPS: 28382 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0450 | PLoss: -0.0000 | Ent: 0.6924 +[ 98.4%] Iter 600/610 | SPS: 28383 | Reward: 0.087 | Value: 0.173 | VLoss: 0.0475 | PLoss: 0.0000 | Ent: 0.6924 +[ 98.5%] Iter 601/610 | SPS: 28384 | Reward: 0.086 | Value: 0.173 | VLoss: 0.0463 | PLoss: 0.0000 | Ent: 0.6923 +[ 98.7%] Iter 602/610 | SPS: 28385 | Reward: 0.087 | Value: 0.172 | VLoss: 0.0463 | PLoss: -0.0000 | Ent: 0.6924 +[ 98.9%] Iter 603/610 | SPS: 28386 | Reward: 0.089 | Value: 0.173 | VLoss: 0.0491 | PLoss: -0.0000 | Ent: 0.6924 +[ 99.0%] Iter 604/610 | SPS: 28386 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0487 | PLoss: -0.0000 | Ent: 0.6923 +[ 99.2%] Iter 605/610 | SPS: 28386 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0451 | PLoss: 0.0000 | Ent: 0.6924 +[ 99.3%] Iter 606/610 | SPS: 28387 | Reward: 0.086 | Value: 0.175 | VLoss: 0.0464 | PLoss: -0.0000 | Ent: 0.6923 +[ 99.5%] Iter 607/610 | SPS: 28388 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0470 | PLoss: 0.0000 | Ent: 0.6924 +[ 99.7%] Iter 608/610 | SPS: 28389 | Reward: 0.086 | Value: 0.174 | VLoss: 0.0459 | PLoss: -0.0000 | Ent: 0.6923 +[ 99.8%] Iter 609/610 | SPS: 28389 | Reward: 0.087 | Value: 0.174 | VLoss: 0.0487 | PLoss: -0.0000 | Ent: 0.6923 +[100.0%] Iter 610/610 | SPS: 28390 | Reward: 0.089 | Value: 0.174 | VLoss: 0.0446 | PLoss: -0.0000 | Ent: 0.6924 diff --git a/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/requirements.txt b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d592ae1a79f938781a73a558d1be3b4aa58e912 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/requirements.txt @@ -0,0 +1,305 @@ +ragen==0.1 +setuptools==80.9.0 +wheel==0.45.1 +pip==25.2 +zipp==3.23.0 +verl==0.2.0.dev0 +ragen==0.1 +triton==3.2.0 +nvidia-cusparselt-cu12==0.6.2 +mpmath==1.3.0 +typing_extensions==4.15.0 +sympy==1.13.1 +nvidia-nvtx-cu12==12.4.127 +nvidia-nvjitlink-cu12==12.4.127 +nvidia-nccl-cu12==2.21.5 +nvidia-curand-cu12==10.3.5.147 +nvidia-cufft-cu12==11.2.1.3 +nvidia-cuda-runtime-cu12==12.4.127 +nvidia-cuda-nvrtc-cu12==12.4.127 +nvidia-cuda-cupti-cu12==12.4.127 +nvidia-cublas-cu12==12.4.5.8 +networkx==3.5 +MarkupSafe==2.1.5 +fsspec==2025.9.0 +filelock==3.19.1 +nvidia-cusparse-cu12==12.3.1.170 +nvidia-cudnn-cu12==9.1.0.70 +Jinja2==3.1.6 +nvidia-cusolver-cu12==11.6.1.9 +torch==2.6.0+cu124 +einops==0.8.1 +flash_attn==2.7.4.post1 +pytz==2025.2 +pyperclip==1.11.0 +pylatexenc==2.10 +pyjnius==1.7.0 +py-cpuinfo==9.0.0 +pure_eval==0.2.3 +ptyprocess==0.7.0 +gym-notices==0.1.0 +flatbuffers==25.9.23 +fastrlock==0.8.3 +Farama-Notifications==0.0.4 +cymem==2.0.11 +antlr4-python3-runtime==4.9.3 +xxhash==3.6.0 +wrapt==2.0.0 +Werkzeug==3.1.3 +websockets==15.0.1 +wcwidth==0.2.14 +wasabi==1.1.3 +uvloop==0.22.1 +urllib3==2.5.0 +tzdata==2025.2 +typing-inspection==0.4.2 +traitlets==5.14.3 +tqdm==4.67.1 +threadpoolctl==3.6.0 +tabulate==0.9.0 +spacy-loggers==1.0.5 +spacy-legacy==3.0.12 +soupsieve==2.8 +sniffio==1.3.1 +smmap==5.0.2 +six==1.17.0 +shellingham==1.5.4 +sentencepiece==0.2.1 +safetensors==0.6.2 +rpds-py==0.28.0 +rignore==0.7.6 +regex==2025.11.3 +RapidFuzz==3.14.3 +pyzmq==27.1.0 +PyYAML==6.0.3 +pytokens==0.3.0 +python-multipart==0.0.20 +python-json-logger==4.0.0 +python-dotenv==1.2.1 +PySocks==1.7.1 +pyparsing==3.2.5 +PyJWT==2.10.1 +Pygments==2.19.2 +pygame==2.6.1 +pydantic_core==2.41.5 +pycparser==2.23 +pycountry==24.6.1 +pybind11==3.0.1 +pyarrow==22.0.0 +psutil==7.1.3 +protobuf==6.33.0 +propcache==0.4.1 +prometheus_client==0.23.1 +platformdirs==4.5.0 +pillow==11.3.0 +pexpect==4.9.0 +pathvalidate==3.3.1 +pathspec==0.12.1 +pathable==0.4.4 +partial-json-parser==0.2.1.1.post6 +parso==0.8.5 +packaging==25.0 +orjson==3.11.4 +numpy==1.26.4 +ninja==1.13.0 +nest-asyncio==1.6.0 +mypy_extensions==1.1.0 +murmurhash==1.0.13 +multidict==6.7.0 +msgspec==0.19.0 +msgpack==1.1.2 +more-itertools==10.8.0 +mdurl==0.1.2 +marisa-trie==1.3.1 +llvmlite==0.43.0 +llguidance==0.7.30 +lark==1.2.2 +kiwisolver==1.4.9 +joblib==1.5.2 +jiter==0.11.1 +jeepney==0.9.0 +jaraco.context==6.0.1 +itsdangerous==2.2.0 +interegular==0.3.3 +idna==3.11 +humanfriendly==10.0 +httpx-sse==0.4.3 +httptools==0.7.1 +html2text==2025.4.15 +hf-xet==1.2.0 +h11==0.16.0 +frozenlist==1.8.0 +fonttools==4.60.1 +executing==2.2.1 +exceptiongroup==1.3.0 +eval_type_backport==0.2.2 +docutils==0.22.3 +docstring_parser==0.17.0 +dnspython==2.8.0 +distro==1.9.0 +diskcache==5.6.3 +dill==0.4.0 +decorator==5.2.1 +debugpy==1.8.17 +Cython==3.2.0 +cycler==0.12.1 +codetiming==1.4.0 +cloudpickle==3.1.2 +cloudpathlib==0.23.0 +click==8.2.1 +charset-normalizer==3.4.4 +certifi==2025.10.5 +catalogue==2.0.10 +cachetools==6.2.1 +blinker==1.9.0 +blake3==1.0.8 +beartype==0.22.5 +attrs==25.4.0 +asttokens==3.0.0 +astor==0.8.1 +annotated-types==0.7.0 +annotated-doc==0.0.3 +airportsdata==20250909 +aiohappyeyeballs==2.6.1 +yarl==1.22.0 +uvicorn==0.38.0 +typer-slim==0.20.0 +thefuzz==0.22.1 +stack-data==0.6.3 +srsly==2.5.1 +smart_open==7.4.4 +sentry-sdk==2.43.0 +scipy==1.16.3 +requests==2.32.5 +referencing==0.36.2 +rank-bm25==0.2.2 +python-dateutil==2.9.0.post0 +pydantic==2.12.4 +py-key-value-shared==0.2.8 +prompt_toolkit==3.0.52 +preshed==3.0.10 +opencv-python-headless==4.11.0.86 +omegaconf==2.3.0 +numba==0.60.0 +nltk==3.9.2 +multiprocess==0.70.18 +matplotlib-inline==0.2.1 +markdown-it-py==4.0.0 +language_data==1.3.0 +jedi==0.19.2 +jaraco.functools==4.3.0 +jaraco.classes==3.4.0 +ipython_pygments_lexers==1.1.1 +importlib_metadata==8.7.0 +ImageIO==2.37.2 +httpcore==1.0.9 +gymnasium==1.2.2 +gym==0.26.2 +gitdb==4.0.12 +gguf==0.10.0 +Flask==3.1.2 +faiss-cpu==1.12.0 +email-validator==2.3.0 +depyf==0.18.0 +cupy-cuda12x==13.6.0 +contourpy==1.3.3 +coloredlogs==15.0.1 +cffi==2.0.0 +blis==1.3.0 +black==25.9.0 +beautifulsoup4==4.14.2 +anyio==4.11.0 +aiosignal==1.4.0 +watchfiles==1.1.1 +tiktoken==0.12.0 +starlette==0.49.3 +sse-starlette==3.0.3 +scikit-learn==1.7.2 +rich==14.2.0 +pydantic-settings==2.11.0 +pydantic-extra-types==2.10.6 +py-key-value-aio==0.2.8 +pandas==2.3.3 +openapi-pydantic==0.5.1 +onnxruntime==1.23.2 +matplotlib==3.10.7 +lm-format-enforcer==0.10.12 +langcodes==3.5.0 +jsonschema-specifications==2025.9.1 +jsonschema-path==0.3.4 +ipython==9.7.0 +hydra-core==1.3.2 +huggingface-hub==0.36.0 +httpx==0.28.1 +gym-sokoban==0.0.6 +GitPython==3.1.45 +cryptography==46.0.3 +confection==0.1.5 +cleantext==1.1.4 +aiohttp==3.13.2 +xformers==0.0.29.post2 +weasel==0.4.2 +wandb==0.22.3 +typer==0.19.2 +torchvision==0.21.0 +torchdata==0.11.0 +torchaudio==2.6.0 +tokenizers==0.22.1 +thinc==8.3.7 +tensordict==0.8.3 +SecretStorage==3.4.0 +rich-toolkit==0.15.1 +rich-rst==1.3.2 +prometheus-fastapi-instrumentator==7.1.0 +openai==2.7.1 +jsonschema==4.25.1 +gdown==5.2.0 +fastapi==0.121.0 +Authlib==1.6.5 +anthropic==0.72.0 +accelerate==1.11.0 +transformers==4.57.1 +together==1.5.30 +spacy==3.8.7 +ray==2.51.1 +outlines_core==0.1.26 +mistral_common==1.8.5 +mcp==1.20.0 +keyring==25.6.0 +fastapi-cloud-cli==0.3.1 +fastapi-cli==0.0.14 +datasets==4.4.1 +cyclopts==4.2.1 +xgrammar==0.1.16 +peft==0.17.1 +outlines==0.1.11 +compressed-tensors==0.9.2 +fastmcp==2.13.0.2 +vllm==0.8.2 +pyserini==1.3.0 +typeguard==4.4.4 +shtab==1.7.2 +tyro==0.9.35 +tensorboard-data-server==0.7.2 +Markdown==3.10 +grpcio==1.76.0 +absl-py==2.3.1 +tensorboard==2.20.0 +ragen==0.1 +verl==0.2.0.dev0 +autocommand==2.2.2 +backports.tarfile==1.2.0 +importlib_metadata==8.0.0 +inflect==7.3.1 +jaraco.collections==5.1.0 +jaraco.context==5.3.0 +jaraco.functools==4.0.1 +jaraco.text==3.12.1 +more-itertools==10.3.0 +packaging==24.2 +platformdirs==4.2.2 +tomli==2.0.1 +typeguard==4.3.0 +typing_extensions==4.12.2 +wheel==0.45.1 +zipp==3.19.2 diff --git a/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/wandb-metadata.json b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/wandb-metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..a0a68300974490566343658370918b3d2fdf7df7 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/files/wandb-metadata.json @@ -0,0 +1,94 @@ +{ + "os": "Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.35", + "python": "CPython 3.12.12", + "startedAt": "2025-11-07T02:26:33.725426Z", + "args": [ + "--track", + "--wandb-project-name", + "ragen-bandit" + ], + "program": "/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/ppo_bandit.py", + "codePath": "cleanrl/ppo_bandit.py", + "codePathLocal": "ppo_bandit.py", + "git": { + "remote": "https://github.com/vwxyzjn/cleanrl.git", + "commit": "004f8a086a892a2a180f4dd332b90d83a968aa7a" + }, + "email": "haoyu-wa22@mails.tsinghua.edu.cn", + "root": "/mnt/general/wanghy/RAGEN/cleanrl/cleanrl", + "host": "pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0", + "executable": "/root/local/miniconda3/envs/ragen/bin/python", + "cpu_count": 64, + "cpu_count_logical": 128, + "gpu": "NVIDIA H100 80GB HBM3", + "gpu_count": 8, + "disk": { + "/": { + "total": "5153960755200", + "used": "30509887488" + } + }, + "memory": { + "total": "2163642122240" + }, + "gpu_nvidia": [ + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-35e2d43d-4067-82ce-90d4-def9e389bf28" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-af4135e3-88f2-e9ac-518d-502c75a85429" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-d7fdeeba-fe9b-ec03-d9f7-6724fe4266b5" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-ccc4f668-3882-5a8e-2c07-c5cd08f6f666" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-7b73c0cf-d3d5-e10c-7176-a43be1e41001" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-81b58d94-5d1f-8ec2-f9d2-fd56172ed177" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-03e8bc66-3b44-6794-49fd-5392fbdda6d1" + }, + { + "name": "NVIDIA H100 80GB HBM3", + "memoryTotal": "85520809984", + "cudaCores": 16896, + "architecture": "Hopper", + "uuid": "GPU-b7cf0ec6-7c29-1179-dceb-09565da51890" + } + ], + "cudaVersion": "12.4", + "writerId": "6ymqnqubvr99vvj2hajaxngee30bwzdk" +} \ No newline at end of file diff --git a/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/logs/debug-internal.log b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/logs/debug-internal.log new file mode 100644 index 0000000000000000000000000000000000000000..5e28ea16630fd2abc76166f3cd1260b94f794fb5 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/logs/debug-internal.log @@ -0,0 +1,225 @@ +{"time":"2025-11-07T10:26:33.988521172+08:00","level":"INFO","msg":"stream: starting","core version":"0.22.3"} +{"time":"2025-11-07T10:26:34.459274234+08:00","level":"INFO","msg":"stream: created new stream","id":"lu2iu68t"} +{"time":"2025-11-07T10:26:34.459631305+08:00","level":"INFO","msg":"handler: started","stream_id":"lu2iu68t"} +{"time":"2025-11-07T10:26:34.462877596+08:00","level":"INFO","msg":"stream: started","id":"lu2iu68t"} +{"time":"2025-11-07T10:26:34.462890194+08:00","level":"INFO","msg":"writer: started","stream_id":"lu2iu68t"} +{"time":"2025-11-07T10:26:34.462896873+08:00","level":"INFO","msg":"sender: started","stream_id":"lu2iu68t"} +{"time":"2025-11-07T10:26:34.849513804+08:00","level":"ERROR","msg":"git repo not found","error":"repository does not exist"} +{"time":"2025-11-07T10:26:44.983958473+08:00","level":"WARN","msg":"tensorboard: no root directory","error":"timed out after 10s"} +{"time":"2025-11-07T10:26:44.984581369+08:00","level":"INFO","msg":"tensorboard: tracking new log directory","rootDir":{},"logDir":"LocalOrCloudPath(LocalPath=\"/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/runs/Bandit__ppo_bandit__1__1762482386\")","namespace":""} +{"time":"2025-11-07T10:26:44.986307004+08:00","level":"INFO","msg":"tensorboard: saving file","fileLocation":"/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/runs/Bandit__ppo_bandit__1__1762482386/events.out.tfevents.1762482394.pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0.132004.0","runPath":"runs/Bandit__ppo_bandit__1__1762482386/events.out.tfevents.1762482394.pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0.132004.0"} +{"time":"2025-11-07T10:26:44.990870062+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":527} +{"time":"2025-11-07T10:26:44.990963594+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:26:49.995612799+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":595} +{"time":"2025-11-07T10:26:50.232894155+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":319} +{"time":"2025-11-07T10:26:55.002055348+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":966} +{"time":"2025-11-07T10:26:55.002149962+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:26:55.002562082+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":998} +{"time":"2025-11-07T10:26:55.009356397+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":285} +{"time":"2025-11-07T10:27:05.018193552+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":1664} +{"time":"2025-11-07T10:27:05.331667668+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":318} +{"time":"2025-11-07T10:27:10.031761756+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2307} +{"time":"2025-11-07T10:27:10.031836934+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:27:15.03775749+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2500} +{"time":"2025-11-07T10:27:15.037865133+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:27:15.038270114+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2532} +{"time":"2025-11-07T10:27:15.039543895+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":147} +{"time":"2025-11-07T10:27:20.044229233+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2730} +{"time":"2025-11-07T10:27:20.326495928+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":281} +{"time":"2025-11-07T10:27:25.050848255+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3097} +{"time":"2025-11-07T10:27:25.05091684+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:27:25.051418353+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3129} +{"time":"2025-11-07T10:27:25.053863604+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":249} +{"time":"2025-11-07T10:27:30.057397574+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3429} +{"time":"2025-11-07T10:27:30.057494707+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:27:30.057854865+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3461} +{"time":"2025-11-07T10:27:30.060495635+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":259} +{"time":"2025-11-07T10:27:35.07649203+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3797} +{"time":"2025-11-07T10:27:35.27622333+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":280} +{"time":"2025-11-07T10:27:40.083967862+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":4128} +{"time":"2025-11-07T10:27:40.084146434+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:27:40.084472099+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":4160} +{"time":"2025-11-07T10:27:40.086936595+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":286} +{"time":"2025-11-07T10:27:45.092861781+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":4496} +{"time":"2025-11-07T10:27:45.092928318+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:27:45.093417362+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":4528} +{"time":"2025-11-07T10:27:45.09732899+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":246} +{"time":"2025-11-07T10:27:50.100469955+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":4827} +{"time":"2025-11-07T10:27:50.339439289+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":320} +{"time":"2025-11-07T10:27:55.107527698+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":5203} +{"time":"2025-11-07T10:27:55.107591925+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:27:55.108033547+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":5235} +{"time":"2025-11-07T10:27:55.111821673+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":279} +{"time":"2025-11-07T10:28:05.122107602+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":5895} +{"time":"2025-11-07T10:28:05.236283223+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":318} +{"time":"2025-11-07T10:28:10.128830958+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":6266} +{"time":"2025-11-07T10:28:10.128925836+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:28:10.129460344+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":6298} +{"time":"2025-11-07T10:28:10.13199436+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":284} +{"time":"2025-11-07T10:28:15.137230668+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":6727} +{"time":"2025-11-07T10:28:15.137336027+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:28:15.137720284+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":6759} +{"time":"2025-11-07T10:28:15.138856926+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":151} +{"time":"2025-11-07T10:28:20.14295049+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":6962} +{"time":"2025-11-07T10:28:20.274436083+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":319} +{"time":"2025-11-07T10:28:25.152046634+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":7626} +{"time":"2025-11-07T10:28:25.15216733+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:28:30.161394355+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":7846} +{"time":"2025-11-07T10:28:30.161474969+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:28:30.161877754+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":7878} +{"time":"2025-11-07T10:28:30.163607669+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":100} +{"time":"2025-11-07T10:28:35.167466563+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":8031} +{"time":"2025-11-07T10:28:35.283489533+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":318} +{"time":"2025-11-07T10:28:40.174265357+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":8442} +{"time":"2025-11-07T10:28:40.174349051+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:28:40.174769736+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":8474} +{"time":"2025-11-07T10:28:40.178530405+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":244} +{"time":"2025-11-07T10:28:45.184290307+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":8866} +{"time":"2025-11-07T10:28:45.18446969+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:28:45.184790363+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":8898} +{"time":"2025-11-07T10:28:45.185974572+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":148} +{"time":"2025-11-07T10:28:50.190177678+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":9099} +{"time":"2025-11-07T10:28:50.309608655+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":318} +{"time":"2025-11-07T10:29:00.204935353+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":9859} +{"time":"2025-11-07T10:29:00.205034074+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:29:00.205462661+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":9891} +{"time":"2025-11-07T10:29:00.207011094+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":223} +{"time":"2025-11-07T10:29:05.21154651+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":10165} +{"time":"2025-11-07T10:29:05.253318623+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":320} +{"time":"2025-11-07T10:29:10.219829464+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":10551} +{"time":"2025-11-07T10:29:10.21991712+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:29:10.22034466+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":10583} +{"time":"2025-11-07T10:29:10.22287408+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":230} +{"time":"2025-11-07T10:29:15.228375922+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":11048} +{"time":"2025-11-07T10:29:15.228428694+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:29:15.228890991+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":11080} +{"time":"2025-11-07T10:29:15.230953936+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":102} +{"time":"2025-11-07T10:29:20.235020269+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":11233} +{"time":"2025-11-07T10:29:20.314026917+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":320} +{"time":"2025-11-07T10:29:25.24166487+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":11619} +{"time":"2025-11-07T10:29:25.241780056+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:29:25.242814382+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":11652} +{"time":"2025-11-07T10:29:25.246017883+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":270} +{"time":"2025-11-07T10:29:30.249524383+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":12023} +{"time":"2025-11-07T10:29:30.249602423+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:29:30.250043012+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":12055} +{"time":"2025-11-07T10:29:30.252450902+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":195} +{"time":"2025-11-07T10:29:35.256840642+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":12303} +{"time":"2025-11-07T10:29:35.273715662+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":318} +{"time":"2025-11-07T10:29:40.262878908+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":12672} +{"time":"2025-11-07T10:29:40.263010145+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:29:40.264085587+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":12705} +{"time":"2025-11-07T10:29:40.266025691+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":285} +{"time":"2025-11-07T10:29:45.27048696+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":13040} +{"time":"2025-11-07T10:29:45.270586377+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:29:45.270990672+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":13072} +{"time":"2025-11-07T10:29:45.27372833+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":246} +{"time":"2025-11-07T10:29:50.277657296+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":13371} +{"time":"2025-11-07T10:29:50.323990746+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":318} +{"time":"2025-11-07T10:30:00.289980525+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":14107} +{"time":"2025-11-07T10:30:00.290096526+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:30:00.290474489+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":14139} +{"time":"2025-11-07T10:30:00.293801683+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":247} +{"time":"2025-11-07T10:30:10.50009327+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":14924} +{"time":"2025-11-07T10:30:10.500155877+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:30:10.500665245+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":14956} +{"time":"2025-11-07T10:30:10.502914625+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":129} +{"time":"2025-11-07T10:30:15.507664487+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":15163} +{"time":"2025-11-07T10:30:15.50775712+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:30:15.508234394+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":15195} +{"time":"2025-11-07T10:30:15.510794899+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":259} +{"time":"2025-11-07T10:30:20.513938488+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":15507} +{"time":"2025-11-07T10:30:20.514102014+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:30:20.514489935+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":15539} +{"time":"2025-11-07T10:30:20.518286051+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":286} +{"time":"2025-11-07T10:30:30.529576756+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":16206} +{"time":"2025-11-07T10:30:30.529673928+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:30:30.530082694+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":16238} +{"time":"2025-11-07T10:30:30.532515502+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":284} +{"time":"2025-11-07T10:30:35.538915645+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":16805} +{"time":"2025-11-07T10:30:35.539012451+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:30:35.53942978+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":16837} +{"time":"2025-11-07T10:30:35.540269789+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":56} +{"time":"2025-11-07T10:30:40.544226242+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":16944} +{"time":"2025-11-07T10:30:40.544343441+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:30:40.544779826+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":16976} +{"time":"2025-11-07T10:30:40.548714455+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":286} +{"time":"2025-11-07T10:30:45.554068318+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":17393} +{"time":"2025-11-07T10:30:45.554160917+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:30:45.555212294+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":17426} +{"time":"2025-11-07T10:30:45.556956894+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":205} +{"time":"2025-11-07T10:30:50.564112084+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":17818} +{"time":"2025-11-07T10:30:50.564991459+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:30:50.567275445+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":17850} +{"time":"2025-11-07T10:30:50.568448329+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":111} +{"time":"2025-11-07T10:30:55.575175818+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":18012} +{"time":"2025-11-07T10:30:55.575313884+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:30:55.575718877+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":18044} +{"time":"2025-11-07T10:30:55.57816212+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":286} +{"time":"2025-11-07T10:31:00.582052443+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":18417} +{"time":"2025-11-07T10:31:00.582137728+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:31:00.582667455+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":18449} +{"time":"2025-11-07T10:31:00.585301219+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":250} +{"time":"2025-11-07T10:31:10.596861654+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":19363} +{"time":"2025-11-07T10:31:10.596914261+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:31:10.597466165+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":19395} +{"time":"2025-11-07T10:31:10.598123022+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":44} +{"time":"2025-11-07T10:31:20.610659076+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":19820} +{"time":"2025-11-07T10:31:20.610764714+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:31:20.611124722+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":19852} +{"time":"2025-11-07T10:31:20.613309934+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":286} +{"time":"2025-11-07T10:31:25.617061073+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":20198} +{"time":"2025-11-07T10:31:25.61719025+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:31:25.617706379+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":20230} +{"time":"2025-11-07T10:31:25.621751248+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":277} +{"time":"2025-11-07T10:31:35.641998758+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":20929} +{"time":"2025-11-07T10:31:35.64212159+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:31:35.642553825+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":20961} +{"time":"2025-11-07T10:31:35.645901846+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":245} +{"time":"2025-11-07T10:31:40.64944534+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":21257} +{"time":"2025-11-07T10:31:40.649572308+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:31:40.649925229+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":21289} +{"time":"2025-11-07T10:31:40.652748134+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":286} +{"time":"2025-11-07T10:31:45.656732285+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":21627} +{"time":"2025-11-07T10:31:45.656804166+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:31:45.657157332+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":21659} +{"time":"2025-11-07T10:31:45.659331659+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":285} +{"time":"2025-11-07T10:31:50.663524025+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":22068} +{"time":"2025-11-07T10:31:50.663644198+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:31:50.664544855+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":22101} +{"time":"2025-11-07T10:31:50.666148276+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":214} +{"time":"2025-11-07T10:31:55.670845697+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":22485} +{"time":"2025-11-07T10:31:55.670921361+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:31:55.671330596+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":22517} +{"time":"2025-11-07T10:31:55.673056616+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":126} +{"time":"2025-11-07T10:32:00.676947335+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":22694} +{"time":"2025-11-07T10:32:00.677057913+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:32:00.677427193+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":22726} +{"time":"2025-11-07T10:32:00.680283995+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":286} +{"time":"2025-11-07T10:32:05.683856877+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":23090} +{"time":"2025-11-07T10:32:05.68395789+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:32:05.684365549+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":23122} +{"time":"2025-11-07T10:32:05.688121324+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":261} +{"time":"2025-11-07T10:32:10.69230954+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":23483} +{"time":"2025-11-07T10:32:10.692383474+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:32:10.69277669+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":23515} +{"time":"2025-11-07T10:32:10.694559666+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":237} +{"time":"2025-11-07T10:32:15.698531312+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":23804} +{"time":"2025-11-07T10:32:15.698590195+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:32:15.699153865+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":23836} +{"time":"2025-11-07T10:32:15.70155554+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":285} +{"time":"2025-11-07T10:32:20.70670464+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":24213} +{"time":"2025-11-07T10:32:20.706773936+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:32:20.7071748+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":24245} +{"time":"2025-11-07T10:32:20.708921999+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":206} +{"time":"2025-11-07T10:32:25.715336191+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":24557} +{"time":"2025-11-07T10:32:25.715410672+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:32:25.715858076+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":24589} +{"time":"2025-11-07T10:32:25.718257413+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":231} +{"time":"2025-11-07T10:32:28.712161761+08:00","level":"INFO","msg":"stream: closing","id":"lu2iu68t"} +{"time":"2025-11-07T10:32:28.714878124+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":24866} +{"time":"2025-11-07T10:32:28.716691076+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":200} +{"time":"2025-11-07T10:32:30.640307526+08:00","level":"INFO","msg":"fileTransfer: Close: file transfer manager closed"} +{"time":"2025-11-07T10:32:31.028402195+08:00","level":"INFO","msg":"handler: closed","stream_id":"lu2iu68t"} +{"time":"2025-11-07T10:32:31.030068564+08:00","level":"INFO","msg":"sender: closed","stream_id":"lu2iu68t"} +{"time":"2025-11-07T10:32:31.030166843+08:00","level":"INFO","msg":"stream: closed","id":"lu2iu68t"} diff --git a/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/logs/debug.log b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/logs/debug.log new file mode 100644 index 0000000000000000000000000000000000000000..44b002b1a4fb8c521b8dfa08dc07cdf7a6c74612 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/logs/debug.log @@ -0,0 +1,24 @@ +2025-11-07 10:26:33,767 INFO MainThread:132004 [wandb_setup.py:_flush():81] Current SDK version is 0.22.3 +2025-11-07 10:26:33,768 INFO MainThread:132004 [wandb_setup.py:_flush():81] Configure stats pid to 132004 +2025-11-07 10:26:33,768 INFO MainThread:132004 [wandb_setup.py:_flush():81] Loading settings from /root/.config/wandb/settings +2025-11-07 10:26:33,768 INFO MainThread:132004 [wandb_setup.py:_flush():81] Loading settings from /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/settings +2025-11-07 10:26:33,768 INFO MainThread:132004 [wandb_setup.py:_flush():81] Loading settings from environment variables +2025-11-07 10:26:33,768 INFO MainThread:132004 [wandb_init.py:setup_run_log_directory():706] Logging user logs to /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/logs/debug.log +2025-11-07 10:26:33,769 INFO MainThread:132004 [wandb_init.py:setup_run_log_directory():707] Logging internal logs to /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/run-20251107_102633-lu2iu68t/logs/debug-internal.log +2025-11-07 10:26:33,770 INFO MainThread:132004 [wandb_init.py:init():833] calling init triggers +2025-11-07 10:26:33,770 INFO MainThread:132004 [wandb_init.py:init():838] wandb.init called with sweep_config: {} +config: {'exp_name': 'ppo_bandit', 'seed': 1, 'torch_deterministic': True, 'cuda': True, 'track': True, 'wandb_project_name': 'ragen-bandit', 'wandb_entity': None, 'capture_video': False, 'env_id': 'Bandit', 'total_timesteps': 10000000, 'learning_rate': 0.00025, 'num_envs': 32, 'num_steps': 512, 'anneal_lr': True, 'gamma': 0.99, 'gae_lambda': 0.95, 'num_minibatches': 4, 'update_epochs': 4, 'norm_adv': True, 'clip_coef': 0.2, 'clip_vloss': True, 'ent_coef': 0.01, 'vf_coef': 0.5, 'max_grad_norm': 0.5, 'target_kl': None, 'batch_size': 16384, 'minibatch_size': 4096, 'num_iterations': 610, '_wandb': {'code_path': 'code/cleanrl/ppo_bandit.py'}} +2025-11-07 10:26:33,770 INFO MainThread:132004 [wandb_init.py:init():881] starting backend +2025-11-07 10:26:33,976 INFO MainThread:132004 [wandb_init.py:init():884] sending inform_init request +2025-11-07 10:26:33,986 INFO MainThread:132004 [wandb_init.py:init():892] backend started and connected +2025-11-07 10:26:33,987 INFO MainThread:132004 [wandb_init.py:init():962] updated telemetry +2025-11-07 10:26:34,019 INFO MainThread:132004 [wandb_init.py:init():986] communicating run to backend with 90.0 second timeout +2025-11-07 10:26:34,837 INFO MainThread:132004 [wandb_init.py:init():1033] starting run threads in backend +2025-11-07 10:26:34,980 INFO MainThread:132004 [wandb_run.py:_console_start():2506] atexit reg +2025-11-07 10:26:34,980 INFO MainThread:132004 [wandb_run.py:_redirect():2354] redirect: wrap_raw +2025-11-07 10:26:34,980 INFO MainThread:132004 [wandb_run.py:_redirect():2423] Wrapping output streams. +2025-11-07 10:26:34,980 INFO MainThread:132004 [wandb_run.py:_redirect():2446] Redirects installed. +2025-11-07 10:26:34,982 INFO MainThread:132004 [wandb_init.py:init():1073] run started, returning control to user process +2025-11-07 10:26:34,983 INFO MainThread:132004 [wandb_run.py:_tensorboard_callback():1598] tensorboard callback: runs/Bandit__ppo_bandit__1__1762482386, True +2025-11-07 10:32:28,712 INFO wandb-AsyncioManager-main:132004 [service_client.py:_forward_responses():80] Reached EOF. +2025-11-07 10:32:28,712 INFO wandb-AsyncioManager-main:132004 [mailbox.py:close():137] Closing mailbox, abandoning 1 handles. diff --git a/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/files/requirements.txt b/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/files/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d592ae1a79f938781a73a558d1be3b4aa58e912 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/files/requirements.txt @@ -0,0 +1,305 @@ +ragen==0.1 +setuptools==80.9.0 +wheel==0.45.1 +pip==25.2 +zipp==3.23.0 +verl==0.2.0.dev0 +ragen==0.1 +triton==3.2.0 +nvidia-cusparselt-cu12==0.6.2 +mpmath==1.3.0 +typing_extensions==4.15.0 +sympy==1.13.1 +nvidia-nvtx-cu12==12.4.127 +nvidia-nvjitlink-cu12==12.4.127 +nvidia-nccl-cu12==2.21.5 +nvidia-curand-cu12==10.3.5.147 +nvidia-cufft-cu12==11.2.1.3 +nvidia-cuda-runtime-cu12==12.4.127 +nvidia-cuda-nvrtc-cu12==12.4.127 +nvidia-cuda-cupti-cu12==12.4.127 +nvidia-cublas-cu12==12.4.5.8 +networkx==3.5 +MarkupSafe==2.1.5 +fsspec==2025.9.0 +filelock==3.19.1 +nvidia-cusparse-cu12==12.3.1.170 +nvidia-cudnn-cu12==9.1.0.70 +Jinja2==3.1.6 +nvidia-cusolver-cu12==11.6.1.9 +torch==2.6.0+cu124 +einops==0.8.1 +flash_attn==2.7.4.post1 +pytz==2025.2 +pyperclip==1.11.0 +pylatexenc==2.10 +pyjnius==1.7.0 +py-cpuinfo==9.0.0 +pure_eval==0.2.3 +ptyprocess==0.7.0 +gym-notices==0.1.0 +flatbuffers==25.9.23 +fastrlock==0.8.3 +Farama-Notifications==0.0.4 +cymem==2.0.11 +antlr4-python3-runtime==4.9.3 +xxhash==3.6.0 +wrapt==2.0.0 +Werkzeug==3.1.3 +websockets==15.0.1 +wcwidth==0.2.14 +wasabi==1.1.3 +uvloop==0.22.1 +urllib3==2.5.0 +tzdata==2025.2 +typing-inspection==0.4.2 +traitlets==5.14.3 +tqdm==4.67.1 +threadpoolctl==3.6.0 +tabulate==0.9.0 +spacy-loggers==1.0.5 +spacy-legacy==3.0.12 +soupsieve==2.8 +sniffio==1.3.1 +smmap==5.0.2 +six==1.17.0 +shellingham==1.5.4 +sentencepiece==0.2.1 +safetensors==0.6.2 +rpds-py==0.28.0 +rignore==0.7.6 +regex==2025.11.3 +RapidFuzz==3.14.3 +pyzmq==27.1.0 +PyYAML==6.0.3 +pytokens==0.3.0 +python-multipart==0.0.20 +python-json-logger==4.0.0 +python-dotenv==1.2.1 +PySocks==1.7.1 +pyparsing==3.2.5 +PyJWT==2.10.1 +Pygments==2.19.2 +pygame==2.6.1 +pydantic_core==2.41.5 +pycparser==2.23 +pycountry==24.6.1 +pybind11==3.0.1 +pyarrow==22.0.0 +psutil==7.1.3 +protobuf==6.33.0 +propcache==0.4.1 +prometheus_client==0.23.1 +platformdirs==4.5.0 +pillow==11.3.0 +pexpect==4.9.0 +pathvalidate==3.3.1 +pathspec==0.12.1 +pathable==0.4.4 +partial-json-parser==0.2.1.1.post6 +parso==0.8.5 +packaging==25.0 +orjson==3.11.4 +numpy==1.26.4 +ninja==1.13.0 +nest-asyncio==1.6.0 +mypy_extensions==1.1.0 +murmurhash==1.0.13 +multidict==6.7.0 +msgspec==0.19.0 +msgpack==1.1.2 +more-itertools==10.8.0 +mdurl==0.1.2 +marisa-trie==1.3.1 +llvmlite==0.43.0 +llguidance==0.7.30 +lark==1.2.2 +kiwisolver==1.4.9 +joblib==1.5.2 +jiter==0.11.1 +jeepney==0.9.0 +jaraco.context==6.0.1 +itsdangerous==2.2.0 +interegular==0.3.3 +idna==3.11 +humanfriendly==10.0 +httpx-sse==0.4.3 +httptools==0.7.1 +html2text==2025.4.15 +hf-xet==1.2.0 +h11==0.16.0 +frozenlist==1.8.0 +fonttools==4.60.1 +executing==2.2.1 +exceptiongroup==1.3.0 +eval_type_backport==0.2.2 +docutils==0.22.3 +docstring_parser==0.17.0 +dnspython==2.8.0 +distro==1.9.0 +diskcache==5.6.3 +dill==0.4.0 +decorator==5.2.1 +debugpy==1.8.17 +Cython==3.2.0 +cycler==0.12.1 +codetiming==1.4.0 +cloudpickle==3.1.2 +cloudpathlib==0.23.0 +click==8.2.1 +charset-normalizer==3.4.4 +certifi==2025.10.5 +catalogue==2.0.10 +cachetools==6.2.1 +blinker==1.9.0 +blake3==1.0.8 +beartype==0.22.5 +attrs==25.4.0 +asttokens==3.0.0 +astor==0.8.1 +annotated-types==0.7.0 +annotated-doc==0.0.3 +airportsdata==20250909 +aiohappyeyeballs==2.6.1 +yarl==1.22.0 +uvicorn==0.38.0 +typer-slim==0.20.0 +thefuzz==0.22.1 +stack-data==0.6.3 +srsly==2.5.1 +smart_open==7.4.4 +sentry-sdk==2.43.0 +scipy==1.16.3 +requests==2.32.5 +referencing==0.36.2 +rank-bm25==0.2.2 +python-dateutil==2.9.0.post0 +pydantic==2.12.4 +py-key-value-shared==0.2.8 +prompt_toolkit==3.0.52 +preshed==3.0.10 +opencv-python-headless==4.11.0.86 +omegaconf==2.3.0 +numba==0.60.0 +nltk==3.9.2 +multiprocess==0.70.18 +matplotlib-inline==0.2.1 +markdown-it-py==4.0.0 +language_data==1.3.0 +jedi==0.19.2 +jaraco.functools==4.3.0 +jaraco.classes==3.4.0 +ipython_pygments_lexers==1.1.1 +importlib_metadata==8.7.0 +ImageIO==2.37.2 +httpcore==1.0.9 +gymnasium==1.2.2 +gym==0.26.2 +gitdb==4.0.12 +gguf==0.10.0 +Flask==3.1.2 +faiss-cpu==1.12.0 +email-validator==2.3.0 +depyf==0.18.0 +cupy-cuda12x==13.6.0 +contourpy==1.3.3 +coloredlogs==15.0.1 +cffi==2.0.0 +blis==1.3.0 +black==25.9.0 +beautifulsoup4==4.14.2 +anyio==4.11.0 +aiosignal==1.4.0 +watchfiles==1.1.1 +tiktoken==0.12.0 +starlette==0.49.3 +sse-starlette==3.0.3 +scikit-learn==1.7.2 +rich==14.2.0 +pydantic-settings==2.11.0 +pydantic-extra-types==2.10.6 +py-key-value-aio==0.2.8 +pandas==2.3.3 +openapi-pydantic==0.5.1 +onnxruntime==1.23.2 +matplotlib==3.10.7 +lm-format-enforcer==0.10.12 +langcodes==3.5.0 +jsonschema-specifications==2025.9.1 +jsonschema-path==0.3.4 +ipython==9.7.0 +hydra-core==1.3.2 +huggingface-hub==0.36.0 +httpx==0.28.1 +gym-sokoban==0.0.6 +GitPython==3.1.45 +cryptography==46.0.3 +confection==0.1.5 +cleantext==1.1.4 +aiohttp==3.13.2 +xformers==0.0.29.post2 +weasel==0.4.2 +wandb==0.22.3 +typer==0.19.2 +torchvision==0.21.0 +torchdata==0.11.0 +torchaudio==2.6.0 +tokenizers==0.22.1 +thinc==8.3.7 +tensordict==0.8.3 +SecretStorage==3.4.0 +rich-toolkit==0.15.1 +rich-rst==1.3.2 +prometheus-fastapi-instrumentator==7.1.0 +openai==2.7.1 +jsonschema==4.25.1 +gdown==5.2.0 +fastapi==0.121.0 +Authlib==1.6.5 +anthropic==0.72.0 +accelerate==1.11.0 +transformers==4.57.1 +together==1.5.30 +spacy==3.8.7 +ray==2.51.1 +outlines_core==0.1.26 +mistral_common==1.8.5 +mcp==1.20.0 +keyring==25.6.0 +fastapi-cloud-cli==0.3.1 +fastapi-cli==0.0.14 +datasets==4.4.1 +cyclopts==4.2.1 +xgrammar==0.1.16 +peft==0.17.1 +outlines==0.1.11 +compressed-tensors==0.9.2 +fastmcp==2.13.0.2 +vllm==0.8.2 +pyserini==1.3.0 +typeguard==4.4.4 +shtab==1.7.2 +tyro==0.9.35 +tensorboard-data-server==0.7.2 +Markdown==3.10 +grpcio==1.76.0 +absl-py==2.3.1 +tensorboard==2.20.0 +ragen==0.1 +verl==0.2.0.dev0 +autocommand==2.2.2 +backports.tarfile==1.2.0 +importlib_metadata==8.0.0 +inflect==7.3.1 +jaraco.collections==5.1.0 +jaraco.context==5.3.0 +jaraco.functools==4.0.1 +jaraco.text==3.12.1 +more-itertools==10.3.0 +packaging==24.2 +platformdirs==4.2.2 +tomli==2.0.1 +typeguard==4.3.0 +typing_extensions==4.12.2 +wheel==0.45.1 +zipp==3.19.2 diff --git a/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/files/wandb-summary.json b/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/files/wandb-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..5ea2bad7fb2ad5196b64d512b1ca083e4411b0f6 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/files/wandb-summary.json @@ -0,0 +1 @@ +{"losses/entropy":0.24892157,"charts/SPS":3573,"charts/learning_rate":2.5614753e-07,"_step":12687,"_wandb":{"runtime":281},"charts/avg_value":0.63738394,"_timestamp":1.762483093763157e+09,"losses/policy_loss":-1.9334257e-05,"charts/min_reward":0,"losses/approx_kl":2.8405339e-08,"_runtime":281,"global_step":999424,"losses/clipfrac":0,"losses/explained_variance":0.47075754,"losses/old_approx_kl":-1.279125e-05,"charts/max_reward":1,"charts/avg_reward":0.068359375,"losses/value_loss":0.044154726} \ No newline at end of file diff --git a/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/logs/debug-internal.log b/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/logs/debug-internal.log new file mode 100644 index 0000000000000000000000000000000000000000..6b5c1d6f2b98306e9794acbc6d18b76e56338c1a --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/logs/debug-internal.log @@ -0,0 +1,215 @@ +{"time":"2025-11-07T10:33:31.614061411+08:00","level":"INFO","msg":"stream: starting","core version":"0.22.3"} +{"time":"2025-11-07T10:33:31.984255546+08:00","level":"INFO","msg":"stream: created new stream","id":"e2e7wd2b"} +{"time":"2025-11-07T10:33:31.984490658+08:00","level":"INFO","msg":"handler: started","stream_id":"e2e7wd2b"} +{"time":"2025-11-07T10:33:31.987878921+08:00","level":"INFO","msg":"stream: started","id":"e2e7wd2b"} +{"time":"2025-11-07T10:33:31.987895518+08:00","level":"INFO","msg":"writer: started","stream_id":"e2e7wd2b"} +{"time":"2025-11-07T10:33:31.987900181+08:00","level":"INFO","msg":"sender: started","stream_id":"e2e7wd2b"} +{"time":"2025-11-07T10:33:32.409366358+08:00","level":"ERROR","msg":"git repo not found","error":"repository does not exist"} +{"time":"2025-11-07T10:33:42.545223339+08:00","level":"WARN","msg":"tensorboard: no root directory","error":"timed out after 10s"} +{"time":"2025-11-07T10:33:42.545754694+08:00","level":"INFO","msg":"tensorboard: tracking new log directory","rootDir":{},"logDir":"LocalOrCloudPath(LocalPath=\"/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/runs/FrozenLake__ppo_frozenlake__1__1762482804\")","namespace":""} +{"time":"2025-11-07T10:33:42.547582969+08:00","level":"INFO","msg":"tensorboard: saving file","fileLocation":"/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/runs/FrozenLake__ppo_frozenlake__1__1762482804/events.out.tfevents.1762482812.pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0.132354.0","runPath":"runs/FrozenLake__ppo_frozenlake__1__1762482804/events.out.tfevents.1762482812.pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0.132354.0"} +{"time":"2025-11-07T10:33:42.550551293+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":144} +{"time":"2025-11-07T10:33:42.550636768+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:33:42.55069706+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":176} +{"time":"2025-11-07T10:33:42.556834201+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":723} +{"time":"2025-11-07T10:33:47.562448213+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":1270} +{"time":"2025-11-07T10:33:47.811128663+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":671} +{"time":"2025-11-07T10:33:52.574443041+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2361} +{"time":"2025-11-07T10:33:52.574536664+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:33:52.57506063+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2393} +{"time":"2025-11-07T10:33:52.577088323+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":278} +{"time":"2025-11-07T10:33:57.586920766+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3222} +{"time":"2025-11-07T10:33:57.587008682+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:33:57.587517901+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3254} +{"time":"2025-11-07T10:33:57.588639877+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":120} +{"time":"2025-11-07T10:34:02.596123897+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3445} +{"time":"2025-11-07T10:34:02.852404015+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":671} +{"time":"2025-11-07T10:34:07.60408084+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":4214} +{"time":"2025-11-07T10:34:07.604176707+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:34:07.604622587+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":4246} +{"time":"2025-11-07T10:34:07.610388793+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":606} +{"time":"2025-11-07T10:34:12.617556092+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":5312} +{"time":"2025-11-07T10:34:12.617741948+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:34:12.618562139+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":5344} +{"time":"2025-11-07T10:34:12.620356592+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":246} +{"time":"2025-11-07T10:34:17.62454859+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":5661} +{"time":"2025-11-07T10:34:17.890320497+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":671} +{"time":"2025-11-07T10:34:22.636094998+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":6572} +{"time":"2025-11-07T10:34:22.636173084+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:34:22.636651662+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":6604} +{"time":"2025-11-07T10:34:22.639405547+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":464} +{"time":"2025-11-07T10:34:27.645638559+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":7137} +{"time":"2025-11-07T10:34:27.645753433+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:34:27.646109854+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":7169} +{"time":"2025-11-07T10:34:27.652363469+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":637} +{"time":"2025-11-07T10:34:32.681515613+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":7916} +{"time":"2025-11-07T10:34:32.915240594+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":673} +{"time":"2025-11-07T10:34:37.69085891+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":8827} +{"time":"2025-11-07T10:34:37.690946672+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:34:37.691338382+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":8859} +{"time":"2025-11-07T10:34:37.694474541+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":466} +{"time":"2025-11-07T10:34:42.70107648+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":9812} +{"time":"2025-11-07T10:34:42.70113031+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:34:42.70156025+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":9844} +{"time":"2025-11-07T10:34:42.703109465+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":219} +{"time":"2025-11-07T10:34:47.708115179+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":10131} +{"time":"2025-11-07T10:34:47.818784531+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":672} +{"time":"2025-11-07T10:34:52.7178812+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":11075} +{"time":"2025-11-07T10:34:52.717944337+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:34:52.718390497+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":11107} +{"time":"2025-11-07T10:34:52.722639082+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":434} +{"time":"2025-11-07T10:34:57.727392949+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":12009} +{"time":"2025-11-07T10:34:57.727469401+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:34:57.72793627+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":12041} +{"time":"2025-11-07T10:34:57.729845282+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":238} +{"time":"2025-11-07T10:35:02.734452342+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":12348} +{"time":"2025-11-07T10:35:02.87983679+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":671} +{"time":"2025-11-07T10:35:07.745676237+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":13086} +{"time":"2025-11-07T10:35:07.745797535+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:35:07.746314425+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":13118} +{"time":"2025-11-07T10:35:07.752368686+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":598} +{"time":"2025-11-07T10:35:12.757217156+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":13790} +{"time":"2025-11-07T10:35:12.757301003+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:35:12.758521266+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":13823} +{"time":"2025-11-07T10:35:12.763861607+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":607} +{"time":"2025-11-07T10:35:17.774861994+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":14515} +{"time":"2025-11-07T10:35:17.818026612+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":638} +{"time":"2025-11-07T10:35:22.783137701+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":15352} +{"time":"2025-11-07T10:35:22.783262767+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:35:22.783594236+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":15384} +{"time":"2025-11-07T10:35:22.78903687+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":466} +{"time":"2025-11-07T10:35:27.793419415+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":16054} +{"time":"2025-11-07T10:35:27.793474126+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:35:27.794054602+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":16086} +{"time":"2025-11-07T10:35:27.798455809+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":461} +{"time":"2025-11-07T10:35:32.802503923+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":16614} +{"time":"2025-11-07T10:35:32.890905379+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":632} +{"time":"2025-11-07T10:35:37.811947009+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":17422} +{"time":"2025-11-07T10:35:37.812001508+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:35:37.8129594+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":17455} +{"time":"2025-11-07T10:35:37.818115269+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":529} +{"time":"2025-11-07T10:35:42.821455742+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":18052} +{"time":"2025-11-07T10:35:42.821574802+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:35:42.822404969+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":18085} +{"time":"2025-11-07T10:35:42.827493199+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":596} +{"time":"2025-11-07T10:35:47.829869179+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":18750} +{"time":"2025-11-07T10:35:47.8300214+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:35:47.830472363+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":18782} +{"time":"2025-11-07T10:35:47.836490956+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":598} +{"time":"2025-11-07T10:35:52.838832173+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":19449} +{"time":"2025-11-07T10:35:52.838948252+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:35:52.839686209+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":19482} +{"time":"2025-11-07T10:35:52.845167183+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":636} +{"time":"2025-11-07T10:35:57.850237976+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":20234} +{"time":"2025-11-07T10:35:57.850307289+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:35:57.850722633+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":20266} +{"time":"2025-11-07T10:35:57.855770193+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":590} +{"time":"2025-11-07T10:36:02.861578838+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":21050} +{"time":"2025-11-07T10:36:02.861662775+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:36:02.862067037+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":21082} +{"time":"2025-11-07T10:36:02.866762453+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":473} +{"time":"2025-11-07T10:36:07.870746776+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":21663} +{"time":"2025-11-07T10:36:07.870846506+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:36:07.871280938+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":21695} +{"time":"2025-11-07T10:36:07.877814374+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":598} +{"time":"2025-11-07T10:36:12.882238564+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":22400} +{"time":"2025-11-07T10:36:12.882318668+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:36:12.882852217+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":22432} +{"time":"2025-11-07T10:36:12.888180029+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":558} +{"time":"2025-11-07T10:36:17.892127298+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":23072} +{"time":"2025-11-07T10:36:17.892204759+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:36:17.893317454+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":23105} +{"time":"2025-11-07T10:36:17.898573523+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":584} +{"time":"2025-11-07T10:36:22.902720548+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":23759} +{"time":"2025-11-07T10:36:22.908628832+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":668} +{"time":"2025-11-07T10:36:27.912557424+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":24495} +{"time":"2025-11-07T10:36:27.918401209+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":629} +{"time":"2025-11-07T10:36:32.9237659+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":25246} +{"time":"2025-11-07T10:36:32.923903707+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:36:32.924341981+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":25278} +{"time":"2025-11-07T10:36:32.927950632+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":545} +{"time":"2025-11-07T10:36:37.931818699+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":25899} +{"time":"2025-11-07T10:36:37.931931329+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:36:37.932441952+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":25931} +{"time":"2025-11-07T10:36:37.937479402+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":589} +{"time":"2025-11-07T10:36:42.941415016+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":26629} +{"time":"2025-11-07T10:36:42.941540111+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:36:42.94202926+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":26661} +{"time":"2025-11-07T10:36:42.945415017+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":570} +{"time":"2025-11-07T10:36:47.952442993+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":27309} +{"time":"2025-11-07T10:36:47.952576601+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:36:47.953668183+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":27342} +{"time":"2025-11-07T10:36:47.959317083+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":615} +{"time":"2025-11-07T10:36:52.962886709+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":28055} +{"time":"2025-11-07T10:36:52.962990505+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:36:52.963498877+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":28087} +{"time":"2025-11-07T10:36:52.969988279+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":567} +{"time":"2025-11-07T10:36:57.973769293+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":28793} +{"time":"2025-11-07T10:36:57.973877683+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:36:57.974266339+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":28825} +{"time":"2025-11-07T10:36:57.979357622+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":526} +{"time":"2025-11-07T10:37:02.983984785+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":29699} +{"time":"2025-11-07T10:37:02.984085119+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:02.984738027+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":29732} +{"time":"2025-11-07T10:37:02.988536482+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":359} +{"time":"2025-11-07T10:37:07.992552162+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":30158} +{"time":"2025-11-07T10:37:07.992641364+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:07.993144794+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":30190} +{"time":"2025-11-07T10:37:07.999768666+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":598} +{"time":"2025-11-07T10:37:13.003169537+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":30855} +{"time":"2025-11-07T10:37:13.003306029+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:13.020595078+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":30887} +{"time":"2025-11-07T10:37:13.026684616+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":598} +{"time":"2025-11-07T10:37:18.031472188+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":31625} +{"time":"2025-11-07T10:37:18.031549787+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:18.032131463+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":31657} +{"time":"2025-11-07T10:37:18.037060268+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":541} +{"time":"2025-11-07T10:37:23.047236833+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":32283} +{"time":"2025-11-07T10:37:23.04739144+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:23.047851158+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":32315} +{"time":"2025-11-07T10:37:23.053879662+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":607} +{"time":"2025-11-07T10:37:28.05709474+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":32990} +{"time":"2025-11-07T10:37:28.057182567+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:28.057616661+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":33022} +{"time":"2025-11-07T10:37:28.063515514+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":597} +{"time":"2025-11-07T10:37:33.067449513+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":33767} +{"time":"2025-11-07T10:37:33.067554161+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:33.067988265+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":33799} +{"time":"2025-11-07T10:37:33.073352637+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":519} +{"time":"2025-11-07T10:37:38.079532496+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":34571} +{"time":"2025-11-07T10:37:38.079665041+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:38.080211537+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":34603} +{"time":"2025-11-07T10:37:38.084573199+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":444} +{"time":"2025-11-07T10:37:43.091705653+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":35169} +{"time":"2025-11-07T10:37:43.091894152+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:43.092335781+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":35201} +{"time":"2025-11-07T10:37:43.098259744+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":552} +{"time":"2025-11-07T10:37:48.102251363+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":35823} +{"time":"2025-11-07T10:37:48.102370693+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:48.102926689+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":35855} +{"time":"2025-11-07T10:37:48.1081816+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":597} +{"time":"2025-11-07T10:37:53.115144307+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":36789} +{"time":"2025-11-07T10:37:53.115224588+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:53.115621649+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":36821} +{"time":"2025-11-07T10:37:53.118244946+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":328} +{"time":"2025-11-07T10:37:58.123271446+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":37217} +{"time":"2025-11-07T10:37:58.123403735+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:37:58.123799568+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":37249} +{"time":"2025-11-07T10:37:58.129687573+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":597} +{"time":"2025-11-07T10:38:03.136981758+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":38275} +{"time":"2025-11-07T10:38:03.139718906+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":270} +{"time":"2025-11-07T10:38:08.147352578+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":38933} +{"time":"2025-11-07T10:38:08.147441059+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:38:08.147893762+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":38965} +{"time":"2025-11-07T10:38:08.150157021+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":277} +{"time":"2025-11-07T10:38:13.154973622+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":39310} +{"time":"2025-11-07T10:38:13.155110147+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T10:38:13.155522998+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":39342} +{"time":"2025-11-07T10:38:13.161765885+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":597} +{"time":"2025-11-07T10:38:13.785119903+08:00","level":"INFO","msg":"stream: closing","id":"e2e7wd2b"} +{"time":"2025-11-07T10:38:13.788036429+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":39983} +{"time":"2025-11-07T10:38:13.789237148+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":79} +{"time":"2025-11-07T10:38:15.846666009+08:00","level":"INFO","msg":"fileTransfer: Close: file transfer manager closed"} +{"time":"2025-11-07T10:38:16.491451351+08:00","level":"INFO","msg":"handler: closed","stream_id":"e2e7wd2b"} +{"time":"2025-11-07T10:38:16.493970964+08:00","level":"INFO","msg":"sender: closed","stream_id":"e2e7wd2b"} +{"time":"2025-11-07T10:38:16.494069974+08:00","level":"INFO","msg":"stream: closed","id":"e2e7wd2b"} diff --git a/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/logs/debug.log b/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/logs/debug.log new file mode 100644 index 0000000000000000000000000000000000000000..9e4b0a1e79785333108b3f5c2d9b06526a743139 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/logs/debug.log @@ -0,0 +1,24 @@ +2025-11-07 10:33:31,391 INFO MainThread:132354 [wandb_setup.py:_flush():81] Current SDK version is 0.22.3 +2025-11-07 10:33:31,391 INFO MainThread:132354 [wandb_setup.py:_flush():81] Configure stats pid to 132354 +2025-11-07 10:33:31,392 INFO MainThread:132354 [wandb_setup.py:_flush():81] Loading settings from /root/.config/wandb/settings +2025-11-07 10:33:31,392 INFO MainThread:132354 [wandb_setup.py:_flush():81] Loading settings from /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/settings +2025-11-07 10:33:31,392 INFO MainThread:132354 [wandb_setup.py:_flush():81] Loading settings from environment variables +2025-11-07 10:33:31,392 INFO MainThread:132354 [wandb_init.py:setup_run_log_directory():706] Logging user logs to /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/logs/debug.log +2025-11-07 10:33:31,393 INFO MainThread:132354 [wandb_init.py:setup_run_log_directory():707] Logging internal logs to /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/run-20251107_103331-e2e7wd2b/logs/debug-internal.log +2025-11-07 10:33:31,394 INFO MainThread:132354 [wandb_init.py:init():833] calling init triggers +2025-11-07 10:33:31,394 INFO MainThread:132354 [wandb_init.py:init():838] wandb.init called with sweep_config: {} +config: {'exp_name': 'ppo_frozenlake', 'seed': 1, 'torch_deterministic': True, 'cuda': True, 'track': True, 'wandb_project_name': 'ragen-bandit', 'wandb_entity': None, 'capture_video': False, 'env_id': 'FrozenLake', 'total_timesteps': 1000000, 'learning_rate': 0.00025, 'num_envs': 8, 'num_steps': 128, 'anneal_lr': True, 'gamma': 0.99, 'gae_lambda': 0.95, 'num_minibatches': 4, 'update_epochs': 4, 'norm_adv': True, 'clip_coef': 0.2, 'clip_vloss': True, 'ent_coef': 0.01, 'vf_coef': 0.5, 'max_grad_norm': 0.5, 'target_kl': None, 'grid_size': 4, 'is_slippery': True, 'batch_size': 1024, 'minibatch_size': 256, 'num_iterations': 976, '_wandb': {'code_path': 'code/cleanrl/ppo_frozenlake.py'}} +2025-11-07 10:33:31,394 INFO MainThread:132354 [wandb_init.py:init():881] starting backend +2025-11-07 10:33:31,600 INFO MainThread:132354 [wandb_init.py:init():884] sending inform_init request +2025-11-07 10:33:31,611 INFO MainThread:132354 [wandb_init.py:init():892] backend started and connected +2025-11-07 10:33:31,612 INFO MainThread:132354 [wandb_init.py:init():962] updated telemetry +2025-11-07 10:33:31,657 INFO MainThread:132354 [wandb_init.py:init():986] communicating run to backend with 90.0 second timeout +2025-11-07 10:33:32,396 INFO MainThread:132354 [wandb_init.py:init():1033] starting run threads in backend +2025-11-07 10:33:32,541 INFO MainThread:132354 [wandb_run.py:_console_start():2506] atexit reg +2025-11-07 10:33:32,541 INFO MainThread:132354 [wandb_run.py:_redirect():2354] redirect: wrap_raw +2025-11-07 10:33:32,541 INFO MainThread:132354 [wandb_run.py:_redirect():2423] Wrapping output streams. +2025-11-07 10:33:32,542 INFO MainThread:132354 [wandb_run.py:_redirect():2446] Redirects installed. +2025-11-07 10:33:32,544 INFO MainThread:132354 [wandb_init.py:init():1073] run started, returning control to user process +2025-11-07 10:33:32,544 INFO MainThread:132354 [wandb_run.py:_tensorboard_callback():1598] tensorboard callback: runs/FrozenLake__ppo_frozenlake__1__1762482804, True +2025-11-07 10:38:13,785 INFO wandb-AsyncioManager-main:132354 [service_client.py:_forward_responses():80] Reached EOF. +2025-11-07 10:38:13,785 INFO wandb-AsyncioManager-main:132354 [mailbox.py:close():137] Closing mailbox, abandoning 1 handles. diff --git a/cleanrl/cleanrl/wandb/run-20251107_112647-9utis4xx/files/wandb-summary.json b/cleanrl/cleanrl/wandb/run-20251107_112647-9utis4xx/files/wandb-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..3e934fbe66c63b349c5526b2b80c1038f688ef08 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_112647-9utis4xx/files/wandb-summary.json @@ -0,0 +1 @@ +{"_runtime":10,"_wandb":{"runtime":10}} \ No newline at end of file diff --git a/cleanrl/cleanrl/wandb/run-20251107_112647-9utis4xx/logs/debug-internal.log b/cleanrl/cleanrl/wandb/run-20251107_112647-9utis4xx/logs/debug-internal.log new file mode 100644 index 0000000000000000000000000000000000000000..c73c2eef59109e581221f63a5bbd68444356c7ef --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_112647-9utis4xx/logs/debug-internal.log @@ -0,0 +1,15 @@ +{"time":"2025-11-07T11:26:47.408857285+08:00","level":"INFO","msg":"stream: starting","core version":"0.22.3"} +{"time":"2025-11-07T11:26:47.785862786+08:00","level":"INFO","msg":"stream: created new stream","id":"9utis4xx"} +{"time":"2025-11-07T11:26:47.7861195+08:00","level":"INFO","msg":"handler: started","stream_id":"9utis4xx"} +{"time":"2025-11-07T11:26:47.789374485+08:00","level":"INFO","msg":"stream: started","id":"9utis4xx"} +{"time":"2025-11-07T11:26:47.789386794+08:00","level":"INFO","msg":"writer: started","stream_id":"9utis4xx"} +{"time":"2025-11-07T11:26:47.789396256+08:00","level":"INFO","msg":"sender: started","stream_id":"9utis4xx"} +{"time":"2025-11-07T11:26:48.283337823+08:00","level":"ERROR","msg":"git repo not found","error":"repository does not exist"} +{"time":"2025-11-07T11:26:48.527340569+08:00","level":"INFO","msg":"stream: closing","id":"9utis4xx"} +{"time":"2025-11-07T11:26:58.418279955+08:00","level":"WARN","msg":"tensorboard: no root directory","error":"timed out after 10s"} +{"time":"2025-11-07T11:26:58.421915183+08:00","level":"INFO","msg":"tensorboard: tracking new log directory","rootDir":{},"logDir":"LocalOrCloudPath(LocalPath=\"/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/runs/Sokoban__ppo_sokoban__1__1762486000\")","namespace":""} +{"time":"2025-11-07T11:26:58.425154477+08:00","level":"INFO","msg":"tensorboard: saving file","fileLocation":"/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/runs/Sokoban__ppo_sokoban__1__1762486000/events.out.tfevents.1762486008.pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0.212707.0","runPath":"runs/Sokoban__ppo_sokoban__1__1762486000/events.out.tfevents.1762486008.pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0.212707.0"} +{"time":"2025-11-07T11:26:59.120221237+08:00","level":"INFO","msg":"fileTransfer: Close: file transfer manager closed"} +{"time":"2025-11-07T11:26:59.418043752+08:00","level":"INFO","msg":"handler: closed","stream_id":"9utis4xx"} +{"time":"2025-11-07T11:26:59.420537182+08:00","level":"INFO","msg":"sender: closed","stream_id":"9utis4xx"} +{"time":"2025-11-07T11:26:59.420626397+08:00","level":"INFO","msg":"stream: closed","id":"9utis4xx"} diff --git a/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/files/output.log b/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/files/output.log new file mode 100644 index 0000000000000000000000000000000000000000..6bf01b9841efdd131d27a14d467ebd9f79a7eef7 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/files/output.log @@ -0,0 +1,113 @@ +[ 0.2%] Iter 1/610 | SPS: 2969 | Reward: 0.031 | Value: 0.452 | VLoss: 0.0581 | PLoss: -0.0004 | Ent: 1.3845 +[ 0.3%] Iter 2/610 | SPS: 3156 | Reward: 0.031 | Value: 0.424 | VLoss: 0.0470 | PLoss: -0.0009 | Ent: 1.3818 +[ 0.5%] Iter 3/610 | SPS: 2981 | Reward: 0.030 | Value: 0.410 | VLoss: 0.0447 | PLoss: -0.0015 | Ent: 1.3800 +[ 0.7%] Iter 4/610 | SPS: 3308 | Reward: 0.031 | Value: 0.349 | VLoss: 0.0472 | PLoss: -0.0018 | Ent: 1.3813 +[ 0.8%] Iter 5/610 | SPS: 3194 | Reward: 0.028 | Value: 0.353 | VLoss: 0.0429 | PLoss: -0.0001 | Ent: 1.3836 +[ 1.0%] Iter 6/610 | SPS: 3252 | Reward: 0.028 | Value: 0.351 | VLoss: 0.0437 | PLoss: -0.0008 | Ent: 1.3848 +[ 1.1%] Iter 7/610 | SPS: 3521 | Reward: 0.030 | Value: 0.344 | VLoss: 0.0445 | PLoss: -0.0005 | Ent: 1.3844 +[ 1.3%] Iter 8/610 | SPS: 3629 | Reward: 0.032 | Value: 0.349 | VLoss: 0.0453 | PLoss: -0.0011 | Ent: 1.3828 +[ 1.5%] Iter 9/610 | SPS: 3651 | Reward: 0.031 | Value: 0.357 | VLoss: 0.0457 | PLoss: -0.0006 | Ent: 1.3818 +[ 1.6%] Iter 10/610 | SPS: 3663 | Reward: 0.029 | Value: 0.364 | VLoss: 0.0438 | PLoss: -0.0015 | Ent: 1.3807 +[ 1.8%] Iter 11/610 | SPS: 3661 | Reward: 0.030 | Value: 0.378 | VLoss: 0.0445 | PLoss: -0.0010 | Ent: 1.3734 +[ 2.0%] Iter 12/610 | SPS: 3624 | Reward: 0.034 | Value: 0.362 | VLoss: 0.0486 | PLoss: -0.0032 | Ent: 1.3547 +[ 2.1%] Iter 13/610 | SPS: 3578 | Reward: 0.030 | Value: 0.379 | VLoss: 0.0438 | PLoss: -0.0027 | Ent: 1.3387 +[ 2.3%] Iter 14/610 | SPS: 3558 | Reward: 0.034 | Value: 0.365 | VLoss: 0.0473 | PLoss: -0.0017 | Ent: 1.3347 +[ 2.5%] Iter 15/610 | SPS: 3539 | Reward: 0.032 | Value: 0.371 | VLoss: 0.0470 | PLoss: -0.0028 | Ent: 1.3035 +[ 2.6%] Iter 16/610 | SPS: 3523 | Reward: 0.029 | Value: 0.382 | VLoss: 0.0428 | PLoss: -0.0027 | Ent: 1.3432 +[ 2.8%] Iter 17/610 | SPS: 3517 | Reward: 0.033 | Value: 0.390 | VLoss: 0.0447 | PLoss: -0.0025 | Ent: 1.3308 +[ 3.0%] Iter 18/610 | SPS: 3453 | Reward: 0.034 | Value: 0.406 | VLoss: 0.0444 | PLoss: -0.0035 | Ent: 1.3329 +[ 3.1%] Iter 19/610 | SPS: 3294 | Reward: 0.034 | Value: 0.399 | VLoss: 0.0465 | PLoss: -0.0021 | Ent: 1.3239 +[ 3.3%] Iter 20/610 | SPS: 3162 | Reward: 0.035 | Value: 0.408 | VLoss: 0.0480 | PLoss: -0.0035 | Ent: 1.3201 +[ 3.4%] Iter 21/610 | SPS: 3052 | Reward: 0.038 | Value: 0.420 | VLoss: 0.0490 | PLoss: -0.0057 | Ent: 1.2753 +[ 3.6%] Iter 22/610 | SPS: 2958 | Reward: 0.038 | Value: 0.434 | VLoss: 0.0480 | PLoss: -0.0042 | Ent: 1.2446 +[ 3.8%] Iter 23/610 | SPS: 2878 | Reward: 0.035 | Value: 0.425 | VLoss: 0.0458 | PLoss: -0.0034 | Ent: 1.2134 +[ 3.9%] Iter 24/610 | SPS: 2808 | Reward: 0.037 | Value: 0.395 | VLoss: 0.0472 | PLoss: -0.0044 | Ent: 1.2284 +[ 4.1%] Iter 25/610 | SPS: 2746 | Reward: 0.039 | Value: 0.407 | VLoss: 0.0502 | PLoss: -0.0053 | Ent: 1.1897 +[ 4.3%] Iter 26/610 | SPS: 2691 | Reward: 0.042 | Value: 0.421 | VLoss: 0.0497 | PLoss: -0.0044 | Ent: 1.1790 +[ 4.4%] Iter 27/610 | SPS: 2643 | Reward: 0.041 | Value: 0.445 | VLoss: 0.0483 | PLoss: -0.0035 | Ent: 1.1575 +[ 4.6%] Iter 28/610 | SPS: 2599 | Reward: 0.042 | Value: 0.470 | VLoss: 0.0495 | PLoss: -0.0047 | Ent: 1.1303 +[ 4.8%] Iter 29/610 | SPS: 2559 | Reward: 0.046 | Value: 0.480 | VLoss: 0.0517 | PLoss: -0.0017 | Ent: 1.1191 +[ 4.9%] Iter 30/610 | SPS: 2523 | Reward: 0.047 | Value: 0.483 | VLoss: 0.0508 | PLoss: -0.0043 | Ent: 1.0895 +[ 5.1%] Iter 31/610 | SPS: 2491 | Reward: 0.045 | Value: 0.508 | VLoss: 0.0488 | PLoss: -0.0063 | Ent: 1.0355 +[ 5.2%] Iter 32/610 | SPS: 2461 | Reward: 0.044 | Value: 0.506 | VLoss: 0.0480 | PLoss: -0.0043 | Ent: 1.0273 +[ 5.4%] Iter 33/610 | SPS: 2434 | Reward: 0.045 | Value: 0.492 | VLoss: 0.0480 | PLoss: -0.0031 | Ent: 0.9835 +[ 5.6%] Iter 34/610 | SPS: 2408 | Reward: 0.046 | Value: 0.497 | VLoss: 0.0476 | PLoss: -0.0048 | Ent: 0.9524 +[ 5.7%] Iter 35/610 | SPS: 2436 | Reward: 0.047 | Value: 0.522 | VLoss: 0.0478 | PLoss: -0.0026 | Ent: 0.9470 +[ 5.9%] Iter 36/610 | SPS: 2478 | Reward: 0.048 | Value: 0.535 | VLoss: 0.0462 | PLoss: -0.0040 | Ent: 0.9404 +[ 6.1%] Iter 37/610 | SPS: 2503 | Reward: 0.049 | Value: 0.537 | VLoss: 0.0482 | PLoss: -0.0034 | Ent: 0.9172 +[ 6.2%] Iter 38/610 | SPS: 2526 | Reward: 0.051 | Value: 0.544 | VLoss: 0.0482 | PLoss: -0.0034 | Ent: 0.8812 +[ 6.4%] Iter 39/610 | SPS: 2546 | Reward: 0.050 | Value: 0.532 | VLoss: 0.0478 | PLoss: -0.0020 | Ent: 0.8758 +[ 6.6%] Iter 40/610 | SPS: 2556 | Reward: 0.049 | Value: 0.530 | VLoss: 0.0486 | PLoss: -0.0034 | Ent: 0.8411 +[ 6.7%] Iter 41/610 | SPS: 2569 | Reward: 0.052 | Value: 0.545 | VLoss: 0.0445 | PLoss: -0.0033 | Ent: 0.8379 +[ 6.9%] Iter 42/610 | SPS: 2582 | Reward: 0.049 | Value: 0.554 | VLoss: 0.0451 | PLoss: -0.0040 | Ent: 0.8258 +[ 7.0%] Iter 43/610 | SPS: 2616 | Reward: 0.052 | Value: 0.546 | VLoss: 0.0453 | PLoss: -0.0043 | Ent: 0.8102 +[ 7.2%] Iter 44/610 | SPS: 2643 | Reward: 0.050 | Value: 0.569 | VLoss: 0.0418 | PLoss: -0.0023 | Ent: 0.7770 +[ 7.4%] Iter 45/610 | SPS: 2650 | Reward: 0.050 | Value: 0.564 | VLoss: 0.0413 | PLoss: -0.0034 | Ent: 0.7727 +[ 7.5%] Iter 46/610 | SPS: 2659 | Reward: 0.048 | Value: 0.578 | VLoss: 0.0426 | PLoss: -0.0023 | Ent: 0.7614 +[ 7.7%] Iter 47/610 | SPS: 2686 | Reward: 0.051 | Value: 0.591 | VLoss: 0.0421 | PLoss: -0.0034 | Ent: 0.7443 +[ 7.9%] Iter 48/610 | SPS: 2703 | Reward: 0.052 | Value: 0.554 | VLoss: 0.0450 | PLoss: -0.0031 | Ent: 0.7543 +[ 8.0%] Iter 49/610 | SPS: 2718 | Reward: 0.052 | Value: 0.576 | VLoss: 0.0424 | PLoss: -0.0034 | Ent: 0.7374 +[ 8.2%] Iter 50/610 | SPS: 2723 | Reward: 0.052 | Value: 0.597 | VLoss: 0.0399 | PLoss: -0.0024 | Ent: 0.7337 +[ 8.4%] Iter 51/610 | SPS: 2730 | Reward: 0.055 | Value: 0.573 | VLoss: 0.0441 | PLoss: -0.0028 | Ent: 0.7120 +[ 8.5%] Iter 52/610 | SPS: 2733 | Reward: 0.054 | Value: 0.558 | VLoss: 0.0432 | PLoss: -0.0037 | Ent: 0.7162 +[ 8.7%] Iter 53/610 | SPS: 2706 | Reward: 0.054 | Value: 0.591 | VLoss: 0.0423 | PLoss: -0.0035 | Ent: 0.6823 +[ 8.9%] Iter 54/610 | SPS: 2681 | Reward: 0.056 | Value: 0.590 | VLoss: 0.0436 | PLoss: -0.0049 | Ent: 0.6676 +[ 9.0%] Iter 55/610 | SPS: 2657 | Reward: 0.053 | Value: 0.592 | VLoss: 0.0405 | PLoss: -0.0015 | Ent: 0.6676 +[ 9.2%] Iter 56/610 | SPS: 2634 | Reward: 0.058 | Value: 0.616 | VLoss: 0.0433 | PLoss: -0.0033 | Ent: 0.6467 +[ 9.3%] Iter 57/610 | SPS: 2612 | Reward: 0.058 | Value: 0.618 | VLoss: 0.0427 | PLoss: -0.0034 | Ent: 0.6535 +[ 9.5%] Iter 58/610 | SPS: 2592 | Reward: 0.053 | Value: 0.602 | VLoss: 0.0422 | PLoss: -0.0024 | Ent: 0.6411 +[ 9.7%] Iter 59/610 | SPS: 2572 | Reward: 0.054 | Value: 0.606 | VLoss: 0.0388 | PLoss: -0.0043 | Ent: 0.6400 +[ 9.8%] Iter 60/610 | SPS: 2554 | Reward: 0.055 | Value: 0.597 | VLoss: 0.0413 | PLoss: -0.0016 | Ent: 0.6419 +[ 10.0%] Iter 61/610 | SPS: 2536 | Reward: 0.057 | Value: 0.593 | VLoss: 0.0431 | PLoss: -0.0035 | Ent: 0.6297 +[ 10.2%] Iter 62/610 | SPS: 2519 | Reward: 0.054 | Value: 0.607 | VLoss: 0.0406 | PLoss: -0.0026 | Ent: 0.6072 +[ 10.3%] Iter 63/610 | SPS: 2503 | Reward: 0.052 | Value: 0.590 | VLoss: 0.0384 | PLoss: -0.0037 | Ent: 0.5959 +[ 10.5%] Iter 64/610 | SPS: 2487 | Reward: 0.061 | Value: 0.601 | VLoss: 0.0418 | PLoss: -0.0025 | Ent: 0.5980 +[ 10.7%] Iter 65/610 | SPS: 2473 | Reward: 0.058 | Value: 0.614 | VLoss: 0.0404 | PLoss: -0.0036 | Ent: 0.5794 +[ 10.8%] Iter 66/610 | SPS: 2458 | Reward: 0.061 | Value: 0.617 | VLoss: 0.0419 | PLoss: -0.0032 | Ent: 0.5619 +[ 11.0%] Iter 67/610 | SPS: 2445 | Reward: 0.055 | Value: 0.603 | VLoss: 0.0391 | PLoss: -0.0017 | Ent: 0.5527 +[ 11.1%] Iter 68/610 | SPS: 2432 | Reward: 0.058 | Value: 0.627 | VLoss: 0.0399 | PLoss: -0.0033 | Ent: 0.5474 +[ 11.3%] Iter 69/610 | SPS: 2419 | Reward: 0.055 | Value: 0.617 | VLoss: 0.0385 | PLoss: -0.0048 | Ent: 0.5250 +[ 11.5%] Iter 70/610 | SPS: 2407 | Reward: 0.058 | Value: 0.631 | VLoss: 0.0398 | PLoss: -0.0037 | Ent: 0.5213 +[ 11.6%] Iter 71/610 | SPS: 2408 | Reward: 0.057 | Value: 0.634 | VLoss: 0.0379 | PLoss: -0.0040 | Ent: 0.5129 +[ 11.8%] Iter 72/610 | SPS: 2426 | Reward: 0.055 | Value: 0.636 | VLoss: 0.0387 | PLoss: -0.0041 | Ent: 0.5090 +[ 12.0%] Iter 73/610 | SPS: 2431 | Reward: 0.058 | Value: 0.605 | VLoss: 0.0431 | PLoss: -0.0028 | Ent: 0.5213 +[ 12.1%] Iter 74/610 | SPS: 2442 | Reward: 0.055 | Value: 0.611 | VLoss: 0.0370 | PLoss: -0.0028 | Ent: 0.4909 +[ 12.3%] Iter 75/610 | SPS: 2458 | Reward: 0.053 | Value: 0.621 | VLoss: 0.0426 | PLoss: -0.0041 | Ent: 0.4855 +[ 12.5%] Iter 76/610 | SPS: 2470 | Reward: 0.056 | Value: 0.611 | VLoss: 0.0374 | PLoss: -0.0038 | Ent: 0.4799 +[ 12.6%] Iter 77/610 | SPS: 2477 | Reward: 0.056 | Value: 0.623 | VLoss: 0.0359 | PLoss: -0.0030 | Ent: 0.4851 +[ 12.8%] Iter 78/610 | SPS: 2488 | Reward: 0.060 | Value: 0.660 | VLoss: 0.0398 | PLoss: -0.0036 | Ent: 0.4659 +[ 13.0%] Iter 79/610 | SPS: 2484 | Reward: 0.054 | Value: 0.655 | VLoss: 0.0357 | PLoss: -0.0026 | Ent: 0.4619 +[ 13.1%] Iter 80/610 | SPS: 2472 | Reward: 0.059 | Value: 0.619 | VLoss: 0.0385 | PLoss: -0.0039 | Ent: 0.4868 +[ 13.3%] Iter 81/610 | SPS: 2469 | Reward: 0.061 | Value: 0.624 | VLoss: 0.0397 | PLoss: -0.0026 | Ent: 0.4633 +[ 13.4%] Iter 82/610 | SPS: 2484 | Reward: 0.063 | Value: 0.633 | VLoss: 0.0420 | PLoss: -0.0039 | Ent: 0.4571 +[ 13.6%] Iter 83/610 | SPS: 2487 | Reward: 0.058 | Value: 0.646 | VLoss: 0.0396 | PLoss: -0.0025 | Ent: 0.4559 +[ 13.8%] Iter 84/610 | SPS: 2496 | Reward: 0.061 | Value: 0.645 | VLoss: 0.0388 | PLoss: -0.0040 | Ent: 0.4552 +Traceback (most recent call last): + File "/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/ppo_frozenlake.py", line 224, in + next_obs, reward, terminations, truncations, infos = envs.step(action.cpu().numpy()) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/gymnasium/vector/sync_vector_env.py", line 265, in step + ) = self.envs[i].step(action) + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/gymnasium/wrappers/common.py", line 513, in step + obs, reward, terminated, truncated, info = super().step(action) + ^^^^^^^^^^^^^^^^^^^^ + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/gymnasium/core.py", line 327, in step + return self.env.step(action) + ^^^^^^^^^^^^^^^^^^^^^ + File "/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/ragen_wrappers.py", line 140, in step + text_obs, reward, done, info = self.env.step(ragen_action) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/../../ragen/env/frozen_lake/env.py", line 42, in step + next_obs = self.render() + ^^^^^^^^^^^^^ + File "/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/../../ragen/env/frozen_lake/env.py", line 57, in render + return '\n'.join(''.join(self.GRID_LOOKUP.get(cell, "?") for cell in row) for row in room) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/../../ragen/env/frozen_lake/env.py", line 57, in + return '\n'.join(''.join(self.GRID_LOOKUP.get(cell, "?") for cell in row) for row in room) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/../../ragen/env/frozen_lake/env.py", line 57, in + return '\n'.join(''.join(self.GRID_LOOKUP.get(cell, "?") for cell in row) for row in room) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +KeyboardInterrupt diff --git a/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/files/wandb-summary.json b/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/files/wandb-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..87c1235e0f880cab320205014de1d4601908ce9c --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/files/wandb-summary.json @@ -0,0 +1 @@ +{"charts/avg_reward":0.061462402,"losses/value_loss":0.038800143,"charts/avg_value":0.6450379,"losses/entropy":0.4552039,"charts/min_reward":0,"_runtime":552,"losses/old_approx_kl":0.002151668,"_step":1091,"_wandb":{"runtime":552},"charts/max_reward":1,"charts/SPS":2496,"losses/clipfrac":0.012161255,"global_step":1376256,"losses/approx_kl":0.0012194765,"losses/explained_variance":0.34000987,"_timestamp":1.762486697135544e+09,"charts/learning_rate":0.0002159836,"losses/policy_loss":-0.004004655} \ No newline at end of file diff --git a/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/logs/debug-internal.log b/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/logs/debug-internal.log new file mode 100644 index 0000000000000000000000000000000000000000..6275aa88707bccde57ddf9b8c5ca1ff2e22531e1 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/logs/debug-internal.log @@ -0,0 +1,61 @@ +{"time":"2025-11-07T11:29:03.809590629+08:00","level":"INFO","msg":"stream: starting","core version":"0.22.3"} +{"time":"2025-11-07T11:29:04.17891044+08:00","level":"INFO","msg":"stream: created new stream","id":"8xop3upl"} +{"time":"2025-11-07T11:29:04.179154693+08:00","level":"INFO","msg":"handler: started","stream_id":"8xop3upl"} +{"time":"2025-11-07T11:29:04.182809549+08:00","level":"INFO","msg":"stream: started","id":"8xop3upl"} +{"time":"2025-11-07T11:29:04.182826865+08:00","level":"INFO","msg":"writer: started","stream_id":"8xop3upl"} +{"time":"2025-11-07T11:29:04.182830482+08:00","level":"INFO","msg":"sender: started","stream_id":"8xop3upl"} +{"time":"2025-11-07T11:29:04.561507055+08:00","level":"ERROR","msg":"git repo not found","error":"repository does not exist"} +{"time":"2025-11-07T11:29:14.697521027+08:00","level":"WARN","msg":"tensorboard: no root directory","error":"timed out after 10s"} +{"time":"2025-11-07T11:29:14.699498441+08:00","level":"INFO","msg":"tensorboard: tracking new log directory","rootDir":{},"logDir":"LocalOrCloudPath(LocalPath=\"/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/runs/FrozenLake__ppo_frozenlake__1__1762486136\")","namespace":""} +{"time":"2025-11-07T11:29:14.702330111+08:00","level":"INFO","msg":"tensorboard: saving file","fileLocation":"/mnt/general/wanghy/RAGEN/cleanrl/cleanrl/runs/FrozenLake__ppo_frozenlake__1__1762486136/events.out.tfevents.1762486144.pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0.213027.0","runPath":"runs/FrozenLake__ppo_frozenlake__1__1762486136/events.out.tfevents.1762486144.pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0.213027.0"} +{"time":"2025-11-07T11:29:19.714087234+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":88} +{"time":"2025-11-07T11:29:20.046069837+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":6} +{"time":"2025-11-07T11:29:29.731549556+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":173} +{"time":"2025-11-07T11:29:29.73170942+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:29:34.741827173+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":213} +{"time":"2025-11-07T11:29:34.940387001+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":6} +{"time":"2025-11-07T11:29:39.749382062+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":263} +{"time":"2025-11-07T11:29:39.749551017+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:29:39.749993195+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":295} +{"time":"2025-11-07T11:29:39.751604253+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":6} +{"time":"2025-11-07T11:29:44.759731315+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":337} +{"time":"2025-11-07T11:29:44.759864472+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:29:49.770216089+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":379} +{"time":"2025-11-07T11:29:49.964405356+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":6} +{"time":"2025-11-07T11:30:04.802231794+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":504} +{"time":"2025-11-07T11:30:04.964986531+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":6} +{"time":"2025-11-07T11:30:19.832686975+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":629} +{"time":"2025-11-07T11:30:19.969389812+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":6} +{"time":"2025-11-07T11:30:34.863632824+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":754} +{"time":"2025-11-07T11:30:34.99163122+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":6} +{"time":"2025-11-07T11:30:44.880442978+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":796} +{"time":"2025-11-07T11:30:44.880515345+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:30:49.886783384+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":838} +{"time":"2025-11-07T11:30:50.053853179+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":6} +{"time":"2025-11-07T11:31:19.93192999+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":965} +{"time":"2025-11-07T11:31:19.95978197+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":6} +{"time":"2025-11-07T11:32:05.003752828+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":1176} +{"time":"2025-11-07T11:32:05.011888005+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":6} +{"time":"2025-11-07T11:32:15.019977901+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":1222} +{"time":"2025-11-07T11:32:15.02008222+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:33:40.173090751+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":1846} +{"time":"2025-11-07T11:33:40.173188566+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:34:20.257965996+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2181} +{"time":"2025-11-07T11:34:20.258025713+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:35:25.366060068+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2474} +{"time":"2025-11-07T11:35:25.366167371+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:36:30.460497096+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2769} +{"time":"2025-11-07T11:36:30.460618588+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:36:45.480377706+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":2853} +{"time":"2025-11-07T11:36:45.480526292+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:37:20.534469663+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3066} +{"time":"2025-11-07T11:37:20.53457352+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:37:30.54888915+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3148} +{"time":"2025-11-07T11:37:30.54905724+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":1} +{"time":"2025-11-07T11:37:30.550096767+08:00","level":"INFO","msg":"flowcontrol: backed up, offloading to disk","recordNumber":3181} +{"time":"2025-11-07T11:37:30.551104053+08:00","level":"INFO","msg":"flowcontrol: unblocked","totalOffloaded":11} +{"time":"2025-11-07T11:38:17.365980222+08:00","level":"INFO","msg":"stream: closing","id":"8xop3upl"} +{"time":"2025-11-07T11:38:18.37714031+08:00","level":"INFO","msg":"fileTransfer: Close: file transfer manager closed"} +{"time":"2025-11-07T11:38:18.683948729+08:00","level":"INFO","msg":"handler: closed","stream_id":"8xop3upl"} +{"time":"2025-11-07T11:38:18.686201474+08:00","level":"INFO","msg":"sender: closed","stream_id":"8xop3upl"} +{"time":"2025-11-07T11:38:18.68630277+08:00","level":"INFO","msg":"stream: closed","id":"8xop3upl"} diff --git a/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/logs/debug.log b/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/logs/debug.log new file mode 100644 index 0000000000000000000000000000000000000000..4db80240008d0a2e8ce74664b37388a59c483e11 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/logs/debug.log @@ -0,0 +1,362 @@ +2025-11-07 11:29:03,586 INFO MainThread:213027 [wandb_setup.py:_flush():81] Current SDK version is 0.22.3 +2025-11-07 11:29:03,586 INFO MainThread:213027 [wandb_setup.py:_flush():81] Configure stats pid to 213027 +2025-11-07 11:29:03,586 INFO MainThread:213027 [wandb_setup.py:_flush():81] Loading settings from /root/.config/wandb/settings +2025-11-07 11:29:03,587 INFO MainThread:213027 [wandb_setup.py:_flush():81] Loading settings from /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/settings +2025-11-07 11:29:03,587 INFO MainThread:213027 [wandb_setup.py:_flush():81] Loading settings from environment variables +2025-11-07 11:29:03,587 INFO MainThread:213027 [wandb_init.py:setup_run_log_directory():706] Logging user logs to /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/logs/debug.log +2025-11-07 11:29:03,587 INFO MainThread:213027 [wandb_init.py:setup_run_log_directory():707] Logging internal logs to /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/wandb/run-20251107_112903-8xop3upl/logs/debug-internal.log +2025-11-07 11:29:03,589 INFO MainThread:213027 [wandb_init.py:init():833] calling init triggers +2025-11-07 11:29:03,589 INFO MainThread:213027 [wandb_init.py:init():838] wandb.init called with sweep_config: {} +config: {'exp_name': 'ppo_frozenlake', 'seed': 1, 'torch_deterministic': True, 'cuda': True, 'track': True, 'wandb_project_name': 'ragen-bandit', 'wandb_entity': None, 'capture_video': False, 'env_id': 'FrozenLake', 'total_timesteps': 10000000, 'learning_rate': 0.00025, 'num_envs': 32, 'num_steps': 512, 'anneal_lr': True, 'gamma': 0.99, 'gae_lambda': 0.95, 'num_minibatches': 4, 'update_epochs': 4, 'norm_adv': True, 'clip_coef': 0.2, 'clip_vloss': True, 'ent_coef': 0.01, 'vf_coef': 0.5, 'max_grad_norm': 0.5, 'target_kl': None, 'grid_size': 4, 'is_slippery': True, 'batch_size': 16384, 'minibatch_size': 4096, 'num_iterations': 610, '_wandb': {'code_path': 'code/cleanrl/ppo_frozenlake.py'}} +2025-11-07 11:29:03,589 INFO MainThread:213027 [wandb_init.py:init():881] starting backend +2025-11-07 11:29:03,795 INFO MainThread:213027 [wandb_init.py:init():884] sending inform_init request +2025-11-07 11:29:03,807 INFO MainThread:213027 [wandb_init.py:init():892] backend started and connected +2025-11-07 11:29:03,808 INFO MainThread:213027 [wandb_init.py:init():962] updated telemetry +2025-11-07 11:29:03,841 INFO MainThread:213027 [wandb_init.py:init():986] communicating run to backend with 90.0 second timeout +2025-11-07 11:29:04,549 INFO MainThread:213027 [wandb_init.py:init():1033] starting run threads in backend +2025-11-07 11:29:04,693 INFO MainThread:213027 [wandb_run.py:_console_start():2506] atexit reg +2025-11-07 11:29:04,693 INFO MainThread:213027 [wandb_run.py:_redirect():2354] redirect: wrap_raw +2025-11-07 11:29:04,694 INFO MainThread:213027 [wandb_run.py:_redirect():2423] Wrapping output streams. +2025-11-07 11:29:04,694 INFO MainThread:213027 [wandb_run.py:_redirect():2446] Redirects installed. +2025-11-07 11:29:04,696 INFO MainThread:213027 [wandb_init.py:init():1073] run started, returning control to user process +2025-11-07 11:29:04,696 INFO MainThread:213027 [wandb_run.py:_tensorboard_callback():1598] tensorboard callback: runs/FrozenLake__ppo_frozenlake__1__1762486136, True +2025-11-07 11:38:17,366 INFO wandb-AsyncioManager-main:213027 [service_client.py:_forward_responses():80] Reached EOF. +2025-11-07 11:38:17,366 INFO wandb-AsyncioManager-main:213027 [mailbox.py:close():137] Closing mailbox, abandoning 1 handles. +2025-11-07 11:38:17,715 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,718 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,719 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,719 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,720 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,726 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,727 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,728 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,728 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,728 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,729 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,729 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,730 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,730 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,730 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,731 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,731 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,731 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,732 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,733 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,733 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,734 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,735 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,736 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,738 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost +2025-11-07 11:38:17,739 ERROR wandb-AsyncioManager-main:213027 [asyncio_manager.py:fn_wrap_exceptions():183] Uncaught exception in run_soon callback. +Traceback (most recent call last): + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/asyncio_manager.py", line 181, in fn_wrap_exceptions + await fn() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 38, in publish + await self._send_server_request(request) + File "/root/local/miniconda3/envs/ragen/lib/python3.12/site-packages/wandb/sdk/lib/service/service_client.py", line 64, in _send_server_request + await self._writer.drain() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 392, in drain + await self._protocol._drain_helper() + File "/root/local/miniconda3/envs/ragen/lib/python3.12/asyncio/streams.py", line 166, in _drain_helper + raise ConnectionResetError('Connection lost') +ConnectionResetError: Connection lost diff --git a/cleanrl/cleanrl/wandb/run-20251107_113856-k31oio6c/files/config.yaml b/cleanrl/cleanrl/wandb/run-20251107_113856-k31oio6c/files/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7429c723baedfec8995361d7bf30291a7ca029f3 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_113856-k31oio6c/files/config.yaml @@ -0,0 +1,157 @@ +_wandb: + value: + cli_version: 0.22.3 + code_path: code/cleanrl/ppo_frozenlake.py + e: + qcnee8s40otwmmxavjc9wsiwf1cq85oc: + args: + - --track + - --wandb-project-name + - ragen-bandit + codePath: cleanrl/ppo_frozenlake.py + codePathLocal: ppo_frozenlake.py + cpu_count: 64 + cpu_count_logical: 128 + cudaVersion: "12.4" + disk: + /: + total: "5153960755200" + used: "31684485120" + email: haoyu-wa22@mails.tsinghua.edu.cn + executable: /root/local/miniconda3/envs/ragen/bin/python + git: + commit: 004f8a086a892a2a180f4dd332b90d83a968aa7a + remote: https://github.com/vwxyzjn/cleanrl.git + gpu: NVIDIA H100 80GB HBM3 + gpu_count: 8 + gpu_nvidia: + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-35e2d43d-4067-82ce-90d4-def9e389bf28 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-af4135e3-88f2-e9ac-518d-502c75a85429 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-d7fdeeba-fe9b-ec03-d9f7-6724fe4266b5 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-ccc4f668-3882-5a8e-2c07-c5cd08f6f666 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-7b73c0cf-d3d5-e10c-7176-a43be1e41001 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-81b58d94-5d1f-8ec2-f9d2-fd56172ed177 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-03e8bc66-3b44-6794-49fd-5392fbdda6d1 + - architecture: Hopper + cudaCores: 16896 + memoryTotal: "85520809984" + name: NVIDIA H100 80GB HBM3 + uuid: GPU-b7cf0ec6-7c29-1179-dceb-09565da51890 + host: pt-4d654cf4576f4d23ad3d3919f12932fe-worker-0 + memory: + total: "2163642122240" + os: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.35 + program: /mnt/general/wanghy/RAGEN/cleanrl/cleanrl/ppo_frozenlake.py + python: CPython 3.12.12 + root: /mnt/general/wanghy/RAGEN/cleanrl/cleanrl + startedAt: "2025-11-07T03:38:56.139668Z" + writerId: qcnee8s40otwmmxavjc9wsiwf1cq85oc + m: [] + python_version: 3.12.12 + t: + "1": + - 1 + - 49 + - 51 + - 105 + "2": + - 1 + - 49 + - 51 + - 105 + "3": + - 13 + - 16 + - 35 + "4": 3.12.12 + "5": 0.22.3 + "12": 0.22.3 + "13": linux-x86_64 +anneal_lr: + value: true +batch_size: + value: 1024 +capture_video: + value: false +clip_coef: + value: 0.2 +clip_vloss: + value: true +cuda: + value: true +ent_coef: + value: 0.01 +env_id: + value: FrozenLake +exp_name: + value: ppo_frozenlake +gae_lambda: + value: 0.95 +gamma: + value: 0.99 +grid_size: + value: 4 +is_slippery: + value: true +learning_rate: + value: 0.00025 +max_grad_norm: + value: 0.5 +minibatch_size: + value: 256 +norm_adv: + value: true +num_envs: + value: 8 +num_iterations: + value: 9765 +num_minibatches: + value: 4 +num_steps: + value: 128 +seed: + value: 1 +target_kl: + value: null +torch_deterministic: + value: true +total_timesteps: + value: 10000000 +track: + value: true +update_epochs: + value: 4 +vf_coef: + value: 0.5 +wandb_entity: + value: null +wandb_project_name: + value: ragen-bandit diff --git a/cleanrl/cleanrl/wandb/run-20251107_113856-k31oio6c/files/requirements.txt b/cleanrl/cleanrl/wandb/run-20251107_113856-k31oio6c/files/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d592ae1a79f938781a73a558d1be3b4aa58e912 --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_113856-k31oio6c/files/requirements.txt @@ -0,0 +1,305 @@ +ragen==0.1 +setuptools==80.9.0 +wheel==0.45.1 +pip==25.2 +zipp==3.23.0 +verl==0.2.0.dev0 +ragen==0.1 +triton==3.2.0 +nvidia-cusparselt-cu12==0.6.2 +mpmath==1.3.0 +typing_extensions==4.15.0 +sympy==1.13.1 +nvidia-nvtx-cu12==12.4.127 +nvidia-nvjitlink-cu12==12.4.127 +nvidia-nccl-cu12==2.21.5 +nvidia-curand-cu12==10.3.5.147 +nvidia-cufft-cu12==11.2.1.3 +nvidia-cuda-runtime-cu12==12.4.127 +nvidia-cuda-nvrtc-cu12==12.4.127 +nvidia-cuda-cupti-cu12==12.4.127 +nvidia-cublas-cu12==12.4.5.8 +networkx==3.5 +MarkupSafe==2.1.5 +fsspec==2025.9.0 +filelock==3.19.1 +nvidia-cusparse-cu12==12.3.1.170 +nvidia-cudnn-cu12==9.1.0.70 +Jinja2==3.1.6 +nvidia-cusolver-cu12==11.6.1.9 +torch==2.6.0+cu124 +einops==0.8.1 +flash_attn==2.7.4.post1 +pytz==2025.2 +pyperclip==1.11.0 +pylatexenc==2.10 +pyjnius==1.7.0 +py-cpuinfo==9.0.0 +pure_eval==0.2.3 +ptyprocess==0.7.0 +gym-notices==0.1.0 +flatbuffers==25.9.23 +fastrlock==0.8.3 +Farama-Notifications==0.0.4 +cymem==2.0.11 +antlr4-python3-runtime==4.9.3 +xxhash==3.6.0 +wrapt==2.0.0 +Werkzeug==3.1.3 +websockets==15.0.1 +wcwidth==0.2.14 +wasabi==1.1.3 +uvloop==0.22.1 +urllib3==2.5.0 +tzdata==2025.2 +typing-inspection==0.4.2 +traitlets==5.14.3 +tqdm==4.67.1 +threadpoolctl==3.6.0 +tabulate==0.9.0 +spacy-loggers==1.0.5 +spacy-legacy==3.0.12 +soupsieve==2.8 +sniffio==1.3.1 +smmap==5.0.2 +six==1.17.0 +shellingham==1.5.4 +sentencepiece==0.2.1 +safetensors==0.6.2 +rpds-py==0.28.0 +rignore==0.7.6 +regex==2025.11.3 +RapidFuzz==3.14.3 +pyzmq==27.1.0 +PyYAML==6.0.3 +pytokens==0.3.0 +python-multipart==0.0.20 +python-json-logger==4.0.0 +python-dotenv==1.2.1 +PySocks==1.7.1 +pyparsing==3.2.5 +PyJWT==2.10.1 +Pygments==2.19.2 +pygame==2.6.1 +pydantic_core==2.41.5 +pycparser==2.23 +pycountry==24.6.1 +pybind11==3.0.1 +pyarrow==22.0.0 +psutil==7.1.3 +protobuf==6.33.0 +propcache==0.4.1 +prometheus_client==0.23.1 +platformdirs==4.5.0 +pillow==11.3.0 +pexpect==4.9.0 +pathvalidate==3.3.1 +pathspec==0.12.1 +pathable==0.4.4 +partial-json-parser==0.2.1.1.post6 +parso==0.8.5 +packaging==25.0 +orjson==3.11.4 +numpy==1.26.4 +ninja==1.13.0 +nest-asyncio==1.6.0 +mypy_extensions==1.1.0 +murmurhash==1.0.13 +multidict==6.7.0 +msgspec==0.19.0 +msgpack==1.1.2 +more-itertools==10.8.0 +mdurl==0.1.2 +marisa-trie==1.3.1 +llvmlite==0.43.0 +llguidance==0.7.30 +lark==1.2.2 +kiwisolver==1.4.9 +joblib==1.5.2 +jiter==0.11.1 +jeepney==0.9.0 +jaraco.context==6.0.1 +itsdangerous==2.2.0 +interegular==0.3.3 +idna==3.11 +humanfriendly==10.0 +httpx-sse==0.4.3 +httptools==0.7.1 +html2text==2025.4.15 +hf-xet==1.2.0 +h11==0.16.0 +frozenlist==1.8.0 +fonttools==4.60.1 +executing==2.2.1 +exceptiongroup==1.3.0 +eval_type_backport==0.2.2 +docutils==0.22.3 +docstring_parser==0.17.0 +dnspython==2.8.0 +distro==1.9.0 +diskcache==5.6.3 +dill==0.4.0 +decorator==5.2.1 +debugpy==1.8.17 +Cython==3.2.0 +cycler==0.12.1 +codetiming==1.4.0 +cloudpickle==3.1.2 +cloudpathlib==0.23.0 +click==8.2.1 +charset-normalizer==3.4.4 +certifi==2025.10.5 +catalogue==2.0.10 +cachetools==6.2.1 +blinker==1.9.0 +blake3==1.0.8 +beartype==0.22.5 +attrs==25.4.0 +asttokens==3.0.0 +astor==0.8.1 +annotated-types==0.7.0 +annotated-doc==0.0.3 +airportsdata==20250909 +aiohappyeyeballs==2.6.1 +yarl==1.22.0 +uvicorn==0.38.0 +typer-slim==0.20.0 +thefuzz==0.22.1 +stack-data==0.6.3 +srsly==2.5.1 +smart_open==7.4.4 +sentry-sdk==2.43.0 +scipy==1.16.3 +requests==2.32.5 +referencing==0.36.2 +rank-bm25==0.2.2 +python-dateutil==2.9.0.post0 +pydantic==2.12.4 +py-key-value-shared==0.2.8 +prompt_toolkit==3.0.52 +preshed==3.0.10 +opencv-python-headless==4.11.0.86 +omegaconf==2.3.0 +numba==0.60.0 +nltk==3.9.2 +multiprocess==0.70.18 +matplotlib-inline==0.2.1 +markdown-it-py==4.0.0 +language_data==1.3.0 +jedi==0.19.2 +jaraco.functools==4.3.0 +jaraco.classes==3.4.0 +ipython_pygments_lexers==1.1.1 +importlib_metadata==8.7.0 +ImageIO==2.37.2 +httpcore==1.0.9 +gymnasium==1.2.2 +gym==0.26.2 +gitdb==4.0.12 +gguf==0.10.0 +Flask==3.1.2 +faiss-cpu==1.12.0 +email-validator==2.3.0 +depyf==0.18.0 +cupy-cuda12x==13.6.0 +contourpy==1.3.3 +coloredlogs==15.0.1 +cffi==2.0.0 +blis==1.3.0 +black==25.9.0 +beautifulsoup4==4.14.2 +anyio==4.11.0 +aiosignal==1.4.0 +watchfiles==1.1.1 +tiktoken==0.12.0 +starlette==0.49.3 +sse-starlette==3.0.3 +scikit-learn==1.7.2 +rich==14.2.0 +pydantic-settings==2.11.0 +pydantic-extra-types==2.10.6 +py-key-value-aio==0.2.8 +pandas==2.3.3 +openapi-pydantic==0.5.1 +onnxruntime==1.23.2 +matplotlib==3.10.7 +lm-format-enforcer==0.10.12 +langcodes==3.5.0 +jsonschema-specifications==2025.9.1 +jsonschema-path==0.3.4 +ipython==9.7.0 +hydra-core==1.3.2 +huggingface-hub==0.36.0 +httpx==0.28.1 +gym-sokoban==0.0.6 +GitPython==3.1.45 +cryptography==46.0.3 +confection==0.1.5 +cleantext==1.1.4 +aiohttp==3.13.2 +xformers==0.0.29.post2 +weasel==0.4.2 +wandb==0.22.3 +typer==0.19.2 +torchvision==0.21.0 +torchdata==0.11.0 +torchaudio==2.6.0 +tokenizers==0.22.1 +thinc==8.3.7 +tensordict==0.8.3 +SecretStorage==3.4.0 +rich-toolkit==0.15.1 +rich-rst==1.3.2 +prometheus-fastapi-instrumentator==7.1.0 +openai==2.7.1 +jsonschema==4.25.1 +gdown==5.2.0 +fastapi==0.121.0 +Authlib==1.6.5 +anthropic==0.72.0 +accelerate==1.11.0 +transformers==4.57.1 +together==1.5.30 +spacy==3.8.7 +ray==2.51.1 +outlines_core==0.1.26 +mistral_common==1.8.5 +mcp==1.20.0 +keyring==25.6.0 +fastapi-cloud-cli==0.3.1 +fastapi-cli==0.0.14 +datasets==4.4.1 +cyclopts==4.2.1 +xgrammar==0.1.16 +peft==0.17.1 +outlines==0.1.11 +compressed-tensors==0.9.2 +fastmcp==2.13.0.2 +vllm==0.8.2 +pyserini==1.3.0 +typeguard==4.4.4 +shtab==1.7.2 +tyro==0.9.35 +tensorboard-data-server==0.7.2 +Markdown==3.10 +grpcio==1.76.0 +absl-py==2.3.1 +tensorboard==2.20.0 +ragen==0.1 +verl==0.2.0.dev0 +autocommand==2.2.2 +backports.tarfile==1.2.0 +importlib_metadata==8.0.0 +inflect==7.3.1 +jaraco.collections==5.1.0 +jaraco.context==5.3.0 +jaraco.functools==4.0.1 +jaraco.text==3.12.1 +more-itertools==10.3.0 +packaging==24.2 +platformdirs==4.2.2 +tomli==2.0.1 +typeguard==4.3.0 +typing_extensions==4.12.2 +wheel==0.45.1 +zipp==3.19.2 diff --git a/cleanrl/cleanrl/wandb/run-20251107_113856-k31oio6c/files/wandb-summary.json b/cleanrl/cleanrl/wandb/run-20251107_113856-k31oio6c/files/wandb-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..c2046decc8162a79473c0c8114174819a19e538f --- /dev/null +++ b/cleanrl/cleanrl/wandb/run-20251107_113856-k31oio6c/files/wandb-summary.json @@ -0,0 +1 @@ +{"losses/approx_kl":4.1909516e-09,"charts/min_reward":0,"losses/entropy":0.2403829,"charts/SPS":2787,"global_step":9999360,"_runtime":3588,"losses/clipfrac":0,"losses/old_approx_kl":-4.4368207e-06,"_wandb":{"runtime":3588},"losses/policy_loss":3.1143427e-06,"charts/max_reward":1,"_step":126944,"charts/learning_rate":2.5601638e-08,"losses/value_loss":0.026815543,"charts/avg_value":0.65406764,"losses/explained_variance":0.5147529,"charts/avg_reward":0.046875,"_timestamp":1.7624903255233564e+09} \ No newline at end of file diff --git a/cleanrl/cleanrl/wandb/run-20251107_125210-py6fnjml/run-py6fnjml.wandb b/cleanrl/cleanrl/wandb/run-20251107_125210-py6fnjml/run-py6fnjml.wandb new file mode 100644 index 0000000000000000000000000000000000000000..2ffc9d620b13c610cd5e16876efa7192b219d8e4 Binary files /dev/null and b/cleanrl/cleanrl/wandb/run-20251107_125210-py6fnjml/run-py6fnjml.wandb differ diff --git a/cleanrl/tuner_example.py b/cleanrl/tuner_example.py new file mode 100644 index 0000000000000000000000000000000000000000..5db4b2f9e0c275a6c347b9cdd0d5a62e031e7f75 --- /dev/null +++ b/cleanrl/tuner_example.py @@ -0,0 +1,31 @@ +import optuna + +from cleanrl_utils.tuner import Tuner + +tuner = Tuner( + script="cleanrl/ppo.py", + metric="charts/episodic_return", + metric_last_n_average_window=50, + direction="maximize", + aggregation_type="average", + target_scores={ + "CartPole-v1": [0, 500], + "Acrobot-v1": [-500, 0], + }, + params_fn=lambda trial: { + "learning-rate": trial.suggest_float("learning-rate", 0.0003, 0.003, log=True), + "num-minibatches": trial.suggest_categorical("num-minibatches", [1, 2, 4]), + "update-epochs": trial.suggest_categorical("update-epochs", [1, 2, 4, 8]), + "num-steps": trial.suggest_categorical("num-steps", [5, 16, 32, 64, 128]), + "vf-coef": trial.suggest_float("vf-coef", 0, 5), + "max-grad-norm": trial.suggest_float("max-grad-norm", 0, 5), + "total-timesteps": 100000, + "num-envs": 16, + }, + pruner=optuna.pruners.MedianPruner(n_startup_trials=5), + sampler=optuna.samplers.TPESampler(), +) +tuner.tune( + num_trials=100, + num_seeds=3, +) diff --git a/eval.sh b/eval.sh new file mode 100644 index 0000000000000000000000000000000000000000..59149eb206a7b3302ddb60831372b93684979dec --- /dev/null +++ b/eval.sh @@ -0,0 +1,93 @@ +#!/usr/bin/env bash +set -euo pipefail + +# 运行时追加的参数会应用到所有实验,例如: +# bash scripts/eval_agent_proxy.sh actor_rollout_ref.rollout.val_kwargs.temperature=0.0 +EXTRA_OVERRIDES=("$@") + +run_eval() { + local exp_name="$1" + local model_path="$2" + local env_name="$3" + shift 3 + local env_overrides=("$@") + + echo "=== Running ${exp_name} | env=${env_name} | model=${model_path} ===" + python -m ragen.llm_agent.agent_proxy \ + --config-name eval \ + "model_path=${model_path}" \ + "es_manager.train.env_configs.tags=[${env_name}]" \ + "es_manager.val.env_configs.tags=[${env_name}]" \ + "output.filename=${exp_name}_val_rollouts.pkl" \ + "${env_overrides[@]}" \ + "${EXTRA_OVERRIDES[@]}" +} + +run_eval "rubik_depth1_withthink_fulltraj_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube1_withthink_fulltraj_sa_rl/global_step_50/qwen2.5_3b_actor_hf" "rubikscube" \ + "custom_envs.rubikscube.env_config.scramble_depth=1" + +run_eval "rubik_depth1_withthink_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube1_withthink_sa_rl/global_step_50/qwen2.5_3b_actor_hf" "rubikscube" \ + "custom_envs.rubikscube.env_config.scramble_depth=1" + +run_eval "rubik_depth1_withthink_sas_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube1_withthink_sas_rl/global_step_50/qwen2.5_3b_actor_hf" "rubikscube" \ + "custom_envs.rubikscube.env_config.scramble_depth=1" + + + + +run_eval "rubik_depth2_withthink_fulltraj_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube2_withthink_fulltraj_sa_rl/global_step_200/qwen2.5_3b_actor_hf" "rubikscube" \ + "custom_envs.rubikscube.env_config.scramble_depth=2" + +run_eval "rubik_depth2_withthink_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube2_withthink_sa_rl/global_step_200/qwen2.5_3b_actor_hf" "rubikscube" \ + "custom_envs.rubikscube.env_config.scramble_depth=2" + +run_eval "rubik_depth2_withthink_sas_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube2_withthink_sas_rl/global_step_200/qwen2.5_3b_actor_hf" "rubikscube" \ + "custom_envs.rubikscube.env_config.scramble_depth=2" + + + + + +run_eval "rubik_depth3_withthink_fulltraj_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube3_withthink_fulltraj_sa_rl/global_step_200/qwen2.5_3b_actor_hf" "rubikscube" \ + "custom_envs.rubikscube.env_config.scramble_depth=3" + +run_eval "rubik_depth3_withthink_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube3_withthink_sa_rl/global_step_200/qwen2.5_3b_actor_hf" "rubikscube" \ + "custom_envs.rubikscube.env_config.scramble_depth=3" + +run_eval "rubik_depth3_withthink_sas_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube3_withthink_sas_rl/global_step_200/qwen2.5_3b_actor_hf" "rubikscube" \ + "custom_envs.rubikscube.env_config.scramble_depth=3" + + + +run_eval "sokoban_box1_withthink_fulltraj_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban1_withthink_fulltraj_sa_rl/global_step_200/qwen2.5_3b_actor_hf" "CoordSokoban" \ + "custom_envs.CoordSokoban.env_config.num_boxes=1" + +run_eval "sokoban_box1_withthink_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban1_withthink_sa_rl/global_step_200/qwen2.5_3b_actor_hf" "CoordSokoban" \ + "custom_envs.CoordSokoban.env_config.num_boxes=1" + +run_eval "sokoban_box1_withthink_sas_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban1_withthink_sas_rl/global_step_200/qwen2.5_3b_actor_hf" "CoordSokoban" \ + "custom_envs.CoordSokoban.env_config.num_boxes=1" + + + + +run_eval "sokoban_box2_withthink_fulltraj_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban2_withthink_fulltraj_sa_rl/global_step_200/qwen2.5_3b_actor_hf" "CoordSokoban" \ + "custom_envs.CoordSokoban.env_config.num_boxes=2" + +run_eval "sokoban_box2_withthink_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban2_withthink_sa_rl/global_step_200/qwen2.5_3b_actor_hf" "CoordSokoban" \ + "custom_envs.CoordSokoban.env_config.num_boxes=2" + +run_eval "sokoban_box2_withthink_sas_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban2_withthink_sas_rl/global_step_200/qwen2.5_3b_actor_hf" "CoordSokoban" \ + "custom_envs.CoordSokoban.env_config.num_boxes=2" + + + + +run_eval "sudoku_withthink_fulltraj_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sudoku_withthink_fulltraj_sa_rl/global_step_200/qwen2.5_3b_actor_hf" "SimpleSudoku" \ +# "custom_envs.CoordSokoban.env_config.num_boxes=2" + +run_eval "sudoku_withthink_sa_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sudoku_withthink_sa_rl/global_step_200/qwen2.5_3b_actor_hf" "SimpleSudoku" \ +# "custom_envs.CoordSokoban.env_config.num_boxes=2" + +run_eval "sudoku_withthink_sas_rl" "/mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sudoku_withthink_sas_rl/global_step_200/qwen2.5_3b_actor_hf" "SimpleSudoku" \ +# "custom_envs.CoordSokoban.env_config.num_boxes=2" \ No newline at end of file diff --git a/example_bash.sh b/example_bash.sh new file mode 100644 index 0000000000000000000000000000000000000000..b13c1374aa9d5981e500f4a296ffc4009751e6e2 --- /dev/null +++ b/example_bash.sh @@ -0,0 +1,13 @@ +set -e + +USE_GRPO="algorithm.adv_estimator=grpo" +USE_PPO="algorithm.adv_estimator=gae" +USE_BASE="algorithm.kl_ctrl.kl_coef=0.0 actor_rollout_ref.actor.kl_loss_coef=0.0 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=0.25" + +python train.py --config-name _3_frozen_lake \ + system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen2.5_3B_it_explict \ + trainer.n_gpus_per_node=8 \ + model_path= \ + trainer.save_freq=200 \ + trainer.experiment_name=frozenlake_slippery $USE_PPO $USE_BASE \ No newline at end of file diff --git a/kill.sh b/kill.sh new file mode 100644 index 0000000000000000000000000000000000000000..bd24160b9f03cdb31fb65b805d76612379bda671 --- /dev/null +++ b/kill.sh @@ -0,0 +1,51 @@ +kill -9 1209798 +kill -9 146747 +kill -9 146748 +kill -9 1782726 +kill -9 1857266 +kill -9 1898296 +kill -9 192891 +kill -9 193088 +kill -9 193155 +kill -9 215717 +kill -9 215863 +kill -9 215934 +kill -9 215936 +kill -9 215938 +kill -9 215940 +kill -9 215942 +kill -9 215944 +kill -9 215946 +kill -9 215948 +kill -9 215951 +kill -9 215953 +kill -9 215955 +kill -9 215957 +kill -9 215959 +kill -9 215962 +kill -9 215985 +kill -9 215987 +kill -9 216012 +kill -9 216014 +kill -9 216021 +kill -9 216032 +kill -9 216041 +kill -9 216048 +kill -9 216057 +kill -9 216062 +kill -9 216081 +kill -9 216083 +kill -9 216085 +kill -9 216087 +kill -9 216089 +kill -9 216091 +kill -9 216093 +kill -9 216095 +kill -9 2678317 +kill -9 2724471 +kill -9 2747024 +kill -9 280311 +kill -9 280312 +kill -9 280313 +kill -9 280314 +kill -9 285538 \ No newline at end of file diff --git a/merge.sh b/merge.sh new file mode 100644 index 0000000000000000000000000000000000000000..ad20e29f3fa6fbe591782baaa3ad2d399712cf0f --- /dev/null +++ b/merge.sh @@ -0,0 +1,4 @@ +python -m verl.model_merger merge \ + --backend fsdp \ + --local_dir /mnt/general/wanghy/RAGEN/saves/qwen3b_it_frommlp_nothink_think_sokobanbox1_sequence_multitask/global_step_200/actor \ + --target_dir /mnt/general/wanghy/RAGEN/saves/qwen3b_it_frommlp_nothink_think_sokobanbox1_sequence_multitask/global_step_200/qwen2.5_3b_actor_hf \ No newline at end of file diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000000000000000000000000000000000000..0e6614a3fbcfc02aaa780dd9356e7a920e4575f0 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +# pytest.ini +[pytest] +pythonpath = . \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..9b521bf3f11c67de729baaa3b1b6872ab09680f9 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,37 @@ +IPython +matplotlib +gym +gym_sokoban +peft +accelerate +codetiming +datasets +dill +hydra-core +numpy +pandas +pybind11 +ray>=2.10 +tensordict>=0.8.0,<0.9.0 +transformers +vllm==0.8.5 +wandb +gymnasium +gymnasium[toy-text] + +pyarrow>=15.0.0 +pylatexenc +# torchdata +debugpy + +together +anthropic +faiss-gpu + +# This is optional, but needs to be installed with main requirements if you want to use webshop +-r external/webshop-minimal/requirements.txt + +# This is optional, but needs to be installed with main requirements if you want to use lean environment +# Note that we only need the client side sdk so the requirements inside kimina-lean-server itself can be separated +# as long as there is an available kimina-lean-server running. +kimina-client \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..2846713e994703a90d411e8d182fc504bf73577f --- /dev/null +++ b/setup.py @@ -0,0 +1,20 @@ +from setuptools import setup, find_packages +import os +import sys + +setup( + name='ragen', + version='0.1', + package_dir={'': '.'}, + packages=find_packages(include=['ragen']), + author='RAGEN Team', + author_email='', + acknowledgements='', + description='', + install_requires=[], + package_data={'ragen': ['*/*.md']}, + classifiers=[ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Science/Research', + ] +) \ No newline at end of file diff --git a/train.py b/train.py new file mode 100644 index 0000000000000000000000000000000000000000..00c21177bc18b5c8a3c848a6a339dc46c25b7b73 --- /dev/null +++ b/train.py @@ -0,0 +1,301 @@ +""" +Borrowed from verl.trainer.main_ppo.py +Note that we don't combine the main with ray_trainer as ray_trainer is used by other main. +""" + +from ragen.trainer.agent_trainer import RayAgentTrainer + +import ray +import hydra +import os +from verl import DataProto +import torch +import numpy as np +from ragen.utils import register_resolvers +register_resolvers() +import sys +import socket + +class DummyRewardManager(): + """The reward manager. + """ + + def __init__(self, tokenizer, num_examine, compute_score=None) -> None: + self.tokenizer = tokenizer + self.num_examine = num_examine # the number of batches of decoded responses to print to the console + self.compute_score = compute_score + + def __call__(self, data: DataProto, return_dict=False): + """We will expand this function gradually based on the available datasets""" + + # If there is rm score, we directly return rm score. Otherwise, we compute via rm_score_fn + if 'rm_scores' in data.batch.keys(): + if return_dict: + return { + "reward_tensor": data.batch['rm_scores'], + } + else: + return data.batch['rm_scores'] + + reward_tensor = torch.zeros_like(data.batch['responses'], dtype=torch.float32) + + all_scores = [] + + already_print_data_sources = {} + + for i in range(len(data)): + data_item = data[i] # DataProtoItem + + prompt_ids = data_item.batch['prompts'] + + prompt_length = prompt_ids.shape[-1] + + valid_prompt_length = data_item.batch['attention_mask'][:prompt_length].sum() + valid_prompt_ids = prompt_ids[-valid_prompt_length:] + + response_ids = data_item.batch['responses'] + valid_response_length = data_item.batch['attention_mask'][prompt_length:].sum() + valid_response_ids = response_ids[:valid_response_length] + + # decode + sequences = torch.cat((valid_prompt_ids, valid_response_ids)) + sequences_str = self.tokenizer.decode(sequences) + + score = data_item.non_tensor_batch['reward'] + score = float(score) + + reward_tensor[i, valid_response_length - 1] = score + all_scores.append(score) + + # Get data_source from data_item if available, otherwise use a default value + data_source = data_item.non_tensor_batch.get('data_source', 'default') + + if data_source not in already_print_data_sources: + already_print_data_sources[data_source] = 0 + + if already_print_data_sources[data_source] < self.num_examine: + already_print_data_sources[data_source] += 1 + print(sequences_str) + + print(f"[DEBUG] all_scores: {all_scores}") + print(f"[DEBUG] all_scores shape: {np.array(all_scores).shape}") + print(f"[DEBUG] all_scores mean: {np.mean(all_scores)}") + print(f"[DEBUG] all_scores max: {np.max(all_scores)}") + print(f"[DEBUG] all_scores min: {np.min(all_scores)}") + print(f"[DEBUG] all_scores std: {np.std(all_scores)}") + + if return_dict: + return { + "reward_tensor": reward_tensor, + } + else: + return reward_tensor + +def get_custom_reward_fn(config): + import importlib.util, os + + reward_fn_config = config.get("custom_reward_function") or {} + file_path = reward_fn_config.get("path") + if not file_path: + return None + + if not os.path.exists(file_path): + raise FileNotFoundError(f"Reward function file '{file_path}' not found.") + + spec = importlib.util.spec_from_file_location("custom_module", file_path) + if spec is None: + raise RuntimeError(f"Failed to create module spec from '{file_path}'") + + module = importlib.util.module_from_spec(spec) + try: + spec.loader.exec_module(module) + except Exception as e: + raise RuntimeError(f"Error loading module from '{file_path}': {e}") + + function_name = reward_fn_config.get("name") + if not function_name: + raise ValueError("Function name not specified in custom_reward_function config") + + if not hasattr(module, function_name): + raise AttributeError(f"Reward function '{function_name}' not found in '{file_path}'.") + + print(f"using customized reward function '{function_name}' from '{file_path}'") + + return getattr(module, function_name) + + + +def add_dependency_and_validate_config(config): + + # validate config + assert config.micro_batch_size_per_gpu * config.trainer.n_gpus_per_node <= config.actor_rollout_ref.actor.ppo_mini_batch_size, \ + f"micro_batch_size_per_gpu * n_gpus_per_node ({config.micro_batch_size_per_gpu * config.trainer.n_gpus_per_node}) must be less than or equal to ppo_mini_batch_size ({config.actor_rollout_ref.actor.ppo_mini_batch_size})" + assert config.actor_rollout_ref.actor.ppo_mini_batch_size % (config.micro_batch_size_per_gpu * config.trainer.n_gpus_per_node) == 0, \ + f"ppo_mini_batch_size ({config.actor_rollout_ref.actor.ppo_mini_batch_size}) must be divisible by micro_batch_size_per_gpu * n_gpus_per_node ({config.micro_batch_size_per_gpu * config.trainer.n_gpus_per_node})" + assert "qwen" in config.model_path.lower() or "llama-3" in config.model_path.lower() or (not config.enable_response_mask), \ + "response mask is currently only supported for qwen models" + assert len(str(config.system.CUDA_VISIBLE_DEVICES).split(',')) == config.trainer.n_gpus_per_node, \ + f"CUDA_VISIBLE_DEVICES ({config.system.CUDA_VISIBLE_DEVICES}) must have the same number of GPUs as n_gpus_per_node ({config.trainer.n_gpus_per_node})" + assert config.es_manager.train.env_groups * config.es_manager.train.group_size * config.actor_rollout_ref.rollout.rollout_filter_ratio >= config.ppo_mini_batch_size, \ + f"env_groups * group_size * rollout_filter_ratio ({config.es_manager.train.env_groups * config.es_manager.train.group_size * config.actor_rollout_ref.rollout.rollout_filter_ratio}) must be greater than or equal to ppo_mini_batch_size ({config.ppo_mini_batch_size}). Note that effective rollouts for update is env_groups * group_size * rollout_filter_ratio." + assert config.algorithm.bi_level_gae == False or config.algorithm.adv_estimator == "gae", "BI_LEVEL_GAE is enabled, so config.algorithm.adv_estimator should be set to gae" + assert config.algorithm.bi_level_gae == False or (not config.agent_proxy.use_turn_scores), "BI_LEVEL_GAE is enabled, but currently use_turn_scores are not correctly supported, so config.agent_proxy.use_turn_scores should be set to False" # This will be added later. Currently turn-scores are not correctly supported yet. + # assert config.algorithm.bi_level_gae == False or config.agent_proxy.use_turn_scores, "BI_LEVEL_GAE is enabled, so config.agent_proxy.use_turn_scores should be set to True" # This will be added later. Currently turn-scores are not correctly supported yet. + + # add dependency + config.data.train_batch_size = config.es_manager.train.env_groups * config.es_manager.train.group_size + + + return config + + +@hydra.main(version_base=None, config_path="config", config_name="base") +def main(config): + config = add_dependency_and_validate_config(config) + print(f"config: {config}") + + run_ppo(config) + + +def run_ppo(config) -> None: + # TODO(linjunrong.ocss884): this ENV is left for resolving SGLang conflict with ray devices + # isolation, will solve in the future + os.environ["CUDA_VISIBLE_DEVICES"] = str(config.system.CUDA_VISIBLE_DEVICES) + print(f"CUDA_VISIBLE_DEVICES: {os.environ['CUDA_VISIBLE_DEVICES']}") + os.environ["ENSURE_CUDA_VISIBLE_DEVICES"] = os.environ.get('CUDA_VISIBLE_DEVICES', '') + if not ray.is_initialized(): + # this is for local ray cluster + ray.init(runtime_env={ + 'env_vars': { + 'TOKENIZERS_PARALLELISM': 'true', + 'NCCL_DEBUG': 'WARN', + 'VLLM_LOGGING_LEVEL': 'WARN', + "RAY_DEBUG": "legacy" # used here for simpler breakpoint() + } + }) + + runner = TaskRunner.remote() + ray.get(runner.run.remote(config)) + + +@ray.remote(num_cpus=1) # please make sure main_task is not scheduled on head +class TaskRunner: + + def run(self, config): + from pprint import pprint + + from omegaconf import OmegaConf + + from verl.utils.fs import copy_to_local + + print(f"TaskRunner hostname: {socket.gethostname()}, PID: {os.getpid()}") + pprint(OmegaConf.to_container(config, resolve=True)) + OmegaConf.resolve(config) + + # download the checkpoint from hdfs + local_path = copy_to_local(config.actor_rollout_ref.model.path) + + # instantiate tokenizer + from verl.utils import hf_tokenizer, hf_processor + tokenizer = hf_tokenizer(local_path) + processor = hf_processor(local_path, use_fast=True) # used for multimodal LLM, could be none + + # define worker classes + if config.actor_rollout_ref.actor.strategy == 'fsdp': + assert config.actor_rollout_ref.actor.strategy == config.critic.strategy + from ragen.workers.fsdp_workers import ActorRolloutRefWorker, CriticWorker + from verl.single_controller.ray import RayWorkerGroup + ray_worker_group_cls = RayWorkerGroup + + else: + raise NotImplementedError + + from verl.trainer.ppo.ray_trainer import ResourcePoolManager, Role + + role_worker_mapping = { + Role.ActorRollout: ray.remote(ActorRolloutRefWorker), + Role.Critic: ray.remote(CriticWorker), + } + if config.actor_rollout_ref.actor.use_ref: + print("[DEBUG] using ref policy") + role_worker_mapping[Role.RefPolicy] = ray.remote(ActorRolloutRefWorker) + else: + print("[DEBUG] not using ref policy, setting use_kl_loss to False") + config.actor_rollout_ref.actor.use_kl_loss = False + global_pool_id = 'global_pool' + resource_pool_spec = { + global_pool_id: [config.trainer.n_gpus_per_node] * config.trainer.nnodes, + } + + mapping = { + Role.ActorRollout: global_pool_id, + Role.Critic: global_pool_id, + } + if config.actor_rollout_ref.actor.use_ref: + mapping[Role.RefPolicy] = global_pool_id + # mapping = { + # Role.ActorRollout: global_pool_id, + # Role.Critic: global_pool_id, + # Role.RefPolicy: global_pool_id, + # } + + # we should adopt a multi-source reward function here + # - for rule-based rm, we directly call a reward score + # - for model-based rm, we call a model + # - for code related prompt, we send to a sandbox if there are test cases + # - finally, we combine all the rewards together + # - The reward type depends on the tag of the data + if config.reward_model.enable: + if config.reward_model.strategy == 'fsdp': + from ragen.workers.fsdp_workers import RewardModelWorker + elif config.reward_model.strategy == 'megatron': + from verl.workers.megatron_workers import RewardModelWorker + else: + raise NotImplementedError + role_worker_mapping[Role.RewardModel] = ray.remote(RewardModelWorker) + mapping[Role.RewardModel] = global_pool_id + + # reward_manager_name = config.reward_model.get("reward_manager", "dummy") + # print(f'reward_manager_name: {reward_manager_name}') + # if reward_manager_name == 'dummy': + print("using dummy reward manager") + reward_manager_cls = DummyRewardManager + # elif reward_manager_name == 'naive': + # from verl.workers.reward_manager import NaiveRewardManager + # reward_manager_cls = NaiveRewardManager + # elif reward_manager_name == 'prime': + # from verl.workers.reward_manager import PrimeRewardManager + # reward_manager_cls = PrimeRewardManager + # else: + # raise NotImplementedError + + compute_score = get_custom_reward_fn(config) + reward_fn = reward_manager_cls(tokenizer=tokenizer, num_examine=0, compute_score=compute_score) + + # Note that we always use function-based RM for validation + val_reward_fn = reward_manager_cls(tokenizer=tokenizer, num_examine=1, compute_score=compute_score) + + resource_pool_manager = ResourcePoolManager(resource_pool_spec=resource_pool_spec, mapping=mapping) + + trainer = RayAgentTrainer( + config=config, + tokenizer=tokenizer, + processor=processor, + role_worker_mapping=role_worker_mapping, + resource_pool_manager=resource_pool_manager, + ray_worker_group_cls=ray_worker_group_cls, + reward_fn=reward_fn, + val_reward_fn=val_reward_fn + ) + trainer.init_workers() + trainer.init_agent_proxy() + trainer.fit() + + +if __name__ == '__main__': + import sys + sys.argv.extend([ + "--config-dir", os.path.join(os.path.dirname(__file__), "ragen/config"), + "--config-dir", os.path.join(os.path.dirname(__file__), "verl/verl/trainer/config"), + ]) + main() diff --git a/train_all.sh b/train_all.sh new file mode 100644 index 0000000000000000000000000000000000000000..27db4212b6b72ec5b4dd4d82303c7917b076ba68 --- /dev/null +++ b/train_all.sh @@ -0,0 +1,347 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" + + +# python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=4 model_path=Qwen/Qwen2.5-0.5B-Instruct trainer.experiment_name=game_2048 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1'" trainer.project_name=ragen_latest_qwen_05B_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-0.5B-Instruct trainer.experiment_name=rubikscube-1 $USE_PPO $USE_BASE +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'2,3'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-1.5B-Instruct trainer.experiment_name=rubikscube-2 $USE_PPO $USE_BASE +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'4,5'" trainer.project_name=ragen_latest_qwen_25_3b_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-3B-Instruct trainer.experiment_name=rubikscube-2 $USE_PPO $USE_BASE +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'6,7'" trainer.project_name=ragen_latest_qwen_05B_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-0.5B-Instruct trainer.experiment_name=rubikscube-3 $USE_PPO $USE_BASE + +# Section 3.1&3.2 - General Observations +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'6,7'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=bandit-ppo-multitask $USE_PPO $USE_BASE & +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'7'" trainer.n_gpus_per_node=1 trainer.experiment_name=bandit-ppo-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=sokoban-ppo-box1-multitask $USE_PPO $USE_BASE +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-grpo $USE_GRPO $USE_BASE & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="'2,3'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=frozen_lake-ppo-slippery-multitask $USE_PPO $USE_BASE + +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="'4,5,6,7'" trainer.project_name=ragen_latest_qwen_25_3b_it trainer.n_gpus_per_node=4 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_multitask trainer.experiment_name=frozen_lake-ppo-slippery-multitask $USE_PPO $USE_BASE +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="'4,5,6,7'" trainer.n_gpus_per_node=4 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=frozen_lake-ppo-slippery-multitask $USE_PPO $USE_BASE + +# # Section 4.1 - Filtering and critic +# # 0.25 +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-ppo-rolloutfilter0.25 actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=frozen_lake-ppo actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=frozen_lake-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_GRPO & + +# wait + +# # 0.5 +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-ppo-rolloutfilter0.5 actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=frozen_lake-ppo actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=frozen_lake-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_GRPO & + +# # 0.75 +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-ppo-rolloutfilter0.75 actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=frozen_lake-ppo actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=frozen_lake-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_GRPO & + +# wait + +# # Section 4.2 - Ablation on Critic/ClipHigh/KL. Start from Basic and add more components. The best setting for StarPO in agent is rollout_filter+Critic+Cliphigh+NoKL +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-base-grpo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_GRPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-base-ppo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=sokoban-base-ppo-cliphigh algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-base-ppo-nokl algorithm.kl_ctrl.kl_coef=0.000 actor_rollout_ref.actor.kl_loss_coef=0.000 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=frozenlake-base-grpo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=frozenlake-base-ppo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=frozenlake-base-ppo-cliphigh algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=frozenlake-base-ppo-nokl algorithm.kl_ctrl.kl_coef=0.000 actor_rollout_ref.actor.kl_loss_coef=0.000 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & + +# wait + +# # Section 5.1 - Reasoning Helps Generalization + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=bandit-generalization \ +# custom_envs.Bandit.env_config.lo_arm_name="Engineer" \ +# custom_envs.Bandit.env_config.hi_arm_name="Teacher" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Trader" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Librarian" + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=bandit-generalization-nothink \ +# custom_envs.Bandit.env_config.lo_arm_name="Engineer" \ +# custom_envs.Bandit.env_config.hi_arm_name="Teacher" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Trader" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Librarian" \ +# agent_proxy.enable_think=False + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=bandit-generalization-rev \ +# custom_envs.Bandit.env_config.lo_arm_name="Teacher" \ +# custom_envs.Bandit.env_config.hi_arm_name="Engineer" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Librarian" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Trader" + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=bandit-generalization-rev-nothink \ +# custom_envs.Bandit.env_config.lo_arm_name="Teacher" \ +# custom_envs.Bandit.env_config.hi_arm_name="Engineer" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Librarian" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Trader" \ +# agent_proxy.enable_think=False + + +# SOKOBAN_GENERALIZATION_CONFIG="es_manager.val.env_groups=512 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[SimpleSokoban,LargerSokoban,SokobanDifferentGridVocab,FrozenLake] es_manager.val.env_configs.n_groups=[128,128,128,128]" +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization $SOKOBAN_GENERALIZATION_CONFIG trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/sokoban-generalization micro_batch_size_per_gpu=8 model_path=Qwen/Qwen2.5-1.5B-Instruct& +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-generalization-nothink $SOKOBAN_GENERALIZATION_CONFIG agent_proxy.enable_think=False & + + +# # SOKOBAN_GENERALIZATION_CONFIG="es_manager.val.env_groups=128 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[SokobanDifferentGridVocab] es_manager.val.env_configs.n_groups=[128]" +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-generalization $SOKOBAN_GENERALIZATION_CONFIG & + + +# # COMPOSITIONALITY_CONFIG="es_manager.train.env_groups=16 es_manager.train.env_configs.tags=[Bandit,SimpleSokoban] es_manager.train.env_configs.n_groups=[8,8] es_manager.val.env_groups=512 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[Bandit,SimpleSokoban,LargerSokoban,FrozenLake] es_manager.val.env_configs.n_groups=[128,128,128,128] actor_rollout_ref.rollout.rollout_filter_ratio=1" # NOTE that we don't filter out low-var rollout in this setting +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=compositional-generalization $COMPOSITIONALITY_CONFIG & +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=compositional-generalization-nothink $COMPOSITIONALITY_CONFIG agent_proxy.enable_think=False & + +# wait + +# # Section 5.2 - what leads to better reasoning? +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-generalization-qwen2.5-0.5b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-0.5B-Instruct & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-generalization-qwen2.5-1.5b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-1.5B-Instruct & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization-qwen2.5-3b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-3B-Instruct trainer.n_gpus_per_node=2 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5,6,7\" trainer.n_gpus_per_node=4 trainer.experiment_name=sokoban-generalization-qwen2.5-7b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-7B-Instruct trainer.n_gpus_per_node=4 & + +# wait + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-generalization-qwen2.5-0.5b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-0.5B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-generalization-qwen2.5-1.5b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-1.5B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization-qwen2.5-3b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-3B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5,6,7\" trainer.n_gpus_per_node=4 trainer.experiment_name=sokoban-generalization-qwen2.5-7b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-7B & + +# wait + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1,2,3\" trainer.n_gpus_per_node=4 trainer.n_gpus_per_node=4 trainer.experiment_name=sokoban-generalization-qwen2.5-7b-r1 $SOKOBAN_GENERALIZATION_CONFIG model_path=deepseek-ai/DeepSeek-R1-Distill-Qwen-7B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization-qwen2.5-1.5b-r1 $SOKOBAN_GENERALIZATION_CONFIG model_path=deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B & + + +# wait + +# # Section 6.1 varying action count +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-action-count-1 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=5 custom_envs.LargerSokoban.max_actions_per_traj=5 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=5 custom_envs.FrozenLake.max_actions_per_traj=5 agent_proxy.max_actions_per_turn=1 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-action-count-2 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=10 custom_envs.LargerSokoban.max_actions_per_traj=10 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=10 custom_envs.FrozenLake.max_actions_per_traj=10 agent_proxy.max_actions_per_turn=2 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=sokoban-action-count-3 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=15 custom_envs.LargerSokoban.max_actions_per_traj=15 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=15 custom_envs.FrozenLake.max_actions_per_traj=15 agent_proxy.max_actions_per_turn=3 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-action-count-4 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=20 custom_envs.LargerSokoban.max_actions_per_traj=20 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=20 custom_envs.FrozenLake.max_actions_per_traj=20 agent_proxy.max_actions_per_turn=4 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-action-count-5 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=25 custom_envs.LargerSokoban.max_actions_per_traj=25 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=25 custom_envs.FrozenLake.max_actions_per_traj=25 agent_proxy.max_actions_per_turn=5 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-action-count-6 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=30 custom_envs.LargerSokoban.max_actions_per_traj=30 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=30 custom_envs.FrozenLake.max_actions_per_traj=30 agent_proxy.max_actions_per_turn=6 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=sokoban-action-count-7 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=35 custom_envs.LargerSokoban.max_actions_per_traj=35 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=35 custom_envs.FrozenLake.max_actions_per_traj=35 agent_proxy.max_actions_per_turn=7 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=sokoban-action-count-8 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=40 custom_envs.LargerSokoban.max_actions_per_traj=40 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=40 custom_envs.FrozenLake.max_actions_per_traj=40 agent_proxy.max_actions_per_turn=8 & + +# # section 6.2 Varying prompt diversity +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-prompt-diversity-4 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=4 es_manager.train.group_size=32 es_manager.train.env_configs.n_groups=[4] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-prompt-diversity-8 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=8 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[8] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=sokoban-prompt-diversity-16 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=16 es_manager.train.group_size=8 es_manager.train.env_configs.n_groups=[16] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-prompt-diversity-32 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=32 es_manager.train.group_size=4 es_manager.train.env_configs.n_groups=[32] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-prompt-diversity-64 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=64 es_manager.train.group_size=2 es_manager.train.env_configs.n_groups=[64] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-prompt-diversity-128 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=128 es_manager.train.group_size=1 es_manager.train.env_configs.n_groups=[128] & + +# wait + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=sokoban-online-2 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=16 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[16] trainer.total_training_steps=100 trainer.test_freq=5 & + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=sokoban-online-5 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=40 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[40] trainer.total_training_steps=40 trainer.test_freq=2 & + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-online-10 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=80 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[80] trainer.total_training_steps=80 trainer.test_freq=1 & + + + + + +# # Extension: Training 7B reasoning model +# SOKOBAN_GENERALIZATION_CONFIG="es_manager.val.env_groups=512 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[SimpleSokoban,LargerSokoban,SokobanDifferentGridVocab,FrozenLake] es_manager.val.env_configs.n_groups=[128,128,128,128]" +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1,2,3,4,5,6,7\" trainer.n_gpus_per_node=8 trainer.experiment_name=sokoban-generalization-qwen2.5-3b-instruct-largescale $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-3B-Instruct es_manager.train.env_groups=8 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[8] micro_batch_size_per_gpu=8 ppo_mini_batch_size=64 actor_rollout_ref.rollout.response_length=1024 actor_rollout_ref.rollout.max_model_len=6400 trainer.test_freq=5 actor_rollout_ref.rollout.max_num_batched_tokens=24000 micro_batch_size_per_gpu=2 actor_rollout_ref.rollout.rollout_filter_ratio=1 & + +# python -m ragen.llm_agent.agent_proxy model_path=Qwen/Qwen2.5-3B-Instruct system.CUDA_VISIBLE_DEVICES=\"0,1,2,3,4,5,6,7\" trainer.n_gpus_per_node=8 actor_rollout_ref.rollout.tensor_model_parallel_size=4 actor_rollout_ref.rollout.response_length=2048 actor_rollout_ref.rollout.max_model_len=12800 + +# # trainer.save_freq=50 trainer.default_local_dir=/mnt/local/cache/exp_name + +# # USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0\" trainer.n_gpus_per_node=1 trainer.experiment_name=sokoban-final enable_response_mask=True trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/sokoban-generalization & + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES=\"1\" trainer.n_gpus_per_node=1 trainer.experiment_name=bandit-final enable_response_mask=True trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/bandit-generalization & + +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES=\"1\" trainer.n_gpus_per_node=1 trainer.experiment_name=frozenlake-final enable_response_mask=True trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/frozenlake-generalization & + + + + +# # USE_PPO="algorithm.adv_estimator=gae" # by default. +# # USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0\" trainer.n_gpus_per_node=1 trainer.experiment_name=sokoban-ppo $USE_PPO $USE_BASE ppo_mini_batch_size=64 enable_response_mask=True & + + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-s-grpo algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std & + +# # enable_response_mask: False +# # grpo_advantage_length_weight: True + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-s-grpo-1-5b algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std agent_proxy.max_actions_per_turn=5 custom_envs.SimpleSokoban.max_actions_per_traj=25 enable_response_mask=True grpo_advantage_length_weight=False model_path=Qwen/Qwen2.5-1.5B-Instruct & + + +# # extension: 7B with lora. Currently NOT recommended to use lora: within current version of vllm, this could result in rollouts slower than non-lora by 100% +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1,2,3\" trainer.n_gpus_per_node=4 model_path=Qwen/Qwen2.5-7B-Instruct trainer.experiment_name=sokoban_7b_instruct_lora_newversion lora.rank=16 + +# # extension: bi-level gae +# python train.py trainer.experiment_name=sokoban-bi-level-gae-final \ +# system.CUDA_VISIBLE_DEVICES=\"0,1,2,3\" trainer.n_gpus_per_node=4 actor_rollout_ref.rollout.tensor_model_parallel_size=2 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# algorithm.bi_level_gae=True algorithm.high_level_gamma=0.95 \ +# agent_proxy.use_turn_scores=True \ +# actor_rollout_ref.rollout.tp_size_check=False + + +# # extension: webshop +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-ppo-s $USE_PPO \ +# trainer.nnodes=1 & + + +# USE_GRPO="algorithm.adv_estimator=grpo" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-grpo-s $USE_GRPO \ +# trainer.nnodes=1 & + +# # StarPO ppo +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"4,5\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-ppo $USE_PPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + +# # StarPO grpo +# USE_GRPO="algorithm.adv_estimator=grpo" +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"6,7\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-grpo $USE_GRPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + + +# # normal:sokoban +# # extension: sokoban +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-ppo-s $USE_PPO \ +# trainer.nnodes=1 & + + +# USE_GRPO="algorithm.adv_estimator=grpo" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-grpo-s $USE_GRPO \ +# trainer.nnodes=1 & + +# # StarPO ppo +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-ppo $USE_PPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + +# # StarPO grpo +# USE_GRPO="algorithm.adv_estimator=grpo" +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"6,7\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-grpo $USE_GRPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + + + +# python train.py \ +# trainer.experiment_name=3b-full-ppo-test system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 + + +# python train.py --config-name _11_sudoku \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sudoku4x4_nohint_think_sa \ +# trainer.experiment_name=sudoku-4x4-nohint-withthink_sa $USE_PPO $USE_BASE + +python train.py --config-name _2_sokoban \ + system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it\ + trainer.n_gpus_per_node=8 \ + custom_envs.CoordSokoban.env_config.num_boxes=1 \ + model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_withthink_fulltracj_sa \ + trainer.experiment_name=sokoban-box1-withthink_fulltrajc_sa $USE_PPO $USE_BASE \ + trainer.save_freq=200 \ + trainer.default_local_dir=/mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban1_withthink_fulltraj_sa_rl + +python train.py --config-name _2_sokoban \ + system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it\ + trainer.n_gpus_per_node=8 \ + custom_envs.CoordSokoban.env_config.num_boxes=2 \ + model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box2_withthink_fulltracj_sa \ + trainer.experiment_name=sokoban-box2-withthink_fulltrajc_sa $USE_PPO $USE_BASE \ + trainer.save_freq=200 \ + trainer.default_local_dir=/mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban2_withthink_fulltraj_sa_rl + + +python train.py --config-name _11_sudoku \ + system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it\ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sudoku4x4_nohint_think_sa_fulltrajc \ + trainer.experiment_name=sudoku_3b_think_sa_fulltrajc $USE_PPO $USE_BASE \ + trainer.save_freq=200 \ + trainer.default_local_dir=/mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sudoku_withthink_fulltraj_sa_rl + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube1_withthink_sa \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube1_withthink_sa $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube1_withthink_sas \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube1_withthink_sas $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube2_withthink_sa \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube2_withthink_sa $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube2_withthink_sas \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube2_withthink_sas $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube3_withthink_sa \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube3_withthink_sa $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube3_withthink_sas \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube3_withthink_sas $USE_PPO $USE_BASE diff --git a/train_all_sa.sh b/train_all_sa.sh new file mode 100644 index 0000000000000000000000000000000000000000..a8de0af1c26230d44280612000ca356af25b4077 --- /dev/null +++ b/train_all_sa.sh @@ -0,0 +1,347 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" + + +# python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=4 model_path=Qwen/Qwen2.5-0.5B-Instruct trainer.experiment_name=game_2048 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1'" trainer.project_name=ragen_latest_qwen_05B_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-0.5B-Instruct trainer.experiment_name=rubikscube-1 $USE_PPO $USE_BASE +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'2,3'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-1.5B-Instruct trainer.experiment_name=rubikscube-2 $USE_PPO $USE_BASE +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'4,5'" trainer.project_name=ragen_latest_qwen_25_3b_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-3B-Instruct trainer.experiment_name=rubikscube-2 $USE_PPO $USE_BASE +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'6,7'" trainer.project_name=ragen_latest_qwen_05B_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-0.5B-Instruct trainer.experiment_name=rubikscube-3 $USE_PPO $USE_BASE + +# Section 3.1&3.2 - General Observations +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'6,7'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=bandit-ppo-multitask $USE_PPO $USE_BASE & +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'7'" trainer.n_gpus_per_node=1 trainer.experiment_name=bandit-ppo-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=sokoban-ppo-box1-multitask $USE_PPO $USE_BASE +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-grpo $USE_GRPO $USE_BASE & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="'2,3'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=frozen_lake-ppo-slippery-multitask $USE_PPO $USE_BASE + +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="'4,5,6,7'" trainer.project_name=ragen_latest_qwen_25_3b_it trainer.n_gpus_per_node=4 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_multitask trainer.experiment_name=frozen_lake-ppo-slippery-multitask $USE_PPO $USE_BASE +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="'4,5,6,7'" trainer.n_gpus_per_node=4 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=frozen_lake-ppo-slippery-multitask $USE_PPO $USE_BASE + +# # Section 4.1 - Filtering and critic +# # 0.25 +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-ppo-rolloutfilter0.25 actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=frozen_lake-ppo actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=frozen_lake-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_GRPO & + +# wait + +# # 0.5 +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-ppo-rolloutfilter0.5 actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=frozen_lake-ppo actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=frozen_lake-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_GRPO & + +# # 0.75 +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-ppo-rolloutfilter0.75 actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=frozen_lake-ppo actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=frozen_lake-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_GRPO & + +# wait + +# # Section 4.2 - Ablation on Critic/ClipHigh/KL. Start from Basic and add more components. The best setting for StarPO in agent is rollout_filter+Critic+Cliphigh+NoKL +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-base-grpo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_GRPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-base-ppo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=sokoban-base-ppo-cliphigh algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-base-ppo-nokl algorithm.kl_ctrl.kl_coef=0.000 actor_rollout_ref.actor.kl_loss_coef=0.000 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=frozenlake-base-grpo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=frozenlake-base-ppo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=frozenlake-base-ppo-cliphigh algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=frozenlake-base-ppo-nokl algorithm.kl_ctrl.kl_coef=0.000 actor_rollout_ref.actor.kl_loss_coef=0.000 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & + +# wait + +# # Section 5.1 - Reasoning Helps Generalization + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=bandit-generalization \ +# custom_envs.Bandit.env_config.lo_arm_name="Engineer" \ +# custom_envs.Bandit.env_config.hi_arm_name="Teacher" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Trader" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Librarian" + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=bandit-generalization-nothink \ +# custom_envs.Bandit.env_config.lo_arm_name="Engineer" \ +# custom_envs.Bandit.env_config.hi_arm_name="Teacher" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Trader" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Librarian" \ +# agent_proxy.enable_think=False + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=bandit-generalization-rev \ +# custom_envs.Bandit.env_config.lo_arm_name="Teacher" \ +# custom_envs.Bandit.env_config.hi_arm_name="Engineer" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Librarian" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Trader" + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=bandit-generalization-rev-nothink \ +# custom_envs.Bandit.env_config.lo_arm_name="Teacher" \ +# custom_envs.Bandit.env_config.hi_arm_name="Engineer" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Librarian" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Trader" \ +# agent_proxy.enable_think=False + + +# SOKOBAN_GENERALIZATION_CONFIG="es_manager.val.env_groups=512 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[SimpleSokoban,LargerSokoban,SokobanDifferentGridVocab,FrozenLake] es_manager.val.env_configs.n_groups=[128,128,128,128]" +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization $SOKOBAN_GENERALIZATION_CONFIG trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/sokoban-generalization micro_batch_size_per_gpu=8 model_path=Qwen/Qwen2.5-1.5B-Instruct& +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-generalization-nothink $SOKOBAN_GENERALIZATION_CONFIG agent_proxy.enable_think=False & + + +# # SOKOBAN_GENERALIZATION_CONFIG="es_manager.val.env_groups=128 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[SokobanDifferentGridVocab] es_manager.val.env_configs.n_groups=[128]" +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-generalization $SOKOBAN_GENERALIZATION_CONFIG & + + +# # COMPOSITIONALITY_CONFIG="es_manager.train.env_groups=16 es_manager.train.env_configs.tags=[Bandit,SimpleSokoban] es_manager.train.env_configs.n_groups=[8,8] es_manager.val.env_groups=512 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[Bandit,SimpleSokoban,LargerSokoban,FrozenLake] es_manager.val.env_configs.n_groups=[128,128,128,128] actor_rollout_ref.rollout.rollout_filter_ratio=1" # NOTE that we don't filter out low-var rollout in this setting +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=compositional-generalization $COMPOSITIONALITY_CONFIG & +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=compositional-generalization-nothink $COMPOSITIONALITY_CONFIG agent_proxy.enable_think=False & + +# wait + +# # Section 5.2 - what leads to better reasoning? +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-generalization-qwen2.5-0.5b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-0.5B-Instruct & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-generalization-qwen2.5-1.5b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-1.5B-Instruct & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization-qwen2.5-3b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-3B-Instruct trainer.n_gpus_per_node=2 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5,6,7\" trainer.n_gpus_per_node=4 trainer.experiment_name=sokoban-generalization-qwen2.5-7b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-7B-Instruct trainer.n_gpus_per_node=4 & + +# wait + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-generalization-qwen2.5-0.5b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-0.5B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-generalization-qwen2.5-1.5b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-1.5B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization-qwen2.5-3b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-3B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5,6,7\" trainer.n_gpus_per_node=4 trainer.experiment_name=sokoban-generalization-qwen2.5-7b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-7B & + +# wait + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1,2,3\" trainer.n_gpus_per_node=4 trainer.n_gpus_per_node=4 trainer.experiment_name=sokoban-generalization-qwen2.5-7b-r1 $SOKOBAN_GENERALIZATION_CONFIG model_path=deepseek-ai/DeepSeek-R1-Distill-Qwen-7B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization-qwen2.5-1.5b-r1 $SOKOBAN_GENERALIZATION_CONFIG model_path=deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B & + + +# wait + +# # Section 6.1 varying action count +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-action-count-1 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=5 custom_envs.LargerSokoban.max_actions_per_traj=5 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=5 custom_envs.FrozenLake.max_actions_per_traj=5 agent_proxy.max_actions_per_turn=1 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-action-count-2 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=10 custom_envs.LargerSokoban.max_actions_per_traj=10 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=10 custom_envs.FrozenLake.max_actions_per_traj=10 agent_proxy.max_actions_per_turn=2 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=sokoban-action-count-3 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=15 custom_envs.LargerSokoban.max_actions_per_traj=15 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=15 custom_envs.FrozenLake.max_actions_per_traj=15 agent_proxy.max_actions_per_turn=3 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-action-count-4 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=20 custom_envs.LargerSokoban.max_actions_per_traj=20 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=20 custom_envs.FrozenLake.max_actions_per_traj=20 agent_proxy.max_actions_per_turn=4 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-action-count-5 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=25 custom_envs.LargerSokoban.max_actions_per_traj=25 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=25 custom_envs.FrozenLake.max_actions_per_traj=25 agent_proxy.max_actions_per_turn=5 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-action-count-6 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=30 custom_envs.LargerSokoban.max_actions_per_traj=30 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=30 custom_envs.FrozenLake.max_actions_per_traj=30 agent_proxy.max_actions_per_turn=6 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=sokoban-action-count-7 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=35 custom_envs.LargerSokoban.max_actions_per_traj=35 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=35 custom_envs.FrozenLake.max_actions_per_traj=35 agent_proxy.max_actions_per_turn=7 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=sokoban-action-count-8 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=40 custom_envs.LargerSokoban.max_actions_per_traj=40 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=40 custom_envs.FrozenLake.max_actions_per_traj=40 agent_proxy.max_actions_per_turn=8 & + +# # section 6.2 Varying prompt diversity +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-prompt-diversity-4 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=4 es_manager.train.group_size=32 es_manager.train.env_configs.n_groups=[4] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-prompt-diversity-8 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=8 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[8] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=sokoban-prompt-diversity-16 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=16 es_manager.train.group_size=8 es_manager.train.env_configs.n_groups=[16] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-prompt-diversity-32 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=32 es_manager.train.group_size=4 es_manager.train.env_configs.n_groups=[32] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-prompt-diversity-64 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=64 es_manager.train.group_size=2 es_manager.train.env_configs.n_groups=[64] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-prompt-diversity-128 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=128 es_manager.train.group_size=1 es_manager.train.env_configs.n_groups=[128] & + +# wait + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=sokoban-online-2 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=16 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[16] trainer.total_training_steps=100 trainer.test_freq=5 & + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=sokoban-online-5 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=40 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[40] trainer.total_training_steps=40 trainer.test_freq=2 & + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-online-10 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=80 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[80] trainer.total_training_steps=80 trainer.test_freq=1 & + + + + + +# # Extension: Training 7B reasoning model +# SOKOBAN_GENERALIZATION_CONFIG="es_manager.val.env_groups=512 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[SimpleSokoban,LargerSokoban,SokobanDifferentGridVocab,FrozenLake] es_manager.val.env_configs.n_groups=[128,128,128,128]" +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1,2,3,4,5,6,7\" trainer.n_gpus_per_node=8 trainer.experiment_name=sokoban-generalization-qwen2.5-3b-instruct-largescale $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-3B-Instruct es_manager.train.env_groups=8 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[8] micro_batch_size_per_gpu=8 ppo_mini_batch_size=64 actor_rollout_ref.rollout.response_length=1024 actor_rollout_ref.rollout.max_model_len=6400 trainer.test_freq=5 actor_rollout_ref.rollout.max_num_batched_tokens=24000 micro_batch_size_per_gpu=2 actor_rollout_ref.rollout.rollout_filter_ratio=1 & + +# python -m ragen.llm_agent.agent_proxy model_path=Qwen/Qwen2.5-3B-Instruct system.CUDA_VISIBLE_DEVICES=\"0,1,2,3,4,5,6,7\" trainer.n_gpus_per_node=8 actor_rollout_ref.rollout.tensor_model_parallel_size=4 actor_rollout_ref.rollout.response_length=2048 actor_rollout_ref.rollout.max_model_len=12800 + +# # trainer.save_freq=50 trainer.default_local_dir=/mnt/local/cache/exp_name + +# # USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0\" trainer.n_gpus_per_node=1 trainer.experiment_name=sokoban-final enable_response_mask=True trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/sokoban-generalization & + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES=\"1\" trainer.n_gpus_per_node=1 trainer.experiment_name=bandit-final enable_response_mask=True trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/bandit-generalization & + +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES=\"1\" trainer.n_gpus_per_node=1 trainer.experiment_name=frozenlake-final enable_response_mask=True trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/frozenlake-generalization & + + + + +# # USE_PPO="algorithm.adv_estimator=gae" # by default. +# # USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0\" trainer.n_gpus_per_node=1 trainer.experiment_name=sokoban-ppo $USE_PPO $USE_BASE ppo_mini_batch_size=64 enable_response_mask=True & + + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-s-grpo algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std & + +# # enable_response_mask: False +# # grpo_advantage_length_weight: True + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-s-grpo-1-5b algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std agent_proxy.max_actions_per_turn=5 custom_envs.SimpleSokoban.max_actions_per_traj=25 enable_response_mask=True grpo_advantage_length_weight=False model_path=Qwen/Qwen2.5-1.5B-Instruct & + + +# # extension: 7B with lora. Currently NOT recommended to use lora: within current version of vllm, this could result in rollouts slower than non-lora by 100% +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1,2,3\" trainer.n_gpus_per_node=4 model_path=Qwen/Qwen2.5-7B-Instruct trainer.experiment_name=sokoban_7b_instruct_lora_newversion lora.rank=16 + +# # extension: bi-level gae +# python train.py trainer.experiment_name=sokoban-bi-level-gae-final \ +# system.CUDA_VISIBLE_DEVICES=\"0,1,2,3\" trainer.n_gpus_per_node=4 actor_rollout_ref.rollout.tensor_model_parallel_size=2 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# algorithm.bi_level_gae=True algorithm.high_level_gamma=0.95 \ +# agent_proxy.use_turn_scores=True \ +# actor_rollout_ref.rollout.tp_size_check=False + + +# # extension: webshop +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-ppo-s $USE_PPO \ +# trainer.nnodes=1 & + + +# USE_GRPO="algorithm.adv_estimator=grpo" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-grpo-s $USE_GRPO \ +# trainer.nnodes=1 & + +# # StarPO ppo +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"4,5\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-ppo $USE_PPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + +# # StarPO grpo +# USE_GRPO="algorithm.adv_estimator=grpo" +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"6,7\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-grpo $USE_GRPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + + +# # normal:sokoban +# # extension: sokoban +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-ppo-s $USE_PPO \ +# trainer.nnodes=1 & + + +# USE_GRPO="algorithm.adv_estimator=grpo" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-grpo-s $USE_GRPO \ +# trainer.nnodes=1 & + +# # StarPO ppo +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-ppo $USE_PPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + +# # StarPO grpo +# USE_GRPO="algorithm.adv_estimator=grpo" +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"6,7\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-grpo $USE_GRPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + + + +# python train.py \ +# trainer.experiment_name=3b-full-ppo-test system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 + + +# python train.py --config-name _11_sudoku \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sudoku4x4_nohint_think_sa \ +# trainer.experiment_name=sudoku-4x4-nohint-withthink_sa $USE_PPO $USE_BASE + +python train.py --config-name _2_sokoban \ + system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it\ + trainer.n_gpus_per_node=8 \ + custom_envs.CoordSokoban.env_config.num_boxes=1 \ + model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_withthink_sa \ + trainer.experiment_name=sokoban-box1-withthink_sa $USE_PPO $USE_BASE \ + trainer.save_freq=200 \ + trainer.default_local_dir=/mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban1_withthink_sa_rl + +python train.py --config-name _2_sokoban \ + system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it\ + trainer.n_gpus_per_node=8 \ + custom_envs.CoordSokoban.env_config.num_boxes=2 \ + model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box2_withthink_sa \ + trainer.experiment_name=sokoban-box2-withthink_sa $USE_PPO $USE_BASE \ + trainer.save_freq=200 \ + trainer.default_local_dir=/mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban2_withthink_sa_rl + + +python train.py --config-name _11_sudoku \ + system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it\ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sudoku4x4_nohint_think_sa \ + trainer.experiment_name=sudoku_3b_think_sa $USE_PPO $USE_BASE \ + trainer.save_freq=200 \ + trainer.default_local_dir=/mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sudoku_withthink_sa_rl + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube1_withthink_sa \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube1_withthink_sa $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube1_withthink_sas \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube1_withthink_sas $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube2_withthink_sa \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube2_withthink_sa $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube2_withthink_sas \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube2_withthink_sas $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube3_withthink_sa \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube3_withthink_sa $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube3_withthink_sas \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube3_withthink_sas $USE_PPO $USE_BASE diff --git a/train_all_sas.sh b/train_all_sas.sh new file mode 100644 index 0000000000000000000000000000000000000000..eb3040f25415b8543c39ea187952fa93ad115c79 --- /dev/null +++ b/train_all_sas.sh @@ -0,0 +1,347 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" + + +# python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=4 model_path=Qwen/Qwen2.5-0.5B-Instruct trainer.experiment_name=game_2048 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1'" trainer.project_name=ragen_latest_qwen_05B_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-0.5B-Instruct trainer.experiment_name=rubikscube-1 $USE_PPO $USE_BASE +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'2,3'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-1.5B-Instruct trainer.experiment_name=rubikscube-2 $USE_PPO $USE_BASE +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'4,5'" trainer.project_name=ragen_latest_qwen_25_3b_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-3B-Instruct trainer.experiment_name=rubikscube-2 $USE_PPO $USE_BASE +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'6,7'" trainer.project_name=ragen_latest_qwen_05B_it trainer.n_gpus_per_node=2 model_path=Qwen/Qwen2.5-0.5B-Instruct trainer.experiment_name=rubikscube-3 $USE_PPO $USE_BASE + +# Section 3.1&3.2 - General Observations +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'6,7'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=bandit-ppo-multitask $USE_PPO $USE_BASE & +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'7'" trainer.n_gpus_per_node=1 trainer.experiment_name=bandit-ppo-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=sokoban-ppo-box1-multitask $USE_PPO $USE_BASE +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-grpo $USE_GRPO $USE_BASE & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="'2,3'" trainer.project_name=ragen_latest_qwen_25_15b_it trainer.n_gpus_per_node=2 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=frozen_lake-ppo-slippery-multitask $USE_PPO $USE_BASE + +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="'4,5,6,7'" trainer.project_name=ragen_latest_qwen_25_3b_it trainer.n_gpus_per_node=4 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_multitask trainer.experiment_name=frozen_lake-ppo-slippery-multitask $USE_PPO $USE_BASE +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="'4,5,6,7'" trainer.n_gpus_per_node=4 model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_multitask trainer.experiment_name=frozen_lake-ppo-slippery-multitask $USE_PPO $USE_BASE + +# # Section 4.1 - Filtering and critic +# # 0.25 +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-ppo-rolloutfilter0.25 actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=frozen_lake-ppo actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=frozen_lake-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.25 $USE_GRPO & + +# wait + +# # 0.5 +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-ppo-rolloutfilter0.5 actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=frozen_lake-ppo actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=frozen_lake-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.5 $USE_GRPO & + +# # 0.75 +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-ppo-rolloutfilter0.75 actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=frozen_lake-ppo actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=frozen_lake-grpo actor_rollout_ref.rollout.rollout_filter_ratio=0.75 $USE_GRPO & + +# wait + +# # Section 4.2 - Ablation on Critic/ClipHigh/KL. Start from Basic and add more components. The best setting for StarPO in agent is rollout_filter+Critic+Cliphigh+NoKL +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-base-grpo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_GRPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-base-ppo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=sokoban-base-ppo-cliphigh algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-base-ppo-nokl algorithm.kl_ctrl.kl_coef=0.000 actor_rollout_ref.actor.kl_loss_coef=0.000 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=frozenlake-base-grpo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_GRPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=frozenlake-base-ppo algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=frozenlake-base-ppo-cliphigh algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=frozenlake-base-ppo-nokl algorithm.kl_ctrl.kl_coef=0.000 actor_rollout_ref.actor.kl_loss_coef=0.000 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1 $USE_PPO & + +# wait + +# # Section 5.1 - Reasoning Helps Generalization + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=bandit-generalization \ +# custom_envs.Bandit.env_config.lo_arm_name="Engineer" \ +# custom_envs.Bandit.env_config.hi_arm_name="Teacher" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Trader" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Librarian" + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=bandit-generalization-nothink \ +# custom_envs.Bandit.env_config.lo_arm_name="Engineer" \ +# custom_envs.Bandit.env_config.hi_arm_name="Teacher" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Trader" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Librarian" \ +# agent_proxy.enable_think=False + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=bandit-generalization-rev \ +# custom_envs.Bandit.env_config.lo_arm_name="Teacher" \ +# custom_envs.Bandit.env_config.hi_arm_name="Engineer" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Librarian" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Trader" + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=bandit-generalization-rev-nothink \ +# custom_envs.Bandit.env_config.lo_arm_name="Teacher" \ +# custom_envs.Bandit.env_config.hi_arm_name="Engineer" \ +# custom_envs.BanditTest.env_config.lo_arm_name="Librarian" \ +# custom_envs.BanditTest.env_config.hi_arm_name="Trader" \ +# agent_proxy.enable_think=False + + +# SOKOBAN_GENERALIZATION_CONFIG="es_manager.val.env_groups=512 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[SimpleSokoban,LargerSokoban,SokobanDifferentGridVocab,FrozenLake] es_manager.val.env_configs.n_groups=[128,128,128,128]" +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization $SOKOBAN_GENERALIZATION_CONFIG trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/sokoban-generalization micro_batch_size_per_gpu=8 model_path=Qwen/Qwen2.5-1.5B-Instruct& +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-generalization-nothink $SOKOBAN_GENERALIZATION_CONFIG agent_proxy.enable_think=False & + + +# # SOKOBAN_GENERALIZATION_CONFIG="es_manager.val.env_groups=128 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[SokobanDifferentGridVocab] es_manager.val.env_configs.n_groups=[128]" +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-generalization $SOKOBAN_GENERALIZATION_CONFIG & + + +# # COMPOSITIONALITY_CONFIG="es_manager.train.env_groups=16 es_manager.train.env_configs.tags=[Bandit,SimpleSokoban] es_manager.train.env_configs.n_groups=[8,8] es_manager.val.env_groups=512 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[Bandit,SimpleSokoban,LargerSokoban,FrozenLake] es_manager.val.env_configs.n_groups=[128,128,128,128] actor_rollout_ref.rollout.rollout_filter_ratio=1" # NOTE that we don't filter out low-var rollout in this setting +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=compositional-generalization $COMPOSITIONALITY_CONFIG & +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=compositional-generalization-nothink $COMPOSITIONALITY_CONFIG agent_proxy.enable_think=False & + +# wait + +# # Section 5.2 - what leads to better reasoning? +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-generalization-qwen2.5-0.5b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-0.5B-Instruct & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-generalization-qwen2.5-1.5b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-1.5B-Instruct & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization-qwen2.5-3b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-3B-Instruct trainer.n_gpus_per_node=2 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5,6,7\" trainer.n_gpus_per_node=4 trainer.experiment_name=sokoban-generalization-qwen2.5-7b-instruct $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-7B-Instruct trainer.n_gpus_per_node=4 & + +# wait + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-generalization-qwen2.5-0.5b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-0.5B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-generalization-qwen2.5-1.5b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-1.5B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization-qwen2.5-3b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-3B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5,6,7\" trainer.n_gpus_per_node=4 trainer.experiment_name=sokoban-generalization-qwen2.5-7b $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-7B & + +# wait + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1,2,3\" trainer.n_gpus_per_node=4 trainer.n_gpus_per_node=4 trainer.experiment_name=sokoban-generalization-qwen2.5-7b-r1 $SOKOBAN_GENERALIZATION_CONFIG model_path=deepseek-ai/DeepSeek-R1-Distill-Qwen-7B & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-generalization-qwen2.5-1.5b-r1 $SOKOBAN_GENERALIZATION_CONFIG model_path=deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B & + + +# wait + +# # Section 6.1 varying action count +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-action-count-1 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=5 custom_envs.LargerSokoban.max_actions_per_traj=5 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=5 custom_envs.FrozenLake.max_actions_per_traj=5 agent_proxy.max_actions_per_turn=1 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-action-count-2 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=10 custom_envs.LargerSokoban.max_actions_per_traj=10 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=10 custom_envs.FrozenLake.max_actions_per_traj=10 agent_proxy.max_actions_per_turn=2 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=sokoban-action-count-3 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=15 custom_envs.LargerSokoban.max_actions_per_traj=15 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=15 custom_envs.FrozenLake.max_actions_per_traj=15 agent_proxy.max_actions_per_turn=3 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-action-count-4 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=20 custom_envs.LargerSokoban.max_actions_per_traj=20 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=20 custom_envs.FrozenLake.max_actions_per_traj=20 agent_proxy.max_actions_per_turn=4 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-action-count-5 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=25 custom_envs.LargerSokoban.max_actions_per_traj=25 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=25 custom_envs.FrozenLake.max_actions_per_traj=25 agent_proxy.max_actions_per_turn=5 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-action-count-6 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=30 custom_envs.LargerSokoban.max_actions_per_traj=30 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=30 custom_envs.FrozenLake.max_actions_per_traj=30 agent_proxy.max_actions_per_turn=6 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=sokoban-action-count-7 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=35 custom_envs.LargerSokoban.max_actions_per_traj=35 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=35 custom_envs.FrozenLake.max_actions_per_traj=35 agent_proxy.max_actions_per_turn=7 & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=sokoban-action-count-8 $SOKOBAN_GENERALIZATION_CONFIG custom_envs.SimpleSokoban.max_actions_per_traj=40 custom_envs.LargerSokoban.max_actions_per_traj=40 custom_envs.SokobanDifferentGridVocab.max_actions_per_traj=40 custom_envs.FrozenLake.max_actions_per_traj=40 agent_proxy.max_actions_per_turn=8 & + +# # section 6.2 Varying prompt diversity +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-prompt-diversity-4 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=4 es_manager.train.group_size=32 es_manager.train.env_configs.n_groups=[4] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="1" trainer.experiment_name=sokoban-prompt-diversity-8 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=8 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[8] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="2" trainer.experiment_name=sokoban-prompt-diversity-16 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=16 es_manager.train.group_size=8 es_manager.train.env_configs.n_groups=[16] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="3" trainer.experiment_name=sokoban-prompt-diversity-32 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=32 es_manager.train.group_size=4 es_manager.train.env_configs.n_groups=[32] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="4" trainer.experiment_name=sokoban-prompt-diversity-64 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=64 es_manager.train.group_size=2 es_manager.train.env_configs.n_groups=[64] & +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="5" trainer.experiment_name=sokoban-prompt-diversity-128 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=128 es_manager.train.group_size=1 es_manager.train.env_configs.n_groups=[128] & + +# wait + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="6" trainer.experiment_name=sokoban-online-2 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=16 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[16] trainer.total_training_steps=100 trainer.test_freq=5 & + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="7" trainer.experiment_name=sokoban-online-5 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=40 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[40] trainer.total_training_steps=40 trainer.test_freq=2 & + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="0" trainer.experiment_name=sokoban-online-10 $SOKOBAN_GENERALIZATION_CONFIG es_manager.train.env_groups=80 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[80] trainer.total_training_steps=80 trainer.test_freq=1 & + + + + + +# # Extension: Training 7B reasoning model +# SOKOBAN_GENERALIZATION_CONFIG="es_manager.val.env_groups=512 es_manager.val.group_size=1 es_manager.val.env_configs.tags=[SimpleSokoban,LargerSokoban,SokobanDifferentGridVocab,FrozenLake] es_manager.val.env_configs.n_groups=[128,128,128,128]" +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1,2,3,4,5,6,7\" trainer.n_gpus_per_node=8 trainer.experiment_name=sokoban-generalization-qwen2.5-3b-instruct-largescale $SOKOBAN_GENERALIZATION_CONFIG model_path=Qwen/Qwen2.5-3B-Instruct es_manager.train.env_groups=8 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[8] micro_batch_size_per_gpu=8 ppo_mini_batch_size=64 actor_rollout_ref.rollout.response_length=1024 actor_rollout_ref.rollout.max_model_len=6400 trainer.test_freq=5 actor_rollout_ref.rollout.max_num_batched_tokens=24000 micro_batch_size_per_gpu=2 actor_rollout_ref.rollout.rollout_filter_ratio=1 & + +# python -m ragen.llm_agent.agent_proxy model_path=Qwen/Qwen2.5-3B-Instruct system.CUDA_VISIBLE_DEVICES=\"0,1,2,3,4,5,6,7\" trainer.n_gpus_per_node=8 actor_rollout_ref.rollout.tensor_model_parallel_size=4 actor_rollout_ref.rollout.response_length=2048 actor_rollout_ref.rollout.max_model_len=12800 + +# # trainer.save_freq=50 trainer.default_local_dir=/mnt/local/cache/exp_name + +# # USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0\" trainer.n_gpus_per_node=1 trainer.experiment_name=sokoban-final enable_response_mask=True trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/sokoban-generalization & + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES=\"1\" trainer.n_gpus_per_node=1 trainer.experiment_name=bandit-final enable_response_mask=True trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/bandit-generalization & + +# python train.py --config-name _3_frozen_lake system.CUDA_VISIBLE_DEVICES=\"1\" trainer.n_gpus_per_node=1 trainer.experiment_name=frozenlake-final enable_response_mask=True trainer.total_training_steps=500 trainer.save_freq=50 trainer.default_local_dir=/mnt/local/ragen_checkpoints/frozenlake-generalization & + + + + +# # USE_PPO="algorithm.adv_estimator=gae" # by default. +# # USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0\" trainer.n_gpus_per_node=1 trainer.experiment_name=sokoban-ppo $USE_PPO $USE_BASE ppo_mini_batch_size=64 enable_response_mask=True & + + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-s-grpo algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std & + +# # enable_response_mask: False +# # grpo_advantage_length_weight: True + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 trainer.experiment_name=sokoban-s-grpo-1-5b algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std agent_proxy.max_actions_per_turn=5 custom_envs.SimpleSokoban.max_actions_per_traj=25 enable_response_mask=True grpo_advantage_length_weight=False model_path=Qwen/Qwen2.5-1.5B-Instruct & + + +# # extension: 7B with lora. Currently NOT recommended to use lora: within current version of vllm, this could result in rollouts slower than non-lora by 100% +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1,2,3\" trainer.n_gpus_per_node=4 model_path=Qwen/Qwen2.5-7B-Instruct trainer.experiment_name=sokoban_7b_instruct_lora_newversion lora.rank=16 + +# # extension: bi-level gae +# python train.py trainer.experiment_name=sokoban-bi-level-gae-final \ +# system.CUDA_VISIBLE_DEVICES=\"0,1,2,3\" trainer.n_gpus_per_node=4 actor_rollout_ref.rollout.tensor_model_parallel_size=2 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# algorithm.bi_level_gae=True algorithm.high_level_gamma=0.95 \ +# agent_proxy.use_turn_scores=True \ +# actor_rollout_ref.rollout.tp_size_check=False + + +# # extension: webshop +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-ppo-s $USE_PPO \ +# trainer.nnodes=1 & + + +# USE_GRPO="algorithm.adv_estimator=grpo" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-grpo-s $USE_GRPO \ +# trainer.nnodes=1 & + +# # StarPO ppo +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"4,5\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-ppo $USE_PPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + +# # StarPO grpo +# USE_GRPO="algorithm.adv_estimator=grpo" +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _6_webshop system.CUDA_VISIBLE_DEVICES=\"6,7\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=webshop-3b-grpo $USE_GRPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + + +# # normal:sokoban +# # extension: sokoban +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-ppo-s $USE_PPO \ +# trainer.nnodes=1 & + + +# USE_GRPO="algorithm.adv_estimator=grpo" # by default. +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"2,3\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-grpo-s $USE_GRPO \ +# trainer.nnodes=1 & + +# # StarPO ppo +# USE_PPO="algorithm.adv_estimator=gae" # by default. +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"4,5\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-ppo $USE_PPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + +# # StarPO grpo +# USE_GRPO="algorithm.adv_estimator=grpo" +# USE_BASE="algorithm.kl_ctrl.kl_coef=0.001 actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.clip_ratio_high=0.2 actor_rollout_ref.rollout.rollout_filter_ratio=1" +# MKL_SERVICE_FORCE_INTEL=1 python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES=\"6,7\" trainer.n_gpus_per_node=2 \ +# trainer.experiment_name=sokoban-3b-grpo $USE_GRPO $USE_BASE \ +# es_manager.train.env_groups=2 es_manager.train.group_size=16 es_manager.train.env_configs.n_groups=[2] \ +# trainer.nnodes=1 & + + + +# python train.py \ +# trainer.experiment_name=3b-full-ppo-test system.CUDA_VISIBLE_DEVICES=\"0,1\" trainer.n_gpus_per_node=2 + + +# python train.py --config-name _11_sudoku \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sudoku4x4_nohint_think_sa \ +# trainer.experiment_name=sudoku-4x4-nohint-withthink_sa $USE_PPO $USE_BASE + +python train.py --config-name _2_sokoban \ + system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it\ + trainer.n_gpus_per_node=8 \ + custom_envs.CoordSokoban.env_config.num_boxes=1 \ + model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_withthink_sas \ + trainer.experiment_name=sokoban-box1-withthink_sas $USE_PPO $USE_BASE \ + trainer.save_freq=200 \ + trainer.default_local_dir=/mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban1_withthink_sas_rl + +python train.py --config-name _2_sokoban \ + system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it\ + trainer.n_gpus_per_node=8 \ + custom_envs.CoordSokoban.env_config.num_boxes=2 \ + model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box2_withthink_sas \ + trainer.experiment_name=sokoban-box2-withthink_sas $USE_PPO $USE_BASE \ + trainer.save_freq=200 \ + trainer.default_local_dir=/mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban2_withthink_sas_rl + + +python train.py --config-name _11_sudoku \ + system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it\ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sudoku4x4_nohint_think_sas \ + trainer.experiment_name=sudoku_3b_think_sas $USE_PPO $USE_BASE \ + trainer.save_freq=200 \ + trainer.default_local_dir=/mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sudoku_withthink_sas_rl + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube1_withthink_sa \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube1_withthink_sa $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube1_withthink_sas \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube1_withthink_sas $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube2_withthink_sa \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube2_withthink_sa $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube2_withthink_sas \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube2_withthink_sas $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube3_withthink_sa \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube3_withthink_sa $USE_PPO $USE_BASE + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube3_withthink_sas \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube3_withthink_sas $USE_PPO $USE_BASE diff --git a/train_starpo-s.sh b/train_starpo-s.sh new file mode 100644 index 0000000000000000000000000000000000000000..eddd07a0b9923990a2ba490357c3ffc238bd1235 --- /dev/null +++ b/train_starpo-s.sh @@ -0,0 +1,151 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.0 actor_rollout_ref.actor.kl_loss_coef=0.0 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=0.25" +# export WANDB_API_KEY="5ab0f17574bdd98888d94dd7ab7480fd8a3f56b8" + +#**************************************cube********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-1218 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube-2-starpos-1218 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube-3-starpos-1218 $USE_PPO $USE_BASE + + + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-1218 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube-2-starpos-1218 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube-3-starpos-1218 $USE_PPO $USE_BASE + + + + +# ########### 3B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-1218 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube-2-starpos-1218 $USE_PPO $USE_BASE + + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube-3-starpos-1218 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=4 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=4 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube-2-starpos $USE_PPO $USE_BASE & + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=4 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube-3-starpos $USE_PPO $USE_BASE + + +#**********************************2048**************************************** + +# WANDB_MODE=offline python train.py --config-name _8_2048 \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_2048_windows5 \ +# trainer.experiment_name=game_2048-frommlp-windows5 $USE_PPO $USE_BASE + +# WANDB_MODE=offline python train.py --config-name _8_2048 \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_2048_windows5 \ +# trainer.experiment_name=game_2048-frommlp-windows5 $USE_PPO $USE_BASE + +# WANDB_MODE=offline python train.py --config-name _8_2048 \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_2048_windows5 \ +# trainer.experiment_name=game_2048-frommlp-windows5 $USE_PPO $USE_BASE + + +#**********************************sudoku**************************************** + +# python train.py --config-name _11_sudoku \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# trainer.experiment_name=sudoku-4x4-nohint $USE_PPO $USE_BASE + +# python train.py --config-name _11_sudoku \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it\ +# trainer.n_gpus_per_node=4 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# trainer.experiment_name=sudoku-4x4-nohint $USE_PPO $USE_BASE + +# python train.py --config-name _11_sudoku \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# trainer.experiment_name=sudoku-4x4-nohint $USE_PPO $USE_BASE \ No newline at end of file diff --git a/train_starpo-s_8gpu.sh b/train_starpo-s_8gpu.sh new file mode 100644 index 0000000000000000000000000000000000000000..898c38283f4716eb41c1743d5121ce505110889c --- /dev/null +++ b/train_starpo-s_8gpu.sh @@ -0,0 +1,173 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.0 actor_rollout_ref.actor.kl_loss_coef=0.0 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=0.25" +export WANDB_API_KEY="5ab0f17574bdd98888d94dd7ab7480fd8a3f56b8" + + +ICL_prompt_sokoban1="You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets.\n You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. \n Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). \n When you are exactly next to a box, you can push it by moving in the same direction. \n You cannot push a box through a wall, and you cannot pull a box.\n The answer should be a sequence of actions, like Right || Right || Up.\n\n To faciliate your understanding, I will provide a successful trajectory for you. You can analyze and learn the dynamic from it:\n \n \\n\\nTurn 1:\\nState:\\nGrid Map:\\n######\\n######\\n####_#\\n#____#\\n#PX_O#\\n######\\nYou have 10 actions left. Always output: [Your thoughts] [your answer] with no extra text. Strictly follow this format. Max response length: 120 words (tokens).\n \\nAction1: Right\\n\\n\n \\nReward:\\n-0.1\\n\\nTurn 2:\\nState:\\nGrid Map:\\n######\\n######\\n####_#\\n#____#\\n#_PXO#\\n######\\nYou have 9 actions left. Always output: [Your thoughts] [your answer] with no extra text. Strictly follow this format. Max response length: 120 words (tokens).\n \\nAction2: Right\\n\\n\n \\nReward:\\n1.0. The env success. \\nState:\\nGrid Map:\\n######\\n######\\n####_#\\n#____#\\n#__P√#\\n######\\n\n " + +python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3'" \ + trainer.project_name=ragen_latest_qwen2.5_3B_it \ + trainer.n_gpus_per_node=4 \ + model_path=/mnt/general/share/model/Qwen/Qwen2.5-3B-Instruct \ + custom_envs.CoordSokoban.env_config.num_boxes=1 \ + custom_envs.CoordSokoban.env_instruction="\"$ICL_prompt_sokoban1\""\ + trainer.experiment_name=sokoban-box1-starpos-incontext $USE_PPO $USE_BASE + + +#**************************************cube********************************* + + +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube1_1218 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp-1218 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube2_1219_turn5 \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube-2-starpos-frommlp-1219-turn5 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube3_1219_turn5_6000 \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube-3-starpos-frommlp-1219-turn5_6000 $USE_PPO $USE_BASE + + + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_rubikscube1_1218 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp-1218 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_rubikscube2_1219_turn5 \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube-2-starpos-frommlp-1219_turn5 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_rubikscube3_1219_turn5_6000 \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube-3-starpos-frommlp-1219_turn5_6000 $USE_PPO $USE_BASE + + + + +# ########### 3B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube1_1218 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp-1218 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube2_1219_turn5 \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube-2-starpos-frommlp-1219-turn5 $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_rubikscube3_1219_turn5_6000 \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube-3-starpos-frommlp-1219-turn5_6000 $USE_PPO $USE_BASE + + + + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=4 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_rubikscube1_1218 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=4 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_rubikscube1_1218 \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# trainer.experiment_name=rubikscube-2-starpos $USE_PPO $USE_BASE & + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=4 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_rubikscube1_1218 \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# trainer.experiment_name=rubikscube-3-starpos $USE_PPO $USE_BASE + + +#**********************************2048**************************************** + +# WANDB_MODE=offline python train.py --config-name _8_2048 \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_2048_windows5_7000scores \ +# trainer.experiment_name=game_2048-frommlp-windows5-7000score $USE_PPO $USE_BASE + +# WANDB_MODE=offline python train.py --config-name _8_2048 \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_2048_windows5_7000scores \ +# trainer.experiment_name=game_2048-frommlp-windows5-7000score $USE_PPO $USE_BASE + +# WANDB_MODE=offline python train.py --config-name _8_2048 \ +# system.CUDA_VISIBLE_DEVICES="'6'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it\ +# trainer.n_gpus_per_node=1 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_2048_windows5_7000scores/checkpoint-3648\ +# trainer.experiment_name=game_2048-frommlp-windows5-7000score $USE_PPO $USE_BASE + + +# WANDB_MODE=offline python train.py --config-name _8_2048 \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_2048_windows5_7000scores \ +# trainer.experiment_name=game_2048-frommlp-windows5 $USE_PPO $USE_BASE + +#**********************************sudoku**************************************** + +# python train.py --config-name _11_sudoku \ +# system.CUDA_VISIBLE_DEVICES="'0'" \ +# trainer.project_name=ragen_latest_qwen_05B_it\ +# trainer.n_gpus_per_node=1 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_sudoku4x4_nohint \ +# trainer.experiment_name=sudoku-4x4-frommlp-nohint $USE_PPO $USE_BASE + +# python train.py --config-name _11_sudoku \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_1.5B_it_sudoku4x4_nohint \ +# trainer.experiment_name=sudoku-4x4-frommlp-nohint $USE_PPO $USE_BASE + +# WANDB_MODE=offline python train.py --config-name _11_sudoku \ +# system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it\ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sudoku4x4_nohint \ +# trainer.experiment_name=sudoku-4x4-frommlp-nohint $USE_PPO $USE_BASE \ No newline at end of file diff --git a/train_starpo-s_SPA_2048_SPA_05B.sh b/train_starpo-s_SPA_2048_SPA_05B.sh new file mode 100644 index 0000000000000000000000000000000000000000..448e5a8622f41813850f55e4ac963098bb464f74 --- /dev/null +++ b/train_starpo-s_SPA_2048_SPA_05B.sh @@ -0,0 +1,268 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.0 actor_rollout_ref.actor.kl_loss_coef=0.0 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=0.25" +# export WANDB_API_KEY="5ab0f17574bdd98888d94dd7ab7480fd8a3f56b8" + +_2048_env_instruction="You are playing the 2048 game on a 4x4 grid.\nMerge equal tiles by sliding Up, Right, Down, or Left.\nUse a zero-indexed grid where (0,0) is top-left and (3,3) is bottom-right.\nIf a move is invalid (no tiles move), a small penalty is applied.\n\nExample answer format:\n\n\n[Current Grid Symbol Representation]\nTile values and positions: 2 at (0,0), 2 at (0,1), 4 at (3,3).\n\nI want to merge the two 2s in the top row. Sliding Right will merge them at (0,3).\n\n[Predicted Grid Symbol Representation after move]\nPredicted changes: The 2 at (0,0) and 2 at (0,1) merge into a 4 at (0,3). (3,3) remains 4.\n\n\nRight\n\nA sample full output is as follows:\n\n\n2 2 . .\n. . . .\n. . . .\n. . . 4\nNon-empty tiles: 2 at (0,0), 2 at (0,1), 4 at (3,3).\n\nChecking moves:\nUp: No merge.\nRight: (0,0) and (0,1) are equal (2), they will merge to the right.\n\n. . . 4\n. . . .\n. . . .\n. . . 4\nMerged tile 4 created at (0,3). Tile at (3,3) stays.\n\n\nRight" + +#**************************************2048********************************* +########### 0.5B ############# +python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_05B_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_8_2048-0.5B-text_with_coordinates-qwen/global_step_3200 \ + custom_envs.game_2048.env_instruction="\"$_2048_env_instruction\"" \ + actor_rollout_ref.rollout.gpu_memory_utilization=0.7\ + actor_rollout_ref.rollout.max_model_len=14400\ + agent_proxy.max_turn=700\ + trainer.experiment_name=_2048_starpo_SPA $USE_PPO $USE_BASE + +########### 1.5B ############# +# python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_8_2048-1.5B-text_with_coordinates-qwen/global_step_3200 \ +# custom_envs.game_2048.env_instruction="\"$_2048_env_instruction\"" \ +# actor_rollout_ref.rollout.gpu_memory_utilization=0.5\ +# actor_rollout_ref.rollout.max_model_len=14400\ +# agent_proxy.max_turn=700\ +# trainer.experiment_name=_2048_starpo_SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_8_2048-3B-text_with_coordinates-qwen/global_step_3200 \ +# custom_envs.game_2048.env_instruction="\"$_2048_env_instruction\"" \ +# actor_rollout_ref.rollout.gpu_memory_utilization=0.7\ +# actor_rollout_ref.rollout.max_model_len=14400\ +# agent_proxy.max_turn=700\ +# trainer.experiment_name=_2048_starpo_SPA $USE_PPO $USE_BASE + + + + +# #**************************************rubikscube-rotato1********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=2048_starpo_stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=2048_starpo_stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=2048_starpo_stateestimation $USE_PPO $USE_BASE + + + + +# #**************************************rubikscube-rotato2********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + + + + +# #**************************************rubikscube-rotato3********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + +# #**************************************bandit********************************* +# ########### 0.5B ############# +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +# ########### 1.5B ############# +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_25_15b_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + +#**************************************2048********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +########### 1.5B ############# +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + + + diff --git a/train_starpo-s_SPA_2048_SPA_3B.sh b/train_starpo-s_SPA_2048_SPA_3B.sh new file mode 100644 index 0000000000000000000000000000000000000000..d8316d4de8b66b4d46964f4603a5d5e83b4cbe35 --- /dev/null +++ b/train_starpo-s_SPA_2048_SPA_3B.sh @@ -0,0 +1,268 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.0 actor_rollout_ref.actor.kl_loss_coef=0.0 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=0.25" +# export WANDB_API_KEY="5ab0f17574bdd98888d94dd7ab7480fd8a3f56b8" + +_2048_env_instruction="You are playing the 2048 game on a 4x4 grid.\nMerge equal tiles by sliding Up, Right, Down, or Left.\nUse a zero-indexed grid where (0,0) is top-left and (3,3) is bottom-right.\nIf a move is invalid (no tiles move), a small penalty is applied.\n\nExample answer format:\n\n\n[Current Grid Symbol Representation]\nTile values and positions: 2 at (0,0), 2 at (0,1), 4 at (3,3).\n\nI want to merge the two 2s in the top row. Sliding Right will merge them at (0,3).\n\n[Predicted Grid Symbol Representation after move]\nPredicted changes: The 2 at (0,0) and 2 at (0,1) merge into a 4 at (0,3). (3,3) remains 4.\n\n\nRight\n\nA sample full output is as follows:\n\n\n2 2 . .\n. . . .\n. . . .\n. . . 4\nNon-empty tiles: 2 at (0,0), 2 at (0,1), 4 at (3,3).\n\nChecking moves:\nUp: No merge.\nRight: (0,0) and (0,1) are equal (2), they will merge to the right.\n\n. . . 4\n. . . .\n. . . .\n. . . 4\nMerged tile 4 created at (0,3). Tile at (3,3) stays.\n\n\nRight" + +#**************************************2048********************************* +########### 0.5B ############# +# python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_8_2048-0.5B-text_with_coordinates-qwen/global_step_3200 \ +# custom_envs.game_2048.env_instruction="\"$_2048_env_instruction\"" \ +# actor_rollout_ref.rollout.gpu_memory_utilization=0.7\ +# actor_rollout_ref.rollout.max_model_len=14400\ +# agent_proxy.max_turn=700\ +# trainer.experiment_name=_2048_starpo_SPA $USE_PPO $USE_BASE + +########### 1.5B ############# +# python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_8_2048-1.5B-text_with_coordinates-qwen/global_step_3200 \ +# custom_envs.game_2048.env_instruction="\"$_2048_env_instruction\"" \ +# actor_rollout_ref.rollout.gpu_memory_utilization=0.5\ +# actor_rollout_ref.rollout.max_model_len=14400\ +# agent_proxy.max_turn=700\ +# trainer.experiment_name=_2048_starpo_SPA $USE_PPO $USE_BASE + +########### 3B ############# + +python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_8_2048-3B-text_with_coordinates-qwen/global_step_3200 \ + custom_envs.game_2048.env_instruction="\"$_2048_env_instruction\"" \ + actor_rollout_ref.rollout.gpu_memory_utilization=0.7\ + actor_rollout_ref.rollout.max_model_len=14400\ + agent_proxy.max_turn=700\ + trainer.experiment_name=_2048_starpo_SPA $USE_PPO $USE_BASE + + + + +# #**************************************rubikscube-rotato1********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=2048_starpo_stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=2048_starpo_stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=2048_starpo_stateestimation $USE_PPO $USE_BASE + + + + +# #**************************************rubikscube-rotato2********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + + + + +# #**************************************rubikscube-rotato3********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + +# #**************************************bandit********************************* +# ########### 0.5B ############# +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +# ########### 1.5B ############# +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_25_15b_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + +#**************************************2048********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +########### 1.5B ############# +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + + + diff --git a/train_starpo-s_SPA_2048_state.sh b/train_starpo-s_SPA_2048_state.sh new file mode 100644 index 0000000000000000000000000000000000000000..24b02663d586e24252ab65aa372996228fdae0d7 --- /dev/null +++ b/train_starpo-s_SPA_2048_state.sh @@ -0,0 +1,268 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.0 actor_rollout_ref.actor.kl_loss_coef=0.0 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=0.25" +# export WANDB_API_KEY="5ab0f17574bdd98888d94dd7ab7480fd8a3f56b8" + +_2048_env_instruction="You are playing the 2048 game on a 4x4 grid.\nMerge equal tiles by sliding Up, Right, Down, or Left.\nUse a zero-indexed grid where (0,0) is top-left and (3,3) is bottom-right.\nIf a move is invalid (no tiles move), a small penalty is applied.\n\nExample answer format:\n\n\n[Current Grid Symbol Representation]\nTile values and positions: 2 at (0,0), 2 at (0,1), 4 at (3,3).\n\nI want to merge the two 2s in the top row. Sliding Right will merge them at (0,3).\n\n[Predicted Grid Symbol Representation after move]\nPredicted changes: The 2 at (0,0) and 2 at (0,1) merge into a 4 at (0,3). (3,3) remains 4.\n\n\nRight\n\nA sample full output is as follows:\n\n\n2 2 . .\n. . . .\n. . . .\n. . . 4\nNon-empty tiles: 2 at (0,0), 2 at (0,1), 4 at (3,3).\n\nChecking moves:\nUp: No merge.\nRight: (0,0) and (0,1) are equal (2), they will merge to the right.\n\n. . . 4\n. . . .\n. . . .\n. . . 4\nMerged tile 4 created at (0,3). Tile at (3,3) stays.\n\n\nRight" + +#**************************************2048********************************* +########### 0.5B ############# +python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_05B_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/share/model/Qwen/Qwen2.5-0.5B-Instruct \ + custom_envs.game_2048.env_instruction="\"$_2048_env_instruction\"" \ + actor_rollout_ref.rollout.gpu_memory_utilization=0.5\ + actor_rollout_ref.rollout.max_model_len=14400\ + agent_proxy.max_turn=700\ + trainer.experiment_name=_2048_starpo_stateestimation $USE_PPO $USE_BASE + +########### 1.5B ############# +python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_15b_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/share/model/Qwen/Qwen2.5-1.5B-Instruct \ + custom_envs.game_2048.env_instruction="\"$_2048_env_instruction\"" \ + actor_rollout_ref.rollout.gpu_memory_utilization=0.5\ + actor_rollout_ref.rollout.max_model_len=14400\ + agent_proxy.max_turn=700\ + trainer.experiment_name=_2048_starpo_stateestimation $USE_PPO $USE_BASE + +########### 3B ############# + +python train.py --config-name _8_2048 system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/share/model/Qwen/Qwen2.5-3B-Instruct \ + custom_envs.game_2048.env_instruction="\"$_2048_env_instruction\"" \ + actor_rollout_ref.rollout.gpu_memory_utilization=0.5\ + actor_rollout_ref.rollout.max_model_len=14400\ + agent_proxy.max_turn=700\ + trainer.experiment_name=_2048_starpo_stateestimation $USE_PPO $USE_BASE + + + + +# #**************************************rubikscube-rotato1********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=2048_starpo_stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=2048_starpo_stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=2048_starpo_stateestimation $USE_PPO $USE_BASE + + + + +# #**************************************rubikscube-rotato2********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + + + + +# #**************************************rubikscube-rotato3********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + +# #**************************************bandit********************************* +# ########### 0.5B ############# +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +# ########### 1.5B ############# +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_25_15b_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + +#**************************************2048********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +########### 1.5B ############# +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + + + diff --git a/train_starpo-s_SPA_bandit_SPA.sh b/train_starpo-s_SPA_bandit_SPA.sh new file mode 100644 index 0000000000000000000000000000000000000000..8342d5e80e2aac650b24f0ab3993020e31c41212 --- /dev/null +++ b/train_starpo-s_SPA_bandit_SPA.sh @@ -0,0 +1,392 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.0 actor_rollout_ref.actor.kl_loss_coef=0.0 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=0.25" +# export WANDB_API_KEY="5ab0f17574bdd98888d94dd7ab7480fd8a3f56b8" + +_2048_env_instruction="""You are playing the 2048 game on a 4x4 grid. +Merge equal tiles by sliding Up, Right, Down, or Left. +Use a zero-indexed grid where (0,0) is top-left and (3,3) is bottom-right. +If a move is invalid (no tiles move), a small penalty is applied. + +Example answer format: + + +[Current Grid Symbol Representation] +Tile values and positions: 2 at (0,0), 2 at (0,1), 4 at (3,3). + +I want to merge the two 2s in the top row. Sliding Right will merge them at (0,3). + +[Predicted Grid Symbol Representation after move] +Predicted changes: The 2 at (0,0) and 2 at (0,1) merge into a 4 at (0,3). (3,3) remains 4. + + +Right + +A sample full output is as follows: + + +2 2 . . +. . . . +. . . . +. . . 4 +Non-empty tiles: 2 at (0,0), 2 at (0,1), 4 at (3,3). + +Checking moves: +Up: No merge. +Right: (0,0) and (0,1) are equal (2), they will merge to the right. + +. . . 4 +. . . . +. . . . +. . . 4 +Merged tile 4 created at (0,3). Tile at (3,3) stays. + + +Right""" + +CUBE_ENV_INSTRUCTION="""You are solving a 2x2 Rubik's Cube (Pocket Cube). +The goal is to restore the cube so that each of the faces consists of a single, unique color. +Available actions: U, U', D, D', L, L', R, R', F, F', B, B'. +State representation format: A string of colors representing faces U, D, L, R, F, B. + +Example answer format: + + +Current State: [Color String or Grid] +Face U (Up): W W W W +Face F (Front): R R G G +Face R (Right): B B O O +... + +I need to fix the Front face top row. Rotating U (Up) clockwise will shift the top row of F, R, B, L to the left. + +Predicted State: [Predicted Color String or Grid] +Face F top row becomes the colors from Face R. +Face R top row becomes the colors from Face B. +... + + +U + +A sample full output is as follows: + + + W W + W W +O O G G R R B B +O O G G R R B B + Y Y + Y Y +Face U: All White. Face F: Green. Face R: Red. Face B: Blue. Face L: Orange. Face D: Yellow. +Cube is currently solved. + +To disrupt the state for demonstration, I will apply R (Right face clockwise). +This will move columns: F right col -> U right col -> B left col (inverted) -> D right col -> F right col. + + W Y + W Y +O O G G W W B B +O O G G W W B B + Y R + Y R +Face R rotates clockwise (colors cycle). Right column of F becomes Yellow (from D). + + +R""" +#**************************************bandit********************************* +########### 0.5B ############# +python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_05B_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_1_bandit-0.5B-text_with_coordinates-qwen/global_step_320 \ + trainer.experiment_name=bandit-starpo-SPA $USE_PPO $USE_BASE + +########### 1.5B ############# + +python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_15b_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_1_bandit-1.5B-text_with_coordinates-qwen/global_step_320 \ + trainer.experiment_name=bandit-starpo-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_1_bandit-3B-text_with_coordinates-qwen/global_step_320 \ + trainer.experiment_name=bandit-starpo-SPA $USE_PPO $USE_BASE + + +#**************************************frozenlake-static********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-0.5B-text_with_coordinates-qwen/global_step_3068 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + +########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-1.5B-text_with_coordinates-qwen/global_step_1348 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-3B-text_with_coordinates-qwen/global_step_1199 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + + + + + + + + + +# #**************************************rubikscube-rotato1********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-1-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-1-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-1-starpos-stateestimation $USE_PPO $USE_BASE + + + + +# #**************************************rubikscube-rotato2********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + + + + +# #**************************************rubikscube-rotato3********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + +# #**************************************bandit********************************* +# ########### 0.5B ############# +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +# ########### 1.5B ############# +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_25_15b_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + +#**************************************2048********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +########### 1.5B ############# +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + + + diff --git a/train_starpo-s_SPA_bandit_state.sh b/train_starpo-s_SPA_bandit_state.sh new file mode 100644 index 0000000000000000000000000000000000000000..804b3c0c1dfb35d5319bdf66fc6f9cdeee7456da --- /dev/null +++ b/train_starpo-s_SPA_bandit_state.sh @@ -0,0 +1,392 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.0 actor_rollout_ref.actor.kl_loss_coef=0.0 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=0.25" +# export WANDB_API_KEY="5ab0f17574bdd98888d94dd7ab7480fd8a3f56b8" + +_2048_env_instruction="""You are playing the 2048 game on a 4x4 grid. +Merge equal tiles by sliding Up, Right, Down, or Left. +Use a zero-indexed grid where (0,0) is top-left and (3,3) is bottom-right. +If a move is invalid (no tiles move), a small penalty is applied. + +Example answer format: + + +[Current Grid Symbol Representation] +Tile values and positions: 2 at (0,0), 2 at (0,1), 4 at (3,3). + +I want to merge the two 2s in the top row. Sliding Right will merge them at (0,3). + +[Predicted Grid Symbol Representation after move] +Predicted changes: The 2 at (0,0) and 2 at (0,1) merge into a 4 at (0,3). (3,3) remains 4. + + +Right + +A sample full output is as follows: + + +2 2 . . +. . . . +. . . . +. . . 4 +Non-empty tiles: 2 at (0,0), 2 at (0,1), 4 at (3,3). + +Checking moves: +Up: No merge. +Right: (0,0) and (0,1) are equal (2), they will merge to the right. + +. . . 4 +. . . . +. . . . +. . . 4 +Merged tile 4 created at (0,3). Tile at (3,3) stays. + + +Right""" + +CUBE_ENV_INSTRUCTION="""You are solving a 2x2 Rubik's Cube (Pocket Cube). +The goal is to restore the cube so that each of the faces consists of a single, unique color. +Available actions: U, U', D, D', L, L', R, R', F, F', B, B'. +State representation format: A string of colors representing faces U, D, L, R, F, B. + +Example answer format: + + +Current State: [Color String or Grid] +Face U (Up): W W W W +Face F (Front): R R G G +Face R (Right): B B O O +... + +I need to fix the Front face top row. Rotating U (Up) clockwise will shift the top row of F, R, B, L to the left. + +Predicted State: [Predicted Color String or Grid] +Face F top row becomes the colors from Face R. +Face R top row becomes the colors from Face B. +... + + +U + +A sample full output is as follows: + + + W W + W W +O O G G R R B B +O O G G R R B B + Y Y + Y Y +Face U: All White. Face F: Green. Face R: Red. Face B: Blue. Face L: Orange. Face D: Yellow. +Cube is currently solved. + +To disrupt the state for demonstration, I will apply R (Right face clockwise). +This will move columns: F right col -> U right col -> B left col (inverted) -> D right col -> F right col. + + W Y + W Y +O O G G W W B B +O O G G W W B B + Y R + Y R +Face R rotates clockwise (colors cycle). Right column of F becomes Yellow (from D). + + +R""" +#**************************************bandit********************************* +########### 0.5B ############# +python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_05B_it \ + trainer.n_gpus_per_node=8 \ + model_path=Qwen/Qwen2.5-0.5B-Instruct \ + trainer.experiment_name=bandit-starpo-stateestimation $USE_PPO $USE_BASE + +########### 1.5B ############# + +python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_15b_it \ + trainer.n_gpus_per_node=8 \ + model_path=Qwen/Qwen2.5-1.5B-Instruct \ + trainer.experiment_name=bandit-starpo-stateestimation $USE_PPO $USE_BASE + +########### 3B ############# + +python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it \ + trainer.n_gpus_per_node=8 \ + model_path=Qwen/Qwen2.5-3B-Instruct \ + trainer.experiment_name=bandit-starpo-stateestimation $USE_PPO $USE_BASE + + +#**************************************frozenlake-static********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-0.5B-text_with_coordinates-qwen/global_step_3068 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + +########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-1.5B-text_with_coordinates-qwen/global_step_1348 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-3B-text_with_coordinates-qwen/global_step_1199 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + + + + + + + + + +# #**************************************rubikscube-rotato1********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-1-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-1-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-1-starpos-stateestimation $USE_PPO $USE_BASE + + + + +# #**************************************rubikscube-rotato2********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + + + + +# #**************************************rubikscube-rotato3********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction=$CUBE_ENV_INSTRUCTION \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + +# #**************************************bandit********************************* +# ########### 0.5B ############# +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +# ########### 1.5B ############# +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_25_15b_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + +#**************************************2048********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +########### 1.5B ############# +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + + + diff --git a/train_starpo-s_SPA_cube1_SPA.sh b/train_starpo-s_SPA_cube1_SPA.sh new file mode 100644 index 0000000000000000000000000000000000000000..7f4491bf0a2f708d77cc48048326ad5380487a45 --- /dev/null +++ b/train_starpo-s_SPA_cube1_SPA.sh @@ -0,0 +1,345 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.0 actor_rollout_ref.actor.kl_loss_coef=0.0 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=0.25" +# export WANDB_API_KEY="5ab0f17574bdd98888d94dd7ab7480fd8a3f56b8" + +_2048_env_instruction="""You are playing the 2048 game on a 4x4 grid. +Merge equal tiles by sliding Up, Right, Down, or Left. +Use a zero-indexed grid where (0,0) is top-left and (3,3) is bottom-right. +If a move is invalid (no tiles move), a small penalty is applied. + +Example answer format: + + +[Current Grid Symbol Representation] +Tile values and positions: 2 at (0,0), 2 at (0,1), 4 at (3,3). + +I want to merge the two 2s in the top row. Sliding Right will merge them at (0,3). + +[Predicted Grid Symbol Representation after move] +Predicted changes: The 2 at (0,0) and 2 at (0,1) merge into a 4 at (0,3). (3,3) remains 4. + + +Right + +A sample full output is as follows: + + +2 2 . . +. . . . +. . . . +. . . 4 +Non-empty tiles: 2 at (0,0), 2 at (0,1), 4 at (3,3). + +Checking moves: +Up: No merge. +Right: (0,0) and (0,1) are equal (2), they will merge to the right. + +. . . 4 +. . . . +. . . . +. . . 4 +Merged tile 4 created at (0,3). Tile at (3,3) stays. + + +Right""" + +CUBE_ENV_INSTRUCTION="You are solving a 2x2 Rubik's Cube (Pocket Cube).\nThe goal is to restore the cube so that each of the faces consists of a single, unique color.\nAvailable actions: U, U', D, D', L, L', R, R', F, F', B, B'.\nState representation format: A string of colors representing faces U, D, L, R, F, B.\n\nExample answer format:\n\n\nCurrent State: [Color String or Grid]\nFace U (Up): W W W W\nFace F (Front): R R G G\nFace R (Right): B B O O\n...\n\nI need to fix the Front face top row. Rotating U (Up) clockwise will shift the top row of F, R, B, L to the left.\n\nPredicted State: [Predicted Color String or Grid]\nFace F top row becomes the colors from Face R.\nFace R top row becomes the colors from Face B.\n...\n\n\nU\n\nA sample full output is as follows:\n\n\n W W\n W W\nO O G G R R B B\nO O G G R R B B\n Y Y\n Y Y\nFace U: All White. Face F: Green. Face R: Red. Face B: Blue. Face L: Orange. Face D: Yellow.\nCube is currently solved.\n\nTo disrupt the state for demonstration, I will apply R (Right face clockwise).\nThis will move columns: F right col -> U right col -> B left col (inverted) -> D right col -> F right col.\n\n W Y\n W Y\nO O G G W W B B\nO O G G W W B B\n Y R\n Y R\nFace R rotates clockwise (colors cycle). Right column of F becomes Yellow (from D).\n\n\nR" + +# #**************************************bandit********************************* +# ########### 0.5B ############# +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# trainer.experiment_name=bandit-starpo-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# trainer.experiment_name=bandit-starpo-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# trainer.experiment_name=bandit-starpo-stateestimation $USE_PPO $USE_BASE + + +#**************************************frozenlake-static********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-0.5B-text_with_coordinates-qwen/global_step_3068 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + +########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-1.5B-text_with_coordinates-qwen/global_step_1348 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-3B-text_with_coordinates-qwen/global_step_1199 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + + + + + + + + + +#**************************************rubikscube-rotato1********************************* +########### 0.5B ############# +python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_05B_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_10_rubikscube-0.5B-text_with_coordinates-qwen/global_step_1335 \ + custom_envs.rubikscube.env_config.scramble_depth=1 \ + custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ + trainer.experiment_name=rubikscube-1-starpos-SPA $USE_PPO $USE_BASE + +########### 1.5B ############# +python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_15b_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_10_rubikscube-1.5B-text_with_coordinates-qwen/global_step_1335 \ + custom_envs.rubikscube.env_config.scramble_depth=1 \ + custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ + trainer.experiment_name=rubikscube-1-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it \ + trainer.n_gpus_per_node=8 \ + model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_10_rubikscube-3B-text_with_coordinates-qwen/global_step_1335 \ + custom_envs.rubikscube.env_config.scramble_depth=1 \ + custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ + trainer.experiment_name=rubikscube-1-starpos-SPA $USE_PPO $USE_BASE + + + + +# #**************************************rubikscube-rotato2********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-2-starpos-SPA $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-2-starpos-SPA $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + + + +# #**************************************rubikscube-rotato3********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-3-starpos-SPA $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-3-starpos-SPA $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-3-starpos-SPA $USE_PPO $USE_BASE + + + + + + +# #**************************************bandit********************************* +# ########### 0.5B ############# +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# # python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_05B_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# # custom_envs.rubikscube.env_config.scramble_depth=1 \ +# # trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +# ########### 1.5B ############# +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_25_15b_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# # custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# # custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# # trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_25_15b_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# # custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# # custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# # trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# ########### 3B ############# + +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_25_3b_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# # custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# # custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# # trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# # python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# # trainer.project_name=ragen_latest_qwen_25_3b_it \ +# # trainer.n_gpus_per_node=8 \ +# # model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# # custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# # custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# # trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + +#**************************************2048********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +########### 1.5B ############# +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + + + diff --git a/train_starpo-s_SPA_cube2_state.sh b/train_starpo-s_SPA_cube2_state.sh new file mode 100644 index 0000000000000000000000000000000000000000..dc8d0e2e32231b322e6ffb408b6e2054b3036238 --- /dev/null +++ b/train_starpo-s_SPA_cube2_state.sh @@ -0,0 +1,345 @@ +set -e + +# Section 1: Base Experiments +USE_GRPO="algorithm.adv_estimator=grpo" +# USE_GRPO="algorithm.adv_estimator=grpo agent_proxy.reward_normalization.method=mean_std actor_rollout_ref.actor.use_kl_loss=True" +USE_PPO="algorithm.adv_estimator=gae" # by default. +USE_BASE="algorithm.kl_ctrl.kl_coef=0.0 actor_rollout_ref.actor.kl_loss_coef=0.0 actor_rollout_ref.actor.clip_ratio_high=0.28 actor_rollout_ref.rollout.rollout_filter_ratio=0.25" +# export WANDB_API_KEY="5ab0f17574bdd98888d94dd7ab7480fd8a3f56b8" + +_2048_env_instruction="""You are playing the 2048 game on a 4x4 grid. +Merge equal tiles by sliding Up, Right, Down, or Left. +Use a zero-indexed grid where (0,0) is top-left and (3,3) is bottom-right. +If a move is invalid (no tiles move), a small penalty is applied. + +Example answer format: + + +[Current Grid Symbol Representation] +Tile values and positions: 2 at (0,0), 2 at (0,1), 4 at (3,3). + +I want to merge the two 2s in the top row. Sliding Right will merge them at (0,3). + +[Predicted Grid Symbol Representation after move] +Predicted changes: The 2 at (0,0) and 2 at (0,1) merge into a 4 at (0,3). (3,3) remains 4. + + +Right + +A sample full output is as follows: + + +2 2 . . +. . . . +. . . . +. . . 4 +Non-empty tiles: 2 at (0,0), 2 at (0,1), 4 at (3,3). + +Checking moves: +Up: No merge. +Right: (0,0) and (0,1) are equal (2), they will merge to the right. + +. . . 4 +. . . . +. . . . +. . . 4 +Merged tile 4 created at (0,3). Tile at (3,3) stays. + + +Right""" + +CUBE_ENV_INSTRUCTION="You are solving a 2x2 Rubik's Cube (Pocket Cube).\nThe goal is to restore the cube so that each of the faces consists of a single, unique color.\nAvailable actions: U, U', D, D', L, L', R, R', F, F', B, B'.\nState representation format: A string of colors representing faces U, D, L, R, F, B.\n\nExample answer format:\n\n\nCurrent State: [Color String or Grid]\nFace U (Up): W W W W\nFace F (Front): R R G G\nFace R (Right): B B O O\n...\n\nI need to fix the Front face top row. Rotating U (Up) clockwise will shift the top row of F, R, B, L to the left.\n\nPredicted State: [Predicted Color String or Grid]\nFace F top row becomes the colors from Face R.\nFace R top row becomes the colors from Face B.\n...\n\n\nU\n\nA sample full output is as follows:\n\n\n W W\n W W\nO O G G R R B B\nO O G G R R B B\n Y Y\n Y Y\nFace U: All White. Face F: Green. Face R: Red. Face B: Blue. Face L: Orange. Face D: Yellow.\nCube is currently solved.\n\nTo disrupt the state for demonstration, I will apply R (Right face clockwise).\nThis will move columns: F right col -> U right col -> B left col (inverted) -> D right col -> F right col.\n\n W Y\n W Y\nO O G G W W B B\nO O G G W W B B\n Y R\n Y R\nFace R rotates clockwise (colors cycle). Right column of F becomes Yellow (from D).\n\n\nR" + +# #**************************************bandit********************************* +# ########### 0.5B ############# +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# trainer.experiment_name=bandit-starpo-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# trainer.experiment_name=bandit-starpo-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _1_bandit system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# trainer.experiment_name=bandit-starpo-stateestimation $USE_PPO $USE_BASE + + +#**************************************frozenlake-static********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-0.5B-text_with_coordinates-qwen/global_step_3068 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + +########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-1.5B-text_with_coordinates-qwen/global_step_1348 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_3_frozen_lake-3B-text_with_coordinates-qwen/global_step_1199 \ +# trainer.experiment_name=frozenlake-static-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# trainer.experiment_name=frozenlake-static-starpos-stateestimate $USE_PPO $USE_BASE + + + + + + + + + +# #**************************************rubikscube-rotato1********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-1-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-1-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-1-starpos-stateestimation $USE_PPO $USE_BASE + + + + +#**************************************rubikscube-rotato2********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=2 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +########### 1.5B ############# +python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_15b_it \ + trainer.n_gpus_per_node=8 \ + model_path=Qwen/Qwen2.5-1.5B-Instruct \ + custom_envs.rubikscube.env_config.scramble_depth=2 \ + custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ + trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + +########### 3B ############# + +python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ + trainer.project_name=ragen_latest_qwen_25_3b_it \ + trainer.n_gpus_per_node=8 \ + model_path=Qwen/Qwen2.5-3B-Instruct \ + custom_envs.rubikscube.env_config.scramble_depth=2 \ + custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ + trainer.experiment_name=rubikscube-2-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + + + + +# #**************************************rubikscube-rotato3********************************* +# ########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-0.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 1.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-1.5B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + +# ########### 3B ############# + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=Qwen/Qwen2.5-3B-Instruct \ +# custom_envs.rubikscube.env_config.scramble_depth=3 \ +# custom_envs.rubikscube.env_instruction="\"$CUBE_ENV_INSTRUCTION\"" \ +# trainer.experiment_name=rubikscube-3-starpos-stateestimation $USE_PPO $USE_BASE + + + + + + +#**************************************bandit********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +########### 1.5B ############# +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + +#**************************************2048********************************* +########### 0.5B ############# +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE + +# python train.py --config-name _10_rubikscube system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_05B_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_0.5B_it_rubikscube_1 \ +# custom_envs.rubikscube.env_config.scramble_depth=1 \ +# trainer.experiment_name=rubikscube-1-starpos-frommlp $USE_PPO $USE_BASE & + +########### 1.5B ############# +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_15b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +########### 3B ############# + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + +# python train.py --config-name _2_sokoban system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \ +# trainer.project_name=ragen_latest_qwen_25_3b_it \ +# trainer.n_gpus_per_node=8 \ +# model_path=/mnt/general/wanghy/SPA/sftckpt/checkpoints_2_sokoban-1.5B-text_with_coordinates-qwen/global_step_1470 \ +# custom_envs.CoordSokoban.env_config.num_boxes=2 \ +# custom_envs.CoordSokoban.env_instruction="'You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target. Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5). When you are exactly next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like Right || Right || Up. A sample full output is as follows: ######\n#_####\n#_P###\n#_X#_#\n#__O_#\n######\nPlayer (P) is at (2,2); box (X) is at (3,2); target (O) is at (4,3). 1 Down – I push box to (4,2). 2 Left – I step to (3,1). 3 Down – I stand left of box, ready to push it Right onto target. ######\n#_####\n#__###\n#__#_#\n#PXO_#\n###### Down || Left || Down '" \ +# trainer.experiment_name=sokoban-box2-starpos-SPA $USE_PPO $USE_BASE + + + + + + + + +