Upload nle_hf_dataset.py
Browse files- nle_hf_dataset.py +9 -9
nle_hf_dataset.py
CHANGED
@@ -88,12 +88,12 @@ class NleHfDataset(datasets.GeneratorBasedBuilder):
|
|
88 |
else:
|
89 |
features = datasets.Features(
|
90 |
{
|
91 |
-
"tty_chars": datasets.Array4D(shape=(
|
92 |
-
"tty_colors": datasets.Array4D(shape=(
|
93 |
-
"tty_cursor": datasets.Array3D(shape=(
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
}
|
98 |
)
|
99 |
|
@@ -126,7 +126,7 @@ class NleHfDataset(datasets.GeneratorBasedBuilder):
|
|
126 |
"tty_chars": f["tty_chars"][()],
|
127 |
"tty_colors": f["tty_colors"][()],
|
128 |
"tty_cursor": f["tty_cursor"][()],
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
}
|
|
|
88 |
else:
|
89 |
features = datasets.Features(
|
90 |
{
|
91 |
+
"tty_chars": datasets.Array4D(shape=(None, 24, 80), dtype="uint8"),
|
92 |
+
"tty_colors": datasets.Array4D(shape=(None, 24, 80), dtype="int8"),
|
93 |
+
"tty_cursor": datasets.Array3D(shape=(None, 2), dtype="int16"),
|
94 |
+
"actions": datasets.Array2D(shape=(-1, 1), dtype="int16"),
|
95 |
+
"rewards": datasets.Array2D(shape=(-1, 1), dtype="int32"),
|
96 |
+
"dones": datasets.Array2D(shape=(-1, 1), dtype="bool"),
|
97 |
}
|
98 |
)
|
99 |
|
|
|
126 |
"tty_chars": f["tty_chars"][()],
|
127 |
"tty_colors": f["tty_colors"][()],
|
128 |
"tty_cursor": f["tty_cursor"][()],
|
129 |
+
"actions": f["actions"][()].reshape(-1, 1),
|
130 |
+
"rewards": f["rewards"][()].reshape(-1, 1),
|
131 |
+
"dones": f["dones"][()].reshape(-1, 1)
|
132 |
}
|