parquet-converter commited on
Commit
3b25c6a
1 Parent(s): f938afa

Update parquet files

Browse files
README.md DELETED
@@ -1,3 +0,0 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
cartpole_gym_replay.py DELETED
@@ -1,75 +0,0 @@
1
- import pickle
2
-
3
- import datasets
4
- import numpy as np
5
-
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.
13
- """
14
-
15
- _HOMEPAGE = "blah"
16
-
17
- _LICENSE = "MIT"
18
-
19
-
20
- class DecisionTransformerGymDataset(datasets.GeneratorBasedBuilder):
21
- def _info(self):
22
-
23
- features = datasets.Features(
24
- {
25
- "observations": datasets.Sequence(datasets.Sequence(datasets.Value("float32"))),
26
- "actions": datasets.Sequence(datasets.Sequence(datasets.Value("float32"))),
27
- "rewards": datasets.Sequence(datasets.Value("float32")),
28
- "dones": datasets.Sequence(datasets.Value("float32")),
29
- # These are the features of your dataset like images, labels ...
30
- }
31
- )
32
-
33
- return datasets.DatasetInfo(
34
- # This is the description that will appear on the datasets page.
35
- description=_DESCRIPTION,
36
- # This defines the different columns of the dataset and their types
37
- # Here we define them above because they are different between the two configurations
38
- features=features,
39
- # If there's a common (input, target) tuple from the features, uncomment supervised_keys line below and
40
- # specify them. They'll be used if as_supervised=True in builder.as_dataset.
41
- # supervised_keys=("sentence", "label"),
42
- # Homepage of the dataset for documentation
43
- homepage=_HOMEPAGE,
44
- # License for the dataset if available
45
- license=_LICENSE,
46
- )
47
- def _split_generators(self, dl_manager):
48
- urls = _DATA_URL
49
- data_dir = dl_manager.download_and_extract(urls)
50
- return [
51
- datasets.SplitGenerator(
52
- name=datasets.Split.TRAIN,
53
- # These kwargs will be passed to _generate_examples
54
- gen_kwargs={
55
- "filepath": data_dir,
56
- "split": "train",
57
- },
58
- )
59
- ]
60
- # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
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[idx],
72
- "actions": act[idx],
73
- "rewards": rew[idx],
74
- "dones": dones[idx],
75
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
replay_buffer_npz.npz → default/cartpole_gym_replay-train.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5769871a06ef456e4e338bc2778da70eed1da49b781721dbf1568f50a7dc6ea3
3
- size 15197224
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd0415637e6f3211ce1c11205aee932f37dd8a47a2e7318dd82f6a4fb86a0136
3
+ size 23449043
replay_buffer_pkl.pkl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:bee243999872c07ea2cac3132d38814cc81c9e08c40a3e97bc6450e5f0f1625f
3
- size 52003748