TimeSeriesFoundationModel¶
- class autogluon.cloud.TimeSeriesFoundationModel(model_id: str, **kwargs)[source]¶
Pretrained time series foundation model for zero-shot forecasting on AWS SageMaker.
Wraps pretrained models like Chronos-2 and Chronos-Bolt and runs prediction as a managed SageMaker job, with no training required. See the foundation model tutorial for the supported
model_idvalues and a full walkthrough.Predictions can be produced in three modes:
Batch —
predict()runs a one-off SageMaker training job and writes forecasts to S3. Best for one-shot inference.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 – ID of the foundation model from the model registry. See Available models in the foundation model tutorial for the list of supported values.
cloud_output_path –
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 – 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 tosagemaker.get_execution_role().hyperparameters – Default hyperparameters applied to inference and (when supported) training.
model_artifact_uri – S3 URI of a pre-bundled
model.tar.gzproduced bycache_model_artifact(). When set, deploys skip the runtime HuggingFace download and load weights from the bundled artifact.backend – Cloud backend to use.
Methods
Download model weights from HuggingFace, bundle them with the FM serve script into a SageMaker-compatible
model.tar.gz, and upload to S3.Deploy model to an inference endpoint.
Restore from
to_dict()output.Restore from a
to_json()string.Run batch prediction for time series.
Serialize the model identity.
Serialize
to_dict()output as a JSON string.