Download the model
Stream the best AutoScientist checkpoint to a local archive.
AutoScientist downloads the checkpoint from the best iteration, which is not necessarily the final iteration. The endpoint streams a compressed tar archive rather than returning a presigned URL.
Stream the checkpoint
Section titled “Stream the checkpoint”Retrieve the run first and verify that it completed and produced a downloadable checkpoint:
from adaption import Adaption
client = Adaption()
run_id = "autoscientist_run_abc123"run = client.autoscientist.get(run_id)
if run.status == "failed": raise RuntimeError(f"failed: {run.error}")if run.status != "succeeded": raise RuntimeError(f"Run is not complete: {run.status}")if not run.download_available: raise RuntimeError("The checkpoint is not available for download")
with client.autoscientist.with_streaming_response.download(run.id) as response: response.stream_to_file("best-checkpoint.tgz")Using the streaming response avoids loading a large model archive into memory.
Inspect the archive
Section titled “Inspect the archive”tar detects the archive’s compression:
mkdir -p best-checkpointtar xf best-checkpoint.tgz -C best-checkpointA LoRA checkpoint typically contains:
adapter_config.jsonadapter_model.safetensorstokenizer.jsontrainer_state.json...To publish manually to Hugging Face, create an empty model repository and upload the extracted files through its web interface or tooling. Keep the archive private if the weights or tokenizer contain proprietary information.
See the download API reference for the current response.