safenax 0.4.7__tar.gz → 0.4.8__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.
Files changed (29) hide show
  1. {safenax-0.4.7 → safenax-0.4.8}/PKG-INFO +1 -1
  2. {safenax-0.4.7 → safenax-0.4.8}/pyproject.toml +1 -1
  3. {safenax-0.4.7 → safenax-0.4.8}/safenax/wrappers/log.py +5 -5
  4. {safenax-0.4.7 → safenax-0.4.8}/uv.lock +9 -1
  5. {safenax-0.4.7 → safenax-0.4.8}/.gitignore +0 -0
  6. {safenax-0.4.7 → safenax-0.4.8}/.pre-commit-config.yaml +0 -0
  7. {safenax-0.4.7 → safenax-0.4.8}/.python-version +0 -0
  8. {safenax-0.4.7 → safenax-0.4.8}/LICENSE +0 -0
  9. {safenax-0.4.7 → safenax-0.4.8}/PUBLISHING.md +0 -0
  10. {safenax-0.4.7 → safenax-0.4.8}/README.md +0 -0
  11. {safenax-0.4.7 → safenax-0.4.8}/safenax/__init__.py +0 -0
  12. {safenax-0.4.7 → safenax-0.4.8}/safenax/eco_ant/__init__.py +0 -0
  13. {safenax-0.4.7 → safenax-0.4.8}/safenax/eco_ant/eco_ant_v1.py +0 -0
  14. {safenax-0.4.7 → safenax-0.4.8}/safenax/eco_ant/eco_ant_v2.py +0 -0
  15. {safenax-0.4.7 → safenax-0.4.8}/safenax/fragile_ant.py +0 -0
  16. {safenax-0.4.7 → safenax-0.4.8}/safenax/frozen_lake/__init__.py +0 -0
  17. {safenax-0.4.7 → safenax-0.4.8}/safenax/frozen_lake/frozen_lake_v1.py +0 -0
  18. {safenax-0.4.7 → safenax-0.4.8}/safenax/frozen_lake/frozen_lake_v2.py +0 -0
  19. {safenax-0.4.7 → safenax-0.4.8}/safenax/portfolio_optimization/__init__.py +0 -0
  20. {safenax-0.4.7 → safenax-0.4.8}/safenax/portfolio_optimization/po_crypto.py +0 -0
  21. {safenax-0.4.7 → safenax-0.4.8}/safenax/portfolio_optimization/po_garch.py +0 -0
  22. {safenax-0.4.7 → safenax-0.4.8}/safenax/wrappers/__init__.py +0 -0
  23. {safenax-0.4.7 → safenax-0.4.8}/safenax/wrappers/brax.py +0 -0
  24. {safenax-0.4.7 → safenax-0.4.8}/scripts/setup_dev.sh +0 -0
  25. {safenax-0.4.7 → safenax-0.4.8}/tests/__init__.py +0 -0
  26. {safenax-0.4.7 → safenax-0.4.8}/tests/test_eco_ant_v1.py +0 -0
  27. {safenax-0.4.7 → safenax-0.4.8}/tests/test_eco_ant_v2.py +0 -0
  28. {safenax-0.4.7 → safenax-0.4.8}/tests/test_frozen_lake_v1.py +0 -0
  29. {safenax-0.4.7 → safenax-0.4.8}/tests/test_frozen_lake_v2.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: safenax
3
- Version: 0.4.7
3
+ Version: 0.4.8
4
4
  Summary: Constrained environments with a gymnax interface
5
5
  Project-URL: Homepage, https://github.com/0xprofessooor/safenax
6
6
  Project-URL: Repository, https://github.com/0xprofessooor/safenax
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "safenax"
7
- version = "0.4.7"
7
+ version = "0.4.8"
8
8
  description = "Constrained environments with a gymnax interface"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -28,7 +28,7 @@ class LogWrapper(GymnaxWrapper):
28
28
  self, key: jax.Array, params: environment.EnvParams | None = None
29
29
  ) -> tuple[jax.Array, LogEnvState]:
30
30
  obs, env_state = self._env.reset(key, params)
31
- state = LogEnvState(env_state, 0, 0, 0, 0, 0, 0)
31
+ state = LogEnvState(env_state, 0.0, 0.0, 0, 0.0, 0.0, 0)
32
32
  return obs, state
33
33
 
34
34
  @partial(jax.jit, static_argnames=("self",))
@@ -60,13 +60,13 @@ class LogWrapper(GymnaxWrapper):
60
60
  new_episode_length = state.episode_lengths + 1
