predict

TabularEndpoint.predict(data: str | Path | DataFrame, train_data: str | Path | DataFrame | None = None, label: str | None = None, **inference_kwargs: Any) → Series[source]

Predict data with the deployed endpoint.

This is intended for low-latency inference. For inputs above the payload limit, use autogluon.cloud.TabularCloudPredictor.predict() or autogluon.cloud.TabularFoundationModel.predict() instead.

Parameters:
  • data (str | pathlib.Path | pd.DataFrame) – Rows to predict, as a pd.DataFrame or local/S3 path to a data file.

  • train_data (str | pathlib.Path | pd.DataFrame | None, default = None) – Labeled examples the foundation model is fit on. Required for foundation model endpoints; must be None for trained predictor endpoints.

  • label (str | None, default = None) – Name of the label column in train_data. Required if and only if train_data is passed.

  • **inference_kwargs (Any) – Additional args passed to the predict call of the AutoGluon predictor on the endpoint. For trained predictor endpoints with an image feature, pass image_column to name the column of data with absolute paths to local images; the images are encoded and sent with the request.

Returns:

pd.Series – Predictions for data.

SageMaker API

  • InvokeEndpoint: sends the data to the endpoint and returns the predictions. The payload is limited to 6 MB (4 MB for serverless endpoints).