diff --git a/envs/atari.py b/envs/atari.py index 1ef4c81..7d7fc4f 100644 --- a/envs/atari.py +++ b/envs/atari.py @@ -1,4 +1,4 @@ -import gym +import gymnasium as gym import numpy as np @@ -38,7 +38,7 @@ class Atari: from PIL import Image self._image = Image - import gym.envs.atari + import gymnasium as gym.envs.atari if name == "james_bond": name = "jamesbond" diff --git a/envs/crafter.py b/envs/crafter.py index 5d72483..351bce6 100644 --- a/envs/crafter.py +++ b/envs/crafter.py @@ -1,4 +1,4 @@ -import gym +import gymnasium as gym import numpy as np diff --git a/envs/dmc.py b/envs/dmc.py index 874d1ad..dcace2a 100644 --- a/envs/dmc.py +++ b/envs/dmc.py @@ -1,4 +1,4 @@ -import gym +import gymnasium as gym import numpy as np diff --git a/envs/dmlab.py b/envs/dmlab.py index 9d8c867..54c2192 100644 --- a/envs/dmlab.py +++ b/envs/dmlab.py @@ -1,4 +1,4 @@ -import gym +import gymnasium as gym import numpy as np import deepmind_lab diff --git a/envs/memorymaze.py b/envs/memorymaze.py index 31f9178..7b5f779 100644 --- a/envs/memorymaze.py +++ b/envs/memorymaze.py @@ -1,4 +1,4 @@ -import gym +import gymnasium as gym import numpy as np ###from tf dreamerv2 code diff --git a/envs/minecraft.py b/envs/minecraft.py index 338d31f..9d8f195 100644 --- a/envs/minecraft.py +++ b/envs/minecraft.py @@ -1,7 +1,7 @@ import numpy as np from . import minecraft_base -import gym +import gymnasium as gym def make_env(task, *args, **kwargs): diff --git a/envs/minecraft_base.py b/envs/minecraft_base.py index d6d18dd..f916658 100644 --- a/envs/minecraft_base.py +++ b/envs/minecraft_base.py @@ -2,7 +2,7 @@ import logging import threading import numpy as np -import gym +import gymnasium as gym class MinecraftBase(gym.Env): diff --git a/envs/wrappers.py b/envs/wrappers.py index 6a538fe..4927b78 100644 --- a/envs/wrappers.py +++ b/envs/wrappers.py @@ -1,5 +1,5 @@ import datetime -import gym +import gymnasium as gym import numpy as np import uuid diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..94f6a81 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,45 @@ +[tool.poetry] +name = "dreamerv3-torch" +version = "0.1.0" +description = "" +authors = ["wassname "] +license = "MIT" +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.9" +torch = {version = "^2.1.0+cu121", source = "pytorch"} +pandas = "^1.2.4" +matplotlib = "^3.5.0" +"ruamel.yaml" = "^0.17.4" +moviepy = "^1.0.3" +einops = "^0.3.0" +protobuf = "^3.10.0" +gymnasium = {version = "^v0.29.1", extras = ["other"]} +# gym = "^0.19.0" +# mujoco = "^2.3.5" +# dm_control = "^1.0.9" +scipy = "^1.8.0" +# memory_maze = "^1.0.3" +# atari-py = "^0.2.9" +crafter = "^1.8.0" +opencv-python = "^4.7.0.72" +numpy = "^1.21.0" +tensorboard = "^2.6.0" +# minerl = "^0.4.4" +jaxtyping = "^0.2.2" +# typeguard = "^4.2.20" +beartype = "^0.18.5" +tqdm = "^4.66.4" +loguru = "^0.7.2" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + +[[tool.poetry.source]] +name = "pytorch" +url = "https://download.pytorch.org/whl/cu121" +priority = "explicit" + + diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e9797d4..0000000 --- a/requirements.txt +++ /dev/null @@ -1,22 +0,0 @@ -setuptools==60.0.0 -torch==2.0.0 -torchvision==0.15.1 -pandas==1.2.4 -matplotlib==3.5.0 -ruamel.yaml==0.17.4 -moviepy==1.0.3 -einops==0.3.0 -protobuf==3.20.0 -gym==0.19.0 -mujoco==2.3.5 -dm_control==1.0.9 -scipy==1.8.0 -memory_maze==1.0.3 -atari-py==0.2.9 -crafter==1.8.0 -opencv-python==4.7.0.72 -numpy==1.21.0 -tensorboard -# minerl==0.4.4 -# This was needed for minerl -# conda install -c conda-forge openjdk=8