Search code examples
ibm-watsonwatson-openscale

Fairness Configuration schema for request payload


While setting the fairness configuration, we are only being asked about the label column in training data and not in the payload data. So, wanted to understand that when UI calls /v1/fairness_monitoring POST API what is the value that is being set as class_label in the request payload. Is it hard-coded to prediction or something else is being done?


Solution

  • WML has a concept of output schema which defines the schema of the output of WML scoring end point and the role for the different columns. The roles are used to identify which column contains the prediction value, which column contains the prediction probability, and the class label value, etc. The output schema is automatically set for models created using model builder. It can also be set using the WML python client. WML also sets the output schema when data is sent for scoring.

    When the output schema identifies the column which contains the prediction, the UI does not ask for this information. The name of the column is hence not hardcoded but can be anything that is defined in the output schema. If output schema does not identify the prediction column, then the UI will show a screen allowing the user to select the prediction column.

    The documentation for the WML python client is available at: http://wml-api-pyclient-dev.mybluemix.net/#repository. Search for “OUTPUT_DATA_SCHEMA” to understand the output schema and the API to use is to store_model API which accepts the OUTPUT_DATA_SCHEMA as a parameter.