You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deffun(ctx):
defin_add(a, b):
print (a+b)
ctx.executor.run_python_fn(in_add)(1, 2) # this passctx.executor.run_python_fn(out_add)(1, 2) # this failed, the error is: ModuleNotFoundError: No module named 'ai2_kit'defout_add(a, b):
print(a+b)
the method run_python_fn is defined in ai2_kit/executor.py , the basic idea is use python -c to execute a python script on remote machine.
I have no idea why it will import ai2_kit when use a function outside of current function, the method out_add doesn't have any external dependencies. Is there any method to workaround this problem? Thank you! Both local and remote python is v3.9.
You can already do cloudpickle.register_pickle_by_value(my_module) if you wish. Feel free to open a PR if you want to implement a decorator to do that on a function by function basis instead of doing it at the module level.
In file ai2_kit/domain.py
the method
run_python_fn
is defined in ai2_kit/executor.py , the basic idea is usepython -c
to execute a python script on remote machine.I have no idea why it will import
ai2_kit
when use a function outside of current function, the methodout_add
doesn't have any external dependencies. Is there any method to workaround this problem? Thank you! Both local and remote python is v3.9.The error pickle (base64) for debug:
The text was updated successfully, but these errors were encountered: