0 / 0

Payload logging for external machine learning engines

Last updated: Feb 10, 2022
Payload logging for external machine learning engines
Payload logging for external machine learning engines

If your AI model is deployed in a machine learning engine other than IBM Watson Machine Learning, you must enable payload logging for the external machine learning engine with a Python client.

See additional information in the Python client documentation, and in the sample Python Notebooks.

Before you begin

You need to have the training data of your model available in Db2 or IBM Cloud Object Storage to evaluate bias for your model. Explainability and accuracy are not supported for Python functions. For more information about training data, see. Why does model evaluation need access to training data?](wos-training-data-schema.html)

  • Import and initiate the ibm_watson_openscale client

      from ibm_watson_openscale import APIClient
    
      aios_credentials = {
        "instance_guid": "***",
        "url": "https://api.aiopenscale.cloud.ibm.com",
        "apikey": "***"
      }
    
      client = APIClient(service_credentials)
    

    Credentials can be found by following the steps that are shown in the "Creating credentials" topic.

  • Create a schema name in your PostgreSQL database

  • Set up a data mart

      client.data_mart.setup(db_credentials=postgres_credentials, schema=schemaName)
    
      client.data_mart.get_details()
    

Next steps

Parent topic: Configure Watson OpenScale