[test] support slow skip and device skip in Uts (#9484)
This commit is contained in:
@@ -16,7 +16,7 @@ import os
|
||||
|
||||
import pytest
|
||||
|
||||
from llamafactory.train.test_utils import compare_model, load_infer_model, load_reference_model, patch_valuehead_model
|
||||
from llamafactory.train.test_utils import compare_model, load_infer_model, load_reference_model
|
||||
|
||||
|
||||
TINY_LLAMA3 = os.getenv("TINY_LLAMA3", "llamafactory/tiny-random-Llama-3")
|
||||
@@ -30,11 +30,6 @@ INFER_ARGS = {
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def fix_valuehead_cpu_loading():
|
||||
patch_valuehead_model()
|
||||
|
||||
|
||||
def test_base():
|
||||
model = load_infer_model(**INFER_ARGS)
|
||||
ref_model = load_reference_model(TINY_LLAMA3)
|
||||
|
||||
@@ -23,7 +23,6 @@ from llamafactory.train.test_utils import (
|
||||
load_infer_model,
|
||||
load_reference_model,
|
||||
load_train_model,
|
||||
patch_valuehead_model,
|
||||
)
|
||||
|
||||
|
||||
@@ -56,11 +55,6 @@ INFER_ARGS = {
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def fix_valuehead_cpu_loading():
|
||||
patch_valuehead_model()
|
||||
|
||||
|
||||
def test_lora_train_qv_modules():
|
||||
model = load_train_model(lora_target="q_proj,v_proj", **TRAIN_ARGS)
|
||||
linear_modules, _ = check_lora_model(model)
|
||||
|
||||
Reference in New Issue
Block a user