AdvancedCheckpointDownload

Download a Checkpoint

This page documents advanced/checkpoint.py download in mint-quickstart.

What this command does

  • accepts a mint://... or tinker://... checkpoint path
  • requests a signed archive URL from the MinT REST client
  • retries while archive creation is still in progress (409)
  • downloads a .tar.gz archive 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 ./ckpts

Useful flags:

  • --checkpoint-type {auto,sampler,training} for legacy paths without weights/ or sampler_weights/
  • --no-extract to keep only the .tar.gz
  • --max-wait and --poll-interval to 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.gz

Common failure cases

  • invalid checkpoint path or missing checkpoint
  • archive creation never finishes before --max-wait
  • wrong --checkpoint-type for legacy paths
  • filesystem permissions on the output directory
  • Create the checkpoint first: Save
  • Upload a local archive: Upload
  • Continue training from a downloaded checkpoint: Resume