Conversation
…astructure/model-service into docs/model-service
📝 WalkthroughWalkthroughReplaces the template README with a Ray Serve–focused README, adds MkDocs configuration and a docs site with ten new pages (architecture, guides, troubleshooting, quick-start), introduces a docs dependency group and CI workflow for building docs, and makes minor non-functional edits to two model files. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, 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 significantly enhances the Model Service's discoverability and usability by introducing a comprehensive, structured documentation portal. The new documentation, built with MkDocs, covers essential aspects from quick deployment to detailed architectural insights and troubleshooting, making it easier for users to understand, deploy, and manage machine learning models. Accompanying these changes are updates to the main README, CI/CD pipelines for documentation validation, and proper dependency management for the documentation tools. Highlights
Changelog
Using Gemini Code AssistThe 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 by creating a comment using either
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 Limitations & Feedback Gemini Code Assist 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. 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
|
There was a problem hiding this comment.
Code Review
The pull request introduces a comprehensive documentation site for the Model Service, covering its architecture, deployment guides, model integration, configuration, and troubleshooting, while also integrating the documentation build process into the CI pipeline. Review comments suggest improving clarity in the README.md regarding kubectl namespace placeholders, completing a placeholder URL in the configuration reference, addressing a potential LaTeX rendering issue in the configuration-reference.md by suggesting a pymdownx.arithmatex extension, resolving a missing JSON curl example in deployment-guide.md, and adding a final newline character to mkdocs.yml for consistency.
There was a problem hiding this comment.
Pull request overview
This PR adds an MkDocs documentation site for the model-service and updates repository metadata/CI to build the docs alongside the existing Ray Serve + KubeRay RayService setup.
Changes:
- Adds a new MkDocs site (
mkdocs.yml) and a full set of docs pages underdocs/(quick start, guides, architecture). - Updates
README.mdto match the current Ray Serve + KubeRay deployment model and reference model payload format. - Adds a
docsdependency group topyproject.tomland updates.gitlab-ci.ymlto include the docs build template.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds a docs dependency group for MkDocs tooling. |
| mkdocs.yml | Introduces MkDocs Material configuration, nav, and Markdown extensions. |
| docs/index.md | Adds the documentation landing page content and navigation pointers. |
| docs/get-started/quick-start.md | Adds a Kubernetes quick start for deploying the RayService. |
| docs/guides/deployment-guide.md | Adds a detailed production deployment guide and ops considerations. |
| docs/guides/configuration-reference.md | Adds a reference for RayService / Serve knobs (autoscaling, backpressure, etc.). |
| docs/guides/adding-models.md | Adds guidance and examples for implementing and integrating models. |
| docs/guides/troubleshooting.md | Adds common failure modes and triage steps for RayService/Serve on K8s. |
| docs/architecture/overview.md | Adds a high-level architecture overview of the stack and scaling model. |
| docs/architecture/request-lifecycle.md | Documents end-to-end request flow and queueing points. |
| docs/architecture/queues-and-backpressure.md | Explains queueing controls (max_queued_requests, max_ongoing_requests). |
| docs/architecture/batching.md | Explains Ray Serve batching behavior and tuning considerations. |
| README.md | Replaces the GitLab template README with repo-specific usage and payload details. |
| .gitlab-ci.yml | Includes the MkDocs CI template and adds a deploy stage for docs build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (3)
docs/architecture/request-lifecycle.md (1)
9-83: Consider specifying language for the ASCII diagram code block.The ASCII diagram is in a fenced code block without a language specifier. While this works, explicitly marking it as
textorplaincan improve rendering consistency across different Markdown processors.📝 Optional: Add language specifier
Change line 9 from:
to:🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/architecture/request-lifecycle.md` around lines 9 - 83, The fenced ASCII diagram block lacks a language tag; update the opening fence for the ASCII diagram (the large block containing the "External Client", "HTTP Proxy Actor", "Replica Actor", etc.) to include a language specifier like text or plain (e.g., change ``` to ```text) so Markdown renderers consistently treat it as preformatted text; leave the closing fence unchanged.pyproject.toml (1)
22-22: Consider using more restrictive version bounds to prevent unexpected breaking changes.The documentation dependencies use minimum version constraints (
>=) which allows any newer version. Verification confirms these packages have progressed significantly beyond the pinned minimums (mkdocs-material from 9.6.0 → 9.7.6, pymdown-extensions from 10.0 → 10.21), which could introduce breaking changes and affect build reproducibility.Consider using more restrictive version bounds such as
mkdocs>=1.6.0,<2.0ormkdocs~=1.6.0to allow patch updates while preventing major version changes.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pyproject.toml` at line 22, Replace the open-ended >= version constraints in the docs extras list with more restrictive bounds to avoid unexpected breaking changes: update the docs = [...] entry to use either compatible release operators or upper bounds (e.g., mkdocs~=1.6.0 or mkdocs>=1.6.0,<2.0 for mkdocs, and similarly mkdocs-material~=9.6.0 or mkdocs-material>=9.6.0,<10.0, and pymdown-extensions~=10.0 or pymdown-extensions>=10.0,<11.0) so the docs extras (the docs = [...] line and the package names mkdocs, mkdocs-material, pymdown-extensions) lock major versions while still permitting safe patch/minor updates.docs/guides/adding-models.md (1)
121-124: Consider usingasync def reconfigure()for consistency.The repository's reference implementation (
models/binary_classifier.py) usesasync def reconfigure(). Making this example async would better align with the production pattern and allow for async operations during reconfiguration (e.g., async model loading).♻️ Proposed change
- def reconfigure(self, config: Config): + async def reconfigure(self, config: Config): self.threshold = config["threshold"] self.batch_size = config["batch_size"] print(f"Reconfigured: threshold={self.threshold}")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/guides/adding-models.md` around lines 121 - 124, The example's reconfigure method is synchronous but the reference implementation uses async; change the signature from def reconfigure(self, config: Config) to async def reconfigure(self, config: Config) and update any callers/docs to await self.reconfigure(...) where appropriate; ensure the body still sets self.threshold and self.batch_size and optionally show how to await async model-loading calls inside reconfigure (mirroring models/binary_classifier.py's pattern).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/architecture/overview.md`:
- Around line 95-100: Update the example under workerGroupSpecs to match the
deployed ray-service.yaml by changing maxReplicas from 4 to 2, add the replicas
field (to show the current replica count), and include the template pod
specification (e.g., container image, resources, and ports) so the snippet
mirrors the real configuration; locate the existing workerGroupSpecs entry with
groupName: cpu-workers and edit it to include replicas and a template block and
set maxReplicas: 2 to match production.
In `@docs/guides/adding-models.md`:
- Around line 33-39: The example's method-level code is misindented: align the
comment "# Process data and return prediction", the lines "result =
self.predict(data)" and "return {"prediction": result}" and the "def
predict(self, data: dict):" block with the other class methods so they are
indented as instance methods; adjust indentation of the predict method body (the
comment and "return data") to be one additional indent level inside predict to
match method scope, ensuring "predict" and its body are at the same indentation
as other class methods.
In `@docs/guides/configuration-reference.md`:
- Line 44: The `runtime_env` line references a broken anchor
`../guides/adding-models.md#6-managing-dependencies`; update the link to point
to the correct target by either changing it to `../guides/adding-models.md`
(linking the whole guide) or to the exact heading anchor that exists in the
adding-models guide (replace `#6-managing-dependencies` with the correct slug),
or remove the anchor entirely if the reference isn't required; update the
`runtime_env` entry accordingly.
In `@mkdocs.yml`:
- Line 4: Update the mkdocs configuration so edit links point to the
repository's default branch: change the edit_uri value from "edit/master/docs/"
to "edit/main/docs/" in mkdocs.yml (look for the edit_uri key).
In `@README.md`:
- Around line 87-97: The fenced code block showing the repository tree in
README.md is missing a language identifier; update that block (the
triple-backtick before the "model-service/" tree) to include a language token
such as "text" (i.e., change ``` to ```text) so markdownlint is satisfied and
syntax highlighting is applied to the model-service/ tree snippet.
---
Nitpick comments:
In `@docs/architecture/request-lifecycle.md`:
- Around line 9-83: The fenced ASCII diagram block lacks a language tag; update
the opening fence for the ASCII diagram (the large block containing the
"External Client", "HTTP Proxy Actor", "Replica Actor", etc.) to include a
language specifier like text or plain (e.g., change ``` to ```text) so Markdown
renderers consistently treat it as preformatted text; leave the closing fence
unchanged.
In `@docs/guides/adding-models.md`:
- Around line 121-124: The example's reconfigure method is synchronous but the
reference implementation uses async; change the signature from def
reconfigure(self, config: Config) to async def reconfigure(self, config: Config)
and update any callers/docs to await self.reconfigure(...) where appropriate;
ensure the body still sets self.threshold and self.batch_size and optionally
show how to await async model-loading calls inside reconfigure (mirroring
models/binary_classifier.py's pattern).
In `@pyproject.toml`:
- Line 22: Replace the open-ended >= version constraints in the docs extras list
with more restrictive bounds to avoid unexpected breaking changes: update the
docs = [...] entry to use either compatible release operators or upper bounds
(e.g., mkdocs~=1.6.0 or mkdocs>=1.6.0,<2.0 for mkdocs, and similarly
mkdocs-material~=9.6.0 or mkdocs-material>=9.6.0,<10.0, and
pymdown-extensions~=10.0 or pymdown-extensions>=10.0,<11.0) so the docs extras
(the docs = [...] line and the package names mkdocs, mkdocs-material,
pymdown-extensions) lock major versions while still permitting safe patch/minor
updates.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c814cd11-97de-4f6e-95b7-23c0cadbdc2d
📒 Files selected for processing (14)
.gitlab-ci.ymlREADME.mddocs/architecture/batching.mddocs/architecture/overview.mddocs/architecture/queues-and-backpressure.mddocs/architecture/request-lifecycle.mddocs/get-started/quick-start.mddocs/guides/adding-models.mddocs/guides/configuration-reference.mddocs/guides/deployment-guide.mddocs/guides/troubleshooting.mddocs/index.mdmkdocs.ymlpyproject.toml
💤 Files with no reviewable changes (1)
- .gitlab-ci.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
@Jurgee add workflow for building documentation |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
docs/guides/configuration-reference.md (1)
44-44:⚠️ Potential issue | 🟡 MinorFix broken anchor link.
The link targets
../guides/adding-models.md#6-managing-dependencies, but the adding-models guide doesn't have a section with that anchor. Update the link to point to the correct target or remove the anchor.🔗 Suggested fixes
Option 1: Link to the entire guide:
-- `runtime_env`: dynamic environment setup (see [Managing Dependencies](../guides/adding-models.md#6-managing-dependencies)). +- `runtime_env`: dynamic environment setup (see [Managing Dependencies](../guides/adding-models.md)).Option 2: Update to use the correct anchor if the section exists with a different slug (verify first).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/guides/configuration-reference.md` at line 44, The `runtime_env` entry contains a broken anchor link (`../guides/adding-models.md#6-managing-dependencies`); update the link in the `runtime_env` line to either point to the whole guide (`../guides/adding-models.md`) or replace the fragment with the correct section anchor if the "Managing Dependencies" heading exists under a different slug—verify the actual heading slug in the adding-models content and update the href accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@docs/guides/configuration-reference.md`:
- Line 44: The `runtime_env` entry contains a broken anchor link
(`../guides/adding-models.md#6-managing-dependencies`); update the link in the
`runtime_env` line to either point to the whole guide
(`../guides/adding-models.md`) or replace the fragment with the correct section
anchor if the "Managing Dependencies" heading exists under a different
slug—verify the actual heading slug in the adding-models content and update the
href accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1e244c17-9339-4b96-a53d-be95a1af6fa8
📒 Files selected for processing (5)
.github/workflows/build-docs.ymldocs/guides/adding-models.mddocs/guides/configuration-reference.mddocs/guides/deployment-guide.mdmkdocs.yml
✅ Files skipped from review due to trivial changes (4)
- .github/workflows/build-docs.yml
- mkdocs.yml
- docs/guides/deployment-guide.md
- docs/guides/adding-models.md
There was a problem hiding this comment.
This doesn't work. Use the provided RationAI template.
This PR adds and polishes MkDocs documentation for the model-service. Changes:
docs/): quick start, architecture overview, deployment guide, configuration reference, adding models, troubleshooting.RayServicesetuppyproject.toml([dependency-groups].docs: mkdocs, mkdocs-material, pymdown-extensions)..gitlab-ci.yml→docs:buildrunsmkdocs build --strict.mkdocs.ymlas needed for the docs site.Summary by CodeRabbit
Documentation
Chores