Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/test_lmdeploy/e2e/test_mixed_prefill_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ def test_mixed_prefill_precision(config, eager_mode):

pipe = None
try:
pipe = pipeline(model_path, backend_config=backend_config)
pipe = pipeline(
model_path, backend_config=backend_config, trust_remote_code=True
)
responses = pipe(
prompts,
gen_config=gen_config,
Expand Down
17 changes: 13 additions & 4 deletions tests/test_lmdeploy/utils/pipeline_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run_pipeline_chat_test(
block_size=block_size,
)
print("backend_config: ", backend_config)
pipe = pipeline(hf_path, backend_config=backend_config)
pipe = pipeline(hf_path, backend_config=backend_config, trust_remote_code=True)

# run testcases
gen_config = GenerationConfig(top_k=1)
Expand All @@ -67,7 +67,9 @@ def run_pipeline_chat_test(
"reproduce config info:",
"engine_config = " + str(backend_config),
"gen_config = " + str(gen_config),
'pipe = pipeline("' + hf_path + '", backend_config=engine_config)',
'pipe = pipeline("'
+ hf_path
+ '", backend_config=engine_config, trust_remote_code=True)',
'res = pipe("Hi, pls introduce shanghai", gen_config=gen_config)',
]
)
Expand Down Expand Up @@ -215,13 +217,20 @@ def run_pipeline_vl_chat_test(config, model_case, device_type, eager_mode=True):
)
print("backend_config: ", backend_config)
gen_config = GenerationConfig(top_k=1)
pipe = pipeline(hf_path, backend_config=backend_config, gen_config=gen_config)
pipe = pipeline(
hf_path,
backend_config=backend_config,
gen_config=gen_config,
trust_remote_code=True,
)

log_string = "\n".join(
[
"reproduce config info:",
"engine_config = " + str(backend_config),
'pipe = pipeline("' + hf_path + '", backend_config=engine_config)',
'pipe = pipeline("'
+ hf_path
+ '", backend_config=engine_config, trust_remote_code=True)',
]
)
print("log config: ", log_string)
Expand Down
Loading