autogluon.cloud.TimeSeriesFoundationModel¶
- class autogluon.cloud.TimeSeriesFoundationModel(model_id: str, **kwargs)[source]¶
Foundation model for time series forecasting (Chronos, etc.).
- __init__(model_id: str, backend: Literal['sagemaker'] = 'sagemaker', cloud_output_path: str | None = None, hyperparameters: Dict[str, Any] | None = None, role: str | None = None)¶
- Parameters:
model_id – ID of the foundation model from the model registry.
backend – Cloud backend to use.
cloud_output_path – S3 path to store intermediate artifacts.
hyperparameters – Default hyperparameters applied to inference and (when supported) training.
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().
- deploy(instance_type: str | None = None, endpoint_name: str | None = None, hyperparameters: Dict[str, Any] | None = None, framework_version: str = 'latest', custom_image_uri: str | None = None, wait: bool = True, **backend_kwargs) TimeSeriesEndpoint[source]¶
Deploy model to a real-time endpoint.
- Parameters:
instance_type – Instance type for the endpoint. If None, will use the default from the model registry.
endpoint_name – Custom endpoint name. If None, will auto-generate a unique name.
hyperparameters – Model hyperparameters for inference. Overrides values passed to the constructor.
framework_version – Container framework version. If ‘latest’, uses the most recent available.
custom_image_uri – Custom Docker image URI for the inference container.
wait – Whether to block until the endpoint is ready.
**backend_kwargs – Backend-specific arguments (e.g., initial_instance_count, volume_size, model_kwargs, deploy_kwargs).
- Return type:
TimeSeriesEndpoint
- predict(data: str | DataFrame, target: str = 'target', id_column: str = 'item_id', timestamp_column: str = 'timestamp', known_covariates: str | DataFrame | None = None, static_features: str | DataFrame | None = None, prediction_length: int = 1, quantile_levels: List[float] | None = None, hyperparameters: Dict[str, Any] | None = None, instance_type: str | None = None, framework_version: str = 'latest', custom_image_uri: str | None = None, wait: bool = True, **backend_kwargs) DataFrame | None[source]¶
Run batch prediction for time series.
- Parameters:
data – Historical time series in long format (DataFrame or S3 path).
target – Name of the target column to forecast.
id_column – Name of the item ID column.
timestamp_column – Name of the timestamp column.
known_covariates – Future values of known covariates (DataFrame or S3 path). Covariate column names are inferred from the DataFrame columns (excluding id_column and timestamp_column).
static_features – Metadata attributes of individual items (DataFrame or S3 path).
prediction_length – Number of time steps to forecast.
quantile_levels – Quantiles to predict.
hyperparameters – Model hyperparameters for inference. Overrides values passed to the constructor.
instance_type – Instance type for the prediction job. If None, uses registry default.
framework_version – Container framework version.
custom_image_uri – Custom Docker image URI for the container.
wait – If True, block and return DataFrame. If False, return the job handle.
**backend_kwargs – Additional backend-specific arguments (e.g., job_name, volume_size, autogluon_sagemaker_estimator_kwargs).
- Return type:
Optional[pd.DataFrame]