Skip to content

tinker_cookbook.weights.download

tinker_cookbook.weights.download(tinker_path, output_dir, base_url)

Download a checkpoint from Tinker storage to local disk.

Parameters:

  • tinker_path (str) – Tinker checkpoint path, e.g. "tinker://<run_id>/sampler_weights/final".
  • output_dir (str) – Local directory where the checkpoint will be extracted.
  • base_url (str | None) – Custom Tinker service URL. If None (default), uses the default Tinker service endpoint (or TINKER_BASE_URL environment variable if set).

Returns: Path to the extracted checkpoint directory.

Raises:

  • WeightsDownloadError: If the archive contains unsafe entries.
  • urllib.error.URLError: If the download fails.