Update bulk_download.py
Browse files- bulk_download.py +11 -2
bulk_download.py
CHANGED
|
@@ -46,6 +46,7 @@ TASK_CONFIGS = [
|
|
| 46 |
"RBY1OpenDataGenConfig",
|
| 47 |
"RBY1PickAndPlaceDataGenConfig",
|
| 48 |
"RBY1PickDataGenConfig",
|
|
|
|
| 49 |
]
|
| 50 |
|
| 51 |
MANIFEST_FILENAME = "download_manifest.json"
|
|
@@ -103,8 +104,12 @@ def _save_manifest(target_dir: str, manifest: dict) -> None:
|
|
| 103 |
|
| 104 |
def load_entries(config_name: str, split: str) -> list[dict]:
|
| 105 |
"""Load the parquet arrow table for a task config as a list of dicts."""
|
| 106 |
-
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
|
| 109 |
|
| 110 |
def summarize_config(config_name: str, split: str, entries: list[dict]) -> dict:
|
|
@@ -258,6 +263,10 @@ def main() -> None:
|
|
| 258 |
part_to_shard_to_entries: dict[int, dict[int, list[dict]]] = {}
|
| 259 |
entries = load_entries(config_name, split)
|
| 260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
part_entries = defaultdict(list)
|
| 262 |
for e in entries:
|
| 263 |
part_entries[e["part"]].append(e)
|
|
|
|
| 46 |
"RBY1OpenDataGenConfig",
|
| 47 |
"RBY1PickAndPlaceDataGenConfig",
|
| 48 |
"RBY1PickDataGenConfig",
|
| 49 |
+
"FrankaPickAndPlaceOmniCamConfig_ObjectBackfill",
|
| 50 |
]
|
| 51 |
|
| 52 |
MANIFEST_FILENAME = "download_manifest.json"
|
|
|
|
| 104 |
|
| 105 |
def load_entries(config_name: str, split: str) -> list[dict]:
|
| 106 |
"""Load the parquet arrow table for a task config as a list of dicts."""
|
| 107 |
+
try:
|
| 108 |
+
ds = load_dataset(REPO, name=config_name, split=f"{split}_pkgs")
|
| 109 |
+
return [row for row in ds]
|
| 110 |
+
except ValueError as e:
|
| 111 |
+
print(f"No {split} split for {config_name}")
|
| 112 |
+
return []
|
| 113 |
|
| 114 |
|
| 115 |
def summarize_config(config_name: str, split: str, entries: list[dict]) -> dict:
|
|
|
|
| 263 |
part_to_shard_to_entries: dict[int, dict[int, list[dict]]] = {}
|
| 264 |
entries = load_entries(config_name, split)
|
| 265 |
|
| 266 |
+
if not entries:
|
| 267 |
+
configs_to_skip[split].add(config_name)
|
| 268 |
+
continue
|
| 269 |
+
|
| 270 |
part_entries = defaultdict(list)
|
| 271 |
for e in entries:
|
| 272 |
part_entries[e["part"]].append(e)
|