serve status not working into ray>2.3.0.
@Ajay_Kumar Can you provide an example CLI and what’s the output you getting? For what you have is hard to go by?
cheers, HTH
Jules
sever status showing app_status NOT_STARTED but the app is running. dashboard and API also working.
(ray_api) ubuntu@ubuntu-pc:~/projects$ serve status
name: ''
app_status:
status: NOT_STARTED
message: Application doesn't exist
deployment_timestamp: 0.0
deployment_statuses: []
Version
ray==2.3.0
python==3.10.0
deployment
(ray_api) ubuntu@ubuntu-pc:~/projects$ ray stop
Stopped all 7 Ray processes.
(ray_api) ubuntu@ubuntu-pc:~/projects$ ray start --head --num-cpus=64 --num-gpus=1 --dashboard-host 0.0.0.0
Usage stats collection is enabled. To disable this, add `--disable-usage-stats` to the command that starts the cluster, or run the following command: `ray disable-usage-stats` before starting the cluster. See https://docs.ray.io/en/master/cluster/usage-stats.html for more details.
Local node IP: 192.168.12.191
--------------------
Ray runtime started.
--------------------
Next steps
To connect to this Ray runtime from another node, run
ray start --address='192.168.12.191:6379'
Alternatively, use the following Python code:
import ray
ray.init(address='auto')
To see the status of the cluster, use
ray status
To monitor and debug Ray, view the dashboard at
192.168.12.191:8265
If the connection fails, check your firewall settings and network configuration.
To terminate the Ray runtime, run
ray stop
(ray_api) ubuntu@ubuntu-pc:~/projects$ python main_copy.py
2023-05-02 11:34:47,308 INFO worker.py:1364 -- Connecting to existing Ray cluster at address: 192.168.12.191:6379...
2023-05-02 11:34:47,314 INFO worker.py:1544 -- Connected to Ray cluster. View the dashboard at 192.168.12.191:8265
(ServeController pid=3529918) INFO 2023-05-02 11:34:47,939 controller 3529918 http_state.py:129 - Starting HTTP proxy with name 'SERVE_CONTROLLER_ACTOR:SERVE_PROXY_ACTOR-08d5632b43b5d4d01cf691d4c942fc48138fe49da3d069c72578f14b' on node '08d5632b43b5d4d01cf691d4c942fc48138fe49da3d069c72578f14b' listening on '0.0.0.0:8000'
(ServeController pid=3529918) INFO 2023-05-02 11:34:48,581 controller 3529918 deployment_state.py:1333 - Adding 1 replica to deployment 'Hello'.
(HTTPProxyActor pid=3529977) INFO: Started server process [3529977]
(ray_api) ubuntu@ubuntu-pc:~/projects$ serve status
name: ''
app_status:
status: NOT_STARTED
message: Application doesn't exist
deployment_timestamp: 0.0
deployment_statuses: []
main_copy.py
from ray import serve
import starlette.requests
@serve.deployment(
route_prefix= "/hello",
)
class Hello:
def __call__(self, request: starlette.requests.Request):
return "Hello, Greeting from API."
serve.start(
detached=True,
http_options={
"host": "0.0.0.0",
"port": "8000"
}
)
Hello.deploy()
@Ajay_Kumar Seems like you using deprecated APIs. Use bind
and serve.run()
. Try and let us know. serve.run() has all the kwargs you need