Skip to content

Remove unused imports and redundant f-string prefixes#20

Merged
Hannibal046 merged 1 commit into
deepseek-ai:mainfrom
DaoyuanLi2816:cleanup-unused-imports-and-fstring-prefixes
Jul 8, 2026
Merged

Remove unused imports and redundant f-string prefixes#20
Hannibal046 merged 1 commit into
deepseek-ai:mainfrom
DaoyuanLi2816:cleanup-unused-imports-and-fstring-prefixes

Conversation

@DaoyuanLi2816

Copy link
Copy Markdown
Contributor

Small maintenance cleanup found with pyflakes — no behavior change.

Unused imports

  • deepspec/eval/base_evaluator.py: drop unused AutoTokenizer (DynamicCache from the same import is still used).
  • deepspec/trainer/base_trainer.py: drop unused import os.
  • deepspec/utils/distributed.py: drop unused import math.

Redundant f-string prefix

  • train.py and scripts/data/prepare_target_cache.py: print(f"git status:", ...) has no placeholders in the f-string, so the f is a no-op — drop it.

@rajpratham1 rajpratham1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! These are clean, non-functional changes that remove unused imports and unnecessary f-string prefixes without affecting behavior. Thanks for cleaning this up.

Maintenance cleanup (no behavior change), found with pyflakes:

- Drop unused imports: `AutoTokenizer` in deepspec/eval/base_evaluator.py
  (DynamicCache from the same line is still used) and `math` in
  deepspec/utils/distributed.py.
- Drop the redundant `f` prefix from `print(f"git status:", ...)` in train.py
  and scripts/data/prepare_target_cache.py; the f-string has no placeholders.
@DaoyuanLi2816 DaoyuanLi2816 force-pushed the cleanup-unused-imports-and-fstring-prefixes branch from 6847715 to 5b479dd Compare July 8, 2026 06:49
@DaoyuanLi2816

Copy link
Copy Markdown
Contributor Author

Heads-up: I've updated this PR so it no longer touches base_trainer.py.

Since I opened it, main implemented _launch_eval with os.system(...), so os is now used in base_trainer.py — dropping import os there would have caused a NameError on merge. The PR now only removes the still-unused imports (AutoTokenizer in deepspec/eval/base_evaluator.py, math in deepspec/utils/distributed.py) and the two f-strings that have no placeholders. Re-verified that it merges cleanly on current main.

@Hannibal046 Hannibal046 merged commit 74097b2 into deepseek-ai:main Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants