TabularFoundationModel¶
- class autogluon.cloud.TabularFoundationModel(model_id: str, **kwargs)[source]¶
Foundation model for tabular prediction on Amazon SageMaker.
Wraps pretrained tabular models like Mitra, with no training required. Each
model_idtargets a single task, either classification (*-classifier) or regression (*-regressor). Uselist_models()to get the supportedmodel_idvalues.Predictions can be produced in a one-off SageMaker job with
predict()/predict_proba(), or through a real-time endpoint created withdeploy(). In both modes, labeledtrain_dataprovides the in-context examples for each prediction.- Parameters:
model_id (str) – ID of the foundation model, e.g.
"chronos-2"or"mitra-classifier". Uselist_models()to get the supported IDs.cloud_output_path (str | None, default = None) –
S3 location where intermediate artifacts are stored. Accepts:
s3://bucket— a unique timestamped subfolderag-<timestamp>is appended.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.
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.hyperparameters (dict[str, Any] | None, default = None) – Model hyperparameters. Hyperparameters passed to
predict()ordeploy()take precedence.model_artifact_uri (str | None, default = None) – S3 URI of a
model.tar.gzcreated bycache_model_artifact(). If set,deploy()loads the weights from this artifact instead of downloading them from Hugging Face.backend (Literal["sagemaker"], default = "sagemaker") – Cloud backend to use.
Methods
Bundle the model weights from Hugging Face and the serve script into a
model.tar.gzon S3.Deploy the model to a real-time endpoint.
Create a model from the output of
to_dict().Create a model from the output of
to_json().List the supported
model_idvalues.Predict
test_datain a one-off SageMaker job, using the labeledtrain_dataas in-context examples.Predict class probabilities for
test_datain a one-off SageMaker job, using the labeledtrain_dataas in-context examples.Serialize
model_id,hyperparameters, andmodel_artifact_urito a dict.Serialize
model_id,hyperparameters, andmodel_artifact_urito a JSON string.