jax-envelope 0.3.0__py3-none-any.whl → 0.4.0__py3-none-any.whl

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.
envelope/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- from envelope.compat import create
1
+ from envelope.adapters import create
2
2
  from envelope.environment import Environment, Info, InfoContainer
3
3
  from envelope.spaces import BatchedSpace, Continuous, Discrete, PyTreeSpace, Space
4
4
  from envelope.struct import Container, FrozenPyTreeNode, field, static_field
@@ -4,14 +4,14 @@ from typing import Any, Protocol, Self
4
4
 
5
5
  # Lazy imports to avoid requiring all dependencies at once
6
6
  _env_module_map = {
7
- "gymnax": ("envelope.compat.gymnax_envelope", "GymnaxEnvelope"),
8
- "brax": ("envelope.compat.brax_envelope", "BraxEnvelope"),
9
- "navix": ("envelope.compat.navix_envelope", "NavixEnvelope"),
10
- "jumanji": ("envelope.compat.jumanji_envelope", "JumanjiEnvelope"),
11
- "kinetix": ("envelope.compat.kinetix_envelope", "KinetixEnvelope"),
12
- "craftax": ("envelope.compat.craftax_envelope", "CraftaxEnvelope"),
7
+ "gymnax": ("envelope.adapters.gymnax_envelope", "GymnaxEnvelope"),
8
+ "brax": ("envelope.adapters.brax_envelope", "BraxEnvelope"),
9
+ "navix": ("envelope.adapters.navix_envelope", "NavixEnvelope"),
10
+ "jumanji": ("envelope.adapters.jumanji_envelope", "JumanjiEnvelope"),
11
+ "kinetix": ("envelope.adapters.kinetix_envelope", "KinetixEnvelope"),
12
+ "craftax": ("envelope.adapters.craftax_envelope", "CraftaxEnvelope"),
13
13
  "mujoco_playground": (
14
- "envelope.compat.mujoco_playground_envelope",
14
+ "envelope.adapters.mujoco_playground_envelope",
15
15
  "MujocoPlaygroundEnvelope",
16
16
  ),
17
17
  }
