multi-agent-rlenv 3.6.0__tar.gz → 3.6.1__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.6.0 → multi_agent_rlenv-3.6.1}/.github/workflows/docs.yaml +1 -3
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/PKG-INFO +1 -1
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/pyproject.toml +1 -1
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/adapters/__init__.py +4 -4
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/catalog/__init__.py +3 -3
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/utils/__init__.py +2 -2
- multi_agent_rlenv-3.6.1/src/marlenv/utils/import_placeholders.py +30 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/test_catalog.py +9 -9
- multi_agent_rlenv-3.6.0/src/marlenv/utils/import_placeholders.py +0 -30
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/.github/workflows/ci.yaml +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/.gitignore +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/LICENSE +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/README.md +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/__init__.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/adapters/gym_adapter.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/adapters/pettingzoo_adapter.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/adapters/pymarl_adapter.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/adapters/smac_adapter.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/catalog/deepsea.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/env_builder.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/env_pool.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/exceptions.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/mock_env.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/models/__init__.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/models/env.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/models/episode.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/models/observation.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/models/spaces.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/models/state.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/models/step.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/models/transition.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/py.typed +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/utils/cached_property_collector.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/utils/schedule.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/__init__.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/action_randomizer.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/agent_id_wrapper.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/available_actions_mask.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/available_actions_wrapper.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/blind_wrapper.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/centralised.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/delayed_rewards.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/last_action_wrapper.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/paddings.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/penalty_wrapper.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/potential_shaping.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/rlenv_wrapper.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/time_limit.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/video_recorder.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/__init__.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/test_adapters.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/test_episode.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/test_models.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/test_others.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/test_pool.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/test_schedules.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/test_serialization.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/test_spaces.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/test_wrappers.py +0 -0
- {multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/tests/utils.py +0 -0
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
name: Deploy static content to Pages
|
|
3
3
|
|
|
4
4
|
on:
|
|
5
|
-
# Runs on pushes targeting the default branch
|
|
6
5
|
push:
|
|
7
6
|
branches: ["main", "master"]
|
|
8
|
-
# Only deploy the documentation on new version tags
|
|
9
7
|
tags:
|
|
10
|
-
|
|
8
|
+
- 'v*.*.*'
|
|
11
9
|
|
|
12
10
|
# Allows you to run this workflow manually from the Actions tab
|
|
13
11
|
workflow_dispatch:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: multi-agent-rlenv
|
|
3
|
-
Version: 3.6.
|
|
3
|
+
Version: 3.6.1
|
|
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>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
from importlib.util import find_spec
|
|
2
2
|
from .pymarl_adapter import PymarlAdapter
|
|
3
|
-
from marlenv.utils import
|
|
3
|
+
from marlenv.utils import dummy_type, dummy_function
|
|
4
4
|
|
|
5
5
|
HAS_GYM = find_spec("gymnasium") is not None
|
|
6
6
|
if HAS_GYM:
|
|
7
7
|
from .gym_adapter import Gym, make
|
|
8
8
|
else:
|
|
9
|
-
Gym =
|
|
9
|
+
Gym = dummy_type("gymnasium")
|
|
10
10
|
make = dummy_function("gymnasium")
|
|
11
11
|
|
|
12
12
|
HAS_PETTINGZOO = find_spec("pettingzoo") is not None
|
|
13
13
|
if HAS_PETTINGZOO:
|
|
14
14
|
from .pettingzoo_adapter import PettingZoo
|
|
15
15
|
else:
|
|
16
|
-
PettingZoo =
|
|
16
|
+
PettingZoo = dummy_type("pettingzoo")
|
|
17
17
|
|
|
18
18
|
HAS_SMAC = find_spec("smac") is not None
|
|
19
19
|
if HAS_SMAC:
|
|
20
20
|
from .smac_adapter import SMAC
|
|
21
21
|
else:
|
|
22
|
-
SMAC =
|
|
22
|
+
SMAC = dummy_type("smac", "https://github.com/oxwhirl/smac.git")
|
|
23
23
|
|
|
24
24
|
__all__ = [
|
|
25
25
|
"PymarlAdapter",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from importlib.util import find_spec
|
|
2
|
-
from ..utils.import_placeholders import
|
|
2
|
+
from ..utils.import_placeholders import dummy_type
|
|
3
3
|
from marlenv.adapters import SMAC
|
|
4
4
|
from .deepsea import DeepSea
|
|
5
5
|
|
|
@@ -8,13 +8,13 @@ HAS_LLE = find_spec("lle") is not None
|
|
|
8
8
|
if HAS_LLE:
|
|
9
9
|
from lle import LLE # pyright: ignore[reportMissingImports]
|
|
10
10
|
else:
|
|
11
|
-
LLE =
|
|
11
|
+
LLE = dummy_type("lle", "laser-learning-environment")
|
|
12
12
|
|
|
13
13
|
HAS_OVERCOOKED = find_spec("overcooked") is not None
|
|
14
14
|
if HAS_OVERCOOKED:
|
|
15
15
|
from overcooked import Overcooked # pyright: ignore[reportMissingImports]
|
|
16
16
|
else:
|
|
17
|
-
Overcooked =
|
|
17
|
+
Overcooked = dummy_type("overcooked", "overcooked")
|
|
18
18
|
|
|
19
19
|
__all__ = [
|
|
20
20
|
"Overcooked",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from .cached_property_collector import CachedPropertyCollector, CachedPropertyInvalidator
|
|
2
2
|
from .schedule import ExpSchedule, LinearSchedule, MultiSchedule, RoundedSchedule, Schedule
|
|
3
|
-
from .import_placeholders import
|
|
3
|
+
from .import_placeholders import dummy_function, dummy_type
|
|
4
4
|
|
|
5
5
|
__all__ = [
|
|
6
6
|
"Schedule",
|
|
@@ -10,6 +10,6 @@ __all__ = [
|
|
|
10
10
|
"RoundedSchedule",
|
|
11
11
|
"CachedPropertyCollector",
|
|
12
12
|
"CachedPropertyInvalidator",
|
|
13
|
-
"DummyClass",
|
|
14
13
|
"dummy_function",
|
|
14
|
+
"dummy_type",
|
|
15
15
|
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from typing import Optional, Any
|
|
2
|
+
from types import SimpleNamespace
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def _raise_error(module_name: str, package_name: Optional[str] = None):
|
|
6
|
+
raise ImportError(
|
|
7
|
+
f"The optional dependency `{module_name}` is not installed.\nInstall the `{package_name}` package (e.g. pip install {package_name})."
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def dummy_type(module_name: str, package_name: Optional[str] = None):
|
|
12
|
+
class DummyType(type):
|
|
13
|
+
def __getattr__(cls, _) -> Any:
|
|
14
|
+
_raise_error(module_name, package_name)
|
|
15
|
+
|
|
16
|
+
def __call__(self, *args: Any, **kwds: Any) -> Any:
|
|
17
|
+
_raise_error(module_name, package_name)
|
|
18
|
+
|
|
19
|
+
class DummyClass(SimpleNamespace, metaclass=DummyType):
|
|
20
|
+
def __getattr__(self, _) -> Any:
|
|
21
|
+
_raise_error(module_name, package_name)
|
|
22
|
+
|
|
23
|
+
return DummyClass
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def dummy_function(module_name: str, package_name: Optional[str] = None):
|
|
27
|
+
def fail(*args, **kwargs) -> Any:
|
|
28
|
+
_raise_error(module_name, package_name)
|
|
29
|
+
|
|
30
|
+
return fail
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import pytest
|
|
2
2
|
from marlenv import catalog
|
|
3
|
-
from marlenv.utils import
|
|
3
|
+
from marlenv.utils import dummy_type, dummy_function
|
|
4
4
|
|
|
5
|
-
skip_lle =
|
|
6
|
-
skip_overcooked =
|
|
5
|
+
skip_lle = not catalog.HAS_LLE
|
|
6
|
+
skip_overcooked = not catalog.HAS_OVERCOOKED
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
@pytest.mark.skipif(skip_lle, reason="LLE is not installed")
|
|
@@ -16,18 +16,18 @@ def test_overcooked():
|
|
|
16
16
|
catalog.Overcooked.from_layout("scenario4")
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
def
|
|
19
|
+
def test_dummy_type():
|
|
20
20
|
try:
|
|
21
|
-
x =
|
|
21
|
+
x = dummy_type("")
|
|
22
22
|
x.abc
|
|
23
|
-
assert False, "Expected ImportError upon usage because
|
|
23
|
+
assert False, "Expected ImportError upon usage because dummy_type is not installed"
|
|
24
24
|
except ImportError:
|
|
25
25
|
pass
|
|
26
26
|
|
|
27
27
|
try:
|
|
28
|
-
x =
|
|
29
|
-
x.abc()
|
|
30
|
-
assert False, "Expected ImportError upon usage because
|
|
28
|
+
x = dummy_type("")
|
|
29
|
+
x.abc() # type: ignore
|
|
30
|
+
assert False, "Expected ImportError upon usage because dummy_type is not installed"
|
|
31
31
|
except ImportError:
|
|
32
32
|
pass
|
|
33
33
|
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
from typing import Optional, Any
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class DummyClass:
|
|
5
|
-
def __init__(self, module_name: str, package_name: Optional[str] = None):
|
|
6
|
-
self.module_name = module_name
|
|
7
|
-
if package_name is None:
|
|
8
|
-
self.package_name = module_name
|
|
9
|
-
else:
|
|
10
|
-
self.package_name = package_name
|
|
11
|
-
|
|
12
|
-
def _raise_error(self):
|
|
13
|
-
raise ImportError(
|
|
14
|
-
f"The optional dependency `{self.module_name}` is not installed.\nInstall the `{self.package_name}` package (e.g. pip install {self.package_name})."
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
def __getattr__(self, _):
|
|
18
|
-
self._raise_error()
|
|
19
|
-
|
|
20
|
-
def __call__(self, *args, **kwargs):
|
|
21
|
-
self._raise_error()
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def dummy_function(module_name: str, package_name: Optional[str] = None):
|
|
25
|
-
dummy = DummyClass(module_name, package_name)
|
|
26
|
-
|
|
27
|
-
def fail(*args, **kwargs) -> Any:
|
|
28
|
-
dummy()
|
|
29
|
-
|
|
30
|
-
return fail
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/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.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/utils/cached_property_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/action_randomizer.py
RENAMED
|
File without changes
|
{multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/agent_id_wrapper.py
RENAMED
|
File without changes
|
{multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/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.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/last_action_wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{multi_agent_rlenv-3.6.0 → multi_agent_rlenv-3.6.1}/src/marlenv/wrappers/potential_shaping.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
|