You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by nk...@apache.org on 2021/02/18 19:37:50 UTC

[madlib] 02/02: DL: Fix exception handling bug in fit multiple

This is an automated email from the ASF dual-hosted git repository.

nkak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/madlib.git

commit e497a614532442321e1507d541911d1f70ccb222
Author: Nikhil Kak <nk...@pivotal.io>
AuthorDate: Wed Feb 17 15:47:07 2021 -0800

    DL: Fix exception handling bug in fit multiple
    
    JIRA: MADLIB-1467
    
    When catching an exception in fit multiple, we were splitting by the wrong
    keyword. This commit fixes the bug and also removes '_' from the keyword name.
    
    Co-authored-by: Ekta Khanna<ek...@vmware.com>
---
 .../modules/deep_learning/madlib_keras_fit_multiple_model.py_in       | 4 ++--
 .../modules/deep_learning/madlib_keras_fit_multiple_model.sql_in      | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/ports/postgres/modules/deep_learning/madlib_keras_fit_multiple_model.py_in b/src/ports/postgres/modules/deep_learning/madlib_keras_fit_multiple_model.py_in
index aa7a2bc..2db346e 100644
--- a/src/ports/postgres/modules/deep_learning/madlib_keras_fit_multiple_model.py_in
+++ b/src/ports/postgres/modules/deep_learning/madlib_keras_fit_multiple_model.py_in
@@ -953,9 +953,9 @@ class FitMultipleModel(object):
             plpy_execute(self.udf_plan, [ self.is_final_training_call ] )
         except plpy.SPIError as e:
             msg = e.message
-            if not 'UDF_Detail' in msg:
+            if not 'UDFDetail' in msg:
                 raise e
-            e.message, detail = msg.split('UDF_Detail')
+            e.message, detail = msg.split('UDFDetail')
             # Extract Traceback from segment, add to
             #  DETAIL of error message on coordinator
             e.args = (e.message,)
diff --git a/src/ports/postgres/modules/deep_learning/madlib_keras_fit_multiple_model.sql_in b/src/ports/postgres/modules/deep_learning/madlib_keras_fit_multiple_model.sql_in
index 84e4426..6d10da4 100644
--- a/src/ports/postgres/modules/deep_learning/madlib_keras_fit_multiple_model.sql_in
+++ b/src/ports/postgres/modules/deep_learning/madlib_keras_fit_multiple_model.sql_in
@@ -1539,7 +1539,7 @@ PythonFunctionBodyOnlyNoSchema(`deep_learning', `madlib_keras')
     except Exception as e:
         etype, _, tb = exc_info()
         detail = ''.join(traceback.format_exception(etype, e, tb))
-        message = e.message + '\nTransAggDetail:\n' + detail
+        message = e.message + 'UDFDetail' + detail
         e.args = (message,)
         raise e
 $$ LANGUAGE plpythonu