Skip to content

Add auto wrapping of gymnax environments #46

Add auto wrapping of gymnax environments

Add auto wrapping of gymnax environments #46

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install "jax==0.4.35"
python -m pip install "jaxlib==0.4.35"
python -m pip install "chex>=0.1.87"
python -m pip install "brax>=0.11.0"
python -m pip install "click>=8.1.7"
python -m pip install "distrax>=0.1.5"
python -m pip install "dm-env>=1.6"
python -m pip install "dm-haiku>=0.0.13"
python -m pip install "pgx>=2.4.3"
python -m pip install "einops>=0.8.0"
python -m pip install "ffmpeg>=1.4"
python -m pip install "imageio>=2.25.1"
python -m pip install "mctx==0.0.5"
python -m pip install "moviepy>=1.0.3"
python -m pip install "ml-collections>=0.1.1"
python -m pip install "optax>=0.2.4"
python -m pip install "pygame>=2.6.1"
python -m pip install "numpy>=1.22.4"
python -m pip install "rlax>=0.1.6"
python -m pip install "tqdm>=4.64.1"
python -m pip install "wandb>=0.18.7"
python -m pip install "flashbax>=0.1.2"
python -m pip install "gymnasium==1.0.0"
python -m pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run Unit Tests
run: |
pytest
- name: Test PPO CartPole Training
run: |
dopamax train --config examples/ppo-cartpole/config.yaml --offline
- name: Test DQN CartPole Training
run: |
dopamax train --config examples/dqn-cartpole/config.yaml --offline
- name: Test AlphaZero TicTacToe Training
run: |
dopamax train --config examples/alphazero-tictactoe/config.yaml --offline