From bb9625f81d5180ef9d34fbfe06eef8f5bcfd6ca8 Mon Sep 17 00:00:00 2001 From: Elliot Tower Date: Mon, 15 May 2023 15:37:33 -0400 Subject: [PATCH] Bump version to 1.23.0, fix tutorials and update tutorial requirements (#984) --- .github/workflows/linux-tutorials-test.yml | 2 +- pettingzoo/__init__.py | 2 +- tutorials/CleanRL/cleanrl.py | 3 ++- tutorials/CleanRL/requirements.txt | 4 ++-- tutorials/EnvironmentCreation/requirements.txt | 2 +- tutorials/Ray/requirements.txt | 5 ++--- tutorials/Tianshou/requirements.txt | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux-tutorials-test.yml b/.github/workflows/linux-tutorials-test.yml index b896964d4..cc47d31c7 100644 --- a/.github/workflows/linux-tutorials-test.yml +++ b/.github/workflows/linux-tutorials-test.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: python-version: ['3.7', '3.8', '3.9', '3.10'] # '3.11' - broken due to numba - tutorial: ['Tianshou', 'EnvironmentCreation'] # TODO: add back 'CleanRL' after SuperSuit is fixed + tutorial: ['Tianshou', 'EnvironmentCreation', 'CleanRL'] # TODO: add back 'CleanRL' after SuperSuit is fixed steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/pettingzoo/__init__.py b/pettingzoo/__init__.py index 346cca435..2b41f102e 100644 --- a/pettingzoo/__init__.py +++ b/pettingzoo/__init__.py @@ -12,7 +12,7 @@ os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "hide" -__version__ = "1.22.4" +__version__ = "1.23.0" try: import sys diff --git a/tutorials/CleanRL/cleanrl.py b/tutorials/CleanRL/cleanrl.py index 3953194f0..fb7f053b8 100644 --- a/tutorials/CleanRL/cleanrl.py +++ b/tutorials/CleanRL/cleanrl.py @@ -265,7 +265,8 @@ def unbatchify(x, env): with torch.no_grad(): # render 5 episodes out for episode in range(5): - obs = batchify_obs(env.reset(seed=None), device) + obs, infos = env.reset(seed=None) + obs = batchify_obs(obs, device) terms = [False] truncs = [False] while not any(terms) and not any(truncs): diff --git a/tutorials/CleanRL/requirements.txt b/tutorials/CleanRL/requirements.txt index cfcbd8e8c..2d8b0027a 100644 --- a/tutorials/CleanRL/requirements.txt +++ b/tutorials/CleanRL/requirements.txt @@ -1,5 +1,5 @@ -SuperSuit==3.7.2 +SuperSuit==3.8.0 torch==1.13.1 -pettingzoo[butterfly]==1.22.4 +pettingzoo[butterfly]==1.23.0 # remove this line when SuperSuit has been updated to 3.7.3 tinyscaler==1.2.5 diff --git a/tutorials/EnvironmentCreation/requirements.txt b/tutorials/EnvironmentCreation/requirements.txt index d83da956e..ae5c33767 100644 --- a/tutorials/EnvironmentCreation/requirements.txt +++ b/tutorials/EnvironmentCreation/requirements.txt @@ -1 +1 @@ -pettingzoo==1.22.4 +pettingzoo==1.23.0 diff --git a/tutorials/Ray/requirements.txt b/tutorials/Ray/requirements.txt index 7c84b646f..13a066f83 100644 --- a/tutorials/Ray/requirements.txt +++ b/tutorials/Ray/requirements.txt @@ -1,8 +1,7 @@ Gymnasium==0.28.1 -numpy==1.23.5 -PettingZoo==1.22.4 +PettingZoo[classic, butterfly]==1.23.0 Pillow==9.4.0 -ray[rllib]==3.0.0.dev0 +ray[rllib]==2.4.0 SuperSuit==3.7.2 torch==1.13.1 tensorflow-probability==0.19.0 diff --git a/tutorials/Tianshou/requirements.txt b/tutorials/Tianshou/requirements.txt index cf78dbb23..b7b8d4a47 100644 --- a/tutorials/Tianshou/requirements.txt +++ b/tutorials/Tianshou/requirements.txt @@ -1,3 +1,3 @@ -pettingzoo[classic]==1.22.4 +pettingzoo[classic]==1.23.0 packaging==21.3 tianshou==0.5.0