id from List checkpoints. The Python SDK takes that id, or the name you saved the checkpoint under together with the run’s ID.
A checkpoint’s files are stored in S3 or in a Baseten volume, and recent checkpoints are usually in volumes. The Python SDK downloads from either. The Baseten CLI and the REST API return presigned URLs only for checkpoints stored in S3. For a checkpoint stored in a volume, they fail with a Checkpoint <checkpoint_id> has no presigned URLs error; use the Python SDK instead. To check where a checkpoint is stored, send a Get checkpoint source request.
The Python SDK, the Baseten CLI, and the curl examples authenticate with BASETEN_API_KEY. Export your API key first:
- Python SDK
- Baseten CLI
- REST API
To download a checkpoint’s files:Call To identify the checkpoint by the name you saved it under, pass The script prints the directory that holds the files and how many it wrote. A sampler checkpoint with two files prints:During a run,
download_checkpoint() on a ServiceClient with the checkpoint’s id and a dest_dir that doesn’t exist yet or is empty. The run doesn’t need to be active. Replace <checkpoint_id> with the id, then run:name and the run’s ID instead of checkpoint_id:training_client.download_checkpoint() takes the same arguments except run_id, which it resolves from the client’s run.Next steps
- Delete a checkpoint: Remove the checkpoint after you keep a copy.
- Load a checkpoint into a new job: Load a Loops checkpoint into your own training code.