Skip to content

Commit 17a423c

Browse files
authored
refactor!: don't call get_good_view_with_patch_refinement after successful jump (thousandbrainsproject#747)
1 parent 2c0a5f0 commit 17a423c

File tree

6 files changed

+22
-28
lines changed

6 files changed

+22
-28
lines changed

benchmarks/logos_on_objects.csv

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Experiment,Correct Child or Parent (%)|align right,Used MLH (%)|align right,Num Match Steps|align right,Rotation Error (degrees)|align right,Avg Prediction Error|align right,Run Time (mins)|align right
2-
infer_comp_lvl1_with_monolithic_models,66.67,54.76,316,82.99,0.38,27
3-
infer_comp_lvl1_with_comp_models,86.90,41.67,41,48.61,0.33,3
4-
infer_comp_lvl2_with_comp_models,79.05,43.33,36,44.19,0.34,11
5-
infer_comp_lvl3_with_comp_models,53.43,57.43,37,35.35,0.34,18
6-
infer_comp_lvl4_with_comp_models,56.32,57.42,35,30.60,0.33,18
2+
infer_comp_lvl1_with_monolithic_models,60.71,53.57,321,80.71,0.38,28
3+
infer_comp_lvl1_with_comp_models,84.52,41.67,44,40.76,0.33,3
4+
infer_comp_lvl2_with_comp_models,79.05,40.48,37,44.91,0.34,9
5+
infer_comp_lvl3_with_comp_models,56.57,56.57,40,41.50,0.34,19
6+
infer_comp_lvl4_with_comp_models,58.24,56.59,33,42.52,0.33,18

benchmarks/ycb_10objs.csv

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Experiment,Correct (%)|align right,Used MLH (%)|align right,Num Match Steps|align right,Rotation Error (degrees)|align right,Run Time (mins)|align right,Episode Run Time (s)|align right
2-
base_config_10distinctobj_dist_agent,99.29,1.43,41,10.82,2,9
2+
base_config_10distinctobj_dist_agent,100.00,1.43,39,11.92,2,10
33
base_config_10distinctobj_surf_agent,100.00,0.00,27,15.57,3,12
4-
randrot_noise_10distinctobj_dist_agent,100.00,1.00,38,19.95,3,16
5-
randrot_noise_10distinctobj_dist_on_distm,99.00,0.00,30,15.74,2,17
6-
randrot_noise_10distinctobj_surf_agent,98.00,1.00,28,19.99,4,25
7-
randrot_10distinctobj_surf_agent,100.00,0.00,28,15.06,2,12
8-
randrot_noise_10distinctobj_5lms_dist_agent,100.00,0.00,51,48.04,6,45
4+
randrot_noise_10distinctobj_dist_agent,99.00,4.00,44,21.57,3,16
5+
randrot_noise_10distinctobj_dist_on_distm,98.00,5.00,30,13.53,3,12
6+
randrot_noise_10distinctobj_surf_agent,98.00,1.00,28,19.99,4,24
7+
randrot_10distinctobj_surf_agent,100.00,0.00,28,15.06,2,13
8+
randrot_noise_10distinctobj_5lms_dist_agent,99.00,0.00,52,54.13,5,41
99
base_10simobj_surf_agent,93.57,10.71,82,13.93,6,31
10-
randrot_noise_10simobj_dist_agent,81.00,34.00,204,28.86,9,76
11-
randrot_noise_10simobj_surf_agent,83.00,33.00,166,31.98,18,145
10+
randrot_noise_10simobj_dist_agent,81.00,38.00,211,33.62,12,96
11+
randrot_noise_10simobj_surf_agent,83.00,33.00,166,31.98,17,139
1212
randomrot_rawnoise_10distinctobj_surf_agent,71.00,74.00,14,96.27,4,6
13-
base_10multi_distinctobj_dist_agent,81.43,17.86,32,18.06,45,2
13+
base_10multi_distinctobj_dist_agent,56.43,2.14,33,26.53,33,1

