- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 11k
 
[Docs] Mock all imports for docs #27873
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
Conversation
Signed-off-by: Harry Mellor <[email protected]>
| 
           Documentation preview: https://vllm--27873.org.readthedocs.build/en/27873/  | 
    
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 introduces a robust mechanism for mocking imports during documentation generation, which significantly improves the developer experience by removing the need for heavy dependencies like PyTorch. The approach to handle runtime imports and special cases for nn.Parameter and custom ops is well-designed. I have identified a minor issue in how package versions are parsed from the requirements file, which could lead to incorrect version strings. My review includes a specific code suggestion to make this parsing more robust. Overall, this is a valuable improvement.
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
 - Mark a draft as ready
 - Comment "@codex review".
 
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: Harry Mellor <[email protected]>
Signed-off-by: Harry Mellor <[email protected]>
Signed-off-by: Harry Mellor <[email protected]>
Signed-off-by: Harry Mellor <[email protected]>
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.
Thanks for simplifying!
Signed-off-by: Harry Mellor <[email protected]>
Special cases that needed handling:
nn.Parameterinheritable when it's mockedGeneral improvements:
requirements/test.txtif __name__ == "__main__"to make the script easier to test