Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nit] Friendlier error message when user hasn't installed ray[serve] #19303

Closed
architkulkarni opened this issue Oct 11, 2021 · 0 comments · Fixed by #19570
Closed

[nit] Friendlier error message when user hasn't installed ray[serve] #19303

architkulkarni opened this issue Oct 11, 2021 · 0 comments · Fixed by #19570
Assignees

Comments

@architkulkarni
Copy link
Contributor

architkulkarni commented Oct 11, 2021

If you run pip install ray in a fresh environment and run from ray import serve, you get the following error message:

>>> from ray import serve
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/archit/anaconda3/envs/serve-cuj/lib/python3.7/site-packages/ray/serve/__init__.py", line 1, in <module>
    from ray.serve.api import (start, get_replica_context, shutdown, ingress,
  File "/Users/archit/anaconda3/envs/serve-cuj/lib/python3.7/site-packages/ray/serve/api.py", line 14, in <module>
    from fastapi import APIRouter, FastAPI
ModuleNotFoundError: No module named 'fastapi'

We should detect when ray[serve] is not installed and raise an error message telling the user to run pip install "ray[serve]". Otherwise the user might end up responding to the current error messages by installing the missing packages (fastapi, etc) one at a time.

@architkulkarni architkulkarni added this to the Serve CUJ milestone Oct 11, 2021
@triciasfu triciasfu changed the title Friendlier error message when user hasn't installed ray[serve] [nit] Friendlier error message when user hasn't installed ray[serve] Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants