Skip to content

Conversation

ansschh
Copy link

@ansschh ansschh commented Aug 9, 2025

Adds type hints and validation to core utility modules for better IDE support and early bug detection.

Changes

  • tokenizer.py: Added return type hint to get_tokenizer()
  • generate.py: Added type hints and checkpoint path validation to main()
  • torch/utils.py: Added type hints to suppress_output()

- Add return type hint to get_tokenizer()
- Add type hints and checkpoint validation to generate.py main()
- Add parameter type hints to suppress_output() in torch/utils.py

Improves IDE support and catches potential bugs early.
- Only validate local file paths for torch/triton backends
- Allow vllm to use model identifiers without path validation
- Addresses reviewer feedback from dkundel-openai
@ansschh ansschh requested a review from dkundel-openai August 13, 2025 08:43
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.

2 participants