Skip to content

Commit

Permalink
fix: modifications from pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
David-GERARD committed Nov 24, 2024
1 parent 74393c1 commit ab64a60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linux-tutorials-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false

matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
tutorial: [Tianshou, CustomEnvironment, CleanRL, SB3/kaz, SB3/waterworld, SB3/test] # TODO: fix tutorials and add back Ray, fix SB3/connect_four tutorial
tutorial: [Tianshou, CustomEnvironment, CleanRL, SB3/kaz, SB3/waterworld, SB3/test] # TODO: fix tutorials and add back Ray, fix SB3/connect_four tutorial
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
10 changes: 5 additions & 5 deletions tutorials/SB3/connect_four/sb3_connect_four_action_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import glob
import os
import time
import gymnasium as gym

import gymnasium as gym
from sb3_contrib import MaskablePPO
from sb3_contrib.common.maskable.policies import MaskableActorCriticPolicy
from sb3_contrib.common.wrappers import ActionMasker
Expand All @@ -18,7 +18,6 @@
from pettingzoo.classic import connect_four_v3



class SB3ActionMaskWrapper(pettingzoo.utils.BaseWrapper):
"""Wrapper to allow PettingZoo environments to be used with SB3 illegal action masking."""

Expand Down Expand Up @@ -176,10 +175,11 @@ def eval_action_mask(env_fn, num_games=100, render_mode=None, **env_kwargs):


if __name__ == "__main__":

if gym.__version__ > "0.29.1":
raise ImportError(f"This script requires gymnasium version 0.29.1 or lower, but you have version {gym.__version__}.")

raise ImportError(
f"This script requires gymnasium version 0.29.1 or lower, but you have version {gym.__version__}."
)

env_fn = connect_four_v3

env_kwargs = {}
Expand Down

0 comments on commit ab64a60

Please sign in to comment.