61
61
  state = LogEnvState(
62
62
  env_state=env_state,
63
- episode_returns=new_episode_return * (1 - done),
64
- episode_cost_returns=new_episode_cost_return * (1 - done),
63
+ episode_returns=new_episode_return * (1.0 - done),
64
+ episode_cost_returns=new_episode_cost_return * (1.0 - done),
65
65
  episode_lengths=new_episode_length * (1 - done),
66
- returned_episode_returns=state.returned_episode_returns * (1 - done)
66
+ returned_episode_returns=state.returned_episode_returns * (1.0 - done)
67
67
  + new_episode_return * done,
68
68
  returned_episode_cost_returns=state.returned_episode_cost_returns
69
- * (1 - done)
69
+ * (1.0 - done)
70
70
  + new_episode_cost_return * done,
71
71
  returned_episode_lengths=state.returned_episode_lengths * (1 - done)
72
72
  + new_episode_length * done,
@@ -382,6 +382,14 @@ wheels = [
382
382
  { url = "https://files.pythonhosted.org/packages/f7/02/6e639e90f181dc9127046e00d0528f9f7ad12d428972e3a5378b9aefdb0b/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313-none-manylinux_2_28_x86_64.whl", hash = "sha256:7916034efa867927892635733a3b6af8cd95ceb10566fd7f1e0d2763c2ee8b12", size = 243525, upload-time = "2025-09-12T08:54:34.006Z" },
383
383
  { url = "https://files.pythonhosted.org/packages/84/06/cb588ca65561defe0fc48d1df4c2ac12569b81231ae4f2b52ab37007d0bd/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313-none-win32.whl", hash = "sha256:6c9549da71b93e367b4d71438798daae1da2592039fd14204a80a1a2348ae127", size = 552685, upload-time = "2025-09-12T08:54:35.723Z" },
384
384
  { url = "https://files.pythonhosted.org/packages/86/27/00c9c96af18ac0a5eac2ff61cbe306551a2d770d7173f396d0792ee1a59e/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.p39.p310.p311.p312.p313-none-win_amd64.whl", hash = "sha256:6292d5d6634d668cd23d337e6089491d3945a9aa4ac6e1667b0003520d7caa51", size = 559466, upload-time = "2025-09-12T08:54:37.661Z" },
385
+ { url = "https://files.pythonhosted.org/packages/b3/87/de0b33f6f00687499ca1371f22aa73396341b85bf88f1a284f9da8842493/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.py39.py310.py311.py312.py313.py314-none-macosx_10_6_intel.whl", hash = "sha256:2aab89d2d9535635ba011fc7303390685169a1aa6731ad580d08d043524b8899", size = 105326, upload-time = "2026-01-28T05:57:56.083Z" },
386
+ { url = "https://files.pythonhosted.org/packages/b6/a6/6ea2f73ad4474896d9e38b3ffbe6ffd5a802c738392269e99e8c6621a461/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.py39.py310.py311.py312.py313.py314-none-macosx_11_0_arm64.whl", hash = "sha256:23936202a107039b5372f0b88ae1d11080746aa1c78910a45d4a0c4cf408cfaa", size = 102180, upload-time = "2026-01-28T05:57:57.787Z" },
387
+ { url = "https://files.pythonhosted.org/packages/58/19/d81b19e8261b9cb51b81d1402167791fef81088dfe91f0c4e9d136fdc5ca/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.py39.py310.py311.py312.py313.py314-none-manylinux2014_aarch64.whl", hash = "sha256:7be06d0838f61df67bd54cb6266a6193d54083acb3624ff3c3812a6358406fa4", size = 230038, upload-time = "2026-01-28T05:57:59.105Z" },
388
+ { url = "https://files.pythonhosted.org/packages/e2/fa/b035636cd82198b97b51a93efe9cfc4343d6b15cefbd336a3f2be871d848/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.py39.py310.py311.py312.py313.py314-none-manylinux2014_x86_64.whl", hash = "sha256:91d36b3582a766512eff8e3b5dcc2d3ffcbf10b7cf448551085a08a10f1b8244", size = 241983, upload-time = "2026-01-28T05:58:00.352Z" },
389
+ { url = "https://files.pythonhosted.org/packages/ff/b4/f7b6cc022dd7c68b6c702d19da5d591f978f89c958b9bd3090615db0c739/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.py39.py310.py311.py312.py313.py314-none-manylinux_2_28_aarch64.whl", hash = "sha256:27c9e9a2d5e1dc3c9e3996171d844d9df9a5a101e797cb94cce217b7afcf8fd9", size = 231053, upload-time = "2026-01-28T05:58:01.683Z" },
390
+ { url = "https://files.pythonhosted.org/packages/5a/3f/efeb7c6801c46e11bd666a5180f0d615f74f72264212f74f39586c6fda9d/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.py39.py310.py311.py312.py313.py314-none-manylinux_2_28_x86_64.whl", hash = "sha256:ce6724bb7cb3d0543dcba17206dce909f94176e68220b8eafee72e9f92bcf542", size = 243522, upload-time = "2026-01-28T05:58:03.517Z" },
391
+ { url = "https://files.pythonhosted.org/packages/cf/b9/b04c3aa0aad2870cfe799f32f8b59789c98e1816bbce9e83f4823c5b840b/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.py39.py310.py311.py312.py313.py314-none-win32.whl", hash = "sha256:fca724a21a372731edb290841edd28a9fb1ee490f833392752844ac807c0086a", size = 552682, upload-time = "2026-01-28T05:58:05.649Z" },
392
+ { url = "https://files.pythonhosted.org/packages/bd/e1/6d6816b296a529ac9b897ad228b1e084eb1f92319e96371880eebdc874a6/glfw-2.10.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38.py39.py310.py311.py312.py313.py314-none-win_amd64.whl", hash = "sha256:823c0bd7770977d4b10e0ed0aef2f3682276b7c88b8b65cfc540afce5951392f", size = 559464, upload-time = "2026-01-28T05:58:07.261Z" },
385
393
  ]
386
394
 
387
395
  [[package]]
@@ -1501,7 +1509,7 @@ wheels = [
1501
1509
 
1502
1510
  [[package]]
1503
1511
  name = "safenax"
1504
- version = "0.4.6"
1512
+ version = "0.4.7"
1505
1513
  source = { editable = "." }
1506
1514
  dependencies = [
1507
1515
  { name = "brax" },
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