Troubleshooting Intelligent Task Prioritization

If you see an error when you enable Intelligent Task Prioritization or if the task list is not sorted, do the following steps to resolve the error.

On Kubernetes, Intelligent Task Prioritization is served as a single Docker container inside a pod. A Kubernetes service does load-balancing across a set of pods. The number of pods and autoscaling configuration can be specified in the custom resource definition. For more information, see Configuring Intelligent Task Prioritization.

Checking pod status and pod logs

If you see an error when you enable Intelligent Task Prioritization or if the task list is not sorted, do the following steps to determine the root cause.
  1. Check the status of the intelligent_task_prioritization pod.
    1. List all the pods in the targeted namespace and find the name of the intelligent_task_prioritization pod.
      oc get pods -n <NAMESPACE>
    2. Check the state of the intelligent_task_prioritization pod and make sure it's running.
      oc get pod <POD_NAME>
    If the pod is not running, delete the pod and let Kubernetes re-create it. If the pod is running, check the pod logs to determine the cause of the failure.
  2. Access the pod logs by running the following command:
    oc logs -f <POD_NAME>
    If you have more than one intelligent_task_prioritization pod, the request from Business Automation Workflow might be routed to any of the pod replicas. You might need to check more than one pod to find the error.
The following table lists common errors and how to resolve them.
Table 1. Common errors
Debug trace Error code Description Resolution
BAW_TASK_ALIAS specified not valid 202 No tasks are created in Business Automation Workflow. Generate a few tasks in Process Portal or Workplace.
InsufficientTrainingData: only 0 training data from bai left after filtering data 202 Insufficient tasks in Business Automation Workflow to trigger model training. Complete more tasks instances until you reach the threshold that is described in the training data requirement.

Running Intelligent Task Prioritization model training

If you get an error while running the Intelligent Task Prioritization model training, it might be because there are not enough instances in IBM® Business Automation Insights. Make sure that you have at least 30 completed tasks per user, for each type of task. You might have encountered the following errors:
The data retrieved from BAI server has size 0. Please make sure you have enough data from BAI
nextbesttask.custom_errors.InsufficientTrainingData: InsufficientTrainingData: the data retrieved from BAI server has size 0. Please make sure you have enough data from BAI 2023-11-03 14:09:24,012 - nbt - INFO - init - Please retrain the model later by accessing /nbt/train when there is sufficient data. Or wait for the regular training session which will happen automatically periodically
By default, model training is automatically started every Sunday at 3:00 AM UTC and also when the Machine Learning Server is restarted. To manually retrain your data models, complete the following procedure:
  1. Get the credential information from the secret with the suffix ibm-mls-itp-admin-secret.
  2. Get the Intelligent Task Prioritization server certificate file location from the Intelligent Task Prioritization pod. The Intelligent Task Prioritization server pod name has the prefix <custom_resource_name>-mls-itp. For example, the JSON path might look similar to:
    spec:
      containers:
        volumeMounts:
          ... ...
          - name: certificate-file
             mountPath: /nextbesttask/nextbesttask/certs/local-server.crt
             subPath: local-server.crt
          ... ...
  3. Get the Intelligent Task Prioritization server service name, which is in the format <custom_resource_name>-mls-itp-service. Make sure that it shows up in the list of created services.
  4. Go to your Intelligent Task Prioritization container in your OpenShift® Container Platform console, or by using the oc or kubectl command.
  5. Using the information retrieved in the previous steps, complete your model training by running the following command:
    curl https://<Intelligent_Task_Prioritization_service_name>:8000/train?dataset=bai -u <admin_username>:<admin_password> --cacert <server_certificate_filepath>
    For example, the resulting command might look similar to:
    curl https://cpfc-pg-wfs-fvt-bai-2302-mls-itp-service.auto-6vlw1.svc.cluster.local:8000/train?dataset=bai -u ITP-kcAMgSjz:password --cacert /nextbesttask/nextbesttask/certs/local-server.crt

Troubleshooting Business Automation Workflow

To enable logging for Business Automation Workflow, follow the instructions in Enabling tracing for BPM event emitter and Machine Learning Server.

Troubleshooting Business Automation Insights

Intelligent Task Prioritization relies on Business Automation Insights for data, so some problems can be solved by troubleshooting Business Automation Insights. See Troubleshooting.