[Bug Fix] prevent lora adapter from being loaded into LoRAManager if it is already loaded (#11365)

This commit is contained in:
Glen Liu
2025-10-09 21:43:03 -04:00
committed by GitHub
parent 0fe87213bb
commit 9a7e7a6576
2 changed files with 35 additions and 0 deletions

View File

@@ -101,6 +101,19 @@ BASIC_TESTS = [
},
],
op_sequence=[
Operation(
type=OperationType.LOAD,
data="philschmid/code-llama-3-1-8b-text-to-sql-lora",
expected_error="already loaded",
),
Operation(
type=OperationType.UNLOAD,
data="philschmid/code-llama-3-1-8b-text-to-sql-lora",
),
Operation(
type=OperationType.LOAD,
data="philschmid/code-llama-3-1-8b-text-to-sql-lora",
),
Operation(
type=OperationType.FORWARD,
data=create_batch_data(
@@ -224,6 +237,19 @@ BASIC_TESTS = [
type=OperationType.LOAD,
data="pbevan11/llama-3.1-8b-ocr-correction",
),
Operation(
type=OperationType.LOAD,
data="philschmid/code-llama-3-1-8b-text-to-sql-lora",
expected_error="already loaded",
),
Operation(
type=OperationType.UNLOAD,
data="philschmid/code-llama-3-1-8b-text-to-sql-lora",
),
Operation(
type=OperationType.LOAD,
data="philschmid/code-llama-3-1-8b-text-to-sql-lora",
),
Operation(
type=OperationType.FORWARD,
data=create_batch_data(