Download a Checkpoint
This page documents advanced/checkpoint.py download in mint-quickstart.
What this command does
- accepts a
mint://...ortinker://...checkpoint path - requests a signed archive URL from the MinT REST client
- retries while archive creation is still in progress (
409) - downloads a
.tar.gzarchive to a local directory - extracts the archive by default
- retries over plain HTTP if the signed archive host advertises HTTPS but actually serves HTTP
Use the MinT endpoint that matches your region:
- Mainland China:
https://mint-cn.macaron.xin/ - Outside Mainland China:
https://mint.macaron.xin/
Command
export MINT_API_KEY=sk-...
python advanced/checkpoint.py download tinker://<run-id>/weights/<checkpoint-name> -o ./ckptsUseful flags:
--checkpoint-type {auto,sampler,training}for legacy paths withoutweights/orsampler_weights/--no-extractto keep only the.tar.gz--max-waitand--poll-intervalto tune the 409 retry loop
Core APIs
rest_client = service_client.create_rest_client()
archive = rest_client.get_checkpoint_archive_url_from_mint_path(mint_path).result()
# Or fall back to the Tinker-style path helper when needed.
# Then download archive.url with a standard HTTP client.The quickstart script also falls back to the Tinker-style archive URL method when needed, but the documentation keeps the example focused on the canonical MinT path.
Expected output
[download] path=tinker://.../weights/my-ckpt-state type=auto out=/.../ckpts
[download] trying: mint://.../weights/my-ckpt-state
signed URL obtained, downloading...
signed URL rejected TLS; retrying over http for archive download...
[download] saved to: /.../ckpts/my-ckpt-state.tar.gzCommon failure cases
- invalid checkpoint path or missing checkpoint
- archive creation never finishes before
--max-wait - wrong
--checkpoint-typefor legacy paths - filesystem permissions on the output directory