由于导入问题,Ray 无法解除远程功能?

Ray fails to unpickle remote function due to import issue?

是否有您应该为此避免的导入模式?

2020-03-26 16:06:01,535 WARNING worker.py:1058 -- Failed to unpickle the remote function with 
function ID ebb720e21fedc91d9da76f8176bc702d2ac788a7. Traceback:
Traceback (most recent call last):
    function = pickle.loads(serialized_function)

    class BaseModel(tf.keras.models.Model):
AttributeError: module 'tensorflow' has no attribute 'keras'

尝试在您的函数中导入 tensorflow 或 class。