Skip to content

Commit 5b31b84

Browse files
authored
Fix pcl_rl bugs (#10465)
1 parent f08513d commit 5b31b84

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

research/pcl_rl/controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ def sample_episodes(self, sess, greedy=False):
204204
observations, actions, rewards,
205205
pads) = self._sample_episodes(sess, greedy=greedy)
206206

207-
observations = zip(*observations)
208-
actions = zip(*actions)
207+
observations = list(zip(*observations))
208+
actions = list(zip(*actions))
209209

210210
terminated = np.array(self.env.dones)
211211

research/pcl_rl/env_spec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def initial_obs(self, batch_size):
175175
if batched:
176176
return obs
177177
else:
178-
return zip(*obs)[0]
178+
return list(zip(*obs))[0]
179179

180180
def initial_act(self, batch_size=None):
181181
batched = batch_size is not None
@@ -191,7 +191,7 @@ def initial_act(self, batch_size=None):
191191
if batched:
192192
return act
193193
else:
194-
return zip(*act)[0]
194+
return list(zip(*act))[0]
195195

196196
def is_discrete(self, typ):
197197
return typ == spaces.discrete

0 commit comments

Comments
 (0)