mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 00:06:06 +08:00
[BugFix][CI/Build][ROCM] Fix import error and apply assert in appropriate case in test_struct_output_generate (#28311)
Signed-off-by: Randall Smith <ransmith@amd.com> Co-authored-by: Randall Smith <ransmith@amd.com>
This commit is contained in:
parent
15ae8e0784
commit
93103575ce
@ -677,9 +677,14 @@ def test_structured_output_with_reasoning_matrices(
|
||||
reasoning, content = run_reasoning_extraction(reasoner, [generated_text])
|
||||
print(f"Prompt: {prompt!r}\nReasoning: {reasoning!r}\nContent: {content!r}")
|
||||
|
||||
assert content is not None and reasoning is not None
|
||||
output_json = json.loads(content)
|
||||
jsonschema.validate(instance=output_json, schema=reasoning_schema)
|
||||
if "Qwen3" in model_name:
|
||||
assert content is not None
|
||||
|
||||
assert reasoning is not None
|
||||
|
||||
if content is not None:
|
||||
output_json = json.loads(content)
|
||||
jsonschema.validate(instance=output_json, schema=reasoning_schema)
|
||||
|
||||
|
||||
@pytest.mark.skip_global_cleanup
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user