Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

Table of Contents
maxLevel
maxLevel3
minLevel1

Background

...

Overview

As mentioned in prior articles, ModelOp Center uses externalized schemas to ensure that all data ingress to the model adheres to what the model expects and so that all model output adheres to what the consuming application/process expects.

Avro Schemas

ModelOp Center utilizes the Avro specification for schema checking. It can be found here: https://avro.apache.org/docs/current/spec.html

...

The Avro specification does not allow for checking the bounds of numerical fields. As such, If if a value is out-of-bounds, it is recommended to put a check in the model source code which changes the type of that field. For instance, if a model is supposed to output a probability, then in the (Python) source code one could include the line

...

  1. Navigate to the corresponding storedModel in the MOC UI (under Models).

  2. Click on Schemas.

  3. Click on Generate Extended Schema. You should see the following window pop-up:

  4. Enter the data you want to use to infer a schema in the top box. The data must be formatted as one-line dictionaries, as in the sample data above.

  5. Click on Generate Schema.

  6. The schema can then be downloaded or saved as Input/Output Schema.

    1. The recommended best practice is to download the generated schema, and then add it as an asset to the business model being monitored in the model’s git repository. Once the schema is properly versioned along with the source code (e.g. in a Github repo), one doesn’t have to regenerate the schema anymore. Note that MOC will not push the generated schema to the model repo; it is up to the user to do so.

    2. Note: If generating the extended schema for monitoring purposes, you should save it as an input schema; the OOTB monitors will look for an extended input schema to set the monitoring parameters.

...