Skip to content

Commit 2cce706

Browse files
author
yichao-liang
committed
clean up coffee
1 parent 09e9696 commit 2cce706

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

predicators/envs/coffee.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)