benchmarks/ycb_77objs.csv

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Experiment,Correct (%)|align right,Used MLH (%)|align right,Num Match Steps|align right,Rotation Error (degrees)|align right,Run Time (mins)|align right,Episode Run Time (s)|align right
2-
base_77obj_dist_agent,93.51,10.82,98,13.59,21,62
3-
base_77obj_surf_agent,99.57,7.36,57,8.75,15,38
4-
randrot_noise_77obj_dist_agent,86.58,24.68,162,30.62,35,116
5-
randrot_noise_77obj_surf_agent,90.48,23.81,111,31.05,35,115
6-
randrot_noise_77obj_5lms_dist_agent,92.21,1,72,53.19,12,119
2+
base_77obj_dist_agent,93.07,15.58,109,16.93,20,61
3+
base_77obj_surf_agent,99.57,7.36,57,8.75,14,36
4+
randrot_noise_77obj_dist_agent,87.01,28.14,158,32.66,35,108
5+
randrot_noise_77obj_surf_agent,90.48,23.81,111,31.05,33,106
6+
randrot_noise_77obj_5lms_dist_agent,92.21,1,66,57.63,11,106
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Experiment,Correct (%)|align right,Num Match Steps|align right,Run Time (mins)|align right,Episode Run Time (s)|align right
2-
unsupervised_inference_distinctobj_dist_agent,99.00,100,11,7
3-
unsupervised_inference_distinctobj_surf_agent,100.00,99,19,11
2+
unsupervised_inference_distinctobj_dist_agent,99.00,96,8,5
3+
unsupervised_inference_distinctobj_surf_agent,100.00,99,17,10

docs/how-monty-works/policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ As the positioning procedures were implemented in the early development of Monty
6464
1) Positioning procedures should only be called in `pre_episode`, i.e. before the episode begins.
6565
2) Positioning procedures may make use of privileged information such as the view-finder and semantic-sensor, which are not available to the learning module. However, consistent with point (1), these should not be leveraged during learning or inference by the Monty agent.
6666

67-
These requirements are currently not enforced in the use of `GetGoodView` and `touch_object` when an agent jumps to a location using a model-based policy. Similarly, `touch_object` is used by the surface agent if it loses contact with the object and cannot find it. Appropriately separating out the role of positioning procedures via the above requirements will clarify their role, and enable policies that do not make use of privileged information, but which serve similar purposes during an experiment.
67+
These requirements are currently not enforced in the use of `touch_object` when an agent jumps to a location using a model-based policy. Similarly, `touch_object` is used by the surface agent if it loses contact with the object and cannot find it. Appropriately separating out the role of positioning procedures via the above requirements will clarify their role, and enable policies that do not make use of privileged information, but which serve similar purposes during an experiment.
6868

6969

7070
# Input-Driven and Hypothesis-Driven Policies

src/tbp/monty/frameworks/environments/embodied_data.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,6 @@ def get_good_view_with_patch_refinement(self) -> bool:
610610
"patch" or "patch_0") to ensure that the patch's central pixel is on-object.
611611
Up to 3 reorientation attempts are performed using the central patch.
612612
613-
Also currently used by the distant agent after a "jump" has been initialized
614-
by a model-based policy.
615-
616613
Returns:
617614
Whether the sensor is on the object.
618615
@@ -754,9 +751,6 @@ def handle_successful_jump(self):
754751
self.motor_system._policy.action_details["avoidance_heading"].append(False)
755752
self.motor_system._policy.action_details["z_defined_pc"].append(None)
756753

757-
else:
758-
self.get_good_view_with_patch_refinement()
759-
760754
def handle_failed_jump(self, pre_jump_state, first_sensor):
761755
"""Deal with the results of a failed hypothesis-testing jump.
762756

0 commit comments

Comments
 (0)