Payload logging for non-IBM Watson Machine Learning service instances

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 Watson OpenScale 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 monitor bias for your model. Explainability and accuracy are not supported for Python functions. For more information about training data, see. Why does Watson OpenScale need access to training data?](wos-training-data-schema.html)

  • Import and initiate Watson OpenScale

      from ibm_watson_openscale import APIClient
      aios_credentials = {
        "instance_guid": "***",
        "url": "",
        "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)

Next steps