Fail to Generate Prediction with Decision Tree Model after Upgrading MADlib to 1.12
search cancel

Fail to Generate Prediction with Decision Tree Model after Upgrading MADlib to 1.12

book

Article ID: 295307

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Symptoms:

After MADlib package is upgraded to version 1.12, it's getting errors when attempting to generate predictions with decision tree models that are trained prior to the upgrade.

Error Message:

ERROR: KeyError: 'null_proxy' (plpython.c:4656) 
CONTEXT: Traceback (most recent call last): 
PL/Python function "tree_predict", line 19, in <module> return decision_tree.tree_predict(**globals()) PL/Python function "tree_predict", 
line 1759, in tree_predict PL/Python function "tree_predict" ********** Error ********** ERROR: KeyError: 'null_proxy' (plpython.c:4656) SQL state: XX000 Context: Traceback (most recent call last): PL/Python function "tree_predict", 
line 19, in <module> return decision_tree.tree_predict(**globals()) PL/Python function "tree_predict", line 1759, in tree_predict PL/Python function "tree_predict"

Environment


Cause

The error is because the summary table in 1.12 contains a new entry called "null_proxy", which is expected in the predict function. However, the tables that are generated in older versions don't have such entry. 

 

Resolution

The issue has been identified as a defect and will be fixed in next release (v1.13). 

Before the fix is ready to apply, either of following options could be used as a workaround.

1. Add a column called "null_proxy" with "NULL" value in the summary table
2. Retrain the models which are trained on older versions (prior to 1.12)