Skip to content

Commit 128b2c9

Browse files
committed
fixed tests
Signed-off-by: Onkar Chougule <ochougul@qti.qualcomm.com>
1 parent 4a43f0b commit 128b2c9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tests/peft/lora/test_lora_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def test_auto_lora_model_for_causal_lm_noncb_export_compile_generate(
222222

223223
# export
224224
start = perf_counter()
225-
qeff_model.export(export_dir=tmp_path)
225+
onnx_path = qeff_model.export(export_dir=tmp_path)
226226
end = perf_counter()
227227
export_time_0 = end - start
228228
model_path = tmp_path.with_name(tmp_path.name + "-" + qeff_model.export_hash)
@@ -237,7 +237,7 @@ def test_auto_lora_model_for_causal_lm_noncb_export_compile_generate(
237237
assert export_time_1 < export_time_0
238238

239239
# test compile
240-
qeff_model.compile(prefill_seq_len=32, ctx_len=64)
240+
qeff_model.compile(onnx_path=onnx_path, prefill_seq_len=32, ctx_len=64)
241241
assert Path(qeff_model.qpc_path).is_dir()
242242
assert os.path.isfile(os.path.join(os.path.dirname(qeff_model.qpc_path), "qconfig.json"))
243243

tests/transformers/models/test_disagg_mode.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ def test_disagg_mode_prefill(model_id, prompt):
5656

5757
undo_transformers_quantizers()
5858

59-
qeff_model = QEFFAutoModelForCausalLM.from_pretrained(
60-
model_id, num_hidden_layers=2, max_position_embeddings=64 * 1024
61-
)
59+
qeff_model = QEFFAutoModelForCausalLM.from_pretrained(model_id, num_hidden_layers=2)
6260
qeff_model.prefill(True)
6361
config = qeff_model.model.config
6462
inputs = tokenizer(prompt, return_tensors="np", padding="max_length", max_length=padded_len)

0 commit comments

Comments
 (0)