marktrovinger
commited on
Commit
•
6a41fc5
1
Parent(s):
8757697
Update cartpole_gym_replay.py
Browse files- cartpole_gym_replay.py +5 -5
cartpole_gym_replay.py
CHANGED
@@ -61,11 +61,11 @@ class DecisionTransformerGymDataset(datasets.GeneratorBasedBuilder):
|
|
61 |
def _generate_examples(self, filepath, split):
|
62 |
|
63 |
#trajectories = pickle.load(f)
|
64 |
-
traj = np.load(filepath)
|
65 |
-
obs =
|
66 |
-
act =
|
67 |
-
rew =
|
68 |
-
|
69 |
for idx, value in enumerate(obs):
|
70 |
yield idx, {
|
71 |
"observations": obs[i],
|
|
|
61 |
def _generate_examples(self, filepath, split):
|
62 |
|
63 |
#trajectories = pickle.load(f)
|
64 |
+
#traj = np.load(filepath)
|
65 |
+
obs = np.load(f'{filepath}/observations.npy')
|
66 |
+
act = np.load(f'{filepath}/actions.npy')
|
67 |
+
rew = np.load(f'{filepath}/rewards.npy')
|
68 |
+
dones = np.load(f'{filepath}/dones.npy')
|
69 |
for idx, value in enumerate(obs):
|
70 |
yield idx, {
|
71 |
"observations": obs[i],
|