multi-agent-rlenv 3.3.2__tar.gz → 3.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/PKG-INFO +1 -1
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/__init__.py +1 -1
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/adapters/overcooked_adapter.py +4 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/tests/test_serialization.py +33 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/.github/workflows/ci.yaml +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/.github/workflows/docs.yaml +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/.gitignore +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/LICENSE +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/README.md +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/pyproject.toml +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/adapters/__init__.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/adapters/gym_adapter.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/adapters/pettingzoo_adapter.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/adapters/pymarl_adapter.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/adapters/smac_adapter.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/env_builder.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/env_pool.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/exceptions.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/mock_env.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/models/__init__.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/models/env.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/models/episode.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/models/observation.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/models/spaces.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/models/state.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/models/step.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/models/transition.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/py.typed +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/__init__.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/agent_id_wrapper.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/available_actions_mask.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/available_actions_wrapper.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/blind_wrapper.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/centralised.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/delayed_rewards.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/last_action_wrapper.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/paddings.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/penalty_wrapper.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/rlenv_wrapper.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/time_limit.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/video_recorder.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/tests/__init__.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/tests/test_adapters.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/tests/test_episode.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/tests/test_models.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/tests/test_pool.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/tests/test_spaces.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/tests/test_wrappers.py +0 -0
- {multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: multi-agent-rlenv
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.3
|
|
4
4
|
Summary: A strongly typed Multi-Agent Reinforcement Learning framework
|
|
5
5
|
Project-URL: repository, https://github.com/yamoling/multi-agent-rlenv
|
|
6
6
|
Author-email: Yannick Molinghen <yannick.molinghen@ulb.be>
|
|
@@ -62,7 +62,7 @@ print(env.extras_shape) # (1, )
|
|
|
62
62
|
If you want to create a new environment, you can simply create a class that inherits from `MARLEnv`. If you want to create a wrapper around an existing `MARLEnv`, you probably want to subclass `RLEnvWrapper` which implements a default behaviour for every method.
|
|
63
63
|
"""
|
|
64
64
|
|
|
65
|
-
__version__ = "3.3.
|
|
65
|
+
__version__ = "3.3.3"
|
|
66
66
|
|
|
67
67
|
from . import models
|
|
68
68
|
from . import wrappers
|
{multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/adapters/overcooked_adapter.py
RENAMED
|
@@ -96,6 +96,10 @@ class Overcooked(MARLEnv[Sequence[int] | npt.NDArray, DiscreteActionSpace]):
|
|
|
96
96
|
return {"horizon": self.horizon, "mdp": self._mdp}
|
|
97
97
|
|
|
98
98
|
def __setstate__(self, state: dict):
|
|
99
|
+
from overcooked_ai_py.mdp.overcooked_mdp import Recipe
|
|
100
|
+
|
|
101
|
+
mdp = state["mdp"]
|
|
102
|
+
Recipe.configure(mdp.recipe_config)
|
|
99
103
|
self.__init__(OvercookedEnv.from_mdp(state["mdp"], horizon=state["horizon"]))
|
|
100
104
|
|
|
101
105
|
def get_image(self):
|
|
@@ -2,6 +2,7 @@ import pickle
|
|
|
2
2
|
import numpy as np
|
|
3
3
|
import orjson
|
|
4
4
|
import pytest
|
|
5
|
+
import os
|
|
5
6
|
from copy import deepcopy
|
|
6
7
|
|
|
7
8
|
import marlenv
|
|
@@ -156,3 +157,35 @@ def test_pickle_overcooked():
|
|
|
156
157
|
step = env.step(actions)
|
|
157
158
|
step_restored = restored.step(actions)
|
|
158
159
|
assert step == step_restored
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
@pytest.mark.skipif(not marlenv.adapters.HAS_OVERCOOKED, reason="Overcooked is not installed")
|
|
163
|
+
def test_unpickling_from_blank_process():
|
|
164
|
+
from marlenv.adapters import Overcooked
|
|
165
|
+
import pickle
|
|
166
|
+
import subprocess
|
|
167
|
+
import tempfile
|
|
168
|
+
|
|
169
|
+
env = Overcooked.from_layout("large_room")
|
|
170
|
+
env_file = tempfile.NamedTemporaryFile("wb", delete=False)
|
|
171
|
+
pickle.dump(env, env_file)
|
|
172
|
+
env_file.close()
|
|
173
|
+
|
|
174
|
+
# Write the python file
|
|
175
|
+
|
|
176
|
+
f = tempfile.NamedTemporaryFile("w", delete=False)
|
|
177
|
+
f.write("""
|
|
178
|
+
import pickle
|
|
179
|
+
import sys
|
|
180
|
+
|
|
181
|
+
with open(sys.argv[1], "rb") as f:
|
|
182
|
+
env = pickle.load(f)
|
|
183
|
+
|
|
184
|
+
env.reset()""")
|
|
185
|
+
f.close()
|
|
186
|
+
try:
|
|
187
|
+
output = subprocess.run(f"python {f.name} {env_file.name}", shell=True, capture_output=True)
|
|
188
|
+
assert output.returncode == 0, output.stderr.decode("utf-8")
|
|
189
|
+
finally:
|
|
190
|
+
os.remove(f.name)
|
|
191
|
+
os.remove(env_file.name)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/adapters/pettingzoo_adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/agent_id_wrapper.py
RENAMED
|
File without changes
|
{multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/available_actions_mask.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multi_agent_rlenv-3.3.2 → multi_agent_rlenv-3.3.3}/src/marlenv/wrappers/last_action_wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|