Pivotal Knowledge Base

Follow

Fail to generate prediction with decision tree model after upgrade MADlib to 1.12

Environment

  • Pivotal Greenplum (GPDB) 4.3.x
  • MADlib 1.12

Symptom

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"

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)

Additional Information

MADLIB-1161

 

Comments

Powered by Zendesk