Datasets:
Publish Xperience-10M task-suite derived artifacts
Browse files- PROJECT_README.md +74 -9
- README.md +19 -0
- docs/data/summary_metrics.json +16 -1
- docs/index.html +18 -1
- results/omni_finetune/A100_HF_RELAY_STATUS.md +66 -0
- results/omni_finetune/HF_UPLOAD.md +26 -0
- scripts/omni/stage_xperience10m_from_hf.py +304 -0
- scripts/omni/transfer_xperience10m_a100_to_h20.sh +16 -0
- scripts/omni/watch_hf_access_and_stage_xperience10m.py +160 -0
PROJECT_README.md
CHANGED
|
@@ -219,9 +219,16 @@ pipeline over Xperience-10M. The important separation is:
|
|
| 219 |
- adapter-required Xperience-10M sensor inputs: depth, pose/SLAM, hand/body
|
| 220 |
mocap, contacts, and IMU.
|
| 221 |
|
| 222 |
-
The H20
|
| 223 |
-
|
| 224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
|
| 226 |
```bash
|
| 227 |
python scripts/omni/build_episode_manifest.py \
|
|
@@ -251,7 +258,7 @@ Verified H20 run:
|
|
| 251 |
| Split | single-episode chronological |
|
| 252 |
| Feature dim | 4,262 |
|
| 253 |
| Adapter soft-token blocks | 11 |
|
| 254 |
-
| Qwen3-Omni weights loaded | no |
|
| 255 |
| Result | 0.0000 macro-F1, expected for this single-episode chronological smoke split |
|
| 256 |
|
| 257 |
The zero score is not treated as a model claim. It is a useful signal that this
|
|
@@ -273,11 +280,12 @@ checkpoints, caches, and logs, a realistic first budget is:
|
|
| 273 |
| Useful LoRA run | 64-128 | 74k-149k | Train sensor adapters plus selected Qwen3-Omni LoRA |
|
| 274 |
| Storage-heavy run | 256+ | 297k+ | Only after download layout and checkpoint size are stable |
|
| 275 |
|
| 276 |
-
For the next run, use **32
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
|
|
|
| 281 |
|
| 282 |
Use the budget helper before downloading:
|
| 283 |
|
|
@@ -297,6 +305,63 @@ python scripts/render_overview_figures.py
|
|
| 297 |
python scripts/render_task_suite_infographic.py
|
| 298 |
```
|
| 299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
## Minimal 12-Task Architectures
|
| 301 |
|
| 302 |
These are deliberately minimal baselines. They are useful because every
|
|
|
|
| 219 |
- adapter-required Xperience-10M sensor inputs: depth, pose/SLAM, hand/body
|
| 220 |
mocap, contacts, and IMU.
|
| 221 |
|
| 222 |
+
The H20 work now has two separate evidence levels:
|
| 223 |
+
|
| 224 |
+
- an adapter-side smoke test over one Xperience-10M sample episode, useful for
|
| 225 |
+
checking sensor feature extraction and label plumbing,
|
| 226 |
+
- a technical Qwen3-Omni LoRA smoke run that loaded the local
|
| 227 |
+
`Qwen/Qwen3-Omni-30B-A3B-Instruct` weights and trained LoRA parameters on
|
| 228 |
+
128 windows from the single locally available episode.
|
| 229 |
+
|
| 230 |
+
Neither is a 32-episode result. The full pilot is still gated on raw
|
| 231 |
+
Xperience-10M access and a held-out episode split.
|
| 232 |
|
| 233 |
```bash
|
| 234 |
python scripts/omni/build_episode_manifest.py \
|
|
|
|
| 258 |
| Split | single-episode chronological |
|
| 259 |
| Feature dim | 4,262 |
|
| 260 |
| Adapter soft-token blocks | 11 |
|
| 261 |
+
| Qwen3-Omni weights loaded | adapter smoke: no; LoRA smoke: yes |
|
| 262 |
| Result | 0.0000 macro-F1, expected for this single-episode chronological smoke split |
|
| 263 |
|
| 264 |
The zero score is not treated as a model claim. It is a useful signal that this
|
|
|
|
| 280 |
| Useful LoRA run | 64-128 | 74k-149k | Train sensor adapters plus selected Qwen3-Omni LoRA |
|
| 281 |
| Storage-heavy run | 256+ | 297k+ | Only after download layout and checkpoint size are stable |
|
| 282 |
|
| 283 |
+
For the next run, use a **32-episode stratified pilot** through the A100 relay,
|
| 284 |
+
then scale to **128 episodes** and later **512 episodes** only after the
|
| 285 |
+
download, transfer, manifest, train, and held-out evaluation path is stable. Do
|
| 286 |
+
not treat "10M" as a reason to start with the entire dataset; the engineering
|
| 287 |
+
unit that matters first is diverse held-out episodes, not adjacent windows from
|
| 288 |
+
one session.
|
| 289 |
|
| 290 |
Use the budget helper before downloading:
|
| 291 |
|
|
|
|
| 305 |
python scripts/render_task_suite_infographic.py
|
| 306 |
```
|
| 307 |
|
| 308 |
+
### 32-Episode Readiness Gate
|
| 309 |
+
|
| 310 |
+
```bash
|
| 311 |
+
python scripts/omni/discover_xperience10m_sources.py \
|
| 312 |
+
--workspace /home/cy/Ropedia/ropedia-episode-task-suite \
|
| 313 |
+
--data-root /home/cy/Ropedia/modelscope_data \
|
| 314 |
+
--output results/omni_finetune/source_discovery.json \
|
| 315 |
+
--report-output results/omni_finetune/DATA_BLOCKER_REPORT.md
|
| 316 |
+
```
|
| 317 |
+
|
| 318 |
+
Current status in this repo:
|
| 319 |
+
|
| 320 |
+
- local_valid_episodes: 1 (degraded-valid: annotation + fisheye_cam0.mp4)
|
| 321 |
+
- local_complete_episodes: 0
|
| 322 |
+
- ready_for_32_episode_pilot: false
|
| 323 |
+
- A100 Hugging Face relay: active watcher, polling gated access every 15 minutes
|
| 324 |
+
- planned 32-episode pilot: stratified across 32 top-level session UUIDs
|
| 325 |
+
- HF full dataset blocker: `ropedia-ai/xperience-10m` returns 403 pending review
|
| 326 |
+
- source_discovery: `results/omni_finetune/source_discovery.json`
|
| 327 |
+
- blocker_report: `results/omni_finetune/DATA_BLOCKER_REPORT.md`
|
| 328 |
+
- relay_status: `results/omni_finetune/A100_HF_RELAY_STATUS.md`
|
| 329 |
+
|
| 330 |
+
Current H20-sourced evidence files in this repo:
|
| 331 |
+
|
| 332 |
+
- `results/omni_finetune/episode_manifest.json`
|
| 333 |
+
- `results/omni_finetune/dataset_manifest.json`
|
| 334 |
+
- `results/omni_finetune/training_metadata.json`
|
| 335 |
+
- `results/omni_finetune/metrics.json`
|
| 336 |
+
- `results/omni_finetune/progress.jsonl`
|
| 337 |
+
- `results/omni_finetune/RUN_REPORT.md`
|
| 338 |
+
- `results/omni_finetune/DATA_BLOCKER_REPORT.md`
|
| 339 |
+
- `results/omni_finetune/A100_HF_RELAY_STATUS.md`
|
| 340 |
+
|
| 341 |
+
Use this gate before scheduling any 32-episode full fine-tune run.
|
| 342 |
+
|
| 343 |
+
For the A100 Hugging Face relay, the 32-episode pilot should use stratified
|
| 344 |
+
selection, not the first 32 paths in repository order. The current relay script
|
| 345 |
+
scans 64 top-level session UUIDs, filters for complete leaf episodes, excludes
|
| 346 |
+
`visualization.rrd`, applies a `0.25 GB` minimum episode size, and selects 32
|
| 347 |
+
episodes from 32 different session UUIDs. This is still a pilot subset, but it
|
| 348 |
+
is materially better for generalization checks than adjacent episodes from the
|
| 349 |
+
same recording session.
|
| 350 |
+
|
| 351 |
+
### Uploading the pilot Qwen3-Omni LoRA
|
| 352 |
+
|
| 353 |
+
A prepared upload package is available at `results/omni_finetune/hf_upload`.
|
| 354 |
+
|
| 355 |
+
```bash
|
| 356 |
+
python3 scripts/omni/upload_qwen3_omni_lora_to_hf.py \
|
| 357 |
+
--repo-id cy0307/ropedia-qwen3-omni-lora-smoke \
|
| 358 |
+
--source-dir results/omni_finetune/hf_upload \
|
| 359 |
+
--message "Upload Xperience-10M Qwen3-Omni LoRA pilot"
|
| 360 |
+
```
|
| 361 |
+
|
| 362 |
+
This script requires a valid Hugging Face token via `HF_TOKEN` or `--token`.
|
| 363 |
+
Network availability to `huggingface.co` is required.
|
| 364 |
+
|
| 365 |
## Minimal 12-Task Architectures
|
| 366 |
|
| 367 |
These are deliberately minimal baselines. They are useful because every
|
README.md
CHANGED
|
@@ -26,6 +26,13 @@ This dataset repo contains the derived evidence layer for the public Xperience-1
|
|
| 26 |
|
| 27 |
It does **not** contain raw Xperience-10M videos or raw `annotation.hdf5`. Download raw data only from the official Ropedia / Hugging Face sources and follow their terms.
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
## Why This Repo Exists
|
| 30 |
|
| 31 |
This is the reviewable half of the project. You can inspect the task outputs, compare the committed metrics, and understand the single-episode limitations without downloading the raw videos first.
|
|
@@ -73,6 +80,18 @@ The artifacts validate one public sample episode:
|
|
| 73 |
|
| 74 |
For research claims, rerun the same scripts over many episodes and evaluate on held-out episodes.
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |

