cache_model_artifact

TimeSeriesFoundationModel.cache_model_artifact(cache_path: str, *, overwrite: bool = False) → Self

Bundle the model weights from Hugging Face and the serve script into a model.tar.gz on S3.

Deploying from the bundled artifact skips the weight download, which is required for network-isolated endpoints such as serverless ones (deploy(inference_mode="serverless")).

The artifact is written to {cache_path}/{model_id}/model.tar.gz. If it already exists, the upload is skipped unless overwrite=True, and RuntimeError is raised if it was bundled with a different autogluon-cloud version.

Parameters:
  • cache_path (str) – S3 prefix to upload the artifact to. Multiple foundation models can share one prefix.

  • overwrite (bool, default = False) – If True, re-bundle and upload the artifact even if it already exists.

Returns:

TimeSeriesFoundationModel | TabularFoundationModel – A copy of this model with model_artifact_uri set to the uploaded artifact. The original is unchanged.