hsml.triton.signature #
create_model #
create_model(
name: str,
version: int | None = None,
metrics: dict | None = None,
description: str | None = None,
input_example: pandas.DataFrame
| pandas.Series
| numpy.ndarray
| list
| None = None,
model_schema: ModelSchema | None = None,
feature_view: FeatureView | None = None,
training_dataset_version: int | None = None,
tags: tag.Tag
| dict[str, Any]
| list[tag.Tag | dict[str, Any]]
| None = None,
) -> Model
Create a Triton Inference Server model metadata object.
The directory passed to save() is one Triton model: its config.pbtxt, at least one numeric version folder such as 1/, and any files the backend needs, for example a conda-pack archive referenced by EXECUTION_ENV_PATH. Leave name out of config.pbtxt, because Triton serves the model under the deployment name and fails to load a model whose configured name differs. Triton serves the version folders its version_policy selects, by default the highest one, independently of the model registry version.
Lazy
This method is lazy and does not persist any metadata or upload model artifacts in the model registry on its own. To save the model object and the model artifacts, call the save() method with a local path to the directory containing the model artifacts.
| PARAMETER | DESCRIPTION |
|---|---|
name | Name of the model to create. TYPE: |
version | Version of the model to create. When it is TYPE: |
metrics | Model evaluation metrics, for example accuracy or MAE. TYPE: |
description | Description of the model. TYPE: |
input_example | An input example that represents a single input for the model. TYPE: |
model_schema | A model schema for the model inputs and outputs. TYPE: |
feature_view | The feature view the model was trained from, as returned by the feature store. Without it, the model has no provenance. TYPE: |
training_dataset_version | The training dataset version the model was trained on. When it is TYPE: |
tags | Optionally the tags to attach to the model when it is saved, in the same shapes accepted by feature groups. A single TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
Model | The model metadata object. |