|
| 77 |
|
| 78 |

|
|
|
|
| 26 |
|
| 27 |
It does **not** contain raw Xperience-10M videos or raw `annotation.hdf5`. Download raw data only from the official Ropedia / Hugging Face sources and follow their terms.
|
| 28 |
|
| 29 |
+
Current scale-up status: the full `ropedia-ai/xperience-10m` Hugging Face
|
| 30 |
+
dataset is still gated for this account. The A100 relay has been configured to
|
| 31 |
+
poll access, download a 32-episode stratified pilot subset after approval,
|
| 32 |
+
validate it, transfer it to H20, and run the readiness gate. Until that
|
| 33 |
+
completes, the committed Qwen3-Omni artifacts remain smoke/debug evidence, not
|
| 34 |
+
real 32-episode held-out metrics.
|
| 35 |
+
|
| 36 |
## Why This Repo Exists
|
| 37 |
|
| 38 |
This is the reviewable half of the project. You can inspect the task outputs, compare the committed metrics, and understand the single-episode limitations without downloading the raw videos first.
|
|
|
|
| 80 |
|
| 81 |
For research claims, rerun the same scripts over many episodes and evaluate on held-out episodes.
|
| 82 |
|
| 83 |
+
## Pending 32-Episode Pilot
|
| 84 |
+
|
| 85 |
+
| Item | Value |
|
| 86 |
+
| --- | --- |
|
| 87 |
+
| Selection strategy | stratified round-robin across top-level session UUIDs |
|
| 88 |
+
| Candidate scan | first 64 top-level session UUIDs |
|
| 89 |
+
| Valid complete candidates | 680 |
|
| 90 |
+
| Selected pilot episodes | 32 from 32 session UUIDs |
|
| 91 |
+
| Estimated raw subset | about 72.0 GB |
|
| 92 |
+
| Excluded file type | `visualization.rrd` |
|
| 93 |
+
| Blocker | HF gated dataset approval pending |
|
| 94 |
+
|
| 95 |

|
| 96 |
|
| 97 |

