Add pydocstyle to the ruff rules (#52136)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <hej.mellor@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -97,6 +97,9 @@ class LoRAModelManager:
|
||||
in a single batch.
|
||||
vocab_size: the vocab size of the model.
|
||||
lora_config: the LoRA configuration.
|
||||
device: the device the LoRA tensors are placed on.
|
||||
vllm_config: the vLLM config for this engine.
|
||||
|
||||
"""
|
||||
self.model: SupportsLoRAModel = model
|
||||
self.supported_lora_modules = get_supported_lora_modules(self.model)
|
||||
@@ -785,6 +788,7 @@ class LoRAModelManager:
|
||||
|
||||
Returns:
|
||||
True if the module passes the filter, False otherwise.
|
||||
|
||||
"""
|
||||
return is_in_target_modules(
|
||||
module_name,
|
||||
@@ -793,9 +797,7 @@ class LoRAModelManager:
|
||||
)
|
||||
|
||||
def _get_punica_wrapper(self, module_name: str) -> PunicaWrapperBase | None:
|
||||
"""
|
||||
Determine whether this module supports LoRA and which wrapper to use.
|
||||
"""
|
||||
"""Determine whether this module supports LoRA and which wrapper to use."""
|
||||
# For language model (early return)
|
||||
if not self.supports_mm:
|
||||
return self.punica_wrapper_mapping[DEFAULT_LANGUAGE_WRAPPER_KEY]
|
||||
@@ -1190,9 +1192,7 @@ class LoRAModelManager:
|
||||
return new_module_names[start:end]
|
||||
|
||||
def _build_moe_ep_load_spec(self) -> MoEEPLoadSpec | None:
|
||||
"""
|
||||
Per-rank slicing metadata for 2D RoutedEXperts LoRA modules.
|
||||
"""
|
||||
"""Per-rank slicing metadata for 2D RoutedEXperts LoRA modules."""
|
||||
if not self._use_ep or not self._is_moe:
|
||||
return None
|
||||
module = next(
|
||||
|
||||
Reference in New Issue
Block a user