Introduce naming convention in io_struct and base sglang io classes. (#10133)
This commit is contained in:
@@ -35,7 +35,7 @@ from sglang.srt.lora.utils import (
|
||||
get_normalized_target_modules,
|
||||
get_target_module_name,
|
||||
)
|
||||
from sglang.srt.managers.io_struct import LoRAUpdateResult
|
||||
from sglang.srt.managers.io_struct import LoRAUpdateOutput
|
||||
from sglang.srt.model_executor.forward_batch_info import ForwardBatch
|
||||
from sglang.srt.server_args import ServerArgs
|
||||
from sglang.srt.utils import replace_submodule
|
||||
@@ -107,8 +107,8 @@ class LoRAManager:
|
||||
|
||||
def create_lora_update_result(
|
||||
self, success: bool, error_message: str = ""
|
||||
) -> LoRAUpdateResult:
|
||||
return LoRAUpdateResult(
|
||||
) -> LoRAUpdateOutput:
|
||||
return LoRAUpdateOutput(
|
||||
success=success,
|
||||
error_message=error_message,
|
||||
loaded_adapters={
|
||||
@@ -117,7 +117,7 @@ class LoRAManager:
|
||||
},
|
||||
)
|
||||
|
||||
def load_lora_adapter(self, lora_ref: LoRARef) -> LoRAUpdateResult:
|
||||
def load_lora_adapter(self, lora_ref: LoRARef) -> LoRAUpdateOutput:
|
||||
"""
|
||||
Load a single LoRA adapter from the specified path.
|
||||
|
||||
@@ -174,7 +174,7 @@ class LoRAManager:
|
||||
"`--max-loras-per-batch` or load it as unpinned LoRA adapters."
|
||||
)
|
||||
|
||||
def unload_lora_adapter(self, lora_ref: LoRARef) -> LoRAUpdateResult:
|
||||
def unload_lora_adapter(self, lora_ref: LoRARef) -> LoRAUpdateOutput:
|
||||
"""
|
||||
Unload LoRA adapters by their names. This will remove the adapters from the memory pool and
|
||||
delete the corresponding LoRA modules.
|
||||
|
||||
Reference in New Issue
Block a user