Datasets:

Languages:
English
DOI:
License:
Schewski commited on
Commit
cdbf6ce
·
0 Parent(s):

Super-squash branch 'main' using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +60 -0
  2. README.md +89 -0
  3. download_dataset.py +288 -0
  4. experiments/dynamic17797-4-7-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  5. experiments/dynamic17797-5-7-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  6. experiments/dynamic17797-6-2-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  7. experiments/dynamic17797-6-4-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  8. experiments/dynamic17797-6-6-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  9. experiments/dynamic17797-6-7-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  10. experiments/dynamic17797-7-3-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  11. experiments/dynamic17797-7-5-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  12. experiments/dynamic17797-8-5-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  13. experiments/dynamic17797-9-3-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  14. experiments/dynamic17797-9-4-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  15. experiments/dynamic17797-9-6-Video-021a75e56847d574b9acbcc06c675055_30hz.tar +3 -0
  16. experiments/dynamic20457-5-9-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  17. experiments/dynamic20892-10-10-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  18. experiments/dynamic20892-9-10-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  19. experiments/dynamic21067-10-18-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  20. experiments/dynamic21067-13-14-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  21. experiments/dynamic21067-9-17-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  22. experiments/dynamic21553-14-5-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  23. experiments/dynamic21553-8-13-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  24. experiments/dynamic21553-8-14-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  25. experiments/dynamic21608-2-18-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  26. experiments/dynamic21608-3-10-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  27. experiments/dynamic21617-7-8-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  28. experiments/dynamic21617-7-9-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  29. experiments/dynamic21617-8-8-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  30. experiments/dynamic21844-3-25-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  31. experiments/dynamic21844-3-26-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  32. experiments/dynamic21844-3-27-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  33. experiments/dynamic22084-2-11-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  34. experiments/dynamic22279-5-15-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  35. experiments/dynamic22285-2-10-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  36. experiments/dynamic22564-2-12-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  37. experiments/dynamic22564-2-13-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  38. experiments/dynamic22564-3-12-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  39. experiments/dynamic22564-3-8-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  40. experiments/dynamic22620-4-15-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  41. experiments/dynamic22620-4-17-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  42. experiments/dynamic22620-5-11-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  43. experiments/dynamic22846-10-16-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  44. experiments/dynamic22846-2-19-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  45. experiments/dynamic22846-2-21-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  46. experiments/dynamic22846-7-15-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  47. experiments/dynamic23343-5-17-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  48. experiments/dynamic23555-5-12-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  49. experiments/dynamic23656-14-22-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
  50. experiments/dynamic23964-4-22-Video-512cdd91f251cf74fff81375926f4002_30hz.tar +3 -0
