gr-libs 0.2.2__py3-none-any.whl → 0.2.6__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.
Files changed (39) hide show
  1. gr_libs/__init__.py +6 -1
  2. gr_libs/_evaluation/_generate_experiments_results.py +0 -141
  3. gr_libs/_version.py +2 -2
  4. gr_libs/all_experiments.py +73 -107
  5. gr_libs/environment/environment.py +126 -17
  6. gr_libs/evaluation/generate_experiments_results.py +100 -0
  7. gr_libs/ml/consts.py +1 -0
  8. gr_libs/ml/neural/deep_rl_learner.py +118 -34
  9. gr_libs/odgr_executor.py +27 -27
  10. gr_libs/problems/consts.py +568 -290
  11. gr_libs/recognizer/_utils/__init__.py +1 -0
  12. gr_libs/recognizer/_utils/format.py +7 -1
  13. gr_libs/recognizer/gr_as_rl/gr_as_rl_recognizer.py +158 -2
  14. gr_libs/recognizer/graml/graml_recognizer.py +18 -10
  15. gr_libs/recognizer/recognizer.py +4 -4
  16. gr_libs/tutorials/gcaura_panda_tutorial.py +168 -0
  17. gr_libs/tutorials/gcaura_parking_tutorial.py +167 -0
  18. gr_libs/tutorials/gcaura_point_maze_tutorial.py +169 -0
  19. gr_libs/tutorials/gcdraco_panda_tutorial.py +6 -2
  20. gr_libs/tutorials/gcdraco_parking_tutorial.py +3 -1
  21. gr_libs/tutorials/graml_minigrid_tutorial.py +16 -12
  22. gr_libs/tutorials/graml_panda_tutorial.py +6 -2
  23. gr_libs/tutorials/graml_parking_tutorial.py +3 -1
  24. gr_libs/tutorials/graml_point_maze_tutorial.py +15 -2
  25. {gr_libs-0.2.2.dist-info → gr_libs-0.2.6.dist-info}/METADATA +31 -15
  26. {gr_libs-0.2.2.dist-info → gr_libs-0.2.6.dist-info}/RECORD +35 -29
  27. {gr_libs-0.2.2.dist-info → gr_libs-0.2.6.dist-info}/WHEEL +1 -1
  28. tests/test_gcaura.py +15 -0
  29. tests/test_odgr_executor_expertbasedgraml.py +14 -0
  30. tests/test_odgr_executor_gcaura.py +14 -0
  31. tests/test_odgr_executor_gcdraco.py +14 -0
  32. tests/test_odgr_executor_gcgraml.py +14 -0
  33. tests/test_odgr_executor_graql.py +14 -0
  34. gr_libs/_evaluation/_analyze_results_cross_alg_cross_domain.py +0 -260
  35. gr_libs/_evaluation/_generate_task_specific_statistics_plots.py +0 -497
  36. gr_libs/_evaluation/_get_plans_images.py +0 -61
  37. gr_libs/_evaluation/_increasing_and_decreasing_.py +0 -106
  38. /gr_libs/{_evaluation → evaluation}/__init__.py +0 -0
  39. {gr_libs-0.2.2.dist-info → gr_libs-0.2.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,169 @@
1
+ from stable_baselines3 import SAC, PPO
2
+
3
+ from gr_libs import GCAura
4
+ from gr_libs.environment._utils.utils import domain_to_env_property
5
+ from gr_libs.environment.environment import POINT_MAZE
6
+ from gr_libs.metrics import mean_wasserstein_distance, stochastic_amplified_selection
7
+ from gr_libs.ml.neural.deep_rl_learner import DeepRLAgent
8
+ from gr_libs.ml.utils.format import random_subset_with_order
9
+
10
+
11
+ def run_gcaura_point_maze_tutorial():
12
+ """
13
+ Tutorial for GCAura on the Point Maze environment with MultiGoals.
14
+
15
+ This tutorial demonstrates:
16
+ 1. Training a goal-conditioned model on a goal subspace (center goal only)
17
+ 2. Adapting to goals both inside and outside this subspace
18
+ 3. Testing inference on all goals types
19
+ """
20
+ print("Starting GCAura tutorial with Point Maze MultiGoals environment...")
21
+
22
+ # Use the registered multigoals environment with 3 goals: [(2, 2), (9, 9), (5, 5)]
23
+ # But define our goal subspace to include ONLY the center goal (5, 5)
24
+ # This lets us properly test the subspace functionality
25
+
26
+ # Initialize the recognizer with the multigoals empty maze environment
27
+ recognizer = GCAura(
28
+ domain_name=POINT_MAZE,
29
+ env_name="PointMaze-EmptyEnvDense-11x11-MultiGoals-2x2-9x9-5x5",
30
+ evaluation_function=mean_wasserstein_distance,
31
+ finetune_timesteps=70000, # Fine-tuning for out-of-subspace goals
32
+ )
33
+
34
+ # Domain learning phase - train on the center goal subspace only
35
+ print("\nStarting domain learning phase - training on center goal subspace...")
36
+ recognizer.domain_learning_phase(
37
+ {
38
+ "gc": {
39
+ "train_configs": [(SAC, 700000)],
40
+ }
41
+ }
42
+ )
43
+
44
+ # Define adaptation goals - one in-subspace (center) and two out-of-subspace (corners)
45
+ # These all exist in the registered environment
46
+ in_subspace_goal = (5, 5) # Center goal (in subspace)
47
+ out_subspace_goal1 = (9, 1) # Bottom left corner (out of subspace)
48
+ out_subspace_goal2 = (1, 9) # Top right corner (out of subspace)
49
+
50
+ print(
51
+ "\nStarting goal adaptation phase with both in-subspace and out-of-subspace goals..."
52
+ )
53
+
54
+ # Goals adaptation phase with mixed goals
55
+ recognizer.goals_adaptation_phase(
56
+ dynamic_goals=[
57
+ in_subspace_goal, # In subspace - will use base model
58
+ out_subspace_goal1, # Out of subspace - will be fine-tuned
59
+ out_subspace_goal2, # Out of subspace - will be fine-tuned
60
+ ],
61
+ )
62
+
63
+ # Setup for testing
64
+ property_type = domain_to_env_property(POINT_MAZE)
65
+ env_property = property_type("PointMaze-EmptyEnvDense-11x11")
66
+
67
+ # Create test actor for in-subspace goal (center)
68
+ print("\nCreating test actor for in-subspace goal (center)...")
69
+ problem_name_in = env_property.goal_to_problem_str(in_subspace_goal)
70
+ actor_in = DeepRLAgent(
71
+ domain_name=POINT_MAZE,
72
+ problem_name=problem_name_in,
73
+ env_prop=env_property,
74
+ algorithm=PPO,
75
+ num_timesteps=700000,
76
+ )
77
+ actor_in.learn()
78
+
79
+ # Create test actor for out-of-subspace goal (bottom left corner)
80
+ print("\nCreating test actor for out-of-subspace goal (bottom left corner)...")
81
+ problem_name_out = env_property.goal_to_problem_str(out_subspace_goal1)
82
+ actor_out = DeepRLAgent(
83
+ domain_name=POINT_MAZE,
84
+ problem_name=problem_name_out,
85
+ env_prop=env_property,
86
+ algorithm=PPO,
87
+ num_timesteps=500000,
88
+ )
89
+ actor_out.learn()
90
+
91
+ # Test inference with in-subspace goal (center)
92
+ print("\nTesting inference with in-subspace goal (should use base model)...")
93
+ full_sequence_in = actor_in.generate_observation(
94
+ action_selection_method=stochastic_amplified_selection,
95
+ random_optimalism=True,
96
+ with_dict=True,
97
+ )
98
+ partial_sequence_in = random_subset_with_order(
99
+ full_sequence_in, (int)(0.5 * len(full_sequence_in)), is_consecutive=False
100
+ )
101
+ recognized_goal_in = recognizer.inference_phase(
102
+ partial_sequence_in, in_subspace_goal, 0.5
103
+ )
104
+ print(f"Goal recognized for in-subspace sequence: {recognized_goal_in}")
105
+ print(f"Actual goal: {in_subspace_goal}")
106
+
107
+ assert str(recognized_goal_in) == str(
108
+ in_subspace_goal
109
+ ), "In-subspace goal recognition failed, expected to recognize the center goal."
110
+
111
+ # Test inference with out-of-subspace goal (bottom left corner)
112
+ print(
113
+ "\nTesting inference with out-of-subspace goal (should use fine-tuned model)..."
114
+ )
115
+ full_sequence_out = actor_out.generate_observation(
116
+ action_selection_method=stochastic_amplified_selection,
117
+ random_optimalism=True,
118
+ with_dict=True,
119
+ )
120
+ partial_sequence_out = random_subset_with_order(
121
+ full_sequence_out, (int)(0.5 * len(full_sequence_out)), is_consecutive=False
122
+ )
123
+ recognized_goal_out = recognizer.inference_phase(
124
+ partial_sequence_out, out_subspace_goal1, 0.5
125
+ )
126
+ print(f"Goal recognized for out-of-subspace sequence: {recognized_goal_out}")
127
+ print(f"Actual goal: {out_subspace_goal1}")
128
+
129
+ assert str(recognized_goal_out) == str(
130
+ out_subspace_goal1
131
+ ), "Out-of-subspace goal recognition failed, expected to recognize the bottom left corner goal."
132
+
133
+ # Test with second out-of-subspace goal (top right corner)
134
+ print("\nTesting inference with second out-of-subspace goal (top right corner)...")
135
+ problem_name_out2 = env_property.goal_to_problem_str(out_subspace_goal2)
136
+ actor_out2 = DeepRLAgent(
137
+ domain_name=POINT_MAZE,
138
+ problem_name=problem_name_out2,
139
+ env_prop=env_property,
140
+ algorithm=PPO,
141
+ num_timesteps=500000,
142
+ )
143
+ actor_out2.learn()
144
+
145
+ full_sequence_out2 = actor_out2.generate_observation(
146
+ action_selection_method=stochastic_amplified_selection,
147
+ random_optimalism=True,
148
+ with_dict=True,
149
+ )
150
+ partial_sequence_out2 = random_subset_with_order(
151
+ full_sequence_out2, (int)(0.5 * len(full_sequence_out2)), is_consecutive=False
152
+ )
153
+ recognized_goal_out2 = recognizer.inference_phase(
154
+ partial_sequence_out2, out_subspace_goal2, 0.5
155
+ )
156
+ print(
157
+ f"Goal recognized for second out-of-subspace sequence: {recognized_goal_out2}"
158
+ )
159
+ print(f"Actual goal: {out_subspace_goal2}")
160
+
161
+ assert str(recognized_goal_out2) == str(
162
+ out_subspace_goal2
163
+ ), "Second out-of-subspace goal recognition failed, expected to recognize the top right corner goal."
164
+
165
+ print("\nGCAura Point Maze tutorial completed successfully!")
166
+
167
+
168
+ if __name__ == "__main__":
169
+ run_gcaura_point_maze_tutorial()
@@ -17,8 +17,12 @@ def run_gcdraco_panda_tutorial():
17
17
  )
