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

[Doc] Fix broken references in serve documentation #45113

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions doc/requirements-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ sphinxcontrib-redoc==1.6.0
sphinx-remove-toctrees==0.0.3
sphinx_design==0.5.0
pydata-sphinx-theme==0.14.1
# Supporrt v1 pydantic schema.
# https://autodoc-pydantic.readthedocs.io/en/stable/users/faq.html#migration-guide-from-v1-to-v2
autodoc_pydantic==1.9.0
autodoc_pydantic==2.2.0

pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3

Expand Down
1 change: 1 addition & 0 deletions doc/source/serve/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ See the [model composition guide](serve-model-composition) for how to update cod
serve.get_deployment_handle
serve.grpc_util.RayServegRPCContext
serve.exceptions.BackPressureError
serve.exceptions.RayServeException
```

(serve-cli)=
Expand Down
2 changes: 1 addition & 1 deletion doc/source/serve/http-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ When the request is cancelled, a cancellation error is raised inside the `Snorin
(serve-fastapi-http)=
## FastAPI HTTP Deployments

If you want to define more complex HTTP handling logic, Serve integrates with [FastAPI](https://fastapi.tiangolo.com/). This allows you to define a Serve deployment using the {mod}`@serve.ingress <ray.serve.api.ingress>` decorator that wraps a FastAPI app with its full range of features. The most basic example of this is shown below, but for more details on all that FastAPI has to offer such as variable routes, automatic type validation, dependency injection (e.g., for database connections), and more, please check out [their documentation](https://fastapi.tiangolo.com/).
If you want to define more complex HTTP handling logic, Serve integrates with [FastAPI](https://fastapi.tiangolo.com/). This allows you to define a Serve deployment using the {mod}`@serve.ingress <ray.serve.ingress>` decorator that wraps a FastAPI app with its full range of features. The most basic example of this is shown below, but for more details on all that FastAPI has to offer such as variable routes, automatic type validation, dependency injection (e.g., for database connections), and more, please check out [their documentation](https://fastapi.tiangolo.com/).

:::{note}
A Serve application that's integrated with FastAPI still respects the `route_prefix` set through Serve. The routes are that registered through the FastAPI `app` object are layered on top of the route prefix. For instance, if your Serve application has `route_prefix = /my_app` and you decorate a method with `@app.get("/fetch_data")`, then you can call that method by sending a GET request to the path `/my_app/fetch_data`.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/serve/key-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A deployment contains business logic or an ML model to handle incoming requests
At runtime, a deployment consists of a number of *replicas*, which are individual copies of the class or function that are started in separate Ray Actors (processes).
The number of replicas can be scaled up or down (or even autoscaled) to match the incoming request load.

To define a deployment, use the {mod}`@serve.deployment <ray.serve.api.deployment>` decorator on a Python class (or function for simple use cases).
To define a deployment, use the {mod}`@serve.deployment <ray.serve.deployment>` decorator on a Python class (or function for simple use cases).
Then, `bind` the deployment with optional arguments to the constructor to define an [application](serve-key-concepts-application).
Finally, deploy the resulting application using `serve.run` (or the equivalent `serve run` CLI command, see [Development Workflow](serve-dev-workflow) for details).

Expand Down
Loading