-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[docs][serve.llm] Add Ray Serve LLM docs examples to test #54763
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
[docs][serve.llm] Add Ray Serve LLM docs examples to test #54763
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @eicherseiji, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request focuses on improving the testability and maintainability of Ray Serve LLM documentation examples. It achieves this by extracting an existing LLM deployment configuration into a dedicated, testable Python script, which is then used to dynamically generate the documentation snippet. The changes also include adjustments to facilitate automated testing of this example within CI environments.
Highlights
- Test Coverage Improvement: Extracted the Qwen LLM example from the Ray Serve documentation into a new, dedicated Python file (
doc/source/serve/doc_code/qwen_example.py). This enables automated testing of the example configuration, significantly improving test coverage for the Ray Serve LLM landing page. - CI/Testing Enhancements: Implemented monkeypatching within the extracted example to ensure
serve.runoperates in a non-blocking mode and to removeaccelerator_typerequirements. This makes the example suitable for execution in CI environments without needing actual hardware accelerators, streamlining automated testing. - Documentation Synchronization: Updated the
serving-llms.rstdocumentation to use aliteralincludedirective. This change ensures that the Qwen LLM example displayed in the documentation is directly pulled from the newly created test file, guaranteeing consistency between the documentation and the testable code. - Documentation Rendering Improvement: Modified the
autopydantic.rsttemplate to enable the display of field summaries and default values for Pydantic models in the generated documentation. This enhances the clarity and detail of configuration object documentation.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request extracts a documentation example into a separate, testable file. To improve robustness, I've suggested a fix to address a potential race condition in the test validation logic that could lead to a KeyError.
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
8f8136d to
454cf04
Compare
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
kunling-anyscale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
nrghosh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks!
angelinalg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stamp
kouroshHakha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do some file reorg before merging. Let me know what you think?
doc/source/llm/examples/serve/BUILD
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we put all of these in doc/source/llm/doc_code/<serve_qwen>/ or sth with a better name in brackets <>?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
doc/source/llm/examples/serve/BUILD
Outdated
| srcs = glob(["*.py"]), | ||
| visibility = ["//doc:__subpackages__"], | ||
| ) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we simply add the content of this file to ray/doc/BUILD instead of creating a separate BUILD here? Basically I want to not create new opinionated paths for where the doc tests are. We can use the same convention for adding a new section in that file to introduce a section for all ray serve llm doc tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: Seiji Eicher <seiji@anyscale.com> Signed-off-by: sampan <sampan@anyscale.com>
…t#54763) Signed-off-by: Seiji Eicher <seiji@anyscale.com> Signed-off-by: Andrew Grosser <dioptre@gmail.com>
…t#54763) Signed-off-by: Seiji Eicher <seiji@anyscale.com> Signed-off-by: jugalshah291 <shah.jugal291@gmail.com>
…t#54763) Signed-off-by: Seiji Eicher <seiji@anyscale.com> Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
Why are these changes needed?
Improve test coverage for example config from Ray Serve LLM landing page: https://docs.ray.io/en/latest/serve/llm/serving-llms.html
Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.