From f11d4ad680071d9cb1bffbfe1d3ee17cbb225fbb Mon Sep 17 00:00:00 2001 From: Le-Zheng <30695225+Le-Zheng@users.noreply.github.com> Date: Tue, 19 May 2020 06:48:18 +0100 Subject: [PATCH] fix callBigDLFunc (#3002) --- python/dllib/src/bigdl/utils/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/dllib/src/bigdl/utils/common.py b/python/dllib/src/bigdl/utils/common.py index e57621b9a46..6bb1fb6d873 100644 --- a/python/dllib/src/bigdl/utils/common.py +++ b/python/dllib/src/bigdl/utils/common.py @@ -581,6 +581,7 @@ def _get_gateway(): def callBigDlFunc(bigdl_type, name, *args): """ Call API in PythonBigDL """ gateway = _get_gateway() + args = [_py2java(gateway, a) for a in args] error = Exception("Cannot find function: %s" % name) for jinvoker in JavaCreator.instance(bigdl_type, gateway).value: # hasattr(jinvoker, name) always return true here, @@ -635,7 +636,6 @@ def _java2py(gateway, r, encoding="bytes"): def callJavaFunc(func, *args): """ Call Java Function """ gateway = _get_gateway() - args = [_py2java(gateway, a) for a in args] result = func(*args) return _java2py(gateway, result)