18
18
 
19
19
  recognizer.domain_learning_phase(
20
- base_goals=[np.array([PandaProperty.sample_goal()]) for _ in range(30)],
21
- train_configs=[(SAC, 800000)],
20
+ {
21
+ "gc": {
22
+ "goals": [np.array([PandaProperty.sample_goal()]) for _ in range(30)],
23
+ "train_configs": [(SAC, 800000)],
24
+ }
25
+ }
22
26
  )
23
27
 
24
28
  recognizer.goals_adaptation_phase(
@@ -15,7 +15,9 @@ def run_gcdraco_parking_tutorial():
15
15
  evaluation_function=mean_wasserstein_distance, # or mean_p_value
16
16
  )
17
17
 
18
- recognizer.domain_learning_phase([i for i in range(1, 21)], [(PPO, 200000)])
18
+ recognizer.domain_learning_phase(
19
+ {"gc": {"goals": [i for i in range(1, 21)], "train_configs": [(PPO, 200000)]}}
20
+ )
19
21
  recognizer.goals_adaptation_phase(
20
22
  dynamic_goals=["1", "11", "21"]
21
23
  # no need for expert sequence generation since GCRL is used
@@ -12,18 +12,22 @@ def run_graml_minigrid_tutorial():
12
12
  )
13
13
 
