I’m getting a very strange error when trying to run a very basic ray program.
import ray from ray import serve import time ray.init() # This will start Ray locally and start Serve on top of it. serve.start() def my_backend_func(request): return "hello" serve.create_backend("my_backend", my_backend_func)
Running this gives me the following error:
AttributeError: module 'ray.serve' has no attribute 'create_backend' .
If I store the object created by calling serve.start() in a variable, and use that to call .create_backend instead of
serve it works. Every single test case, example, etc. does not do this so I was wondering what I might be doing wrong. I was able to recreate this issue on every Linux machine I tried it on, and in both python3.6 and python3.8. Thank you!