Skip to content

Implement render method for Brax envs #36

Implement render method for Brax envs

Implement render method for Brax envs #36

# 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.9", "3.10", "3.11"]
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.23"
python -m pip install "jaxlib>=0.4.23"
python -m pip install "chex>=0.1.6"
python -m pip install "brax>=0.9.0"
python -m pip install "click>=8.1.3"
python -m pip install "distrax>=0.1.3"
python -m pip install "dm-env>=1.6"
python -m pip install "dm-haiku>=0.0.9"
python -m pip install "pgx>=2.0.1"
python -m pip install "einops>=0.6.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.1.7"
python -m pip install "pygame>=2.1.3"
python -m pip install "numpy>=1.22.4"
python -m pip install "rlax>=0.1.5"
python -m pip install "tqdm>=4.64.1"
python -m pip install "wandb>=0.13.10"
python -m pip install "gymnasium==0.29.1"
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