14
14
  recognizer.domain_learning_phase(
15
- base_goals=[
16
- (11, 1),
17
- (11, 11),
18
- (1, 11),
19
- (7, 11),
20
- (8, 1),
21
- (10, 6),
22
- (6, 9),
23
- (11, 3),
24
- (11, 5),
25
- ],
26
- train_configs=[(QLEARNING, 100000) for _ in range(9)],
15
+ {
16
+ "bg": {
17
+ "goals": [
18
+ (11, 1),
19
+ (11, 11),
20
+ (1, 11),
21
+ (7, 11),
22
+ (8, 1),
23
+ (10, 6),
24
+ (6, 9),
25
+ (11, 3),
26
+ (11, 5),
27
+ ],
28
+ "train_configs": [(QLEARNING, 100000) for _ in range(9)],
29
+ }
30
+ }
27
31
  )
28
32
 
29
33
  recognizer.goals_adaptation_phase(
@@ -14,8 +14,12 @@ def run_graml_panda_tutorial():
14
14
  domain_name=PANDA, env_name="PandaMyReachDense"
15
15
  )
16
16
  recognizer.domain_learning_phase(
17
- base_goals=[np.array([PandaProperty.sample_goal()]) for _ in range(1, 30)],
18
- train_configs=[(SAC, 800000)],
17
+ {
18
+ "gc": {
19
+ "goals": [np.array([PandaProperty.sample_goal()]) for _ in range(30)],
20
+ "train_configs": [(SAC, 800000)],
21
+ }
22
+ }
19
23
  )
