-
Notifications
You must be signed in to change notification settings - Fork 363
chore: reenable py313 #3455
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
Merged
Merged
chore: reenable py313 #3455
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
2caf324
reenable py313
zewenli98 0ccb6eb
clear py filter
zewenli98 177ed03
fix python version req
zewenli98 ab88c60
upgrade transformers
zewenli98 8b04754
keep transformers==4.40.2
zewenli98 fe9faa3
fix
zewenli98 41546a8
try transformers==4.49.0
zewenli98 9358250
add python 3.13t in workflow
zewenli98 f60e091
fix
zewenli98 2f3edc7
fix
zewenli98 cb5263e
revert py313t
zewenli98 fd39f84
fix
zewenli98 6e597ad
update bdist_wheel
zewenli98 9455634
small fix
zewenli98 a0b0e93
attempt fix
zewenli98 822e2fe
attempt fix
zewenli98 3ad2156
attempt fix
zewenli98 7e864ad
revert to not support py313t
zewenli98 826b7b2
fix
zewenli98 da0e3a7
fix not on the same device error
zewenli98 9089c1c
disable refit and engine caching for py313
zewenli98 e06a930
disable related tests
zewenli98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
"torch_tensorrt_runtime", | ||
"dynamo_frontend", | ||
"fx_frontend", | ||
"refit", | ||
], | ||
) | ||
|
||
|
@@ -36,9 +37,10 @@ | |
_TORCHTRT_RT_AVAIL = _TS_FE_AVAIL or os.path.isfile(linked_file_runtime_full_path) | ||
_DYNAMO_FE_AVAIL = version.parse(sanitized_torch_version()) >= version.parse("2.1.dev") | ||
_FX_FE_AVAIL = True | ||
_REFIT_AVAIL = version.parse(sys.version.split()[0]) < version.parse("3.13") | ||
|
||
ENABLED_FEATURES = FeatureSet( | ||
_TS_FE_AVAIL, _TORCHTRT_RT_AVAIL, _DYNAMO_FE_AVAIL, _FX_FE_AVAIL | ||
_TS_FE_AVAIL, _TORCHTRT_RT_AVAIL, _DYNAMO_FE_AVAIL, _FX_FE_AVAIL, _REFIT_AVAIL | ||
) | ||
|
||
|
||
|
@@ -62,6 +64,22 @@ def not_implemented(*args: List[Any], **kwargs: Dict[str, Any]) -> Any: | |
return wrapper | ||
|
||
|
||
def needs_refit(f: Callable[..., Any]) -> Callable[..., Any]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can make this a bit more generic (like for any feature in the FeatureSet) |
||
def wrapper(*args: List[Any], **kwargs: Dict[str, Any]) -> Any: | ||
if ENABLED_FEATURES.refit: | ||
return f(*args, **kwargs) | ||
else: | ||
|
||
def not_implemented(*args: List[Any], **kwargs: Dict[str, Any]) -> Any: | ||
raise NotImplementedError( | ||
"Refit feature is currently not available in Python 3.13 or higher" | ||
) | ||
|
||
return not_implemented(*args, **kwargs) | ||
|
||
return wrapper | ||
|
||
|
||
T = TypeVar("T") | ||
|
||
|
||
|
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.