Predictive intelligence question - just starting out

MS12
Kilo Sage

Hi, 

This might be a basic question since I'm still learning Predictive Intelligence solution.

 

I have created a classification definition on a case based on short description and description. Ran the training. It came up with results which I tested and verified. 

Copied and created new business rules to trigger it for case record.

Now when I create new case record, the priority is getting set as I expected.

 

But I get these two errors at the top of the screen after it is saved.

 

applyPredictionForSolution(gr, solution) is only applicable for classification solution
Error MessageIllegal access to getter method getMessage in class java.lang.NullPointerException

 

I debugged and found that the script include MLPredictor, line 70 compares the capability of the solution definition with a string 'classification_trainer', My solution definition has capability = 'workflow classification' and request source = API.

So I updated it to 'Classification' but the moment I ran the training it switches to 'Workflow Classification'. 

Why doesn't it let me save the capability as 'Classification' when the solution definition is for classification.

MLPredictor _ Script Include .png

Classification Definitions 2.png

  

 

1 ACCEPTED SOLUTION

MS12
Kilo Sage

1. I found this article that took me a little farther

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0779273

 

2. I also had to set the system property for glide.platform_ml.api.enable_workflow_classification to false. If you set it to false,  uses the old java trainer instead of the new python trainer. Python trainer is ideal since it performs better.

 

3. User record - sharedservice.worker should be active and have admin role to train the solution definition.

 

A combination of all 3 changes helped me get rid of the error message I received.

View solution in original post

3 REPLIES 3

MS12
Kilo Sage

1. I found this article that took me a little farther

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0779273

 

2. I also had to set the system property for glide.platform_ml.api.enable_workflow_classification to false. If you set it to false,  uses the old java trainer instead of the new python trainer. Python trainer is ideal since it performs better.

 

3. User record - sharedservice.worker should be active and have admin role to train the solution definition.

 

A combination of all 3 changes helped me get rid of the error message I received.

Tried doing 2 and 3 and it did not help. Could you mention what is written in 1? My account does not allow me to read it

@Anton Perepelit , Here you go (I'm just copy pasting):

 

Issue

In Predictive Intelligence, after training a solution definition successfully, getting an error "applyPredictionForSolution(gr, solution) is only applicable for classification solution" whenever a record is created on the trained table.

Resolution

Users will have to create a copy of the business rule "Incident Based Prediction (Template)", as per the documentation below, if, they are using a "Classification Solution" in "Predictive Intelligence" for the incident table.

https://docs.servicenow.com/csh?topicname=c_MLPredictorAPI.html&version=latest#r_MLPredictor-applyPr...

In case there are any other solutions to be added, they would have updated in the solution names in the business rule.

Also, users would have to deactivate the business rule "Default Task Based Prediction" since they already have the business rule "Incident Based Prediction (Template)Copy".