-
Notifications
You must be signed in to change notification settings - Fork 9
Converters refactor [base config/model]: Updates to the base config and model for better loading support and standardization #117
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
base: features/converters/transformers-utils
Are you sure you want to change the base?
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.
Pull Request Overview
This PR refactors base configuration and model classes to improve loading capabilities, standardize APIs, and enhance type safety. The update modernizes the codebase by adopting Python 3.10+ union syntax, implementing better loading methods, and organizing test suites into comprehensive class-based structures.
- Enhanced
VerifierConfig
loading by renamingfrom_config()
tofrom_pretrained()
for consistency with transformers - Modernized type annotations by migrating from
Union
types to Python 3.10+ union syntax (str | int
) - Reorganized test structure with comprehensive class-based organization and improved coverage
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tests/unit/test_model.py | Comprehensive test reorganization with class-based structure and enhanced test coverage |
tests/unit/test_config.py | Complete test suite restructuring with parameterized fixtures and class organization |
tests/integration/test_config.py | Updated method call from from_config to from_pretrained |
src/speculators/models/eagle.py | Added add_to_config parameter to attach_verifier method |
src/speculators/model.py | Enhanced type annotations and improved documentation with union syntax migration |
src/speculators/config.py | Renamed method and improved type annotations with comprehensive documentation updates |
pyproject.toml | Added TC003 to ruff ignore list for typing imports |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
📦 Build Artifacts Available |
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.
A few nits but looks good overall!
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.
Looks good! Can we try to resolve some of the failed tests as well?
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.
Question about Python 3.9 which we can also just update to say we do not support as it is coming near EOL
Should this branch not point to main?
How should we be landing it?
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.
Looks good! Left a couple comments below.
50eb873
to
a3c0f80
Compare
f1bab30
to
a41d2eb
Compare
Signed-off-by: Mark Kurtz <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Mark Kurtz <[email protected]>
Signed-off-by: Mark Kurtz <[email protected]>
05dab34
to
491e702
Compare
Signed-off-by: Mark Kurtz <[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 Mark!
Signed-off-by: Mark Kurtz <[email protected]>
Summary
Refactors base configuration and model classes to improve loading capabilities, standardize APIs, and enhance type safety. This PR modernizes the codebase with better type annotations, streamlined loading methods, and improved documentation while maintaining backward compatibility.
Details
from_config()
tofrom_pretrained()
for consistency with transformersUnion
types to Python 3.10+ union syntax (str | int
)from __future__ import annotations
for Python 3.9 supportadd_to_config
parameter for better config managementTest Plan
Related Issues