TimeSeriesFoundationModel¶
- class autogluon.cloud.TimeSeriesFoundationModel(model_id: str, **kwargs)[source]¶
Pretrained time series foundation model for zero-shot forecasting on Amazon SageMaker.
Wraps pretrained models like Chronos-2, Chronos-Bolt, and Toto-2.0, with no training required. Use
list_models()to get the supportedmodel_idvalues, and see the foundation model tutorial for a full walkthrough.Predictions can be produced in three modes:
Batch —
predict()runs a one-off SageMaker training job and writes forecasts to S3.Real-time —
deploy()provisions a real-time endpoint; callTimeSeriesEndpoint.predict()for low-latency inference, thenTimeSeriesEndpoint.delete_endpoint()to tear it down.Serverless —
deploy()withinference_mode="serverless"provisions a SageMaker Serverless Inference endpoint that scales to zero. Requires a cached model artifact (seecache_model_artifact()).
- Parameters:
model_id (str) – ID of the foundation model, e.g.
"chronos-2"or"mitra-classifier". Uselist_models()to get the supported IDs.cloud_output_path (str | None, default = None) –
S3 location where intermediate artifacts are stored. Accepts:
s3://bucket— a unique timestamped subfolderag-<timestamp>is appended.s3://bucket/prefix— used verbatim. Re-running with the same prefix will overwrite previously written artifacts.None(default) — use the bucket saved in~/.autogluon/cloud.yaml(set byautogluon.cloud.bootstrap()/autogluon.cloud.register()) and append a timestamped subfolder. Raises if no bucket is configured.
role (str | None, default = None) – ARN of the SageMaker execution role used to run training and inference jobs. If
None, falls back torole_arnin~/.autogluon/cloud.yaml(set byautogluon.cloud.bootstrap()/autogluon.cloud.register()), and finally to the role of the current AWS identity.hyperparameters (dict[str, Any] | None, default = None) – Model hyperparameters. Hyperparameters passed to
predict()ordeploy()take precedence.model_artifact_uri (str | None, default = None) – S3 URI of a
model.tar.gzcreated bycache_model_artifact(). If set,deploy()loads the weights from this artifact instead of downloading them from Hugging Face.backend (Literal["sagemaker"], default = "sagemaker") – Cloud backend to use.
Methods
Bundle the model weights from Hugging Face and the serve script into a
model.tar.gzon S3.Deploy the model to a real-time or serverless endpoint.
Create a model from the output of
to_dict().Create a model from the output of
to_json().List the supported
model_idvalues.Forecast the future values of
datain a one-off SageMaker job.Serialize
model_id,hyperparameters, andmodel_artifact_urito a dict.Serialize
model_id,hyperparameters, andmodel_artifact_urito a JSON string.