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 runsfit,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 folderAutogluonCloudPredictor/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 subfolderag-<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 byautogluon.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 torole_arnin~/.autogluon/cloud.yaml(set byautogluon.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 to an existing SageMaker training job, e.g. after the local process that launched it crashed.
Deploy a predictor to a real-time inference endpoint.
Download and extract the trained predictor.
Fit the predictor in a SageMaker training job.
Fit and predict in a single SageMaker training job.
Fit and predict probabilities in a single SageMaker training job.
Get info about a batch inference job launched by this predictor.
Get the status of a batch inference job, e.g. after calling
predict(wait=False).Get the S3 path of the trained predictor artifact (
model.tar.gz).Get the status of the training job, e.g. after calling
fit(wait=False).Retrieve the predictions and probabilities of a completed
fit_predict()orfit_predict_proba()job.Retrieve the predictions of a completed
fit_predict()orfit_predict_proba()job.Return a summary of the predictor: output paths, the training job, batch inference jobs, and the endpoint.
Return the leaderboard of models trained by the completed
fit()job.Load a predictor saved with
save().Predict with a SageMaker batch transform job.
Predict class probabilities with a SageMaker batch transform job.
Save the predictor to
local_output_path, so it can be restored later withload().Download the trained predictor and load it as a local AutoGluon predictor.
Attributes
backend_mapendpoint_nameName of the most recent endpoint deployed by this predictor, or
None.is_fitWhether the training job has completed successfully.
predictor_file_namepredictor_typeType of the underlying AutoGluon predictor.