[Serve] Example script not working

Running Example from docs: Ray Serve: Scalable and Programmable Serving — Ray v2.0.0.dev0
Does not work:

python app_ray_serve.py

2021-05-25 21:50:23,406 INFO services.py:1267 -- View the Ray dashboard at http://127.0.0.1:8265
(pid=34596) 2021-05-25 21:50:25,386     INFO http_state.py:67 -- Starting HTTP proxy with name 'fCbsKc:SERVE_CONTROLLER_ACTOR:SERVE_PROXY_ACTOR-node:192.168.1.140-0' on node 'node:192.168.1.140-0' listening on '127.0.0.1:8000'
Traceback (most recent call last):
  File "app_ray_serve.py", line 12, in <module>
    my_func.deploy()
AttributeError: 'function' object has no attribute 'deploy'
(pid=34593) INFO:     Started server process [34593]

AttributeError: 'function' object has no attribute 'deploy'

The script works for me.

Can you confirm which version of python and ray you are running? And on which OS?

cc @simon-mo

I got exactly the same error. My python version is 3.8.8 and ray version is 1.3.0. Let me know if you need more info

Python 3.8.9, Ray 1.3, Mac OS 10.17

were you able to solve this problem? I also have this error.