-
Notifications
You must be signed in to change notification settings - Fork 361
Update docs and enforces google's docstring style #941
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
…gface/lighteval into nathan-reduce-cli-args-redundancy
…into nathan-better-doc
* upgrade and fix docstring where needed * add missing attr doc to model configs * fix and upgrade docs * small typo fix * update doc * update doc * update doc * update doc * update doc * update doc * run make style with auto fix for docstrings * continue fixing docs
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
Pull Request Overview
This PR updates documentation across the codebase to enforce Google's docstring style as configured in the linting setup. The changes improve docstring formatting, add missing documentation, and ensure consistency with Google's Python documentation standards.
- Enhanced docstring formatting and completeness across all modules
- Added missing return type documentation and parameter descriptions
- Standardized function and class documentation to Google style conventions
Reviewed Changes
Copilot reviewed 89 out of 89 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/lighteval/utils/utils.py | Enhanced docstrings with detailed parameters, return types, and examples for utility functions |
src/lighteval/utils/timeout.py | Added missing Returns section to timeout decorator documentation |
src/lighteval/utils/parallelism.py | Improved docstring formatting and added missing return type documentation |
src/lighteval/utils/cache_management.py | Standardized docstring format and added comprehensive parameter descriptions |
src/lighteval/tasks/templates/ | Updated all template modules with consistent Google-style docstrings and return types |
src/lighteval/tasks/requests.py | Simplified and improved class documentation formatting |
src/lighteval/tasks/registry.py | Enhanced Registry class documentation with detailed parameter descriptions |
src/lighteval/tasks/prompt_manager.py | Added comprehensive return type documentation for prompt preparation methods |
src/lighteval/tasks/multilingual/ | Updated utility functions with proper docstring formatting |
src/lighteval/tasks/lighteval_task.py | Significantly expanded LightevalTaskConfig documentation with detailed parameter descriptions |
src/lighteval/tasks/extended/ | Improved documentation for extended task modules |
src/lighteval/tasks/default_tasks.py | Updated GSM8K repository path to use lighteval namespace |
src/lighteval/tasks/default_prompts.py | Enhanced function documentation and added missing return types |
src/lighteval/models/ | Comprehensive docstring updates across all model classes and configurations |
src/lighteval/metrics/ | Improved metric class documentation with detailed parameter and return descriptions |
src/lighteval/main_*.py | Updated main function documentation with consistent return type information |
src/lighteval/logging/ | Enhanced logger class documentation with comprehensive attribute descriptions |
src/lighteval/data.py | Improved dataset class documentation with detailed method descriptions |
src/lighteval/cli_args.py | Updated module docstring format |
pyproject.toml | Added pydocstyle configuration for Google convention and ignored specific docstring rules |
examples/model_configs/vllm_model_config.yaml | Adjusted temperature parameter from 0.0 to 0.1 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
- Doc text is inconsistent on 3rd person vs not
- Doc param calls are inconsistent, sometimes with :params: sometimes not
- Optional params sometimes are indicated like so
(type | None)
sometimes just astype
Please make consistent.
Did a first pass up to src/ligtheval/tasks, will continue later
""" | ||
Return a list of Fragments.Match objects between summary and text. | ||
"""Return a list of Fragments.Match objects between summary and text. |
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.
Sometimes the doc is 3rd person (as above, turns tokens
) sometimes not (as here, return
) - edit for consistency
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.
Last changes - once addressed, good to merge - cool update!
TRUNCATE_FEW_SHOTS_DEFAULTS = True | ||
|
||
|
||
class Registry: |
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.
This will need to be updated with the new registry arch
* reduces cli args redundancy * fix typing * reasoning tags do not need to default to None to then be attributed to actual default * fix typing for dataclass * better docs for cli args * fix reasoning tags parsing * upgrade and fix docstring where needed * add missing attr doc to model configs * fix and upgrade docs * small typo fix * update from suggestion * styling * styling * styling * update doc * update doc * update doc * update doc * update doc * update doc * run make style with auto fix for docstrings * continue fixing docs * Update docstring where needed (#935) * upgrade and fix docstring where needed * add missing attr doc to model configs * fix and upgrade docs * small typo fix * update doc * update doc * update doc * update doc * update doc * update doc * run make style with auto fix for docstrings * continue fixing docs * fix docs * Apply suggestion from @NathanHB * Update examples/model_configs/vllm_model_config.yaml * update from suggestions * remove |0 from docs * last fixes
No description provided.