Skip to content

Commit

Permalink
fix callBigDLFunc (intel-analytics#3002)
Browse files Browse the repository at this point in the history
  • Loading branch information
Le-Zheng committed May 19, 2020
1 parent d2cdbf9 commit c7eb7ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/dllib/src/bigdl/dllib/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit c7eb7ae

Please sign in to comment.