关于ray,运行代码出现终止

img


训练代码运行后出现以下代码,无法正常运行,请问应该如何解决呢..

提到了一个可能的解决方案,即设置环境变量RAY_DISABLE_MEMORY_MONITOR为1来禁用内存监控。

  • 这篇博客: Ray 环境搭建和示例中的 示例 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
  • hello_world.py

    import ray
    
    ray.init(redis_address="192.168.1.6:6379")
    
    @ray.remote
    def hello():
        return "Hello"
    
    @ray.remote
    def world():
        return "world!"
    
    @ray.remote
    def hello_world(a, b):
        return a + " " + b
    
    a_id = hello.remote()
    b_id = world.remote()
    c_id = hello_world.remote(a_id, b_id)
    
    hello = ray.get(c_id)
    
    print(hello)
    

    运行:python hello_world.py

    输出:

    Hello world!