cols = [
    "fare_amount",
    "trip_distance",
    "pickup_zip",
    "dropoff_zip",
    "tpep_pickup_datetime",
    "tpep_dropoff_datetime",
]
new_taxi_data = raw_data.select(cols)
display(new_taxi_data)

Score Batch API

When you score a model trained with features from time series feature tables, the appropriate features are retrieved using point-in-time lookups with metadata packaged with the model during training. The DataFrame you provide to FeatureEngineeringClient.score_batch must contain a timestamp column with the same name and DataType as the timestamp_lookup_key of the FeatureLookup provided to FeatureEngineeringClient.create_training_set.

# Get the model URI
latest_model_version = get_latest_model_version(
    "ml.taxi_example.taxi_example_fare_time_series_packaged"
)
model_uri = f"models:/ml.taxi_example.taxi_example_fare_time_series_packaged/{latest_model_version}"

# Call score_batch to get the predictions from the model
with_predictions = fe.score_batch(model_uri=model_uri, df=new_taxi_data)