@@ -479,12 +479,6 @@ def _get_tasks(self,
479479 }
480480 for task_idx in range (num ):
481481 state_dict = {k : v .copy () for k , v in common_state_dict .items ()}
482- # if is_train:
483- # if task_idx == 2:
484- # num_cups = 2
485- # else:
486- # num_cups = 1
487- # else:
488482 num_cups = num_cups_lst [rng .choice (len (num_cups_lst ))]
489483 cups = [Object (f"cup{ i } " , self ._cup_type ) for i in range (num_cups )]
490484 goal = {GroundAtom (self ._CupFilled , [c ]) for c in cups }
@@ -547,26 +541,10 @@ def _get_tasks(self,
547541 add_rotation = rng .choice ([True , False ], p = [p , 1 - p ])
548542 if add_rotation :
549543 logging .info (f"Adding rotation to jug to task { task_idx } " )
550- # rot = rng.uniform(self.jug_init_rot_lb,
551- # self.jug_init_rot_ub)
552544 rot = self .jug_init_rot_ub
553545 else :
554- # rot = rng.choice([0.1, -0.1])
555546 epsilon = 1e-10
556547 rot = rng .uniform (- 0.1 + epsilon , 0.1 - epsilon )
557- # rot = 0
558-
559- # Manual
560- # if is_train:
561- # if task_idx == 0:
562- # rot = 0.0
563- # elif task_idx in [1, 2]:
564- # logging.info(f"Add rotated to jug to task {task_idx}")
565- # rot = self.jug_init_rot_ub
566- # else:
567- # logging.info(f"Add rotated to jug to task {task_idx}")
568- # rot = rng.uniform(self.jug_init_rot_lb,
569- # self.jug_init_rot_ub)
570548
571549 state_dict [self ._jug ] = {
572550 "x" : x ,
0 commit comments