TabularCloudPredictor

class autogluon.cloud.TabularCloudPredictor(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 tabular models (classification and regression) on Amazon SageMaker.

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

Parameters:
  • local_output_path (str | None, default = None) – Local directory for the saved predictor, downloaded artifacts, and intermediate files. If None, a timestamped folder AutogluonCloudPredictor/ag-<timestamp> is created in the working directory. Reusing the same path for two predictors overwrites the files of the first one.

  • cloud_output_path (str | None, 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") – Cloud backend to use. Currently only "sagemaker" is supported.

  • role (str | None, 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 the role of the current AWS identity.

  • verbosity (int, default = 2) – Logging verbosity from 0 (errors only) to 4 (debug).

Methods

attach_job

Attach to an existing SageMaker training job, e.g. after the local process that launched it crashed.

deploy

Deploy a predictor to a real-time inference endpoint.

download_trained_predictor

Download and extract the trained predictor.

fit

Fit the predictor in a SageMaker training job.

fit_predict

Fit and predict in a single SageMaker training job.

fit_predict_proba

Fit and predict probabilities in a single SageMaker training job.

get_batch_inference_job_info

Get info about a batch inference job launched by this predictor.

get_batch_inference_job_status

Get the status of a batch inference job, e.g. after calling predict(wait=False).

get_fit_job_output_path

Get the S3 path of the trained predictor artifact (model.tar.gz).

get_fit_job_status

Get the status of the training job, e.g. after calling fit(wait=False).

get_fit_predict_proba_results

Retrieve the predictions and probabilities of a completed fit_predict() or fit_predict_proba() job.

get_fit_predict_results

Retrieve the predictions of a completed fit_predict() or fit_predict_proba() job.

info

Return a summary of the predictor: output paths, the training job, batch inference jobs, and the endpoint.

leaderboard

Return the leaderboard of models trained by the completed fit() job.

load

Load a predictor saved with save().

predict

Predict with a SageMaker batch transform job.

predict_proba

Predict class probabilities with a SageMaker batch transform job.

save

Save the predictor to local_output_path, so it can be restored later with load().

to_local_predictor

Download the trained predictor and load it as a local AutoGluon predictor.

Attributes

backend_map

endpoint_name

Name of the most recent endpoint deployed by this predictor, or None.

is_fit

Whether the training job has completed successfully.

predictor_file_name

predictor_type

Type of the underlying AutoGluon predictor.