Skip to content

Model Schema#

Model schemas can be accessed from the model metadata objects.

model.model_schema

The schemas of the Model inputs and outputs can be accessed from the ModelSchema metadata objects.

model_schema.input_schema
model_schema.output_schema

Schema #

Create a schema for a model input or output.

PARAMETER DESCRIPTION
object

The object to construct the schema from.

TYPE: pandas.DataFrame | pandas.Series | TypeVar('pyspark.sql.dataframe.DataFrame') | TypeVar('hsfs.training_dataset.TrainingDataset') | numpy.ndarray | list | None DEFAULT: None

RETURNS DESCRIPTION

Schema. The schema object.

to_dict #

to_dict()

Get dict representation of the Schema.

ModelSchema #

Create a schema for a model.

PARAMETER DESCRIPTION
input_schema

Schema to describe the inputs.

TYPE: Schema | None DEFAULT: None

output_schema

Schema to describe the outputs.

TYPE: Schema | None DEFAULT: None

RETURNS DESCRIPTION

ModelSchema. The model schema object.

to_dict #

to_dict()

Get dict representation of the ModelSchema.