|
docs/data/summary_metrics.json
CHANGED
|
@@ -1,4 +1,19 @@
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"models": {
|
| 3 |
"motion_action": {
|
| 4 |
"accuracy": 0.9828178694158075,
|
|
@@ -389,4 +404,4 @@
|
|
| 389 |
"dim": 117
|
| 390 |
}
|
| 391 |
]
|
| 392 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"omni_relay": {
|
| 3 |
+
"status": "pending_huggingface_gated_access",
|
| 4 |
+
"dataset": "ropedia-ai/xperience-10m",
|
| 5 |
+
"relay_server": "ANGEL-A100-80Gx4",
|
| 6 |
+
"training_server": "ANGEL-H20-96GX8",
|
| 7 |
+
"selection_strategy": "stratified_round_robin_by_top_level_session",
|
| 8 |
+
"target_episodes": 32,
|
| 9 |
+
"selected_sessions": 32,
|
| 10 |
+
"candidate_scan_top_level_sessions": 64,
|
| 11 |
+
"valid_candidates": 680,
|
| 12 |
+
"estimated_bytes": 72031620552,
|
| 13 |
+
"exclude": ["visualization.rrd"],
|
| 14 |
+
"blocker": "Hugging Face returns 403 pending review for the full Xperience-10M gated dataset.",
|
| 15 |
+
"claim_boundary": "No real 32-episode fine-tune is claimed until the watcher downloads data, transfers it to H20, and the held-out evaluation runs."
|
| 16 |
+
},
|
| 17 |
"models": {
|
| 18 |
"motion_action": {
|
| 19 |
"accuracy": 0.9828178694158075,
|
|
|
|
| 404 |
"dim": 117
|
| 405 |
}
|
| 406 |
]
|
| 407 |
+
}
|
docs/index.html
CHANGED
|
@@ -657,7 +657,7 @@
|
|
| 657 |
<div class="wrap">
|
| 658 |
<div class="section-head">
|
| 659 |
<h2>Where the evidence lives.</h2>
|
| 660 |
-
<p>Metrics, predictions, confusion matrices, manifests, model weights, and derived window artifacts are committed so the repo is reviewable before rerunning anything.</p>
|
| 661 |
</div>
|
| 662 |
<div class="artifact-grid">
|
| 663 |
<article class="artifact"><h3>Task-suite report</h3><p>One JSON file with every task metric and split detail.</p><a href="https://github.com/ChaoYue0307/ropedia-episode-task-suite/blob/main/results/episode_task_suite/summary_report.json">summary_report.json</a></article>
|
|
@@ -669,11 +669,28 @@
|
|
| 669 |
<article class="artifact"><h3>Hugging Face Space</h3><p>The same dashboard packaged as a public static Space.</p><a href="https://huggingface.co/spaces/cy0307/ropedia-episode-task-suite">cy0307/ropedia-episode-task-suite</a></article>
|
| 670 |
<article class="artifact"><h3>Derived HF artifacts</h3><p>Metrics, predictions, docs, and lightweight derived files without raw Xperience-10M video/data redistribution.</p><a href="https://huggingface.co/datasets/cy0307/ropedia-episode-task-suite-artifacts">dataset repo</a></article>
|
| 671 |
<article class="artifact"><h3>HF baseline models</h3><p>Minimal NumPy softmax and ridge baseline weights with model card and architecture diagrams.</p><a href="https://huggingface.co/cy0307/ropedia-minimal-task-baselines">model repo</a></article>
|
|
|
|
|
|
|
|
|
|
| 672 |
<article class="artifact"><h3>HF collection</h3><p>Space, artifacts, and model baselines grouped into one public project collection.</p><a href="https://huggingface.co/collections/cy0307/ropedia-episode-task-suite">collection</a></article>
|
| 673 |
</div>
|
| 674 |
</div>
|
| 675 |
</section>
|
| 676 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 677 |
<section id="run">
|
| 678 |
<div class="wrap">
|
| 679 |
<div class="section-head">
|
|
|
|
| 657 |
<div class="wrap">
|
| 658 |
<div class="section-head">
|
| 659 |
<h2>Where the evidence lives.</h2>
|
| 660 |
+
<p>Metrics, predictions, confusion matrices, manifests, lightweight model weights, and derived window artifacts are committed so the repo is reviewable before rerunning anything. Raw Xperience-10M data and Qwen weights are not redistributed.</p>
|
| 661 |
</div>
|
| 662 |
<div class="artifact-grid">
|
| 663 |
<article class="artifact"><h3>Task-suite report</h3><p>One JSON file with every task metric and split detail.</p><a href="https://github.com/ChaoYue0307/ropedia-episode-task-suite/blob/main/results/episode_task_suite/summary_report.json">summary_report.json</a></article>
|
|
|
|
| 669 |
<article class="artifact"><h3>Hugging Face Space</h3><p>The same dashboard packaged as a public static Space.</p><a href="https://huggingface.co/spaces/cy0307/ropedia-episode-task-suite">cy0307/ropedia-episode-task-suite</a></article>
|
| 670 |
<article class="artifact"><h3>Derived HF artifacts</h3><p>Metrics, predictions, docs, and lightweight derived files without raw Xperience-10M video/data redistribution.</p><a href="https://huggingface.co/datasets/cy0307/ropedia-episode-task-suite-artifacts">dataset repo</a></article>
|
| 671 |
<article class="artifact"><h3>HF baseline models</h3><p>Minimal NumPy softmax and ridge baseline weights with model card and architecture diagrams.</p><a href="https://huggingface.co/cy0307/ropedia-minimal-task-baselines">model repo</a></article>
|
| 672 |
+
<article class="artifact"><h3>A100 HF relay status</h3><p>HF full-dataset access is pending; an A100 watcher is ready to download a 32-session stratified pilot and transfer it to H20 once approved.</p><a href="https://github.com/ChaoYue0307/ropedia-episode-task-suite/blob/main/results/omni_finetune/A100_HF_RELAY_STATUS.md">A100_HF_RELAY_STATUS.md</a></article>
|
| 673 |
+
<article class="artifact"><h3>Qwen3-Omni readiness artifacts</h3><p>Manifests, metadata, metrics, and progress logs from the current smoke/evidence run. No real 32-episode metric is claimed yet.</p><a href="https://github.com/ChaoYue0307/ropedia-episode-task-suite/blob/main/results/omni_finetune/episode_manifest.json">episode_manifest.json</a></article>
|
| 674 |
+
<article class="artifact"><h3>32-episode data gate</h3><p>The readiness gate remains the source of truth before any full pilot training claim.</p><a href="https://github.com/ChaoYue0307/ropedia-episode-task-suite/blob/main/results/omni_finetune/DATA_BLOCKER_REPORT.md">DATA_BLOCKER_REPORT.md</a></article>
|
| 675 |
<article class="artifact"><h3>HF collection</h3><p>Space, artifacts, and model baselines grouped into one public project collection.</p><a href="https://huggingface.co/collections/cy0307/ropedia-episode-task-suite">collection</a></article>
|
| 676 |
</div>
|
| 677 |
</div>
|
| 678 |
</section>
|
| 679 |
|
| 680 |
+
<section id="omni-relay">
|
| 681 |
+
<div class="wrap">
|
| 682 |
+
<div class="section-head">
|
| 683 |
+
<h2>Qwen3-Omni pilot is approval-ready.</h2>
|
| 684 |
+
<p>The full Xperience-10M Hugging Face dataset is gated. While access is pending, the A100 relay has already selected a 32-episode pilot across 32 different session UUIDs and will continue automatically after approval.</p>
|
| 685 |
+
</div>
|
| 686 |
+
<div class="artifact-grid">
|
| 687 |
+
<article class="artifact"><h3>Selection</h3><p>Stratified round-robin over 64 top-level sessions; 680 complete candidates scanned; 32 sessions selected.</p></article>
|
| 688 |
+
<article class="artifact"><h3>Transfer</h3><p>A100 downloads from Hugging Face, excludes visualization.rrd, validates files, then rsyncs to H20.</p></article>
|
| 689 |
+
<article class="artifact"><h3>Boundary</h3><p>The current LoRA artifact is a smoke/pilot checkpoint. A real 32-episode result requires the watcher to finish and held-out evaluation to run.</p></article>
|
| 690 |
+
</div>
|
| 691 |
+
</div>
|
| 692 |
+
</section>
|
| 693 |
+
|
| 694 |
<section id="run">
|
| 695 |
<div class="wrap">
|
| 696 |
<div class="section-head">
|
results/omni_finetune/A100_HF_RELAY_STATUS.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A100 Hugging Face Relay Status
|
| 2 |
+
|
| 3 |
+
Current blocker: Hugging Face access to `ropedia-ai/xperience-10m` is still
|
| 4 |
+
pending approval from the dataset authors.
|
| 5 |
+
|
| 6 |
+
Verified:
|
| 7 |
+
|
| 8 |
+
- A100 SSH alias: `ANGEL-A100-80Gx4`
|
| 9 |
+
- H20 SSH alias: `ANGEL-H20-96GX8`
|
| 10 |
+
- A100 can reach `huggingface.co`
|
| 11 |
+
- A100 staging path: `/mnt/kgc/chaoyue/xperience10m_hf_staging`
|
| 12 |
+
- A100 HF cache path: `/mnt/kgc/chaoyue/hf_cache`
|
| 13 |
+
- A100 HF token path: `/mnt/kgc/chaoyue/hf_home/token`
|
| 14 |
+
- A100 has enough free space for the 32-episode stratified pilot subset
|
| 15 |
+
- Direct A100 -> H20 SSH/rsync works with `~/.ssh/xperience10m_h20_transfer`
|
| 16 |
+
|
| 17 |
+
Dry-run selection:
|
| 18 |
+
|
| 19 |
+
- Dataset: `ropedia-ai/xperience-10m`
|
| 20 |
+
- Target: 32 complete leaf episodes
|
| 21 |
+
- Strategy: stratified round-robin across top-level session UUIDs
|
| 22 |
+
- Candidate scan: first 64 top-level session UUIDs
|
| 23 |
+
- Valid candidates: `680`
|
| 24 |
+
- Selected sessions: `32`
|
| 25 |
+
- Minimum episode size: `0.25 GB`
|
| 26 |
+
- Estimated bytes: `72,031,620,552`
|
| 27 |
+
- Excludes: `visualization.rrd`
|
| 28 |
+
|
| 29 |
+
Background watcher:
|
| 30 |
+
|
| 31 |
+
```bash
|
| 32 |
+
ps -p $(cat /mnt/kgc/chaoyue/xperience10m_logs/hf_access_watch.pid) -o pid,etime,cmd
|
| 33 |
+
tail -f /mnt/kgc/chaoyue/xperience10m_logs/hf_access_watch.out
|
| 34 |
+
tail -f /mnt/kgc/chaoyue/xperience10m_logs/hf_access_watch.jsonl
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
Watcher behavior:
|
| 38 |
+
|
| 39 |
+
1. Polls one gated HF file every 15 minutes.
|
| 40 |
+
2. When access changes from 403 pending to approved, downloads 32 complete episodes from 32 different session UUIDs.
|
| 41 |
+
3. Validates the staged files.
|
| 42 |
+
4. Transfers staged data to `/home/cy/Ropedia/modelscope_data` on H20.
|
| 43 |
+
5. Runs the H20 readiness gate.
|
| 44 |
+
|
| 45 |
+
Manual restart on A100:
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
HF_HOME=/mnt/kgc/chaoyue/hf_home \
|
| 49 |
+
HF_HUB_CACHE=/mnt/kgc/chaoyue/hf_cache \
|
| 50 |
+
nohup python3 /mnt/kgc/chaoyue/xperience10m_tools/watch_hf_access_and_stage_xperience10m.py \
|
| 51 |
+
--poll-seconds 900 \
|
| 52 |
+
--target-episodes 32 \
|
| 53 |
+
--max-top-level 64 \
|
| 54 |
+
--workers 8 \
|
| 55 |
+
--reserve-gb 250 \
|
| 56 |
+
--selection-strategy stratified \
|
| 57 |
+
--min-episode-gb 0.25 \
|
| 58 |
+
--run-transfer \
|
| 59 |
+
> /mnt/kgc/chaoyue/xperience10m_logs/hf_access_watch.out 2>&1 &
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
Stop watcher:
|
| 63 |
+
|
| 64 |
+
```bash
|
| 65 |
+
kill $(cat /mnt/kgc/chaoyue/xperience10m_logs/hf_access_watch.pid)
|
| 66 |
+
```
|
results/omni_finetune/HF_UPLOAD.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Hugging Face Upload (Model Artifact)
|
| 2 |
+
|
| 3 |
+
The current checkpoint available in this repo is the pilot run:
|
| 4 |
+
|
| 5 |
+
- `results/omni_finetune/adapter_lora/` (`xperience10m_qwen3_omni_32ep_lora`)
|
| 6 |
+
- Train windows: `128`
|
| 7 |
+
- Processes: `8`
|
| 8 |
+
- JSON output path: `results/omni_finetune/predictions_eval.jsonl`
|
| 9 |
+
|
| 10 |
+
Upload target layout:
|
| 11 |
+
- Source directory: `results/omni_finetune/hf_upload/`
|
| 12 |
+
- Upload script: `scripts/omni/upload_qwen3_omni_lora_to_hf.py`
|
| 13 |
+
|
| 14 |
+
Run (when network to huggingface.co is available):
|
| 15 |
+
|
| 16 |
+
```bash
|
| 17 |
+
HF_TOKEN=<your_token> python3 scripts/omni/upload_qwen3_omni_lora_to_hf.py \
|
| 18 |
+
--repo-id cy0307/ropedia-qwen3-omni-lora-smoke \
|
| 19 |
+
--source-dir results/omni_finetune/hf_upload \
|
| 20 |
+
--message "Upload Xperience-10M Qwen3-Omni pilot LoRA"
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
If you want the repo private, add `--private`.
|
| 24 |
+
|
| 25 |
+
Note: this is a pilot artifact. The full 32-episode LoRA run is still blocked by
|
| 26 |
+
data availability; this artifact should not be reported as a full-scale result.
|
scripts/omni/stage_xperience10m_from_hf.py
ADDED
|
@@ -0,0 +1,304 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Stage a bounded Xperience-10M episode subset from Hugging Face.
|
| 3 |
+
|
| 4 |
+
This downloads leaf episode folders such as:
|
| 5 |
+
|
| 6 |
+
<session_uuid>/ep1/{annotation.hdf5,fisheye_cam0.mp4,...}
|
| 7 |
+
|
| 8 |
+
It intentionally excludes visualization.rrd and writes a manifest that can be
|
| 9 |
+
used before transferring data to the H20 training server.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
from __future__ import annotations
|
| 13 |
+
|
| 14 |
+
import argparse
|
| 15 |
+
import json
|
| 16 |
+
import os
|
| 17 |
+
import re
|
| 18 |
+
import shutil
|
| 19 |
+
from concurrent.futures import ThreadPoolExecutor, as_completed
|
| 20 |
+
from dataclasses import dataclass
|
| 21 |
+
from pathlib import Path
|
| 22 |
+
|
| 23 |
+
from huggingface_hub import HfApi, hf_hub_download
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
REQUIRED_FILES = [
|
| 27 |
+
"annotation.hdf5",
|
| 28 |
+
"fisheye_cam0.mp4",
|
| 29 |
+
"fisheye_cam1.mp4",
|
| 30 |
+
"fisheye_cam2.mp4",
|
| 31 |
+
"fisheye_cam3.mp4",
|
| 32 |
+
"stereo_left.mp4",
|
| 33 |
+
"stereo_right.mp4",
|
| 34 |
+
]
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
@dataclass
|
| 38 |
+
class Episode:
|
| 39 |
+
episode_id: str
|
| 40 |
+
prefix: str
|
| 41 |
+
files: dict[str, int]
|
| 42 |
+
|
| 43 |
+
@property
|
| 44 |
+
def session_id(self) -> str:
|
| 45 |
+
return self.prefix.split("/", 1)[0]
|
| 46 |
+
|
| 47 |
+
@property
|
| 48 |
+
def leaf_episode(self) -> str:
|
| 49 |
+
parts = self.prefix.split("/", 1)
|
| 50 |
+
return parts[1] if len(parts) > 1 else "."
|
| 51 |
+
|
| 52 |
+
@property
|
| 53 |
+
def missing(self) -> list[str]:
|
| 54 |
+
return [name for name in REQUIRED_FILES if name not in self.files]
|
| 55 |
+
|
| 56 |
+
@property
|
| 57 |
+
def is_complete(self) -> bool:
|
| 58 |
+
return not self.missing
|
| 59 |
+
|
| 60 |
+
@property
|
| 61 |
+
def is_degraded_valid(self) -> bool:
|
| 62 |
+
return "annotation.hdf5" in self.files and "fisheye_cam0.mp4" in self.files
|
| 63 |
+
|
| 64 |
+
@property
|
| 65 |
+
def bytes(self) -> int:
|
| 66 |
+
return sum(self.files.values())
|
| 67 |
+
|
| 68 |
+
def as_dict(self) -> dict:
|
| 69 |
+
return {
|
| 70 |
+
"episode_id": self.episode_id,
|
| 71 |
+
"prefix": self.prefix,
|
| 72 |
+
"session_id": self.session_id,
|
| 73 |
+
"leaf_episode": self.leaf_episode,
|
| 74 |
+
"files": self.files,
|
| 75 |
+
"missing": self.missing,
|
| 76 |
+
"is_complete": self.is_complete,
|
| 77 |
+
"is_degraded_valid": self.is_degraded_valid,
|
| 78 |
+
"bytes": self.bytes,
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
def parse_args() -> argparse.Namespace:
|
| 83 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 84 |
+
parser.add_argument("--repo-id", default="ropedia-ai/xperience-10m")
|
| 85 |
+
parser.add_argument("--local-dir", type=Path, required=True)
|
| 86 |
+
parser.add_argument("--target-episodes", type=int, default=32)
|
| 87 |
+
parser.add_argument("--max-top-level", type=int, default=64)
|
| 88 |
+
parser.add_argument("--workers", type=int, default=6)
|
| 89 |
+
parser.add_argument("--reserve-gb", type=float, default=100.0)
|
| 90 |
+
parser.add_argument("--prefer-complete", action="store_true", default=True)
|
| 91 |
+
parser.add_argument("--allow-degraded", action="store_true")
|
| 92 |
+
parser.add_argument("--min-episode-gb", type=float, default=0.25)
|
| 93 |
+
parser.add_argument(
|
| 94 |
+
"--selection-strategy",
|
| 95 |
+
choices=["stratified", "first"],
|
| 96 |
+
default="stratified",
|
| 97 |
+
help="stratified spreads episodes across top-level session UUIDs.",
|
| 98 |
+
)
|
| 99 |
+
parser.add_argument("--dry-run", action="store_true")
|
| 100 |
+
parser.add_argument("--manifest-name", default="stage_manifest.json")
|
| 101 |
+
return parser.parse_args()
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
def file_size(item) -> int:
|
| 105 |
+
value = getattr(item, "size", None)
|
| 106 |
+
return int(value) if value is not None else 0
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
def natural_episode_key(episode: Episode) -> tuple[str, int, str]:
|
| 110 |
+
match = re.fullmatch(r"ep(\d+)", episode.leaf_episode)
|
| 111 |
+
numeric = int(match.group(1)) if match else 10**9
|
| 112 |
+
return episode.session_id, numeric, episode.leaf_episode
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def collect_candidates(api: HfApi, repo_id: str, max_top_level: int) -> list[Episode]:
|
| 116 |
+
candidates: list[Episode] = []
|
| 117 |
+
top_count = 0
|
| 118 |
+
for top in api.list_repo_tree(repo_id, repo_type="dataset", recursive=False):
|
| 119 |
+
top_path = getattr(top, "path", "")
|
| 120 |
+
if not top_path:
|
| 121 |
+
continue
|
| 122 |
+
top_count += 1
|
| 123 |
+
grouped: dict[str, dict[str, int]] = {}
|
| 124 |
+
for item in api.list_repo_tree(repo_id, repo_type="dataset", path_in_repo=top_path, recursive=True):
|
| 125 |
+
path = getattr(item, "path", "")
|
| 126 |
+
name = Path(path).name
|
| 127 |
+
if name not in REQUIRED_FILES:
|
| 128 |
+
continue
|
| 129 |
+
prefix = Path(path).parent.as_posix()
|
| 130 |
+
grouped.setdefault(prefix, {})[name] = file_size(item)
|
| 131 |
+
|
| 132 |
+
for prefix, files in sorted(grouped.items()):
|
| 133 |
+
episode_id = prefix.replace("/", "__")
|
| 134 |
+
episode = Episode(episode_id=episode_id, prefix=prefix, files=files)
|
| 135 |
+
if episode.is_degraded_valid:
|
| 136 |
+
candidates.append(episode)
|
| 137 |
+
|
| 138 |
+
if top_count >= max_top_level:
|
| 139 |
+
break
|
| 140 |
+
return sorted(candidates, key=natural_episode_key)
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
def round_robin_by_session(episodes: list[Episode], target: int) -> list[Episode]:
|
| 144 |
+
grouped: dict[str, list[Episode]] = {}
|
| 145 |
+
for episode in sorted(episodes, key=natural_episode_key):
|
| 146 |
+
grouped.setdefault(episode.session_id, []).append(episode)
|
| 147 |
+
|
| 148 |
+
selected: list[Episode] = []
|
| 149 |
+
session_ids = sorted(grouped)
|
| 150 |
+
depth = 0
|
| 151 |
+
while len(selected) < target:
|
| 152 |
+
added = False
|
| 153 |
+
for session_id in session_ids:
|
| 154 |
+
bucket = grouped[session_id]
|
| 155 |
+
if depth < len(bucket):
|
| 156 |
+
selected.append(bucket[depth])
|
| 157 |
+
added = True
|
| 158 |
+
if len(selected) >= target:
|
| 159 |
+
break
|
| 160 |
+
if not added:
|
| 161 |
+
break
|
| 162 |
+
depth += 1
|
| 163 |
+
return selected
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def select_episodes(
|
| 167 |
+
candidates: list[Episode],
|
| 168 |
+
target: int,
|
| 169 |
+
prefer_complete: bool,
|
| 170 |
+
allow_degraded: bool,
|
| 171 |
+
min_episode_bytes: int,
|
| 172 |
+
selection_strategy: str,
|
| 173 |
+
) -> list[Episode]:
|
| 174 |
+
eligible = [ep for ep in candidates if ep.bytes >= min_episode_bytes]
|
| 175 |
+
if prefer_complete and not allow_degraded:
|
| 176 |
+
complete = [ep for ep in eligible if ep.is_complete]
|
| 177 |
+
if len(complete) >= target:
|
| 178 |
+
pool = complete
|
| 179 |
+
else:
|
| 180 |
+
pool = [ep for ep in eligible if ep.is_degraded_valid]
|
| 181 |
+
else:
|
| 182 |
+
pool = [ep for ep in eligible if ep.is_degraded_valid]
|
| 183 |
+
|
| 184 |
+
if selection_strategy == "first":
|
| 185 |
+
return pool[:target]
|
| 186 |
+
return round_robin_by_session(pool, target)
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
def local_file(local_dir: Path, filename: str) -> Path:
|
| 190 |
+
return local_dir / filename
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def download_one(repo_id: str, local_dir: Path, filename: str, token: str | None) -> dict:
|
| 194 |
+
path = hf_hub_download(
|
| 195 |
+
repo_id=repo_id,
|
| 196 |
+
repo_type="dataset",
|
| 197 |
+
filename=filename,
|
| 198 |
+
local_dir=str(local_dir),
|
| 199 |
+
token=token,
|
| 200 |
+
)
|
| 201 |
+
stat = Path(path).stat()
|
| 202 |
+
return {"path": filename, "local_path": path, "bytes": stat.st_size}
|
| 203 |
+
|
| 204 |
+
|
| 205 |
+
def validate_selected(local_dir: Path, selected: list[Episode]) -> list[dict]:
|
| 206 |
+
records = []
|
| 207 |
+
for episode in selected:
|
| 208 |
+
files = {}
|
| 209 |
+
for name in REQUIRED_FILES:
|
| 210 |
+
path = local_file(local_dir, f"{episode.prefix}/{name}")
|
| 211 |
+
files[name] = {
|
| 212 |
+
"exists": path.exists(),
|
| 213 |
+
"bytes": path.stat().st_size if path.exists() else 0,
|
| 214 |
+
}
|
| 215 |
+
records.append(
|
| 216 |
+
{
|
| 217 |
+
**episode.as_dict(),
|
| 218 |
+
"local_files": files,
|
| 219 |
+
"local_complete": all(item["exists"] for item in files.values()),
|
| 220 |
+
"local_degraded_valid": files["annotation.hdf5"]["exists"]
|
| 221 |
+
and files["fisheye_cam0.mp4"]["exists"],
|
| 222 |
+
}
|
| 223 |
+
)
|
| 224 |
+
return records
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
def write_manifest(path: Path, payload: dict) -> None:
|
| 228 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 229 |
+
path.write_text(json.dumps(payload, indent=2), encoding="utf-8")
|
| 230 |
+
|
| 231 |
+
|
| 232 |
+
def main() -> int:
|
| 233 |
+
args = parse_args()
|
| 234 |
+
token = os.environ.get("HF_TOKEN")
|
| 235 |
+
local_dir = args.local_dir.expanduser().resolve()
|
| 236 |
+
local_dir.mkdir(parents=True, exist_ok=True)
|
| 237 |
+
|
| 238 |
+
api = HfApi(token=token)
|
| 239 |
+
candidates = collect_candidates(api, args.repo_id, args.max_top_level)
|
| 240 |
+
min_episode_bytes = int(args.min_episode_gb * 1024**3)
|
| 241 |
+
selected = select_episodes(
|
| 242 |
+
candidates,
|
| 243 |
+
args.target_episodes,
|
| 244 |
+
args.prefer_complete,
|
| 245 |
+
args.allow_degraded,
|
| 246 |
+
min_episode_bytes,
|
| 247 |
+
args.selection_strategy,
|
| 248 |
+
)
|
| 249 |
+
required_bytes = sum(ep.bytes for ep in selected)
|
| 250 |
+
free_bytes = shutil.disk_usage(local_dir).free
|
| 251 |
+
reserve_bytes = int(args.reserve_gb * 1024**3)
|
| 252 |
+
|
| 253 |
+
payload = {
|
| 254 |
+
"repo_id": args.repo_id,
|
| 255 |
+
"local_dir": str(local_dir),
|
| 256 |
+
"target_episodes": args.target_episodes,
|
| 257 |
+
"max_top_level": args.max_top_level,
|
| 258 |
+
"selection_strategy": args.selection_strategy,
|
| 259 |
+
"min_episode_bytes": min_episode_bytes,
|
| 260 |
+
"allow_degraded": args.allow_degraded,
|
| 261 |
+
"num_candidates": len(candidates),
|
| 262 |
+
"num_selected": len(selected),
|
| 263 |
+
"num_selected_sessions": len({ep.session_id for ep in selected}),
|
| 264 |
+
"required_bytes": required_bytes,
|
| 265 |
+
"free_bytes_before": free_bytes,
|
| 266 |
+
"reserve_bytes": reserve_bytes,
|
| 267 |
+
"dry_run": args.dry_run,
|
| 268 |
+
"selected": [ep.as_dict() for ep in selected],
|
| 269 |
+
}
|
| 270 |
+
write_manifest(local_dir / args.manifest_name, payload)
|
| 271 |
+
|
| 272 |
+
if len(selected) < args.target_episodes:
|
| 273 |
+
raise SystemExit(f"only found {len(selected)} valid episodes, target is {args.target_episodes}")
|
| 274 |
+
if free_bytes - required_bytes < reserve_bytes:
|
| 275 |
+
raise SystemExit(
|
| 276 |
+
f"not enough free space: need {required_bytes} bytes plus reserve {reserve_bytes}, "
|
| 277 |
+
f"free {free_bytes}"
|
| 278 |
+
)
|
| 279 |
+
if args.dry_run:
|
| 280 |
+
print(json.dumps(payload, indent=2))
|
| 281 |
+
return 0
|
| 282 |
+
|
| 283 |
+
filenames = [f"{ep.prefix}/{name}" for ep in selected for name in REQUIRED_FILES if name in ep.files]
|
| 284 |
+
results = []
|
| 285 |
+
with ThreadPoolExecutor(max_workers=max(1, args.workers)) as pool:
|
| 286 |
+
futures = [pool.submit(download_one, args.repo_id, local_dir, filename, token) for filename in filenames]
|
| 287 |
+
for idx, future in enumerate(as_completed(futures), start=1):
|
| 288 |
+
item = future.result()
|
| 289 |
+
results.append(item)
|
| 290 |
+
print(f"[{idx}/{len(futures)}] {item['path']} {item['bytes']}")
|
| 291 |
+
|
| 292 |
+
final_payload = {
|
| 293 |
+
**payload,
|
| 294 |
+
"downloaded_files": sorted(results, key=lambda item: item["path"]),
|
| 295 |
+
"validated": validate_selected(local_dir, selected),
|
| 296 |
+
"free_bytes_after": shutil.disk_usage(local_dir).free,
|
| 297 |
+
}
|
| 298 |
+
write_manifest(local_dir / args.manifest_name, final_payload)
|
| 299 |
+
print(f"Wrote {local_dir / args.manifest_name}")
|
| 300 |
+
return 0
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
if __name__ == "__main__":
|
| 304 |
+
raise SystemExit(main())
|
scripts/omni/transfer_xperience10m_a100_to_h20.sh
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
A100_STAGE_DIR="${A100_STAGE_DIR:-/mnt/kgc/chaoyue/xperience10m_hf_staging/}"
|
| 5 |
+
H20_HOST="${H20_HOST:-cy@47.100.122.133}"
|
| 6 |
+
H20_DATA_ROOT="${H20_DATA_ROOT:-/home/cy/Ropedia/modelscope_data/}"
|
| 7 |
+
SSH_KEY="${SSH_KEY:-$HOME/.ssh/xperience10m_h20_transfer}"
|
| 8 |
+
|
| 9 |
+
rsync -avP --partial --append-verify \
|
| 10 |
+
--exclude "visualization.rrd" \
|
| 11 |
+
-e "ssh -i ${SSH_KEY} -o BatchMode=yes -o StrictHostKeyChecking=accept-new" \
|
| 12 |
+
"${A100_STAGE_DIR}" \
|
| 13 |
+
"${H20_HOST}:${H20_DATA_ROOT}"
|
| 14 |
+
|
| 15 |
+
ssh -i "${SSH_KEY}" -o BatchMode=yes -o StrictHostKeyChecking=accept-new "${H20_HOST}" \
|
| 16 |
+
"cd /home/cy/Ropedia/ropedia-episode-task-suite && python3 scripts/omni/discover_xperience10m_sources.py --workspace /home/cy/Ropedia/ropedia-episode-task-suite --data-root /home/cy/Ropedia/modelscope_data --output results/omni_finetune/source_discovery.json --report-output results/omni_finetune/DATA_BLOCKER_REPORT.md"
|
scripts/omni/watch_hf_access_and_stage_xperience10m.py
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Poll Hugging Face gated access, then stage and optionally transfer Xperience-10M.
|
| 3 |
+
|
| 4 |
+
This is intended for an A100 relay server that can reach Hugging Face while H20
|
| 5 |
+
cannot. It does a cheap HEAD request against one gated file. When access is
|
| 6 |
+
approved, it starts the selective 32-episode staging script and then can launch
|
| 7 |
+
the A100->H20 transfer script.
|
| 8 |
+
"""
|
| 9 |
+
|
| 10 |
+
from __future__ import annotations
|
| 11 |
+
|
| 12 |
+
import argparse
|
| 13 |
+
import json
|
| 14 |
+
import os
|
| 15 |
+
import subprocess
|
| 16 |
+
import time
|
| 17 |
+
from datetime import datetime, timezone
|
| 18 |
+
from pathlib import Path
|
| 19 |
+
|
| 20 |
+
from huggingface_hub import hf_hub_url
|
| 21 |
+
from huggingface_hub.file_download import get_hf_file_metadata
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
DEFAULT_PROBE_FILE = "003dcaf0-edba-4787-ada0-187d2748f684/ep1/fisheye_cam0.mp4"
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def parse_args() -> argparse.Namespace:
|
| 28 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 29 |
+
parser.add_argument("--repo-id", default="ropedia-ai/xperience-10m")
|
| 30 |
+
parser.add_argument("--probe-file", default=DEFAULT_PROBE_FILE)
|
| 31 |
+
parser.add_argument("--local-dir", type=Path, default=Path("/mnt/kgc/chaoyue/xperience10m_hf_staging"))
|
| 32 |
+
parser.add_argument("--stage-script", type=Path, default=Path("/mnt/kgc/chaoyue/xperience10m_tools/stage_xperience10m_from_hf.py"))
|
| 33 |
+
parser.add_argument("--transfer-script", type=Path, default=Path("/mnt/kgc/chaoyue/xperience10m_tools/transfer_xperience10m_a100_to_h20.sh"))
|
| 34 |
+
parser.add_argument("--log-dir", type=Path, default=Path("/mnt/kgc/chaoyue/xperience10m_logs"))
|
| 35 |
+
parser.add_argument("--target-episodes", type=int, default=32)
|
| 36 |
+
parser.add_argument("--max-top-level", type=int, default=64)
|
| 37 |
+
parser.add_argument("--workers", type=int, default=8)
|
| 38 |
+
parser.add_argument("--reserve-gb", type=float, default=250)
|
| 39 |
+
parser.add_argument("--min-episode-gb", type=float, default=0.25)
|
| 40 |
+
parser.add_argument("--selection-strategy", default="stratified", choices=["stratified", "first"])
|
| 41 |
+
parser.add_argument("--poll-seconds", type=int, default=900)
|
| 42 |
+
parser.add_argument("--max-attempts", type=int, default=0, help="0 means run until approved.")
|
| 43 |
+
parser.add_argument("--run-transfer", action="store_true")
|
| 44 |
+
return parser.parse_args()
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def utc_now() -> str:
|
| 48 |
+
return datetime.now(timezone.utc).isoformat()
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def read_token() -> str:
|
| 52 |
+
token = os.environ.get("HF_TOKEN", "").strip()
|
| 53 |
+
if token:
|
| 54 |
+
return token
|
| 55 |
+
|
| 56 |
+
hf_home = Path(os.environ.get("HF_HOME", "~/.cache/huggingface")).expanduser()
|
| 57 |
+
token_path = hf_home / "token"
|
| 58 |
+
if token_path.exists():
|
| 59 |
+
return token_path.read_text(encoding="utf-8").strip()
|
| 60 |
+
return ""
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
def append_jsonl(path: Path, record: dict) -> None:
|
| 64 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 65 |
+
with path.open("a", encoding="utf-8") as handle:
|
| 66 |
+
handle.write(json.dumps(record, sort_keys=True) + "\n")
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
def check_access(repo_id: str, probe_file: str, token: str) -> tuple[bool, dict]:
|
| 70 |
+
if not token:
|
| 71 |
+
return False, {"status": "missing_token"}
|
| 72 |
+
|
| 73 |
+
url = hf_hub_url(repo_id=repo_id, filename=probe_file, repo_type="dataset")
|
| 74 |
+
try:
|
| 75 |
+
metadata = get_hf_file_metadata(url, token=token, timeout=30)
|
| 76 |
+
return True, {
|
| 77 |
+
"status": "approved",
|
| 78 |
+
"etag": metadata.etag,
|
| 79 |
+
"size": metadata.size,
|
| 80 |
+
}
|
| 81 |
+
except Exception as exc:
|
| 82 |
+
response = getattr(exc, "response", None)
|
| 83 |
+
status_code = getattr(response, "status_code", None)
|
| 84 |
+
return False, {
|
| 85 |
+
"status": "not_approved" if status_code in (401, 403) else "check_error",
|
| 86 |
+
"http_status": status_code,
|
| 87 |
+
"error_type": type(exc).__name__,
|
| 88 |
+
"error": str(exc),
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
def run_logged(cmd: list[str], log_file: Path, env: dict[str, str]) -> int:
|
| 93 |
+
log_file.parent.mkdir(parents=True, exist_ok=True)
|
| 94 |
+
with log_file.open("a", encoding="utf-8") as handle:
|
| 95 |
+
handle.write(f"\n[{utc_now()}] RUN {' '.join(cmd)}\n")
|
| 96 |
+
handle.flush()
|
| 97 |
+
proc = subprocess.run(cmd, stdout=handle, stderr=subprocess.STDOUT, env=env)
|
| 98 |
+
handle.write(f"[{utc_now()}] EXIT {proc.returncode}\n")
|
| 99 |
+
return int(proc.returncode)
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def main() -> int:
|
| 103 |
+
args = parse_args()
|
| 104 |
+
args.log_dir.mkdir(parents=True, exist_ok=True)
|
| 105 |
+
status_path = args.log_dir / "hf_access_watch.jsonl"
|
| 106 |
+
token = read_token()
|
| 107 |
+
|
| 108 |
+
env = os.environ.copy()
|
| 109 |
+
if token:
|
| 110 |
+
env["HF_TOKEN"] = token
|
| 111 |
+
env.setdefault("HF_HOME", "/mnt/kgc/chaoyue/hf_home")
|
| 112 |
+
env.setdefault("HF_HUB_CACHE", "/mnt/kgc/chaoyue/hf_cache")
|
| 113 |
+
|
| 114 |
+
attempt = 0
|
| 115 |
+
while True:
|
| 116 |
+
attempt += 1
|
| 117 |
+
approved, detail = check_access(args.repo_id, args.probe_file, token)
|
| 118 |
+
record = {"time": utc_now(), "attempt": attempt, "approved": approved, **detail}
|
| 119 |
+
append_jsonl(status_path, record)
|
| 120 |
+
print(json.dumps(record, sort_keys=True), flush=True)
|
| 121 |
+
|
| 122 |
+
if approved:
|
| 123 |
+
break
|
| 124 |
+
if args.max_attempts and attempt >= args.max_attempts:
|
| 125 |
+
return 2
|
| 126 |
+
time.sleep(max(60, args.poll_seconds))
|
| 127 |
+
|
| 128 |
+
stage_cmd = [
|
| 129 |
+
"python3",
|
| 130 |
+
str(args.stage_script),
|
| 131 |
+
"--local-dir",
|
| 132 |
+
str(args.local_dir),
|
| 133 |
+
"--target-episodes",
|
| 134 |
+
str(args.target_episodes),
|
| 135 |
+
"--max-top-level",
|
| 136 |
+
str(args.max_top_level),
|
| 137 |
+
"--workers",
|
| 138 |
+
str(args.workers),
|
| 139 |
+
"--reserve-gb",
|
| 140 |
+
str(args.reserve_gb),
|
| 141 |
+
"--min-episode-gb",
|
| 142 |
+
str(args.min_episode_gb),
|
| 143 |
+
"--selection-strategy",
|
| 144 |
+
args.selection_strategy,
|
| 145 |
+
]
|
| 146 |
+
stage_rc = run_logged(stage_cmd, args.log_dir / "stage_32ep.log", env)
|
| 147 |
+
append_jsonl(status_path, {"time": utc_now(), "stage_exit": stage_rc})
|
| 148 |
+
if stage_rc != 0:
|
| 149 |
+
return stage_rc
|
| 150 |
+
|
| 151 |
+
if args.run_transfer:
|
| 152 |
+
transfer_rc = run_logged([str(args.transfer_script)], args.log_dir / "transfer_to_h20.log", env)
|
| 153 |
+
append_jsonl(status_path, {"time": utc_now(), "transfer_exit": transfer_rc})
|
| 154 |
+
return transfer_rc
|
| 155 |
+
|
| 156 |
+
return 0
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
if __name__ == "__main__":
|
| 160 |
+
raise SystemExit(main())
|