[CI] Fix mypy for vllm/lora#30874
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
Code Review
This pull request refactors LoRA (Low-Rank Adaptation) integration across several modules, primarily focusing on type hinting, validation, and internal logic. Key changes include adjusting mypy configuration for the vllm/lora module, enhancing LoRAConfig validation by ensuring max_cpu_loras is an integer and adding a field_validator for None values during delayed initialization, and improving error messages. For FusedMoE layers, the PR updates type hints (e.g., Mapping, str | None), modifies how MoE configuration parameters are accessed, removes functools.partial usage, and adds type: ignore comments for mypy. It also introduces a validation check for tensorizer_dir when loading LoRA models and refines the parse_fine_tuned_lora_name utility. Significant changes in vllm/lora/model_manager.py involve introducing new abstract base classes (SupportsLoRAModel, SupportsMultiModalLoRAModel) to better define LoRA-compatible models, updating type hints for model parameters and internal caches (MutableMapping), and renaming LoRALRUCache to LoRAModelLRUCache while adding a NoneLRUCache. Finally, the PR removes several assert self.quant_method is not None and assert self.moe_quant_config is not None statements in quantization-related files, relying instead on explicit ValueError checks during initialization to ensure these configurations are present.
|
This pull request has merge conflicts that must be resolved before it can be |
yewentao256
left a comment
There was a problem hiding this comment.
Please fix the conflicts so that we can get this landed
|
Sure, I was waiting to hear from @jeejeelee for what to do about the multimodal type hint. |
Sorry for the delay response |
|
Should be good now, I've started CI |
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
Hi @hmellor, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
|
This pull request has merge conflicts that must be resolved before it can be |
yewentao256
left a comment
There was a problem hiding this comment.
What's the current status? Could you solve the conflicts so that we can land this?
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
Hi @hmellor, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
|
This pull request has merge conflicts that must be resolved before it can be |
This change brings us closer to not needing a custom mypy check. Part of #26533