java.lang.NullPointerException during Apply Model

Hi, I'm getting java.lang.NullPointerException error when applying a Fast Large Margin model. Does anyone know how to fix this? Thanks!
ERROR MESSAGE
Apr 23 | 2025 1:45:47 PM SEVERE: Process failed: operator cannot be executed. Check the log messages... |
---|---|
Apr 23 | 2025 1:45:47 PM SEVERE: Here: |
Apr 23 | 2025 1:45:47 PM SEVERE: Process[1] (Process) |
Apr 23 | 2025 1:45:47 PM SEVERE: subprocess 'Main Process' |
Apr 23 | 2025 1:45:47 PM SEVERE: +- Retrieve HIDEMA1Scored_03.19.25_test[1] (Retrieve) |
Apr 23 | 2025 1:45:47 PM SEVERE: +- Select Attributes[1] (Select Attributes) |
Apr 23 | 2025 1:45:47 PM SEVERE: +- Set Role[1] (Set Role) |
Apr 23 | 2025 1:45:47 PM SEVERE: +- Multiply[1] (Multiply) |
Apr 23 | 2025 1:45:47 PM SEVERE: +- Retrieve HIDEMA1Scored_03.19.25_train[1] (Retrieve) |
Apr 23 | 2025 1:45:47 PM SEVERE: +- Select Attributes (3)[1] (Select Attributes) |
Apr 23 | 2025 1:45:47 PM SEVERE: +- Set Role (2)[1] (Set Role) |
Apr 23 | 2025 1:45:47 PM SEVERE: +- Retrieve fast large margin[1] (Retrieve) |
Apr 23 | 2025 1:45:47 PM SEVERE: ==> +- Apply Model[1] (Apply Model) |
Apr 23 | 2025 1:45:47 PM SEVERE: +- Performance[0] (Performance) |
Apr 23 | 2025 1:45:47 PM SEVERE: +- KernelSHAP[0] (Generate Interpretation) |
Apr 23 | 2025 1:45:47 PM SEVERE: java.lang.NullPointerException |
PROCESS XML
<?xml version="1.0" encoding="UTF-8"?><process version="10.4.003"> <context> <input/> <output/> <macros/> </context> <operator activated="true" class="process" compatibility="10.4.003" expanded="true" name="Process"> <parameter key="logverbosity" value="init"/> <parameter key="random_seed" value="2001"/> <parameter key="send_mail" value="never"/> <parameter key="notification_email" value=""/> <parameter key="process_duration_for_mail" value="30"/> <parameter key="encoding" value="SYSTEM"/> <process expanded="true"> <operator activated="true" class="retrieve" compatibility="10.4.003" expanded="true" height="68" name="Retrieve HIDEMA1Scored_03.19.25_test" width="90" x="112" y="85"> <parameter key="repository_entry" value="../data/HIDEMA1Scored_03.19.25_test"/> </operator> <operator activated="true" class="blending:select_attributes" compatibility="10.4.003" expanded="true" height="82" name="Select Attributes" width="90" x="313" y="34"> <parameter key="type" value="exclude attributes"/> <parameter key="attribute_filter_type" value="a subset"/> <parameter key="select_attribute" value=""/> <parameter key="select_subset" value="ID␞IsNotDrinking␞TDRKNM_lag_1␞TDRKNM_lag_1_missing"/> <parameter key="also_apply_to_special_attributes_(id,_label..)" value="false"/> </operator> <operator activated="true" class="blending:set_role" compatibility="10.4.003" expanded="true" height="82" name="Set Role" width="90" x="447" y="34"> <list key="set_roles"> <parameter key="IsDrinking" value="label"/> </list> </operator> <operator activated="true" class="multiply" compatibility="10.4.003" expanded="true" height="103" name="Multiply" width="90" x="648" y="136"/> <operator activated="true" class="retrieve" compatibility="10.4.003" expanded="true" height="68" name="Retrieve HIDEMA1Scored_03.19.25_train" width="90" x="112" y="238"> <parameter key="repository_entry" value="../data/HIDEMA1Scored_03.19.25_train"/> </operator> <operator activated="true" class="blending:select_attributes" compatibility="10.4.003" expanded="true" height="82" name="Select Attributes (3)" width="90" x="313" y="238"> <parameter key="type" value="exclude attributes"/> <parameter key="attribute_filter_type" value="a subset"/> <parameter key="select_attribute" value=""/> <parameter key="select_subset" value="ID␞IsNotDrinking␞TDRKNM_lag_1␞TDRKNM_lag_1_missing"/> <parameter key="also_apply_to_special_attributes_(id,_label..)" value="false"/> </operator> <operator activated="true" class="blending:set_role" compatibility="10.4.003" expanded="true" height="82" name="Set Role (2)" width="90" x="447" y="238"> <list key="set_roles"> <parameter key="IsDrinking" value="label"/> </list> </operator> <operator activated="true" class="retrieve" compatibility="10.4.003" expanded="true" height="68" name="Retrieve fast large margin" width="90" x="581" y="34"> <parameter key="repository_entry" value="../model/fast large margin"/> </operator> <operator activated="true" class="apply_model" compatibility="10.4.003" expanded="true" height="82" name="Apply Model" width="90" x="782" y="85"> <list key="application_parameters"/> </operator> <operator activated="true" class="performance" compatibility="10.4.003" expanded="true" height="82" name="Performance" width="90" x="916" y="34"> <parameter key="use_example_weights" value="true"/> </operator> <operator activated="true" class="interpretation:generate_interpretation" compatibility="0.8.000" expanded="true" height="124" name="KernelSHAP" width="90" x="916" y="136"> <parameter key="algorithm" value="KernelSHAP"/> <parameter key="sample_size" value="100"/> <parameter key="redraw_local_samples" value="true"/> <parameter key="explanation_algorithm" value="Correlation"/> <parameter key="locality" value="0.2"/> <parameter key="maximal_explaining_attributes" value="3"/> <parameter key="use_local_random_seed" value="true"/> <parameter key="local_random_seed" value="1992"/> </operator> <connect from_op="Retrieve HIDEMA1Scored_03.19.25_test" from_port="output" to_op="Select Attributes" to_port="example set input"/> <connect from_op="Select Attributes" from_port="example set output" to_op="Set Role" to_port="example set input"/> <connect from_op="Set Role" from_port="example set output" to_op="Multiply" to_port="input"/> <connect from_op="Multiply" from_port="output 1" to_op="Apply Model" to_port="unlabelled data"/> <connect from_op="Multiply" from_port="output 2" to_op="KernelSHAP" to_port="test"/> <connect from_op="Retrieve HIDEMA1Scored_03.19.25_train" from_port="output" to_op="Select Attributes (3)" to_port="example set input"/> <connect from_op="Select Attributes (3)" from_port="example set output" to_op="Set Role (2)" to_port="example set input"/> <connect from_op="Set Role (2)" from_port="example set output" to_op="KernelSHAP" to_port="training"/> <connect from_op="Retrieve fast large margin" from_port="output" to_op="Apply Model" to_port="model"/> <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/> <connect from_op="Apply Model" from_port="model" to_op="KernelSHAP" to_port="mod"/> <connect from_op="Performance" from_port="performance" to_port="result 1"/> <connect from_op="KernelSHAP" from_port="importance" to_port="result 2"/> <connect from_op="KernelSHAP" from_port="global weights" to_port="result 3"/> <portSpacing port="source_input 1" spacing="0"/> <portSpacing port="sink_result 1" spacing="0"/> <portSpacing port="sink_result 2" spacing="0"/> <portSpacing port="sink_result 3" spacing="0"/> <portSpacing port="sink_result 4" spacing="0"/> </process> </operator></process>
Answers
-
Hi @reyvababtista,
It looks like this error occurs in the Generate Interpretation. Would you be able to share the inputs to the process so I can replicate on my side?
Many thanks,
Roland
0 -
Hi @RolandJones,
Please see the attached files. I’ve included the Fast Large Margin and SVM models, as they both exhibit the same error in my pipeline. These models were saved from Auto Model’s production steps using the attached training set.
0 -
Hi @RolandJones,
Is there any update regarding this issue? Thank you so much for your time.
0 -
Hi @reyvababtista,
Apologies for the delay. I've had a look at it seems like there's a mismatch between the types for the testing, and the data the model was trained on. You can see this in the Log panel if you turn it on in the top left > View > Show Panel > Log. I've attached the warnings below. I'd recommend as a first step, create a workflow including both the training of the model, and the generating of the interpretations, to see if that removes the error. I will also speak to the developers.
Let me know how you get on. Best,
Roland
Example of one of the messages:
Apr 29, 2025 8:23:02 PM WARNING: Kernel Model: The value types between training and application differ for attribute 'TSIT1_lag_1', training: real, application: polynominal
0 -
Hi @RolandJones,
The warnings are there for other models I tried. However, other models are running fine on both training and testing sets, only Fast Large Margin and SVM that yield NullPointerException. Please let me know if you need anything else from me to help debug this problem. Thank you for looking into this.
Rey
0 -
Hi @RolandJones,
Are there any updates regarding this issue yet? Thank you!
Rey0