pyRDDLGym-jax 1.2__tar.gz → 2.0__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 (56) hide show
  1. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/PKG-INFO +1 -1
  2. pyrddlgym_jax-2.0/pyRDDLGym_jax/__init__.py +1 -0
  3. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/core/compiler.py +16 -1
  4. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/core/logic.py +36 -9
  5. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/core/planner.py +517 -129
  6. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/core/simulator.py +20 -0
  7. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/core/tuning.py +15 -0
  8. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/core/visualization.py +48 -0
  9. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/Cartpole_Continuous_gym_replan.cfg +3 -3
  10. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/Cartpole_Continuous_gym_slp.cfg +4 -4
  11. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/Quadcopter_drp.cfg +1 -0
  12. pyrddlgym_jax-2.0/pyRDDLGym_jax/examples/configs/Quadcopter_slp.cfg +19 -0
  13. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/Reservoir_Continuous_drp.cfg +1 -0
  14. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/Reservoir_Continuous_slp.cfg +1 -0
  15. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/UAV_Continuous_slp.cfg +1 -0
  16. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/Wildfire_MDP_ippc2014_drp.cfg +1 -0
  17. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/Wildfire_MDP_ippc2014_replan.cfg +1 -0
  18. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/Wildfire_MDP_ippc2014_slp.cfg +1 -0
  19. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax.egg-info/PKG-INFO +1 -1
  20. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/setup.py +1 -1
  21. pyrddlgym_jax-1.2/pyRDDLGym_jax/__init__.py +0 -1
  22. pyrddlgym_jax-1.2/pyRDDLGym_jax/examples/configs/Quadcopter_slp.cfg +0 -18
  23. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/LICENSE +0 -0
  24. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/README.md +0 -0
  25. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/core/__init__.py +0 -0
  26. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/core/assets/__init__.py +0 -0
  27. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/core/assets/favicon.ico +0 -0
  28. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/entry_point.py +0 -0
  29. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/__init__.py +0 -0
  30. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/Cartpole_Continuous_gym_drp.cfg +0 -0
  31. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/HVAC_ippc2023_drp.cfg +0 -0
  32. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/HVAC_ippc2023_slp.cfg +0 -0
  33. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/MountainCar_Continuous_gym_slp.cfg +0 -0
  34. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/MountainCar_ippc2023_slp.cfg +0 -0
  35. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/PowerGen_Continuous_drp.cfg +0 -0
  36. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/PowerGen_Continuous_replan.cfg +0 -0
  37. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/PowerGen_Continuous_slp.cfg +0 -0
  38. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/Reservoir_Continuous_replan.cfg +0 -0
  39. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/__init__.py +0 -0
  40. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/default_drp.cfg +0 -0
  41. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/default_replan.cfg +0 -0
  42. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/default_slp.cfg +0 -0
  43. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/tuning_drp.cfg +0 -0
  44. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/tuning_replan.cfg +0 -0
  45. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/configs/tuning_slp.cfg +0 -0
  46. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/run_gradient.py +0 -0
  47. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/run_gym.py +0 -0
  48. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/run_plan.py +0 -0
  49. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/run_scipy.py +0 -0
  50. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax/examples/run_tune.py +0 -0
  51. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax.egg-info/SOURCES.txt +0 -0
  52. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax.egg-info/dependency_links.txt +0 -0
  53. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax.egg-info/entry_points.txt +0 -0
  54. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax.egg-info/requires.txt +0 -0
  55. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/pyRDDLGym_jax.egg-info/top_level.txt +0 -0
  56. {pyrddlgym_jax-1.2 → pyrddlgym_jax-2.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pyRDDLGym-jax
3
- Version: 1.2
3
+ Version: 2.0
4
4
  Summary: pyRDDLGym-jax: automatic differentiation for solving sequential planning problems in JAX.
5
5
  Home-page: https://github.com/pyrddlgym-project/pyRDDLGym-jax
6
6
  Author: Michael Gimelfarb, Ayal Taitler, Scott Sanner
@@ -0,0 +1 @@
1
+ __version__ = '2.0'
@@ -1,3 +1,18 @@
1
+ # ***********************************************************************
2
+ # JAXPLAN
3
+ #
4
+ # Author: Michael Gimelfarb
5
+ #
6
+ # REFERENCES:
7
+ #
8
+ # [1] Gimelfarb, Michael, Ayal Taitler, and Scott Sanner. "JaxPlan and GurobiPlan:
9
+ # Optimization Baselines for Replanning in Discrete and Mixed Discrete-Continuous
10
+ # Probabilistic Domains." Proceedings of the International Conference on Automated
11
+ # Planning and Scheduling. Vol. 34. 2024.
12
+ #
13
+ # ***********************************************************************
14
+
15
+
1
16
  from functools import partial
2
17
  import traceback
3
18
  from typing import Any, Callable, Dict, List, Optional
@@ -524,7 +539,7 @@ class JaxRDDLCompiler:
524
539
  _jax_wrapped_single_step_policy,
525
540
  in_axes=(0, None, None, None, 0, None)
526
541
  )(keys, policy_params, hyperparams, step, subs, model_params)
