Skip to content

inference

Public API for wherobots.inference.

read_model_metadata(model_meta_uri)

Reads and parses a model metadata JSON file from S3.

Parameters:

Name Type Description Default
model_meta_uri str

The S3 URI for the model metadata JSON file.

required

Returns:

Name Type Description
MLModel MLModel

The parsed model metadata.

read_raster_table(tif_folder_path, sedona, num_partitions=None, limit=None)

Reads TIFF files from a folder and returns a DataFrame with raster paths.

If partitions are not specified, they are set to 4x the executors.

Parameters:

Name Type Description Default
tif_folder_path str

Path to the folder containing TIFF files.

required
sedona SedonaContext

The current Sedona context.

required
num_partitions int

Number of partitions to use. Defaults to None.

None
limit int

Limit the number of rows read. Defaults to None.

None

Returns:

Name Type Description
DataFrame DataFrame

A DataFrame with paths and corresponding raster data.