marktrovinger commited on
Commit
dff3127
1 Parent(s): f43f2a6

Update cartpole_gym_replay.py

Browse files
Files changed (1) hide show
  1. cartpole_gym_replay.py +3 -3
cartpole_gym_replay.py CHANGED
@@ -6,7 +6,7 @@ import numpy as np
6
  # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
7
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
8
  _BASE_URL = "https://huggingface.co/datasets/marktrovinger/cartpole_gym_replay/resolve/main"
9
- _DATA_URL = f"{_BASE_URL}/replay_buffer_pkl.pkl"
10
 
11
  _DESCRIPTION = """ \
12
  Testing a cartpole replay.
@@ -60,8 +60,8 @@ class DecisionTransformerGymDataset(datasets.GeneratorBasedBuilder):
60
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
61
  def _generate_examples(self, filepath, split):
62
  with open(filepath, "rb") as f:
63
- trajectories = pickle.load(f)
64
- #trajectories = np.load(f)
65
 
66
  for idx, traj in enumerate(trajectories):
67
  yield idx, {
 
6
  # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
7
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
8
  _BASE_URL = "https://huggingface.co/datasets/marktrovinger/cartpole_gym_replay/resolve/main"
9
+ _DATA_URL = f"{_BASE_URL}/replay_buffer_npz.npz"
10
 
11
  _DESCRIPTION = """ \
12
  Testing a cartpole replay.
 
60
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
61
  def _generate_examples(self, filepath, split):
62
  with open(filepath, "rb") as f:
63
+ #trajectories = pickle.load(f)
64
+ trajectories = np.load(f)
65
 
66
  for idx, traj in enumerate(trajectories):
67
  yield idx, {