TimeSeriesCloudPredictor

class autogluon.cloud.TimeSeriesCloudPredictor(local_output_path: str | None = None, cloud_output_path: str | None = None, backend: str = 'sagemaker', role: str | None = None, verbosity: int = 2)[source]

Train and deploy AutoGluon time series forecasting models on AWS SageMaker.

Wraps autogluon.timeseries.TimeSeriesPredictor (docs) and runs fit, predict, and endpoint deployment as managed SageMaker jobs.

Parameters:
  • local_output_path (Optional[str], default = None) – Path to directory where downloaded trained predictor, batch transform results, and intermediate outputs should be saved If unspecified, a time-stamped folder called “AutogluonCloudPredictor/ag-[TIMESTAMP]” will be created in the working directory to store all downloaded trained predictor, batch transform results, and intermediate outputs. Note: To call fit() twice and save all results of each fit, you must specify different local_output_path locations or don’t specify local_output_path at all. Otherwise files from first fit() will be overwritten by second fit().

  • cloud_output_path (Optional[str], default = None) –

    S3 location where intermediate artifacts and trained models are stored. Accepts:

    • s3://bucket — a unique timestamped subfolder ag-<timestamp> is appended, so each call gets its own folder and repeated runs don’t overwrite each other.

    • 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 by autogluon.cloud.bootstrap() / autogluon.cloud.register()) and append a timestamped subfolder. Raises if no bucket is configured.

  • backend (str, default = "sagemaker") – The backend to use. Valid options are: “sagemaker” and “ray_aws”. SageMaker backend supports training, deploying and batch inference on AWS SageMaker. Only single instance training is supported. RayAWS backend supports distributed training by creating an ephemeral ray cluster on AWS. Deployment and batch inferenc are not supported yet.

  • role (Optional[str], default = None) – ARN of the SageMaker execution role used to run training and inference jobs. If None, falls back to role_arn in ~/.autogluon/cloud.yaml (set by autogluon.cloud.bootstrap() / autogluon.cloud.register()), and finally to sagemaker.get_execution_role().

  • verbosity (int, default = 2) – Verbosity levels range from 0 to 4 and control how much information is printed. Higher levels correspond to more detailed print statements (you can set verbosity = 0 to suppress warnings). If using logging, you can alternatively control amount of information printed via logger.setLevel(L), where L ranges from 0 to 50 (Note: higher values of L correspond to fewer print statements, opposite of verbosity levels).

Methods

attach_endpoint

Attach the current CloudPredictor to an existing endpoint.

attach_job

Attach to a sagemaker training job.

cleanup_deployment

Delete the deployed endpoint and other artifacts

deploy

Deploy a predictor to an endpoint, which can be used to do real-time inference later.

detach_endpoint

Detach the current endpoint and return it.

download_trained_predictor

Download the trained predictor from the cloud.

fit

Fit the predictor with SageMaker.

fit_predict

Fit and predict in a single SageMaker training job.

get_batch_inference_job_info

Get general info of the batch inference job.

get_batch_inference_job_status

Get the status of the batch inference job.

get_fit_job_output_path

Get the output path in the cloud of the trained artifact

get_fit_job_status

Get the status of the training job.

get_fit_predict_results

Retrieve predictions produced by a completed fit_predict job.

info

Return general info about CloudPredictor

leaderboard

load

Load the CloudPredictor

predict

Predict using SageMaker batch transform.

predict_real_time

Predict with the deployed SageMaker endpoint.

save

Save the CloudPredictor so that user can later reload the predictor to gain access to deployed endpoint.

to_local_predictor

Convert the Cloud trained predictor to a local AutoGluon Predictor.

Attributes

backend_map

endpoint_name

Return the CloudPredictor deployed endpoint name

is_fit

Whether this CloudPredictor is fitted already

predictor_file_name

predictor_type

Type of the underneath AutoGluon Predictor