Update stream_access_example.py
Browse files- stream_access_example.py +3 -2
stream_access_example.py
CHANGED
|
@@ -33,6 +33,7 @@ TASK_CONFIGS = [
|
|
| 33 |
"RBY1PickAndPlaceDataGenConfig",
|
| 34 |
"RBY1PickDataGenConfig",
|
| 35 |
]
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
@contextmanager
|
|
@@ -47,7 +48,7 @@ def stream_pkg(
|
|
| 47 |
"""
|
| 48 |
url = hf_hub_url(
|
| 49 |
repo_id=repo_id,
|
| 50 |
-
filename=f"{config_name}/
|
| 51 |
repo_type="dataset",
|
| 52 |
revision="main",
|
| 53 |
)
|
|
@@ -247,7 +248,7 @@ def main():
|
|
| 247 |
grand_parts = 0
|
| 248 |
|
| 249 |
for config in TASK_CONFIGS:
|
| 250 |
-
ds = load_dataset(REPO, name=config, split="
|
| 251 |
|
| 252 |
current_size = sum(row["size"] for row in ds)
|
| 253 |
current_inflated = sum(row["inflated_size"] for row in ds)
|
|
|
|
| 33 |
"RBY1PickAndPlaceDataGenConfig",
|
| 34 |
"RBY1PickDataGenConfig",
|
| 35 |
]
|
| 36 |
+
SPLIT = "train"
|
| 37 |
|
| 38 |
|
| 39 |
@contextmanager
|
|
|
|
| 48 |
"""
|
| 49 |
url = hf_hub_url(
|
| 50 |
repo_id=repo_id,
|
| 51 |
+
filename=f"{config_name}/{SPLIT}_shards/{entry['shard_id']:05d}.tar",
|
| 52 |
repo_type="dataset",
|
| 53 |
revision="main",
|
| 54 |
)
|
|
|
|
| 248 |
grand_parts = 0
|
| 249 |
|
| 250 |
for config in TASK_CONFIGS:
|
| 251 |
+
ds = load_dataset(REPO, name=config, split=f"{SPLIT}_pkgs")
|
| 252 |
|
| 253 |
current_size = sum(row["size"] for row in ds)
|
| 254 |
current_inflated = sum(row["inflated_size"] for row in ds)
|