Skip to content

4. Setup configuration file

Nilav edited this page Sep 9, 2021 · 1 revision

Sample Model configuration files

Parameter definitions

  • dependency: Path where model file, preprocess, postprocess and custom_metrics may be found in the container.

    • path: '/app/model_dependencies'
  • model: Model Parameters

    • model_type: Type of model - Options : ['sklearn', 'onnx']
    • model_path: Names of the model file Eg : ['horse_zebra_1.onnx', 'horse_zebra_2.onnx', 'horse_zebra_3.onnx']
    • ab_split: A/B Testing load split : Eg. [80, 10, 10] (Default is 100 if a single model is mentioned in model path)
    • model_file_type: Type of file extension Options : ['sklearn', 'onnx']
    • version: '1.0.0'
    • model_name: 'Give a name to your liking'
    • endpoint: Name of the API endpoint Eg. : 'predict'
    • protected: Allow Authentication - Options : [0: No authenticated, 1: Authenticated]
    • input_type: Data input type to API - Options : ['structured', 'serialized']
    • input_shape: Shape of the data - Eg. [224, 224, 3] , Only applicable if input_type : 'serialized'
    • server:
      • name: Name of the server - Eg. 'autodeploy'
      • port: API Port - Eg. 8000
  • input_schema: Change based on if input_type is serialized or structured. Eg. below is for serialized, for structured refer example

    • input: 'string' - 'string' if the input is a serialized array (for image/text/audio inputs)
  • out_schema: Output schema for the api (To be adhered to in postprocess.py)

    • out: 'int'
    • probablity: 'float'
    • status: 'int'
  • preprocess : The custom data preprocessing function to call in preprocess.py Eg. 'preprocess_1'

  • postprocess : The custom data postprocessing function to call in postprocess.py Eg. 'postprocess_1'

  • monitor: Monitoring configuration parameters

    • server:

      • name: 'rabbitmq' - Name of the rabbitmq server (Change to 'localhost' when running outside of docker)
      • port: 5672
    • data_drift: Enable Data drift testing using predefined algorithms in alibi-detect

      • name: 'KSDrift'
      • reference_data: 'structured_ref.npy'
      • type: 'info'
    • custom_metrics: Name of the custom metric function defined in custom_metrics.py Eg. 'custom_metric_1'

      • metrics:
        • average_per_day:
        • type: 'info'