cache_model_artifact

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

Download model weights from HuggingFace, bundle them with the FM serve script into a SageMaker-compatible model.tar.gz, and upload to S3.

Lets deploy() skip the runtime HuggingFace download — required for network-isolated endpoints (e.g. SageMaker Serverless Inference). Returns a new FoundationModel with model_artifact_uri set to the uploaded tarball.

Destination key: {cache_path}/{model_id}/model.tar.gz. If it already exists, upload is skipped unless overwrite=True; a stale-cache mismatch between the bundled artifact’s autogluon-cloud version and the current version raises RuntimeError and prompts the caller to re-bundle.

Parameters:
  • cache_path – S3 prefix under which the artifact will be uploaded. Multiple foundation models can share one prefix.

  • overwrite – If True, re-upload even when the destination key exists.

Returns:

A new instance with model_artifact_uri populated. The original is unchanged.

Return type:

FoundationModel