Skip to content

Model Schema

Schema#

[source]

Schema#

hsml.schema.Schema(object=None)

Create a schema for a model input or output.

Arguments

  • object Optional[Union[pandas.core.frame.DataFrame, pandas.core.series.Series, pyspark.sql.dataframe.DataFrame, hsfs.training_dataset.TrainingDataset, numpy.ndarray, list]]: The object to construct the schema from.

Returns

Schema. The schema object.


[source]

to_dict#

Schema.to_dict()

Get dict representation of the Schema.


ModelSchema#

[source]

ModelSchema#

hsml.model_schema.ModelSchema(input_schema=None, output_schema=None)

Create a schema for a model.

Arguments

  • input_schema Optional[hsml.schema.Schema]: Schema to describe the inputs.
  • output_schema Optional[hsml.schema.Schema]: Schema to describe the outputs.

Returns

ModelSchema. The model schema object.


[source]

to_dict#

ModelSchema.to_dict()

Get dict representation of the ModelSchema.