.gitattributes ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.avro filter=lfs diff=lfs merge=lfs -text
4
+ *.bin filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
7
+ *.ftz filter=lfs diff=lfs merge=lfs -text
8
+ *.gz filter=lfs diff=lfs merge=lfs -text
9
+ *.h5 filter=lfs diff=lfs merge=lfs -text
10
+ *.joblib filter=lfs diff=lfs merge=lfs -text
11
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
13
+ *.mds filter=lfs diff=lfs merge=lfs -text
14
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
+ *.model filter=lfs diff=lfs merge=lfs -text
16
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
17
+ *.npy filter=lfs diff=lfs merge=lfs -text
18
+ *.npz filter=lfs diff=lfs merge=lfs -text
19
+ *.onnx filter=lfs diff=lfs merge=lfs -text
20
+ *.ot filter=lfs diff=lfs merge=lfs -text
21
+ *.parquet filter=lfs diff=lfs merge=lfs -text
22
+ *.pb filter=lfs diff=lfs merge=lfs -text
23
+ *.pickle filter=lfs diff=lfs merge=lfs -text
24
+ *.pkl filter=lfs diff=lfs merge=lfs -text
25
+ *.pt filter=lfs diff=lfs merge=lfs -text
26
+ *.pth filter=lfs diff=lfs merge=lfs -text
27
+ *.rar filter=lfs diff=lfs merge=lfs -text
28
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
29
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
31
+ *.tar filter=lfs diff=lfs merge=lfs -text
32
+ *.tflite filter=lfs diff=lfs merge=lfs -text
33
+ *.tgz filter=lfs diff=lfs merge=lfs -text
34
+ *.wasm filter=lfs diff=lfs merge=lfs -text
35
+ *.xz filter=lfs diff=lfs merge=lfs -text
36
+ *.zip filter=lfs diff=lfs merge=lfs -text
37
+ *.zst filter=lfs diff=lfs merge=lfs -text
38
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
39
+ # Audio files - uncompressed
40
+ *.pcm filter=lfs diff=lfs merge=lfs -text
41
+ *.sam filter=lfs diff=lfs merge=lfs -text
42
+ *.raw filter=lfs diff=lfs merge=lfs -text
43
+ # Audio files - compressed
44
+ *.aac filter=lfs diff=lfs merge=lfs -text
45
+ *.flac filter=lfs diff=lfs merge=lfs -text
46
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
47
+ *.ogg filter=lfs diff=lfs merge=lfs -text
48
+ *.wav filter=lfs diff=lfs merge=lfs -text
49
+ # Image files - uncompressed
50
+ *.bmp filter=lfs diff=lfs merge=lfs -text
51
+ *.gif filter=lfs diff=lfs merge=lfs -text
52
+ *.png filter=lfs diff=lfs merge=lfs -text
53
+ *.tiff filter=lfs diff=lfs merge=lfs -text
54
+ # Image files - compressed
55
+ *.jpg filter=lfs diff=lfs merge=lfs -text
56
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
57
+ *.webp filter=lfs diff=lfs merge=lfs -text
58
+ # Video files - compressed
59
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
60
+ *.webm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - neuroscience
6
+ ---
7
+
8
+ # Omnimouse dataset
9
+
10
+ Repository for the complete Omnimouse dataset.
11
+
12
+ The Omnimouse dataset comprises **>3 million single-neuron recordings** from visual cortex in **78 mice** across **323 sessions**, capturing **>150 billion neural tokens** during presentations of **natural movies**, **natural images**, **parametric stimuli**, and aligned **behavioral measurements**.
13
+
14
+ For more information, see the [OmniMouse paper](https://openreview.net/forum?id=mEw4lhAn0F).
15
+
16
+
17
+ ## Additional resources
18
+
19
+ We provide [Experanto](https://github.com/sensorium-competition/experanto), a Python package for working with neuroscience experiments and loading them into torch
20
+ (including interpolation utilities for recordings and stimuli). Experanto is fully compatible with the Omnimouse data format out of the box and is highly recommended.
21
+
22
+ We also provide the [Sensorium 2023 codebase](https://github.com/ecker-lab/sensorium_2023) and the OmniMouse codebase (TBA),
23
+ which include tutorial notebooks and baseline models to help you get started.
24
+
25
+ ## Sample download
26
+
27
+ The following Python script demonstrates how to download a single experiment from the dataset.
28
+
29
+ 1. Set the environment variable `HF_TOKEN` to your Hugging Face access token.
30
+ 2. Run the script in a suitable Python environment (with `huggingface_hub` installed).
31
+
32
+ ```python
33
+ import os
34
+ import tarfile
35
+ from pathlib import Path
36
+ from huggingface_hub import hf_hub_download
37
+
38
+ # =========================
39
+ # Configuration
40
+ # =========================
41
+ HF_TOKEN = os.environ.get("HF_TOKEN")
42
+ REPO_ID = "the-enigma-project/omnimouse-dataset"
43
+
44
+ # Where you want the extracted experiment locally
45
+ DOWNLOAD_DIR = Path("data")
46
+
47
+ # Path of the tar file inside the HF repo
48
+ REMOTE_TAR_PATH = "experiments/dynamic17797-4-7-Video-021a75e56847d574b9acbcc06c675055_30hz.tar"
49
+
50
+
51
+ def test_download_and_extract():
52
+ print(f"--- Starting download test from {REPO_ID} ---")
53
+
54
+ try:
55
+ DOWNLOAD_DIR.mkdir(parents=True, exist_ok=True)
56
+
57
+ tar_local_path = hf_hub_download(
58
+ repo_id=REPO_ID,
59
+ repo_type="dataset",
60
+ filename=REMOTE_TAR_PATH,
61
+ token=HF_TOKEN,
62
+ local_dir=DOWNLOAD_DIR,
63
+ )
64
+
65
+ tar_local_path = Path(tar_local_path)
66
+ print(f"Downloaded tar to: {tar_local_path}")
67
+
68
+ print("Extracting archive...")
69
+ with tarfile.open(tar_local_path, "r") as tar:
70
+ tar.extractall(path=DOWNLOAD_DIR)
71
+
72
+ extracted_root = DOWNLOAD_DIR / tar_local_path.stem
73
+ print(f"Extraction complete.")
74
+ print(f"Experiment folder available at: {extracted_root}")
75
+
76
+ except Exception as e:
77
+ print(f"An error occurred during download or extraction: {e}")
78
+
79
+
80
+ if __name__ == "__main__":
81
+ test_download_and_extract()
82
+ ```
83
+
84
+ For a more detailed and customizable download script checkout the download_dataset.py file uploaded in this repo.
85
+ For further guidance on downloading larger subsets (or the full dataset), see the [Hugging Face Hub download documentation](https://huggingface.co/docs/huggingface_hub/guides/download).
86
+
87
+ ## Data sources and attribution
88
+ The experiments in the Omnimouse dataset are aggregated from multiple projects and original sources.
89
+ Please consult the [metadata table](https://enigma-brain.github.io/omnimouse-data-release/dataset_details.html) to identify the originating project(s) for any experiment you use, and cite the corresponding paper(s) accordingly
download_dataset.py ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import os
3
+ import random
4
+ import tarfile
5
+ from pathlib import Path
6
+ from typing import List
7
+
8
+ from huggingface_hub import hf_hub_download, list_repo_files
9
+
10
+
11
+ HF_TOKEN = os.environ.get("HF_TOKEN")
12
+ DEFAULT_REPO_ID = "the-enigma-project/omnimouse-dataset"
13
+ DEFAULT_DOWNLOAD_DIR = Path("data")
14
+ DEFAULT_PARENT_FOLDER = "experiments"
15
+
16
+
17
+ def parse_args():
18
+ parser = argparse.ArgumentParser(
19
+ description="Download experiment tar files from a Hugging Face dataset repo, extract them, and delete the tar files."
20
+ )
21
+ parser.add_argument(
22
+ "--repo-id",
23
+ type=str,
24
+ default=DEFAULT_REPO_ID,
25
+ help=f"Hugging Face dataset repo id. Default: {DEFAULT_REPO_ID}",
26
+ )
27
+ parser.add_argument(
28
+ "--download-dir",
29
+ type=Path,
30
+ default=DEFAULT_DOWNLOAD_DIR,
31
+ help=f"Local root directory for downloaded and extracted data. Default: {DEFAULT_DOWNLOAD_DIR}",
32
+ )
33
+ parser.add_argument(
34
+ "--parent-folder",
35
+ type=str,
36
+ default=DEFAULT_PARENT_FOLDER,
37
+ help=f"Top-level folder inside the repo that contains the tar files. Default: {DEFAULT_PARENT_FOLDER}",
38
+ )
39
+ parser.add_argument(
40
+ "--num-files",
41
+ type=int,
42
+ default=1,
43
+ help="Number of experiment tar files to download.",
44
+ )
45
+ parser.add_argument(
46
+ "--experiments",
47
+ nargs="*",
48
+ default=[],
49
+ help="Specific experiment names to prioritize, without .tar suffix.",
50
+ )
51
+ parser.add_argument(
52
+ "--download-all",
53
+ action="store_true",
54
+ help="Download all available experiment tar files. Overrides --num-files and --experiments.",
55
+ )
56
+ parser.add_argument(
57
+ "--token",
58
+ type=str,
59
+ default=HF_TOKEN,
60
+ help="Hugging Face token. Defaults to HF_TOKEN environment variable.",
61
+ )
62
+ parser.add_argument(
63
+ "--seed",
64
+ type=int,
65
+ default=0,
66
+ help="Random seed for filling remaining experiments. Default: 0",
67
+ )
68
+ return parser.parse_args()
69
+
70
+
71
+ def get_available_experiment_names(repo_id: str, parent_folder: str, token: str | None) -> List[str]:
72
+ repo_files = list_repo_files(
73
+ repo_id=repo_id,
74
+ repo_type="dataset",
75
+ token=token,
76
+ )
77
+
78
+ prefix = parent_folder.rstrip("/") + "/"
79
+ experiment_names = []
80
+
81
+ for path in repo_files:
82
+ if not path.startswith(prefix):
83
+ continue
84
+ if not path.endswith(".tar"):
85
+ continue
86
+
87
+ filename = Path(path).name
88
+ experiment_names.append(filename[:-4])
89
+
90
+ return sorted(experiment_names)
91
+
92
+
93
+ def choose_experiments(
94
+ requested: List[str],
95
+ available: List[str],
96
+ num_files: int,
97
+ seed: int,
98
+ ) -> List[str]:
99
+ available_set = set(available)
100
+
101
+ valid_requested = []
102
+ invalid_requested = []
103
+
104
+ for name in requested:
105
+ if name in available_set:
106
+ if name not in valid_requested:
107
+ valid_requested.append(name)
108
+ else:
109
+ invalid_requested.append(name)
110
+
111
+ if invalid_requested:
112
+ print(
113
+ f"Warning: {len(invalid_requested)} requested experiment(s) were not found in the repo and will be ignored:\n"
114
+ + "\n".join(f" - {name}" for name in invalid_requested)
115
+ )
116
+
117
+ if len(valid_requested) > num_files:
118
+ print(
119
+ f"Warning: you requested {len(valid_requested)} valid experiment(s) but --num-files={num_files}. "
120
+ f"Only the first {num_files} requested experiment(s) will be used."
121
+ )
122
+ return valid_requested[:num_files]
123
+
124
+ chosen = list(valid_requested)
125
+
126
+ if len(chosen) < num_files:
127
+ remaining_pool = [name for name in available if name not in chosen]
128
+ random.Random(seed).shuffle(remaining_pool)
129
+
130
+ needed = num_files - len(chosen)
131
+ fillers = remaining_pool[:needed]
132
+
133
+ if fillers:
134
+ print(
135
+ f"Warning: only {len(valid_requested)} requested experiment(s) were selected, "
136
+ f"so the remaining {len(fillers)} slot(s) will be filled with random experiment(s)."
137
+ )
138
+
139
+ chosen.extend(fillers)
140
+
141
+ if len(chosen) < num_files:
142
+ print(
143
+ f"Warning: only {len(chosen)} experiment(s) are available in total, "
144
+ f"which is fewer than requested --num-files={num_files}."
145
+ )
146
+
147
+ return chosen
148
+
149
+
150
+ def safe_extract_tar(tar_path: Path, extract_root: Path) -> List[Path]:
151
+ """
152
+ Extract tar safely, preventing path traversal.
153
+ Returns the list of top-level extracted paths.
154
+ """
155
+ top_level_names = []
156
+
157
+ with tarfile.open(tar_path, "r") as tar:
158
+ members = tar.getmembers()
159
+
160
+ resolved_extract_root = extract_root.resolve()
161
+
162
+ for member in members:
163
+ member_path = extract_root / member.name
164
+ resolved_member_path = member_path.resolve()
165
+
166
+ if not str(resolved_member_path).startswith(str(resolved_extract_root)):
167
+ raise RuntimeError(f"Unsafe path in tar archive: {member.name}")
168
+
169
+ for member in members:
170
+ parts = Path(member.name).parts
171
+ if parts:
172
+ top_level_names.append(parts[0])
173
+
174
+ tar.extractall(path=extract_root)
175
+
176
+ unique_top_paths = []
177
+ seen = set()
178
+ for name in top_level_names:
179
+ if name not in seen:
180
+ seen.add(name)
181
+ unique_top_paths.append(extract_root / name)
182
+
183
+ return unique_top_paths
184
+
185
+
186
+ def download_and_extract_experiment(
187
+ repo_id: str,
188
+ parent_folder: str,
189
+ experiment_name: str,
190
+ download_dir: Path,
191
+ token: str | None,
192
+ ):
193
+ remote_tar_path = f"{parent_folder.rstrip('/')}/{experiment_name}.tar"
194
+
195
+ # download_dir is the local top-level target already
196
+ local_parent_dir = download_dir
197
+
198
+ print(f"\n--- Downloading {experiment_name} ---")
199
+ local_parent_dir.mkdir(parents=True, exist_ok=True)
200
+
201
+ tar_local_path = hf_hub_download(
202
+ repo_id=repo_id,
203
+ repo_type="dataset",
204
+ filename=remote_tar_path,
205
+ token=token,
206
+ local_dir=local_parent_dir,
207
+ local_dir_use_symlinks=False,
208
+ )
209
+
210
+ tar_local_path = Path(tar_local_path)
211
+ print(f"Downloaded tar to: {tar_local_path}")
212
+
213
+ print("Extracting archive...")
214
+ extracted_paths = safe_extract_tar(tar_local_path, local_parent_dir)
215
+
216
+ if tar_local_path.exists():
217
+ tar_local_path.unlink()
218
+ print(f"Deleted tar file: {tar_local_path}")
219
+
220
+ if extracted_paths:
221
+ print("Extraction complete. Extracted top-level path(s):")
222
+ for path in extracted_paths:
223
+ print(f" - {path}")
224
+ else:
225
+ print("Extraction complete, but no extracted paths were detected.")
226
+
227
+
228
+ def main():
229
+ args = parse_args()
230
+
231
+ if args.num_files < 1 and not args.download_all:
232
+ raise ValueError("--num-files must be at least 1 unless --download-all is used")
233
+
234
+ download_dir = args.download_dir.expanduser().resolve()
235
+ download_dir.mkdir(parents=True, exist_ok=True)
236
+
237
+ print(f"--- Inspecting repo: {args.repo_id} ---")
238
+ available = get_available_experiment_names(
239
+ repo_id=args.repo_id,
240
+ parent_folder=args.parent_folder,
241
+ token=args.token,
242
+ )
243
+
244
+ if not available:
245
+ raise RuntimeError(
246
+ f"No .tar files found under '{args.parent_folder}' in dataset repo '{args.repo_id}'."
247
+ )
248
+
249
+ print(f"Found {len(available)} available experiment tar file(s).")
250
+
251
+ if args.download_all:
252
+ if args.experiments:
253
+ print("Warning: --download-all was set, so --experiments will be ignored.")
254
+ if args.num_files != 1:
255
+ print("Warning: --download-all was set, so --num-files will be ignored.")
256
+ selected = available
257
+ else:
258
+ selected = choose_experiments(
259
+ requested=args.experiments,
260
+ available=available,
261
+ num_files=args.num_files,
262
+ seed=args.seed,
263
+ )
264
+
265
+ if not selected:
266
+ raise RuntimeError("No experiments were selected for download.")
267
+
268
+ print("\nExperiments selected for download:")
269
+ for name in selected:
270
+ print(f" - {name}")
271
+
272
+ for experiment_name in selected:
273
+ try:
274
+ download_and_extract_experiment(
275
+ repo_id=args.repo_id,
276
+ parent_folder=args.parent_folder,
277
+ experiment_name=experiment_name,
278
+ download_dir=download_dir,
279
+ token=args.token,
280
+ )
281
+ except Exception as e:
282
+ print(f"Error while processing {experiment_name}: {e}")
283
+
284
+ print("\nDone.")
285
+
286
+
287
+ if __name__ == "__main__":
288
+ main()
experiments/dynamic17797-4-7-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ebfbcd8d07be4cbcb89df6801526bce4e18abee5b679dd7cf71d60f2286b8c27
3
+ size 7442554880
experiments/dynamic17797-5-7-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d4915da0a99a2e725702e49305133e9ce8f4e3766af3aa1034effe742939ba0
3
+ size 7933859840
experiments/dynamic17797-6-2-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:037e5371f8dff55085fdc98cc7e72f13fb86de867b02ecd1e296325c428040e7
3
+ size 7948902400
experiments/dynamic17797-6-4-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6776871b913c4dd1e964e1f45d3066b7149a996433df7d862775202b55c3752
3
+ size 7996917760
experiments/dynamic17797-6-6-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a672b9cbdec12120ee563588d58fa3905be832e308cd114f3e717751cc95c5b8
3
+ size 7807447040
experiments/dynamic17797-6-7-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7bff6e10ea3c7a6d8f349a8447cd2d753cf999adfef793f75c180dec2d37aade
3
+ size 7743467520
experiments/dynamic17797-7-3-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff2ac58ce33c05481e4452150210a6a17f3c555a106cac22ec131897cfa35d02
3
+ size 8300810240
experiments/dynamic17797-7-5-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c18ef71cc32fab588ab1b37c67f6f7ce725252f9c41efd210a1828611e99cd2
3
+ size 7978250240
experiments/dynamic17797-8-5-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eaf69d225c365a5733c890cc7c03f9549c8170fb45537c53936073c0596499c1
3
+ size 9309296640
experiments/dynamic17797-9-3-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:198e8624b02b717bbc7ecd9bb14d489c18bb41ae9246675ad9933dd843814ad0
3
+ size 7285309440
experiments/dynamic17797-9-4-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:678d2d828327ee0b693dd9f34dba872d1dca47d0872d9fa5a5685f3437134a61
3
+ size 7202990080
experiments/dynamic17797-9-6-Video-021a75e56847d574b9acbcc06c675055_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b2043addeadec6bb1a6291e4c89ef0c6f54f39b492024402222813abf38b0e1a
3
+ size 5379696640
experiments/dynamic20457-5-9-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea51ed23c5e9f05a970e65f5dede5d32e29fc52582478632c19812b060f27002
3
+ size 4122470400
experiments/dynamic20892-10-10-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c4b7de8fcc775d7782c71a3e1a0ad03fa8aa38a437853ac1ec4e046ff7579b8
3
+ size 7215738880
experiments/dynamic20892-9-10-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18fc44e9ccd968f4ce0c4e871c4a2d84cf9e13a523d425e25e2eb9ad4c94e833
3
+ size 4549754880
experiments/dynamic21067-10-18-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c77e4384a10c7570ba5542c532265f6e451c9c256b1434694a2a43634aa31f05
3
+ size 6304143360
experiments/dynamic21067-13-14-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cf71ce5d0dff908b90d56783cf3e279eae45c63cca9d0b84878efca6a29bc83
3
+ size 6825984000
experiments/dynamic21067-9-17-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f1e74edca1ee553aa1f67f60875fe3a12f40ff5bf1689d2b8419bda1febf806
3
+ size 5955604480
experiments/dynamic21553-14-5-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b52925b8e129834e094da8c8af3fe0a56513fbb97265ac8cb98cb5f6f99e6b0
3
+ size 3173519360
experiments/dynamic21553-8-13-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1bb508904e49e99794b9ccf53760ee90d35b818a4823277e00ff4b385ebd2062
3
+ size 2704322560
experiments/dynamic21553-8-14-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6af9a94a60bdd2b8fa8c387042f916ab712a91b36c0355a1df01488c7085e7e6
3
+ size 2983444480
experiments/dynamic21608-2-18-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed4f99160ad5fa6748eccd7072f101dbe622b9fbfbf6d51aacce6d0f6b3b3386
3
+ size 8084736000
experiments/dynamic21608-3-10-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7b22e9875c30af926046e39e59f4d8ba8b00dff61d4c38264405911f5248f7e
3
+ size 7864504320
experiments/dynamic21617-7-8-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f016781df1afd69ad90a5aba1a52973167b54f0a2e2a1d4b80016f3e053bf8e5
3
+ size 6923468800
experiments/dynamic21617-7-9-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa85adf0cbd0319cb915ddfcf597752ba2320d78da3b81c872dc3c1571b146a3
3
+ size 6791772160
experiments/dynamic21617-8-8-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec01aae9cb2b39acf816f60daf9b7dd641f8ebcb6f4203a9339b77d94c93da2e
3
+ size 6926458880
experiments/dynamic21844-3-25-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8382eda4ba33f4bedd1251a898d4e694970c3b445c0434e7b28bf9f28fe9f73e
3
+ size 3401236480
experiments/dynamic21844-3-26-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e8a2b2fd6d451b28838388b8019d873dfa116c948d4a377e71351044fcec4f9
3
+ size 3388252160
experiments/dynamic21844-3-27-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1787839daff5adf8e6051e7adf1f50caab9b8852ca296f497647e76e2bebdce2
3
+ size 3406039040
experiments/dynamic22084-2-11-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc0c6170f2467a6f22648c9fe482e4ad55c74963392728a03c46f8c5b31730f8
3
+ size 12185210880
experiments/dynamic22279-5-15-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2535c40c226cd81afe85bf55ae82081ba2054e5f4d52ecb6e66a8cc446c6926
3
+ size 12842567680
experiments/dynamic22285-2-10-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66c46bb00fa512dfb5b3c7ea7d4cce983ce150d5f72e17ddcac28b62ef17c9d2
3
+ size 12028672000
experiments/dynamic22564-2-12-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:932814f890792b1e8f6ad44d3ffad91494d8e1c71a454125c2268986e95ab202
3
+ size 5907742720
experiments/dynamic22564-2-13-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3144eda135eccf6061a55e10f072a7bb777d1dc78ba071c430520800efe780e
3
+ size 5982453760
experiments/dynamic22564-3-12-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:086d5631ecdbfc492cc0d8c7599412bbb130b04f3f8dde29d636ad6065bd37b6
3
+ size 6232852480
experiments/dynamic22564-3-8-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1606a100d220e9efc15a09548ab7934e5b6fd4f3fbe53174554bee119a9f4c70
3
+ size 5952317440
experiments/dynamic22620-4-15-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d8f41c4f162ae1e23398776ceadf7103dd7d3fc8e20d862fb18f8b487e6cc24
3
+ size 5957969920
experiments/dynamic22620-4-17-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7bd44be5373086efcd973f2d9e709da90850573cdada38192d3695fedb573a41
3
+ size 6368563200
experiments/dynamic22620-5-11-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9fb5e5fa655ac3c329e64fb1c263fff365e13046a998004977cf65005d1bc12
3
+ size 5747998720
experiments/dynamic22846-10-16-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf578539e1f5fd6a1d8665e2e06e38870685c396ea5fc6a803e2cac1dd426235
3
+ size 5433415680
experiments/dynamic22846-2-19-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c902a540ecc9d90c98241182563ff66ad44c6b1d7585461af5c1736bb39a02cb
3
+ size 5643663360
experiments/dynamic22846-2-21-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:075c236d3dda1adb2ea2ad125f7a289983da290352934f5eaa75c2eb47146be3
3
+ size 6757416960
experiments/dynamic22846-7-15-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8219fb0cf48ae535aa89a44452b6ad0c2c60de4c98a2ef7c77b454dd104e0013
3
+ size 5930137600
experiments/dynamic23343-5-17-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab8e913567ee17fa1cc2ba2251f5ab78d385f4595cf97b0237b678c7c302e08d
3
+ size 5347788800
experiments/dynamic23555-5-12-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc17f15cef8ebfc032a9b52d75e88c80e88b5f91d00bdf7580a27bab2a8ea006
3
+ size 4842485760
experiments/dynamic23656-14-22-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77158f7940cbcaa21aaeefabf897768dd42b398e9dd099d3358359f502bbc28a
3
+ size 5961216000
experiments/dynamic23964-4-22-Video-512cdd91f251cf74fff81375926f4002_30hz.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3281e70db4c46734e4476d92cdeffeee93c3a8f1eef5bee34f72e21d78d3ed63
3
+ size 5864929280