-
Notifications
You must be signed in to change notification settings - Fork 332
misc: cleanup #1092
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
yzh119
merged 4 commits into
flashinfer-ai:main
from
bzhng-development:fix-various-issues
May 25, 2025
Merged
misc: cleanup #1092
yzh119
merged 4 commits into
flashinfer-ai:main
from
bzhng-development:fix-various-issues
May 25, 2025
Conversation
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
yzh119
approved these changes
May 25, 2025
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.
LGTM, thank you for the contribution!
A next step could be using ruff as pre-commit hook instead of isort (as suggested by @abcdabcd987 ). |
b8zhong
added a commit
to bzhng-development/flashinfer
that referenced
this pull request
May 25, 2025
b8zhong
added a commit
to bzhng-development/flashinfer
that referenced
this pull request
May 25, 2025
Merged
yzh119
pushed a commit
that referenced
this pull request
May 26, 2025
Followup of #1092 The last one. Additionally @yzh119 I didn't fix the below unused imports, I am not sure if it will break the build. ``` flashinfer/jit/attention/__init__.py:17:15: F401 `.pytorch` imported but unused; consider removing, adding to `__all__`, or using a redundant alias | 15 | """ 16 | 17 | from . import pytorch, tvm | ^^^^^^^ F401 18 | from .pytorch import gen_batch_decode_mla_module as gen_batch_decode_mla_module 19 | from .pytorch import gen_batch_decode_module as gen_batch_decode_module | = help: Use an explicit re-export: `pytorch as pytorch` flashinfer/jit/attention/__init__.py:17:24: F401 `.tvm` imported but unused; consider removing, adding to `__all__`, or using a redundant alias | 15 | """ 16 | 17 | from . import pytorch, tvm | ^^^ F401 18 | from .pytorch import gen_batch_decode_mla_module as gen_batch_decode_mla_module 19 | from .pytorch import gen_batch_decode_module as gen_batch_decode_module | = help: Use an explicit re-export: `tvm as tvm` flashinfer/prefill.py:2664:13: F841 Local variable `module` is assigned to but never used | 2662 | if args not in modules_dict: 2663 | uri = get_batch_prefill_uri("cutlass", *args) 2664 | module = get_fmha_module(*args) | ^^^^^^ F841 2665 | 2666 | @register_custom_op( | = help: Remove assignment to unused variable `module` flashinfer/profiler/__init__.py:17:8: F401 `argparse` imported but unused | 15 | """ 16 | 17 | import argparse | ^^^^^^^^ F401 18 | import csv 19 | import json | = help: Remove unused import: `argparse` flashinfer/profiler/__init__.py:18:8: F401 `csv` imported but unused | 17 | import argparse 18 | import csv | ^^^ F401 19 | import json 20 | from collections import namedtuple | = help: Remove unused import: `csv` flashinfer/profiler/__init__.py:19:8: F401 `json` imported but unused | 17 | import argparse 18 | import csv 19 | import json | ^^^^ F401 20 | from collections import namedtuple 21 | from enum import Enum | = help: Remove unused import: `json` flashinfer/profiler/__init__.py:20:25: F401 `collections.namedtuple` imported but unused | 18 | import csv 19 | import json 20 | from collections import namedtuple | ^^^^^^^^^^ F401 21 | from enum import Enum 22 | from typing import List | = help: Remove unused import: `collections.namedtuple` ```
Edenzzzz
pushed a commit
to Edenzzzz/flashinfer
that referenced
this pull request
Jun 6, 2025
<!-- .github/pull_request_template.md --> ## π Description <!-- What does this PR do? Briefly describe the changes and why theyβre needed. --> Short unused import code cleanup ## π Related Issues N/A <!-- Link any related issues here --> ### β Pre-commit Checks - [x] I have installed `pre-commit` by running `pip install pre-commit` (or used your preferred method). - [x] I have installed the hooks with `pre-commit install`. - [x] I have run the hooks manually with `pre-commit run --all-files` and fixed any reported issues.
Edenzzzz
pushed a commit
to Edenzzzz/flashinfer
that referenced
this pull request
Jun 6, 2025
Followup of flashinfer-ai#1092 The last one. Additionally @yzh119 I didn't fix the below unused imports, I am not sure if it will break the build. ``` flashinfer/jit/attention/__init__.py:17:15: F401 `.pytorch` imported but unused; consider removing, adding to `__all__`, or using a redundant alias | 15 | """ 16 | 17 | from . import pytorch, tvm | ^^^^^^^ F401 18 | from .pytorch import gen_batch_decode_mla_module as gen_batch_decode_mla_module 19 | from .pytorch import gen_batch_decode_module as gen_batch_decode_module | = help: Use an explicit re-export: `pytorch as pytorch` flashinfer/jit/attention/__init__.py:17:24: F401 `.tvm` imported but unused; consider removing, adding to `__all__`, or using a redundant alias | 15 | """ 16 | 17 | from . import pytorch, tvm | ^^^ F401 18 | from .pytorch import gen_batch_decode_mla_module as gen_batch_decode_mla_module 19 | from .pytorch import gen_batch_decode_module as gen_batch_decode_module | = help: Use an explicit re-export: `tvm as tvm` flashinfer/prefill.py:2664:13: F841 Local variable `module` is assigned to but never used | 2662 | if args not in modules_dict: 2663 | uri = get_batch_prefill_uri("cutlass", *args) 2664 | module = get_fmha_module(*args) | ^^^^^^ F841 2665 | 2666 | @register_custom_op( | = help: Remove assignment to unused variable `module` flashinfer/profiler/__init__.py:17:8: F401 `argparse` imported but unused | 15 | """ 16 | 17 | import argparse | ^^^^^^^^ F401 18 | import csv 19 | import json | = help: Remove unused import: `argparse` flashinfer/profiler/__init__.py:18:8: F401 `csv` imported but unused | 17 | import argparse 18 | import csv | ^^^ F401 19 | import json 20 | from collections import namedtuple | = help: Remove unused import: `csv` flashinfer/profiler/__init__.py:19:8: F401 `json` imported but unused | 17 | import argparse 18 | import csv 19 | import json | ^^^^ F401 20 | from collections import namedtuple 21 | from enum import Enum | = help: Remove unused import: `json` flashinfer/profiler/__init__.py:20:25: F401 `collections.namedtuple` imported but unused | 18 | import csv 19 | import json 20 | from collections import namedtuple | ^^^^^^^^^^ F401 21 | from enum import Enum 22 | from typing import List | = help: Remove unused import: `collections.namedtuple` ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
π Description
Short unused import code cleanup
π Related Issues
N/A
β Pre-commit Checks
pre-commit
by runningpip install pre-commit
(or used your preferred method).pre-commit install
.pre-commit run --all-files
and fixed any reported issues.