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:48 UTC
[madlib] branch master updated (fa0f42d -> e497a61)
This is an automated email from the ASF dual-hosted git repository.
nkak pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/madlib.git.
from fa0f42d boost: Smarter logic for Boost detection & download
new 80842c9 DL: Replace e.args[0] with e.message
new e497a61 DL: Fix exception handling bug in fit multiple
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/ports/postgres/modules/deep_learning/madlib_keras.sql_in | 8 ++++----
.../modules/deep_learning/madlib_keras_fit_multiple_model.py_in | 4 ++--
.../modules/deep_learning/madlib_keras_fit_multiple_model.sql_in | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
[madlib] 02/02: DL: Fix exception handling bug in fit multiple
Posted by nk...@apache.org.
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
[madlib] 01/02: DL: Replace e.args[0] with e.message
Posted by nk...@apache.org.
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 80842c99155e453d4377aa867e9b56763acbd8ca
Author: Ekta Khanna <ek...@vmware.com>
AuthorDate: Wed Feb 17 13:31:56 2021 -0800
DL: Replace e.args[0] with e.message
JIRA: MADLIB-1467
Previously we were relying on e.args[0] in our except block but some of the
exceptions raised by tensorflow like `InvalidArgumentError` do not have e.args
as empty. This is not usual but there is no guarantee of args being populated
so we should instead rely on e.message(typically e.args[0] is the same as
e.message)
Co-authored-by: Ekta Khanna<ek...@vmware.com>
---
src/ports/postgres/modules/deep_learning/madlib_keras.sql_in | 8 ++++----
.../modules/deep_learning/madlib_keras_fit_multiple_model.sql_in | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/ports/postgres/modules/deep_learning/madlib_keras.sql_in b/src/ports/postgres/modules/deep_learning/madlib_keras.sql_in
index da61e8e..2620706 100644
--- a/src/ports/postgres/modules/deep_learning/madlib_keras.sql_in
+++ b/src/ports/postgres/modules/deep_learning/madlib_keras.sql_in
@@ -1691,7 +1691,7 @@ PythonFunctionBodyOnlyNoSchema(`deep_learning', `madlib_keras')
except Exception as e:
etype, _, tb = exc_info()
detail = ''.join(traceback.format_exception(etype, e, tb))
- message = e.args[0] + 'TransAggDetail' + detail
+ message = e.message + 'TransAggDetail' + detail
e.args = (message,)
raise e
$$ LANGUAGE plpythonu
@@ -1733,7 +1733,7 @@ PythonFunctionBodyOnlyNoSchema(`deep_learning', `madlib_keras')
except Exception as e:
etype, _, tb = exc_info()
detail = ''.join(traceback.format_exception(etype, e, tb))
- message = e.args[0] + 'TransAggDetail' + detail
+ message = e.message + 'TransAggDetail' + detail
e.args = (message,)
raise e
$$ LANGUAGE plpythonu
@@ -1753,7 +1753,7 @@ PythonFunctionBodyOnlyNoSchema(`deep_learning', `madlib_keras')
except Exception as e:
etype, _, tb = exc_info()
detail = ''.join(traceback.format_exception(etype, e, tb))
- message = e.args[0] + 'MergeAggDetail' + detail
+ message = e.message + 'MergeAggDetail' + detail
e.args = (message,)
raise e
$$ LANGUAGE plpythonu
@@ -1771,7 +1771,7 @@ PythonFunctionBodyOnlyNoSchema(`deep_learning', `madlib_keras')
except Exception as e:
etype, _, tb = exc_info()
detail = ''.join(traceback.format_exception(etype, e, tb))
- message = e.args[0] + 'FinalAggDetail' + detail
+ message = e.message + 'FinalAggDetail' + detail
e.args = (message,)
raise e
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 42fd7d9..84e4426 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.args[0] + '\nTransAggDetail:\n' + detail
+ message = e.message + '\nTransAggDetail:\n' + detail
e.args = (message,)
raise e
$$ LANGUAGE plpythonu