From db28d57a93a99a66637e674c82476d8248f82893 Mon Sep 17 00:00:00 2001 From: Camyll Harajli Date: Thu, 10 Apr 2025 12:53:09 -0700 Subject: [PATCH 1/6] test if this helps --- torchbenchmark/models/drq/drqutils.py | 2 +- torchbenchmark/models/drq/requirements.txt | 2 +- torchbenchmark/models/soft_actor_critic/envs.py | 4 ++-- torchbenchmark/models/soft_actor_critic/requirements.txt | 2 +- userbenchmark/dynamo/dynamobench/timm_models.yaml | 4 ++++ 5 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 userbenchmark/dynamo/dynamobench/timm_models.yaml diff --git a/torchbenchmark/models/drq/drqutils.py b/torchbenchmark/models/drq/drqutils.py index 24be20f82..53c0a1da8 100644 --- a/torchbenchmark/models/drq/drqutils.py +++ b/torchbenchmark/models/drq/drqutils.py @@ -3,7 +3,7 @@ import random from collections import deque -import gym +import gymnasium as gym import numpy as np import torch diff --git a/torchbenchmark/models/drq/requirements.txt b/torchbenchmark/models/drq/requirements.txt index cfbd5fcdd..18f7d2376 100644 --- a/torchbenchmark/models/drq/requirements.txt +++ b/torchbenchmark/models/drq/requirements.txt @@ -1,3 +1,3 @@ kornia scikit-image -gym +gymnasium diff --git a/torchbenchmark/models/soft_actor_critic/envs.py b/torchbenchmark/models/soft_actor_critic/envs.py index 7e39bba8e..9e891bfbf 100644 --- a/torchbenchmark/models/soft_actor_critic/envs.py +++ b/torchbenchmark/models/soft_actor_critic/envs.py @@ -2,7 +2,7 @@ import random from collections import deque -import gym +import gymnasium as gym import numpy as np @@ -132,7 +132,7 @@ def highway_env(env_id): highway_env: https://highway-env.readthedocs.io/en/latest/index.html """ - import gym + import gymnasium as gym env = gym.make(env_id) env.configure({"action": {"type": "ContinuousAction"}}) diff --git a/torchbenchmark/models/soft_actor_critic/requirements.txt b/torchbenchmark/models/soft_actor_critic/requirements.txt index 9dd7425d1..6829437f6 100644 --- a/torchbenchmark/models/soft_actor_critic/requirements.txt +++ b/torchbenchmark/models/soft_actor_critic/requirements.txt @@ -1,3 +1,3 @@ -gym +gymnasium pygame tensorboardX diff --git a/userbenchmark/dynamo/dynamobench/timm_models.yaml b/userbenchmark/dynamo/dynamobench/timm_models.yaml new file mode 100644 index 000000000..8fe214c8b --- /dev/null +++ b/userbenchmark/dynamo/dynamobench/timm_models.yaml @@ -0,0 +1,4 @@ +# removing this file prevents the TimmRunner from dynamically skipping models +skip: + all: + - ~ From 2339bdbc358c160090cd65d0dc52cd530f0fbebe Mon Sep 17 00:00:00 2001 From: Camyll Harajli Date: Thu, 10 Apr 2025 12:55:25 -0700 Subject: [PATCH 2/6] add gymnasium to requirements --- torchbenchmark/models/drq/requirements.txt | 2 +- torchbenchmark/models/soft_actor_critic/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/torchbenchmark/models/drq/requirements.txt b/torchbenchmark/models/drq/requirements.txt index 18f7d2376..cfbd5fcdd 100644 --- a/torchbenchmark/models/drq/requirements.txt +++ b/torchbenchmark/models/drq/requirements.txt @@ -1,3 +1,3 @@ kornia scikit-image -gymnasium +gym diff --git a/torchbenchmark/models/soft_actor_critic/requirements.txt b/torchbenchmark/models/soft_actor_critic/requirements.txt index 6829437f6..9dd7425d1 100644 --- a/torchbenchmark/models/soft_actor_critic/requirements.txt +++ b/torchbenchmark/models/soft_actor_critic/requirements.txt @@ -1,3 +1,3 @@ -gymnasium +gym pygame tensorboardX From 7beaa914fd139a471a11754f0d40057f4b281253 Mon Sep 17 00:00:00 2001 From: Camyll Harajli Date: Thu, 10 Apr 2025 13:22:36 -0700 Subject: [PATCH 3/6] add requirements fix --- torchbenchmark/models/drq/__init__.py | 2 +- torchbenchmark/models/drq/requirements.txt | 2 +- torchbenchmark/models/soft_actor_critic/requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/torchbenchmark/models/drq/__init__.py b/torchbenchmark/models/drq/__init__.py index 63da8ef15..351e5e9a1 100644 --- a/torchbenchmark/models/drq/__init__.py +++ b/torchbenchmark/models/drq/__init__.py @@ -4,7 +4,7 @@ import numpy as np import torch -from gym import spaces +from gymnasium import spaces from torchbenchmark.tasks import REINFORCEMENT_LEARNING from ...util.model import BenchmarkModel diff --git a/torchbenchmark/models/drq/requirements.txt b/torchbenchmark/models/drq/requirements.txt index cfbd5fcdd..18f7d2376 100644 --- a/torchbenchmark/models/drq/requirements.txt +++ b/torchbenchmark/models/drq/requirements.txt @@ -1,3 +1,3 @@ kornia scikit-image -gym +gymnasium diff --git a/torchbenchmark/models/soft_actor_critic/requirements.txt b/torchbenchmark/models/soft_actor_critic/requirements.txt index 9dd7425d1..6829437f6 100644 --- a/torchbenchmark/models/soft_actor_critic/requirements.txt +++ b/torchbenchmark/models/soft_actor_critic/requirements.txt @@ -1,3 +1,3 @@ -gym +gymnasium pygame tensorboardX From 33a725cf1ba6c2f4b96aeaa860406fb883eb8ede Mon Sep 17 00:00:00 2001 From: Camyll Harajli Date: Thu, 10 Apr 2025 15:43:49 -0700 Subject: [PATCH 4/6] add missing import change --- torchbenchmark/models/drq/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchbenchmark/models/drq/__init__.py b/torchbenchmark/models/drq/__init__.py index 351e5e9a1..63da8ef15 100644 --- a/torchbenchmark/models/drq/__init__.py +++ b/torchbenchmark/models/drq/__init__.py @@ -4,7 +4,7 @@ import numpy as np import torch -from gymnasium import spaces +from gym import spaces from torchbenchmark.tasks import REINFORCEMENT_LEARNING from ...util.model import BenchmarkModel From 9ec44cf4106f620218d4db38879dd0d034172cfc Mon Sep 17 00:00:00 2001 From: Camyll Harajli Date: Thu, 10 Apr 2025 15:48:42 -0700 Subject: [PATCH 5/6] add missing import change --- torchbenchmark/models/drq/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchbenchmark/models/drq/__init__.py b/torchbenchmark/models/drq/__init__.py index 63da8ef15..351e5e9a1 100644 --- a/torchbenchmark/models/drq/__init__.py +++ b/torchbenchmark/models/drq/__init__.py @@ -4,7 +4,7 @@ import numpy as np import torch -from gym import spaces +from gymnasium import spaces from torchbenchmark.tasks import REINFORCEMENT_LEARNING from ...util.model import BenchmarkModel From 27aad00a140eac7eb019aeb5d00199cff9124868 Mon Sep 17 00:00:00 2001 From: Camyll Harajli Date: Fri, 11 Apr 2025 13:38:20 -0700 Subject: [PATCH 6/6] update dependency --- torchbenchmark/models/soft_actor_critic/envs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/torchbenchmark/models/soft_actor_critic/envs.py b/torchbenchmark/models/soft_actor_critic/envs.py index 9e891bfbf..07ae22151 100644 --- a/torchbenchmark/models/soft_actor_critic/envs.py +++ b/torchbenchmark/models/soft_actor_critic/envs.py @@ -339,15 +339,15 @@ def load_dmc( """ Load a task from the deepmind control suite. - Uses dmc2gym (https://github.com/denisyarats/dmc2gym) + Uses dmc2gymnasiym (https://github.com/imgeorgiev/dmc2gymnasium) Note that setting seed=None (the default) picks a random seed """ - import dmc2gym + import dmc2gymnasium if seed is None: seed = random.randint(1, 100000) - env = dmc2gym.make( + env = dmc2gymnasium.make( domain_name=domain_name, task_name=task_name, from_pixels=from_pixels,