Repository navigation
[misc] Remove unreferenced dead code across the repo - #2083
Open
fv-superagent wants to merge 1 commit into
Open
fv-superagent wants to merge 1 commit into
fv-superagent wants to merge 1 commit into
Conversation
Contributor
Merge Protections🔴 1 of 2 protections blocking · waiting on 👀 reviews and 🤖 CI
🔴 PR merge requirementsWaiting for
This rule is failing.
Show 1 satisfied protection🟢 MLX smoke requirements
|
fv-superagent
force-pushed
the
agent/dead-code-sweep-f8249dba3607
branch
from
November 10, 2026 02:09
eae557d to
98ac7eb
Compare
fv-superagent
force-pushed
the
agent/dead-code-sweep-f8249dba3607
branch
from
November 10, 2026 02:13
98ac7eb to
318bfd0
Compare
This branch has not been deployed
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
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.
— fv-superagent · grep said nobody called; deletion approved · run by aryan5v
Problem:
Main carries definitions and imports left behind by refactors that no code, config, docstring or config string references. There is no red lane or issue to link: this is a repo-wide dead-code sweep (the follow-up to the comment sweep), so the failing object is the surface area contributors have to read.
Change:
A stdlib-only AST/reference sweep over every tracked Python file, backed by whole-repo word-boundary checks across
.py,.md,.mdx,.yaml,.json,.toml,.shand C/CUDA sources. It removes 42 unreferenced definitions/classes (for exampleVisionEncoderInfo,FlashAttnMetadataBuilder,flash_attn_no_pad_v3,_rotate_neox/_rotate_gptj, the MLXbenchmark_mlx_*helpers, plus the now-uncalledtopk_index_to_map_kernel) and drops 52 unused-import lines. Four zero-reference symbols were kept because their docstrings document external use:set_extension,read_vision_index_header,get_current_fastvideo_args,load_transformer_state_dict_from_safetensors.fastvideo/dataset/latent_datasets.pyandfastvideo/layers/utils.pyare fully unreferenced too, but their module pages are frozen entries indocs-site/migration-anchors.json; deleting them would faildocs-site/tests/content.test.mjswithMissing route. They are left in place; dropping them needs a separate change to that frozen contract.Verification:
python3 -c "import ast; ast.parse(open(f).read())"for all 54 changed modules: every file parsed.git grep -w <symbol>for each removed name: 0 remaining references (an independent fresh-context audit repeated this for every name plus substring and dynamic-dispatch patterns).pre-commitcheck on318bfd0: green.pr-fastcheckbuild #2287:fastcheck-passed; microscope Unit, Kernel, DreamVerse App, Encoder, VAE and Transformer lanes all green. MLX smoke checks green.pre-commitandpytestcannot run inside the agent container (no network, read-only pre-commit cache, no torch/pytest); the CI checks above covered both.Risk:
No behavior change on any reachable path: each removed symbol has zero references, so no caller, registry string, config or doc touched it. No numerical output, public API (
fastvideo/__init__.py, CLI) or CI configuration changes. A downstream fork importing these internal helpers directly would have to stop. The diff touches some of the same files as #2082, so a conflict is possible if that lands first.