predict

TimeSeriesCloudPredictor.predict(data: str | DataFrame, *, static_features: str | DataFrame | None = None, known_covariates: str | DataFrame | None = None, predictor_path: str | None = None, framework_version: str | None = None, instance_type: str = 'ml.m5.2xlarge', wait: bool = True, predictions_path: str | None = None, backend_overrides: dict[str, dict[str, Any]] | None = None, **kwargs: Unpack[BatchTransformKwargs]) → DataFrame | None[source]

Forecast with a SageMaker batch transform job.

Suited for large datasets. For low-latency predictions, deploy an endpoint with deploy() instead. data must use the same id_column / timestamp_column names that were passed to fit().

Parameters:
  • data (str | pd.DataFrame) – Historical time series to forecast from, in long format, as a pd.DataFrame or local/S3 path to a data file.

  • static_features (str | pd.DataFrame | None, default = None) – Static (time-independent) features describing each individual time series.

  • known_covariates (str | pd.DataFrame | None, default = None) – Future values of the known covariates over the forecast horizon. Must be provided if known_covariates_names was specified at fit time.

  • predictor_path (str | None, default = None) – Local or S3 path of the predictor tarball. If None, uses the predictor trained by fit().

  • framework_version (str | None, default = None) – AutoGluon version, e.g. "1.6". Inference uses the official AutoGluon DLC image for this version. Defaults to the version used by fit(). Ignored if custom_image_uri is set.

  • instance_type (str, default = "ml.m5.2xlarge") – Instance type of the batch transform job.

  • wait (bool, default = True) – Whether to block until the job completes and return the forecast. If False, returns None once the job is launched; use get_batch_inference_job_status() to poll it.

  • predictions_path (str | None, default = None) – S3 prefix under which the batch transform job writes its results (<predictions_path>/<input file>.out). Defaults to {cloud_output_path}/batch_transform/<timestamp>/results.

Returns:

pd.DataFrame | None – Forecast in long format with item_id, timestamp, mean, and one column per quantile, or None if wait=False.

Other Parameters:
  • backend_overrides (dict[str, dict[str, Any]] | None, default = None) – Raw SageMaker request fields for settings without a dedicated argument.

    • Keys: request names from the SageMaker API section below.

    • Values: request fields in PascalCase, as in the SageMaker API and boto3. Deep-merged over the request built by AutoGluon-Cloud; lists and other non-dict values replace the generated ones.

    • Example: {"CreateTransformJob": {"BatchStrategy": "SingleRecord", "MaxPayloadInMB": 20}}

  • job_name (str | None, default = None) – Name of the batch transform job. Defaults to a unique name with prefix ag-cloud-timeseries.

  • instance_count (int, default = 1) – Number of batch transform instances.

  • custom_image_uri (str | None, default = None) – Custom inference container image URI. If set, framework_version is ignored.

SageMaker API

  • CreateModel: registers the predictor artifact and inference image as a SageMaker model.

  • CreateTransformJob: runs batch inference on instance_count x instance_type. Results are written to predictions_path.

The model is deleted when the job finishes. With wait=False it is kept; delete it with DeleteModel.