Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
khorshuheng committed Mar 1, 2024
1 parent 0703f5e commit 643f71e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/user/templates/11_model_observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Currently the only supported model for model observability is PyFunc model, the
Beside changes in signature, you can see some of those methods returning new type, `ModelInput` and `ModelOutput`. `ModelInput` is a class that represents input information of the models, this class contains following fields:
| Field | Type | Description|
|-------|------|------------|
| `prediction_ids` | List[str] | Unique identifier for each prediction |
| `prediction_ids` | List[str] | Unique identifier for each row in prediction |
| `features` | Union[Values, pandas.DataFrame] | Features value that is used by the model to generate prediction. Length of features should be the same with `prediction_ids` |
| `entities` | Optional[Union[Values, pandas.DataFrame]] | Additional data that are not used for prediction, but this data is used to retrieved another features, e.g `driver_id`, we can retrieve features associated with certain `driver_id`|
| `session_id` | str | Identifier for the request. This value will be used together with `prediction_ids` as prediction identifier in model observability system |
Expand All @@ -40,7 +40,7 @@ Beside changes in signature, you can see some of those methods returning new typ
| Field | Type | Description |
|-------|------|-------------|
| `prediction` | Values | `predictions` contains prediction output from ml_predict, it may contains multiple columns e.g for multiclass classification or for binary classification that contains prediction score and label |
| `prediction_ids` | List[str] | Unique identifier for each prediction output |
| `prediction_ids` | List[str] | Unique identifier for each row in prediction output |

Same like `ModelInput`, `ModelOutput` is also essential for model observability, it can be used to calculate prediction drift but more importantly it can calculate performance metrics.

Expand Down Expand Up @@ -83,7 +83,8 @@ model_schema = ModelSchema(spec=InferenceSchema(
"featureC": ValueType.STRING,
"featureD": ValueType.BOOLEAN
},
prediction_id_column="prediction_id",
session_id_column="session_id",
row_id_column="prediction_id",
model_prediction_output=RankingOutput(
rank_score_column="score",
prediction_group_id_column="session_id",
Expand Down

0 comments on commit 643f71e

Please sign in to comment.