Merged
Conversation
lvhan028
approved these changes
Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This PR aims to systematically improve the documentation quality and maintainability of the LMDeploy project. The existing documentation had inconsistencies in formatting, suboptimal Sphinx configuration, and outdated code examples that hindered readability and API reference generation. Additionally, the lack of proper type hint documentation diminished the developer experience when navigating the codebase.
Modification
This is a comprehensive documentation refinement with three core improvement areas:
Sphinx Configuration Modernization
Reorganized and extended the Sphinx extensions list for better build performance and functionality. Added
sphinx-autodoc-typehintsfor automatic type annotation rendering and configuredautodoc_type_aliasesto properly handle Pydantic dataclasses, enabling cleaner API documentation generation.Documentation Format Standardization
Applied consistent capitalization rules across all heading levels in RST files and standardized TOML configuration examples by enforcing quoted string values and lowercase boolean literals. Merged fragmented configuration class documentations into unified sections to improve scannability.
API Documentation Enhancement
Refactored Python docstrings to use proper Sphinx directives (e.g.,
code-block, inline literals) instead of plain text examples. Updated parameter descriptions to remove redundant type annotations (following Sphinx best practices) and replaced generic returns with specific type hints. This produces more accurate and navigable API references while maintaining backward compatibility.The changes are purely documentation-focused and do not affect runtime functionality.