client.get_predictions

Runs a model on a pandas DataFrame and returns the predictions.

Input ParameterTypeDefaultDescription
project_idstrNoneA unique identifier for the project.
model_idstrNoneA unique identifier for the model.
input_dfpd.DataFrameNoneA pandas DataFrame containing model input vectors as rows.
chunk_sizeOptional[int]10000The chunk size for fetching predictions. Default is 10_000 rows chunk.
import pandas as pd

PROJECT_ID = 'example_project'
MODEL_ID = 'example_model'

input_df = pd.read_csv('example_data.csv')

# Example without chunk size specified:
predictions = client.get_predictions(
    project_id=PROJECT_ID,
    model_id=MODEL_ID,
    input_df=input_df,
)


# Example with chunk size specified:
predictions = client.get_predictions(
    project_id=PROJECT_ID,
    model_id=MODEL_ID,
    input_df=input_df,
    chunk_size=1000,
)
Return TypeDescription
pd.DataFrameA pandas DataFrame containing model predictions for the given input vectors.