@@ -10,7 +10,7 @@ from craftax.craftax_classic.envs.craftax_state import (
10
10
  from craftax.craftax_env import make_craftax_env_from_name
11
11
 
12
12
  from envelope import spaces as envelope_spaces
13
- from envelope.compat.gymnax_envelope import _convert_space as _convert_gymnax_space
13
+ from envelope.adapters.gymnax_envelope import _convert_space as _convert_gymnax_space
14
14
  from envelope.environment import Environment, Info, InfoContainer, State
15
15
  from envelope.struct import Container, static_field
16
16
  from envelope.typing import Key, PyTree, TypeAlias
@@ -1,7 +1,7 @@
1
1
  """Kinetix compatibility wrapper.
2
2
 
3
3
  This module exposes Kinetix environments through the `envelope.environment.Environment`
4
- API. It mirrors envelope's compat philosophy:
4
+ API. It mirrors envelope's adapters philosophy:
5
5
  - prefer *no* environment-side auto-reset (use `AutoResetWrapper` in envelope)
6
6
  - prefer *no* fixed episode time-limits (use `TruncationWrapper` in envelope)
7
7
 
@@ -30,7 +30,7 @@ from kinetix.util.saving import load_from_json_file
30
30
 
31
31
  from envelope import field
32
32
  from envelope import spaces as envelope_spaces
33
- from envelope.compat.gymnax_envelope import _convert_space as _convert_gymnax_space
33
+ from envelope.adapters.gymnax_envelope import _convert_space as _convert_gymnax_space
34
34
  from envelope.environment import Environment, Info, InfoContainer, State
35
35
  from envelope.struct import Container, static_field
36
36
  from envelope.typing import Key, PyTree
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jax-envelope
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: A JAX-native environment interface with powerful wrappers and adapters for popular RL environment suites
5
5
  Project-URL: Homepage, https://github.com/keraJLi/envelope
6
6
  Project-URL: Repository, https://github.com/keraJLi/envelope
@@ -42,6 +42,7 @@ env = envelope.wrappers.ObservationNormalizationWrapper(env)
42
42
  ```
43
43
 
44
44
  ## 🌍 Simple, expressive interaction!
45
+
45
46
  - **Environments are pytrees**. Squish them through JAX transformations and trace their parameters.
46
47
  - **Idiomatic jax-y interface** of `init(key: Key) -> State, Info` and `step(state: State, action: PyTree) -> State, Info`. You can directly `jax.scan` over a `step(...)`!
47
48
  - **Spaces are super simple**. No `Tuple`, `Dict` nonsense! There are two spaces: `Continuous` and `Discrete`, which you can compose into a `PyTreeSpace`.
@@ -53,8 +54,6 @@ env = envelope.wrappers.ObservationNormalizationWrapper(env)
53
54
  - **Carry state across episodes** to track running statistics, for example to normalize observations.
54
55
  - **Composable wrappers** can be stacked in any order. For example, `ObservationNormalizationWrapper` before vs. after `VmapWrapper` gives per-env vs. global normalization.
55
56
 
56
-
57
-
58
57
  ## 🔌 Adapters for existing suites
59
58
 
60
59
 
@@ -78,11 +77,11 @@ let's you create environments from any of the above!
78
77
 
79
78
  ## 📝 Testing
80
79
 
81
- - **Default (no optional compat deps required)**: `uv run pytest -m "not compat"`
82
- - **Compat suite (requires full compat dependency group)**:
83
- - `uv sync --group compat`
84
- - `uv run pytest -m compat`
85
- - If any compat dependency is missing/broken, the run will fail fast with an error telling you what to install.
80
+ - **Default (no optional adapters deps required)**: `uv run pytest -m "not adapters"`
81
+ - **Adapters suite (requires full adapters dependency group)**:
82
+ - `uv sync --group adapters`
83
+ - `uv run pytest -m adapters`
84
+ - If any adapter dependency is missing/broken, the run will fail fast with an error telling you what to install.
86
85
 
87
86
  ## 🏗️ Installation
88
87
 
@@ -1,16 +1,16 @@
1
- envelope/__init__.py,sha256=AAk0b9UHGUTC4EzERXYPOrHuECgO0fx_UN4_gpKvgT0,1329
1
+ envelope/__init__.py,sha256=3IaAPQ12MPozGX1a73c6_EGaI26-UdXYtu5rqJfPBYs,1331
2
2
  envelope/environment.py,sha256=ZPTznHjMdpUkadDB0rpiGuG_E5ZhfgHt8SxfUhDgySU,2015
3
3
  envelope/spaces.py,sha256=E05OsM999nJw03lyg-ALXbvuw8xQT4AJhLFyahDKFaA,6938
4
4
  envelope/struct.py,sha256=tO1LLxk0bYc4kBCXraDv93T5d-xFRzpv4QCjASB0Lv4,5522
5
5
  envelope/typing.py,sha256=2rWKiZnKXaUU6JIl51Wcj_txRwe8wQNRSLSiRuT3OP4,127
6
- envelope/compat/__init__.py,sha256=6q2B2bfTIu7MlnIXc702ysqEnyURz-MEjTBMBCo8rdQ,3458
7
- envelope/compat/brax_envelope.py,sha256=xToV4fJYU9gPfF5SDs1Y3BaP96daz9iW8gKs2QYQDNA,3476
8
- envelope/compat/craftax_envelope.py,sha256=ey_mhJh5KCDRvjpCAJbFexpWiFjzQr7BZuRYLM9g-yA,3959
9
- envelope/compat/gymnax_envelope.py,sha256=X0pfFKaFKzvBl2Zih4utiXSEI-lc5f9miJGMxeT-Xfw,4690
10
- envelope/compat/jumanji_envelope.py,sha256=zl6yE1yqdCxZmjVCexu5vD10f5a-M82EpjzyVlj13wM,4909
11
- envelope/compat/kinetix_envelope.py,sha256=99RNN6nBN9CQEEe2fX2T1n8lL9ki0uKaz5BK052IU1o,6853
12
- envelope/compat/mujoco_playground_envelope.py,sha256=7iPaRuwXUHbP8hHNgSFipW8rJVruootMQPYBWNpPiHA,3705
13
- envelope/compat/navix_envelope.py,sha256=2n8vgr6gVeAYo12D1kDPxUrA9Hm-If3E7rV7TF_ksSA,3026
6
+ envelope/adapters/__init__.py,sha256=Xn2jNxQK1tdS1P1FEzCNTO8ulLuKfDaiozWkOqNRTPQ,3472
7
+ envelope/adapters/brax_envelope.py,sha256=xToV4fJYU9gPfF5SDs1Y3BaP96daz9iW8gKs2QYQDNA,3476
8
+ envelope/adapters/craftax_envelope.py,sha256=G9jLBJjV_YQh_dnnQlk0hm_hW5B2lyjz7GiRZnIo-FM,3961
9
+ envelope/adapters/gymnax_envelope.py,sha256=X0pfFKaFKzvBl2Zih4utiXSEI-lc5f9miJGMxeT-Xfw,4690
10
+ envelope/adapters/jumanji_envelope.py,sha256=zl6yE1yqdCxZmjVCexu5vD10f5a-M82EpjzyVlj13wM,4909
11
+ envelope/adapters/kinetix_envelope.py,sha256=Nh98HXzuXB_gCWKOdYWBiaxa2v1zyhmYzrUw2xmfwWo,6857
12
+ envelope/adapters/mujoco_playground_envelope.py,sha256=7iPaRuwXUHbP8hHNgSFipW8rJVruootMQPYBWNpPiHA,3705
13
+ envelope/adapters/navix_envelope.py,sha256=2n8vgr6gVeAYo12D1kDPxUrA9Hm-If3E7rV7TF_ksSA,3026
14
14
  envelope/wrappers/__init__.py,sha256=GFs54kY1aWbf9xymzm22x6M2AhZCwFLx1f5LF23jX94,1409
15
15
  envelope/wrappers/autoreset_wrapper.py,sha256=MIP9Svl1KyX0B7tfsSpcDJeEzPrAJQNWwpixrMZkF_s,3382
16
16
  envelope/wrappers/clip_action_wrapper.py,sha256=YKJbKBUbf-LADxIfCE6mMOKo_NEa2xPfDncNKg9iEHM,955
@@ -26,7 +26,7 @@ envelope/wrappers/truncation_wrapper.py,sha256=k3NZBMmnYiCN35jA1Yyi3rGdLcqM52Czu
26
26
  envelope/wrappers/vmap_envs_wrapper.py,sha256=b-xtzhVcT7P0IV4dvVvQk-rX5zv9H4Msv3Ftf5KnZp4,2757
27
27
  envelope/wrappers/vmap_wrapper.py,sha256=8Qxml26HZqjdKV7ey43wLszjMUxURQUFBHwJ1z5F9y8,1973
28
28
  envelope/wrappers/wrapper.py,sha256=SSnKFs_9Rhf0zorMUTTSlzj81OwR7KWo4PgCgycROwo,1503
29
- jax_envelope-0.3.0.dist-info/METADATA,sha256=I33XYdMzK_nJwPegfLUUU3TBusSw4oXy11_h3F3B_Is,5044
30
- jax_envelope-0.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
31
- jax_envelope-0.3.0.dist-info/licenses/LICENSE,sha256=VyF-MK-gY2_fZlhf8uEnE2y8ziIXK-w55GM12eOgXrQ,1069
32
- jax_envelope-0.3.0.dist-info/RECORD,,
29
+ jax_envelope-0.4.0.dist-info/METADATA,sha256=gxqlnwoNe2wcVPfYMZQE9HRROD8q7CDkni1ND1akrKg,5056
30
+ jax_envelope-0.4.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
31
+ jax_envelope-0.4.0.dist-info/licenses/LICENSE,sha256=VyF-MK-gY2_fZlhf8uEnE2y8ziIXK-w55GM12eOgXrQ,1069
32
+ jax_envelope-0.4.0.dist-info/RECORD,,
File without changes
File without changes
File without changes
File without changes