Download scripts/resync_one.py from hkblockchaintechnology/VLM-all-inclusive: direct link, hf CLI and curl.
- Browser
- Download file 828 Bytes
-
https://huggingface.co/hkblockchaintechnology/VLM-all-inclusive/resolve/main/scripts/resync_one.py
- Command line
-
hf download hf://hkblockchaintechnology/VLM-all-inclusive/scripts/resync_one.py
-
curl -L -o resync_one.py https://huggingface.co/hkblockchaintechnology/VLM-all-inclusive/resolve/main/scripts/resync_one.py
828 Bytes
| """Push one stage's local checkpoints to the Hub (used by the swarm workers). | |
| The trainer already uploads on a timer, but a fire-and-forget uploader can miss | |
| its last commit when a process dies or the sandbox is recycled. This is the | |
| recovery path, and it is cheap to call after every job exit. | |
| python resync_one.py speech | |
| """ | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, "/marimo") | |
| import omni.hub as hub | |
| stage = sys.argv[1] if len(sys.argv) > 1 else None | |
| tok = None | |
| if Path("/marimo/.hf_token").exists(): | |
| tok = Path("/marimo/.hf_token").read_text().strip() | |
| pushed = hub.resync_local_runs("hkblockchaintechnology/omni-vlm-ckpt", tok, retries=3, | |
| include_optim=True, force=True, | |
| only_stages=(stage,) if stage else None) | |
| print("resynced:", pushed) | |