20
24
  recognizer.goals_adaptation_phase(
21
25
  dynamic_goals=[
@@ -11,7 +11,9 @@ from gr_libs.recognizer.graml.graml_recognizer import GCGraml
11
11
  def run_graml_parking_tutorial():
12
12
  recognizer = GCGraml(domain_name=PARKING, env_name="Parking-S-14-PC-")
13
13
 
14
- recognizer.domain_learning_phase([i for i in range(1, 21)], [(PPO, 200000)])
14
+ recognizer.domain_learning_phase(
15
+ {"gc": {"goals": [i for i in range(1, 21)], "train_configs": [(PPO, 200000)]}}
16
+ )
15
17
  recognizer.goals_adaptation_phase(
16
18
  dynamic_goals=["1", "11", "21"]
17
19
  # no need for expert sequence generation since GCRL is used
@@ -14,8 +14,21 @@ def run_graml_point_maze_tutorial():
14
14
  )
15
15
 
16
16
  recognizer.domain_learning_phase(
17
- [(9, 1), (9, 9), (1, 9), (3, 3), (3, 4), (8, 2), (3, 7), (2, 8)],
18
- [(SAC, 200000) for _ in range(8)],
17
+ {
18
+ "bg": {
19
+ "goals": [
20
+ (9, 1),
21
+ (9, 9),
22
+ (1, 9),
23
+ (3, 3),
24
+ (3, 4),
25
+ (8, 2),
26
+ (3, 7),
27
+ (2, 8),
28
+ ],
29
+ "train_configs": [(SAC, 200000) for _ in range(8)],
30
+ }
31
+ }
19
32
  )
20
33
 
21
34
  recognizer.goals_adaptation_phase(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gr_libs
3
- Version: 0.2.2
3
+ Version: 0.2.6
4
4
  Summary: Package with goal recognition frameworks baselines
5
5
  Author: Ben Nageris
6
6
  Author-email: Matan Shamir <matan.shamir@live.biu.ac.il>, Osher Elhadad <osher.elhadad@live.biu.ac.il>
@@ -108,13 +108,16 @@ For any issues or troubleshooting, please refer to the repository's issue tracke
108
108
 
109
109
  ## Supported Algorithms
110
110
 
111
- Successors of algorithms that don't differ in their specifics are added in parentheses after the algorithm name. For example, since GC-DRACO and DRACO share the same column values, they're written on one line as DRACO (GC).
111
+ | **Algorithm** | **Supervised** | **Reinforcement Learning** | **Discrete States** | **Continuous States** | **Discrete Actions** | **Continuous Actions** | **Model-Based** | **Model-Free** | **Action-Only** | **Goal Conditioned** | **Fine-Tuning** | **Supported Environments** |
112
+ |---------------------|----------------|---------------------------|---------------------|----------------------|----------------------|-----------------------|------------------|----------------|----------------|---------------------|-----------------|-------------------------------------------|
113
+ | Graql | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | Minigrid |
114
+ | Draco | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | PointMaze, Panda Reach, Parking |
115
+ | GCDraco | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | Panda Reach, Parking |
116
+ | GCAura | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | PointMaze, Panda Reach, Parking |
117
+ | ExpertBasedGraml | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | Panda Reach, Parking |
118
+ | BGGraml | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | Minigrid, PointMaze |
119
+ | GCGraml | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | Panda Reach, Parking |
112
120
 
113
- | **Algorithm** | **Supervised** | **Reinforcement Learning** | **Discrete States** | **Continuous States** | **Discrete Actions** | **Continuous Actions** | **Model-Based** | **Model-Free** | **Action-Only** |
114
- |--------------|--------------|------------------------|------------------|------------------|--------------|--------------|--------------|--------------|--------------|
115
- | GRAQL | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ |
116
- | DRACO (GC) | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ |
117
- | GRAML (GC, BG) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
118
121
 
119
122
  ## Supported Domains
120
123
 
@@ -259,20 +262,33 @@ A part of the contribution of this package is standardizing the evaluations of M
259
262
  consts.py provides a set of ODGR problems on which the framework can be evaluated.
260
263
  The 'evaluations' sub-package provides scripts to analyze the results of the all_experiments.py execution, done over the ODGR the problems defined at consts.py.
261
264
 
262
- In order to parallelize executions of odgr_executor.py, you can edit all_experiments.py with your combination of domains, environments and tasks.
263
- This script use multiprocessing to simultaniously execute many odgr_executor.py python executions as child processes.
265
+ #### Running all_experiments.py
264
266
 
265
- It logs failures and successful executions for debugability.
267
+ You can now run `all_experiments.py` with your desired combination of domains, environments, tasks, and recognizers directly from the command line, without editing the script:
266
268
 
267
- After execution, another level of abstraction for the results is created. For example, when running for Graql in the minigrid domain:
268
269
  ```sh
269
- outputs\summaries\detailed_summary_minigrid_Graql.txt
270
+ python gr_libs/all_experiments.py \
271
+ --domains minigrid parking \
272
+ --envs MiniGrid-SimpleCrossingS13N4 Parking-S-14-PC- \
273
+ --tasks L1 L2 L3 L4 L5 \
274
+ --recognizers ExpertBasedGraml Graql \
275
+ --n 5
270
276
  ```
271
- Will show the accuracies for every ODGR problem, for every percentage and type of input in a table-like .txt format, whike:
277
+
278
+ - `--domains`: List of domains to run experiments on.
279
+ - `--envs`: List of environments (must be in the same order as domains).
280
+ - `--tasks`: List of tasks (applied to all domain/env pairs).
281
+ - `--recognizers`: List of recognizers/algorithms to evaluate.
282
+ - `--n`: Number of times to execute each task (default: 5).
283
+
284
+ This script uses multiprocessing to simultaneously execute many `odgr_executor.py` runs as child processes. It logs failures and successful executions for debugability.
285
+
286
+ After execution summary files are generated in `outputs/summaries/` for further analysis and plotting.
287
+
288
+ another execution example:
272
289
  ```sh
273
- outputs\summaries\compiled_summary_minigrid_Graql.txt
290
+ python gr_libs/all_experiments.py --domains parking --envs Parking-S-14-PC- --tasks L1 L2 L3 L4 L5 --recognizers GCAura GCGraml GCDraco BGGraml Draco --n 5
274
291
  ```
275
- Will show the same results in a more compact summary.
276
292
 
277
293
  ### Using analysis scripts
278
294
  The repository provides benchmark domains and scripts for analyzing experimental results. The `evaluation` directory contains tools for processing and visualizing the results from odgr_executor.py and all_experiments.py.
@@ -1,26 +1,23 @@
1
- gr_libs/__init__.py,sha256=XGx0_nWGgy-1zEQUXHRBs3TTb13jX9yOxVvSaavCkBk,376
2
- gr_libs/_version.py,sha256=OjGGK5TcHVG44Y62aAqeJH4CskkZoY9ydbHOtCDew50,511
3
- gr_libs/all_experiments.py,sha256=0Xm1KZ1YDWGcAiYKc6IilZ-UyVuxm77iZNsUVzTURqY,11357
4
- gr_libs/odgr_executor.py,sha256=AdO5qpQ6fZcVRxJg0O-mSKDXim3gVQbq8vSmfx0AjQk,10615
5
- gr_libs/_evaluation/__init__.py,sha256=trZ-4PyOhzEEK_TvQLfbnNFcqYuN6SdRjDkkAdW6MW8,78
6
- gr_libs/_evaluation/_analyze_results_cross_alg_cross_domain.py,sha256=ksguC1zeokjpd_ItC5e6MX8HE9qEtjw-uxCXzwGsO88,9863
7
- gr_libs/_evaluation/_generate_experiments_results.py,sha256=Nj2XLDJ-g9Vn_3oA3tEDu8qWQcIT25Hf_tRySm00oGc,5163
8
- gr_libs/_evaluation/_generate_task_specific_statistics_plots.py,sha256=Jgst3PW-XTu1JHWhyl73zi4mqoUI3U3dHLIUemKSx7c,19051
9
- gr_libs/_evaluation/_get_plans_images.py,sha256=a_e97aOMiZ8toBiAIzJCx75lF9RLiVfxROYvcoNy6rM,2729
10
- gr_libs/_evaluation/_increasing_and_decreasing_.py,sha256=1VOHrriv9mdhc1fxNjVAsu-sO77KRnscbmFXNUub0YU,3868
1
+ gr_libs/__init__.py,sha256=3gXejmK_mOfmD9RmB2jMG1Xm7DUyCwAILB7h7sheYxQ,405
2
+ gr_libs/_version.py,sha256=nObnONsicQ3YX6SG5MVBxmIp5dmRacXDauSqZijWQbY,511
3
+ gr_libs/all_experiments.py,sha256=OTTMx5ddy7z3kJbElQcR5nwEtshPsoehNPwDuMzojcc,10006
4
+ gr_libs/odgr_executor.py,sha256=MKDK-8fNc4HHlwnZFTjyeS-UbYafdmVbe84gRNG7stI,10806
5
+ gr_libs/_evaluation/_generate_experiments_results.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
6
  gr_libs/environment/__init__.py,sha256=xCCzTFDrj_ijdLoZ-PzGyyYDeU2aoW19X1da76_x9iM,1458
12
- gr_libs/environment/environment.py,sha256=G3XXuhJDtduOtNeMCbwbMAygfP55AI07Aufs9QrggWQ,16389
7
+ gr_libs/environment/environment.py,sha256=neKNy0fkJK1i53LIh0JFP4tl0-4ntTM8F2wTkCvJtm4,19706
13
8
  gr_libs/environment/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
9
  gr_libs/environment/_utils/utils.py,sha256=dKuWoUpyuGSJL6qHQfvvJnFf4g-Rh1t2ykuRNrsIvP8,614
10
+ gr_libs/evaluation/__init__.py,sha256=trZ-4PyOhzEEK_TvQLfbnNFcqYuN6SdRjDkkAdW6MW8,78
11
+ gr_libs/evaluation/generate_experiments_results.py,sha256=mXsGlOJKqRwtTDxuIVlsZhwgLyHAKb3zmK6jAVE7G7o,3420
15
12
  gr_libs/metrics/__init__.py,sha256=dQo4cMqrOB2-VLDxTIGryCm14mUnmEXs4F8jqcgNsY4,145
16
13
  gr_libs/metrics/metrics.py,sha256=tpjr4hKt5AGft5H2YxkbF0O8La5JZQaOmnkyjptD2M8,13430
17
14
  gr_libs/ml/__init__.py,sha256=xX9InKnWhYm8e0Lhsnnm0H68yBPTNEfq756w95xv-98,83
18
15
  gr_libs/ml/agent.py,sha256=ea1yRltKX0LSpRMnpAQLRKvvKoLMQz9MgMeWBPhQISw,2095
19
- gr_libs/ml/consts.py,sha256=vsEB1nk5V_qP3FjNlv4vBKeTTFngV3RNaNp6fWnmEz0,366
16
+ gr_libs/ml/consts.py,sha256=TsuTuQZNRrZ5bFRaUkFOeYnzljHjtyFszQJpqg4xq7s,420
20
17
  gr_libs/ml/base/__init__.py,sha256=f63VN3Lv4tQp3dAZjtT78PGV5XuOD8WlU4svy43LZrU,123
21
18
  gr_libs/ml/base/rl_agent.py,sha256=Ewqu583gUkgRmeGWCJgkyDBKxTqQnN4qa2vxq0-ydoE,3843
22
19
  gr_libs/ml/neural/__init__.py,sha256=vGdjx1KzlB9UxNRwkAeYBEoYdVtRdhj0M4mtWuzqvU8,55
23
- gr_libs/ml/neural/deep_rl_learner.py,sha256=iy0N0BaUW3jRttLYUteApNWBI5pIYZTjJn2v32UVUQ4,26950
20
+ gr_libs/ml/neural/deep_rl_learner.py,sha256=ND1D8b5Tc96ZpWc3yu-JjtP7662E2q4cKVLV9aFheD0,30141
24
21
  gr_libs/ml/neural/utils/__init__.py,sha256=Av5wB2eSHR7spHqZFdgau_9EJV0FmijaYqXeyGMwktQ,69
25
22
  gr_libs/ml/neural/utils/dictlist.py,sha256=ORFez_KmaCzraStF97hxdgCAAALP4Er8u3e9RcqlvhM,1030
26
23
  gr_libs/ml/planner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -42,30 +39,39 @@ gr_libs/ml/utils/math.py,sha256=7Au9L-FHE7eB1ygLbbuR6AhZK6kq8D_9srVtu4iDMPk,429
42
39
  gr_libs/ml/utils/other.py,sha256=93oaveiHUzWt_rCDVqybrpHdAfI3UBPCto31Nm5yT0Y,506
43
40
  gr_libs/ml/utils/storage.py,sha256=CgZHWcC3GovKe-U3Cvwz0s5qCbBrYHY6w_CV-LnTquc,3791
44
41
  gr_libs/problems/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
- gr_libs/problems/consts.py,sha256=kgmaUi3wbHvcBfnIaXT8D79J_cD1yTrwgha6k3Y429Y,62096
42
+ gr_libs/problems/consts.py,sha256=FQk2TaKAFHdZiISubGXeYleBaOXpk8ZC749NtP5RqWs,68520
46
43
  gr_libs/recognizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
- gr_libs/recognizer/recognizer.py,sha256=gtUttI1473co5ZHgO7-wQ7HL-aYJp0S4X6goqVYyT24,3091
48
- gr_libs/recognizer/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
- gr_libs/recognizer/_utils/format.py,sha256=eCoqEwv7YdLrF5nb-xAbDXxQ-ogvq_DHf9I2uwdfv-0,512
44
+ gr_libs/recognizer/recognizer.py,sha256=IZ3KU5jopf5WhQZe_dQWYZp_fdMFvcabqoU3z6ZOFK8,3128
45
+ gr_libs/recognizer/_utils/__init__.py,sha256=MvXPRyr30W5C_n-Dul3aheE_9SWy2aIMGINKWj36mfM,42
46
+ gr_libs/recognizer/_utils/format.py,sha256=6m-csTBg8hBLrrKwRGFwS1uKGmulihsABH_BUl5TV80,567
50
47
  gr_libs/recognizer/gr_as_rl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
- gr_libs/recognizer/gr_as_rl/gr_as_rl_recognizer.py,sha256=ztucO7YRZ3mZDGdt98OUAu_DJHVgUhUEvIngL2swfCE,9705
48
+ gr_libs/recognizer/gr_as_rl/gr_as_rl_recognizer.py,sha256=efQtSECx73FMzIB1bpldN8CqBrlIrXf0ELvHeEMEImA,15664
52
49
  gr_libs/recognizer/graml/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
50
  gr_libs/recognizer/graml/_gr_dataset.py,sha256=JChqXOh7TP8yu-zQPCQ34ghw7iJFnAzd2FkeOyndvFk,10038
54
- gr_libs/recognizer/graml/graml_recognizer.py,sha256=M-tvipAMn_tiWbM3M74D5zH8yKbPEwR-sKTQy3FZT3E,26058
51
+ gr_libs/recognizer/graml/graml_recognizer.py,sha256=BL2sydjRoFRx2wZBm0-IfkBvDfVy07JyOsKjodaIGGU,26340
55
52
  gr_libs/tutorials/draco_panda_tutorial.py,sha256=9_scjcyMjkjw8l6g9E-GKOrFTxsIIndW_J1WKjE6-wo,2146
56
53
  gr_libs/tutorials/draco_parking_tutorial.py,sha256=jjbNzSv5l4EvjydwslNYh51xHoIkNmcjPbi0YL6WAeA,1896
57
- gr_libs/tutorials/gcdraco_panda_tutorial.py,sha256=KsYStJPk9vI7PUuJrwBaMcQ5a9GT-00-DGJgqRmYvgs,2230
58
- gr_libs/tutorials/gcdraco_parking_tutorial.py,sha256=wvhwIwXw_h_VP4OBdsnv2rn9WTTaXJXA_xZ8mLHxcmg,2053
59
- gr_libs/tutorials/graml_minigrid_tutorial.py,sha256=msw19nRKAFUJGZy0JNym1At3Zoe5cGxppt24xcElLTQ,2205
60
- gr_libs/tutorials/graml_panda_tutorial.py,sha256=DC0AyiZswc5zOKFd0xTYU72ugaCLlf7xtnOGFsmv7MQ,2140
61
- gr_libs/tutorials/graml_parking_tutorial.py,sha256=Qf39bdpF4lgppKlDO3qa1CfswmbubqKBXJlPMn2PfhI,1941
62
- gr_libs/tutorials/graml_point_maze_tutorial.py,sha256=L95_2u1SA1aZJS-C4dQdq-97Sv6nFYNve2FAX2p5_Mc,2188
54
+ gr_libs/tutorials/gcaura_panda_tutorial.py,sha256=Z8RmzLLHboRzCfGWbM_Bhc_glJ4VIWCGMNky1_3i_VA,6189
55
+ gr_libs/tutorials/gcaura_parking_tutorial.py,sha256=OgSa6NvG0W0pm3h-lbN8v4YY1Br7WY3tIguGd9P4HWY,6221
56
+ gr_libs/tutorials/gcaura_point_maze_tutorial.py,sha256=Z39Tydx7VqXlB37YNhHOc9ge5Zjo0EQNQte_q6ZUXLE,6593
57
+ gr_libs/tutorials/gcdraco_panda_tutorial.py,sha256=HzGKqZR--rcTYj3RQMuQCzTVll2Q-Z_RQbmGpcZPovg,2301
58
+ gr_libs/tutorials/gcdraco_parking_tutorial.py,sha256=kd7xRsjGPCHohwhbJEK5XAsD3R9k8rcd0qz8IZIgjN4,2103
59
+ gr_libs/tutorials/graml_minigrid_tutorial.py,sha256=bEsi21-9-AiOw4-H98Fr3YaCrp8_uSXOiiGahaCO4mg,2356
60
+ gr_libs/tutorials/graml_panda_tutorial.py,sha256=e2pm62Hj6wyzKO-RvSz_qnDxLZoqKqnzc8B_ylVoGVM,2208
61
+ gr_libs/tutorials/graml_parking_tutorial.py,sha256=vRvcbrbM8N7npt7W_0g-CbUhALkXVqUejoVWlPMuj04,1991
62
+ gr_libs/tutorials/graml_point_maze_tutorial.py,sha256=KA28__CNKslxq3p6O5htjJFDKOXXbiA1bOX-oPJxjmI,2463
63
63
  gr_libs/tutorials/graql_minigrid_tutorial.py,sha256=HT8kCFNbZXAraIau9wtgC_aW8xg-QNRZB2lcpGm3yWk,1941
64
64
  tests/test_draco.py,sha256=oIeTDgn6pt3RfTC-RPX3Bw5cG4BThxRGH3z8en3TX0M,385
65
+ tests/test_gcaura.py,sha256=mPqBGnqPto4uFkoLj8OrKySvG0Ph-w5ucIlAQ4bw8Yw,466
65
66
  tests/test_gcdraco.py,sha256=vV6rp7PkJJk_WpAfRekb197QiMHjXXApqrBiLG9RTwo,308
66
67
  tests/test_graml.py,sha256=amSikMWrGS9BNVSXGNKc1n5tfRl-FfgCsyHYsJtduD4,608
67
68
  tests/test_graql.py,sha256=KxVKx6rcSCbN-PjxR2DFoKcILRUmMDz0dTM5SvJZMXg,154
68
- gr_libs-0.2.2.dist-info/METADATA,sha256=0hqzG9XaGJmqfJ36sKLPnlU1lFUqHdOr7if1icu1sV0,12992
69
- gr_libs-0.2.2.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
70
- gr_libs-0.2.2.dist-info/top_level.txt,sha256=Yzc_VSW3gzbVM7ZtlV4r6VXmfAC8WXqGVUgK1r6JcLs,14
71
- gr_libs-0.2.2.dist-info/RECORD,,
69
+ tests/test_odgr_executor_expertbasedgraml.py,sha256=UQh1pzaqAy9kRN1O--x1tQLGWkRXuYnz5ujB2H1XMas,558
70
+ tests/test_odgr_executor_gcaura.py,sha256=rggRtH-1xU67_m_mtHRwk_tX-hNFiWNdcyp3kzmOEXs,502
71
+ tests/test_odgr_executor_gcdraco.py,sha256=VUmnO33tuMVlNYz7Fh08VUW4jfUXhhUsJu7oPiLF2iU,506
72
+ tests/test_odgr_executor_gcgraml.py,sha256=MmyadmboVxFwfRigqe9jondZopqUjhbQ3gXjCbK4yAs,506
73
+ tests/test_odgr_executor_graql.py,sha256=06p_kPAUn2OQrL-nBik58C22UPbTDC4CwDaB7MUk61o,514
74
+ gr_libs-0.2.6.dist-info/METADATA,sha256=Le6ZmUIXTb7B8D9ohgOCo0YkiGeXvvioS_usH_Q_oDc,15032
75
+ gr_libs-0.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
76
+ gr_libs-0.2.6.dist-info/top_level.txt,sha256=Yzc_VSW3gzbVM7ZtlV4r6VXmfAC8WXqGVUgK1r6JcLs,14
77
+ gr_libs-0.2.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
tests/test_gcaura.py ADDED
@@ -0,0 +1,15 @@
1
+ from gr_libs.tutorials.gcaura_panda_tutorial import run_gcaura_panda_tutorial
2
+ from gr_libs.tutorials.gcaura_parking_tutorial import run_gcaura_parking_tutorial
3
+ from gr_libs.tutorials.gcaura_point_maze_tutorial import run_gcaura_point_maze_tutorial
4
+
5
+
6
+ def test_gcaura_panda_tutorial():
7
+ run_gcaura_panda_tutorial()
8
+
9
+
10
+ def test_gcaura_parking_tutorial():
11
+ run_gcaura_parking_tutorial()
12
+
13
+
14
+ def test_gcaura_point_maze_tutorial():
15
+ run_gcaura_point_maze_tutorial()
@@ -0,0 +1,14 @@
1
+ import subprocess
2
+ import sys
3
+
4
+ def test_odgr_executor_expertbasedgraml_minigrid():
5
+ """Test odgr_executor.py with ExpertBasedGraml on minigrid, L1, easiest env."""
6
+ result = subprocess.run([
7
+ sys.executable, "gr_libs/odgr_executor.py",
8
+ "--domain", "minigrid",
9
+ "--env_name", "MiniGrid-SimpleCrossingS13N4",
10
+ "--recognizer", "ExpertBasedGraml",
11
+ "--task", "L1",
12
+ "--collect_stats"
13
+ ], capture_output=True, text=True)
14
+ assert result.returncode == 0, f"ExpertBasedGraml minigrid L1 failed: {result.stderr}"
@@ -0,0 +1,14 @@
1
+ import subprocess
2
+ import sys
3
+
4
+ def test_odgr_executor_gcaura_parking():
5
+ """Test odgr_executor.py with GCAura on parking, L1, easiest env."""
6
+ result = subprocess.run([
7
+ sys.executable, "gr_libs/odgr_executor.py",
8
+ "--domain", "parking",
9
+ "--env_name", "Parking-S-14-PC-",
10
+ "--recognizer", "GCAura",
11
+ "--task", "L1",
12
+ "--collect_stats"
13
+ ], capture_output=True, text=True)
14
+ assert result.returncode == 0, f"GCAura parking L1 failed: {result.stderr}"
@@ -0,0 +1,14 @@
1
+ import subprocess
2
+ import sys
3
+
4
+ def test_odgr_executor_gcdraco_parking():
5
+ """Test odgr_executor.py with GCDraco on parking, L1, easiest env."""
6
+ result = subprocess.run([
7
+ sys.executable, "gr_libs/odgr_executor.py",
8
+ "--domain", "parking",
9
+ "--env_name", "Parking-S-14-PC-",
10
+ "--recognizer", "GCDraco",
11
+ "--task", "L1",
12
+ "--collect_stats"
13
+ ], capture_output=True, text=True)
14
+ assert result.returncode == 0, f"GCDraco parking L1 failed: {result.stderr}"
@@ -0,0 +1,14 @@
1
+ import subprocess
2
+ import sys
3
+
4
+ def test_odgr_executor_gcgraml_parking():
5
+ """Test odgr_executor.py with GCGraml on parking, L1, easiest env."""
6
+ result = subprocess.run([
7
+ sys.executable, "gr_libs/odgr_executor.py",
8
+ "--domain", "parking",
9
+ "--env_name", "Parking-S-14-PC-",
10
+ "--recognizer", "GCGraml",
11
+ "--task", "L1",
12
+ "--collect_stats"
13
+ ], capture_output=True, text=True)
14
+ assert result.returncode == 0, f"GCGraml parking L1 failed: {result.stderr}"
@@ -0,0 +1,14 @@
1
+ import subprocess
2
+ import sys
3
+
4
+ def test_odgr_executor_graql_minigrid():
5
+ """Test odgr_executor.py with Graql on minigrid, L1, easiest env."""
6
+ result = subprocess.run([
7
+ sys.executable, "gr_libs/odgr_executor.py",
8
+ "--domain", "minigrid",
9
+ "--env_name", "MiniGrid-SimpleCrossingS13N4",
10
+ "--recognizer", "Graql",
11
+ "--task", "L1",
12
+ "--collect_stats"
13
+ ], capture_output=True, text=True)
14
+ assert result.returncode == 0, f"Graql minigrid L1 failed: {result.stderr}"