-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
[CI] Fix Pre-commit Issue #25497
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
[CI] Fix Pre-commit Issue #25497
Conversation
Signed-off-by: yewentao256 <zhyanwentao@126.com>
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 addresses several mypy type errors in gpu_model_runner.py. The changes involve adding assert statements to help the type checker understand that certain optional variables are not None in specific code paths, which resolves union-attr errors. Additionally, the type hint for aux_hidden_states has been corrected to Optional[list[torch.Tensor]] to accurately reflect its usage as an iterable. The pull request also includes an improvement to an assertion message in _dummy_run to provide more context during debugging. These changes are correct and improve code quality and maintainability.
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: gaojc <1055866782@qq.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Purpose
Fix