527
- model_params = jax.tree_map(lambda x: jnp.mean(x, axis=0), model_params)
542
+ model_params = jax.tree_map(partial(jnp.mean, axis=0), model_params)
528
543
  carry = (key, policy_params, hyperparams, subs, model_params)
529
544
  return carry, log
530
545
 
@@ -1,4 +1,31 @@
1
- from typing import Optional, Set
1
+ # ***********************************************************************
2
+ # JAXPLAN
3
+ #
4
+ # Author: Michael Gimelfarb
5
+ #
6
+ # REFERENCES:
7
+ #
8
+ # [1] Gimelfarb, Michael, Ayal Taitler, and Scott Sanner. "JaxPlan and GurobiPlan:
9
+ # Optimization Baselines for Replanning in Discrete and Mixed Discrete-Continuous
10
+ # Probabilistic Domains." Proceedings of the International Conference on Automated
11
+ # Planning and Scheduling. Vol. 34. 2024.
12
+ #
13
+ # [2] Petersen, Felix, Christian Borgelt, Hilde Kuehne, and Oliver Deussen. "Learning with
14
+ # algorithmic supervision via continuous relaxations." Advances in Neural Information
15
+ # Processing Systems 34 (2021): 16520-16531.
16
+ #
17
+ # [3] Agustsson, Eirikur, and Lucas Theis. "Universally quantized neural compression."
18
+ # Advances in neural information processing systems 33 (2020): 12367-12376.
19
+ #
20
+ # [4] Gupta, Madan M., and J11043360726 Qi. "Theory of T-norms and fuzzy inference
21
+ # methods." Fuzzy sets and systems 40, no. 3 (1991): 431-450.
22
+ #
23
+ # [5] Jang, Eric, Shixiang Gu, and Ben Poole. "Categorical Reparametrization with
24
+ # Gumble-Softmax." In International Conference on Learning Representations (ICLR 2017).
25
+ # OpenReview. net, 2017.
26
+ #
27
+ # ***********************************************************************
28
+
2
29
 
3
30
  import jax
4
31
  import jax.numpy as jnp
@@ -759,14 +786,14 @@ class FuzzyLogic(Logic):
759
786
 
760
787
  def __str__(self) -> str:
761
788
  return (f'model relaxation:\n'
762
- f' tnorm ={str(self.tnorm)}\n'
763
- f' complement ={str(self.complement)}\n'
764
- f' comparison ={str(self.comparison)}\n'
765
- f' sampling ={str(self.sampling)}\n'
766
- f' rounding ={str(self.rounding)}\n'
767
- f' control ={str(self.control)}\n'
768
- f' underflow_tol ={self.eps}\n'
769
- f' use_64_bit ={self.use64bit}')
789
+ f' tnorm ={str(self.tnorm)}\n'
790
+ f' complement ={str(self.complement)}\n'
791
+ f' comparison ={str(self.comparison)}\n'
792
+ f' sampling ={str(self.sampling)}\n'
793
+ f' rounding ={str(self.rounding)}\n'
794
+ f' control ={str(self.control)}\n'
795
+ f' underflow_tol={self.eps}\n'
796
+ f' use_64_bit ={self.use64bit}\n')
770
797
 
771
798
  def summarize_hyperparameters(self) -> None:
772
799
  print(self.__str__())