Unverified Commit 93103575 authored by rasmith's avatar rasmith Committed by GitHub
Browse files

[BugFix][CI/Build][ROCM] Fix import error and apply assert in appropriate case...


[BugFix][CI/Build][ROCM] Fix import error and apply assert in appropriate case in test_struct_output_generate (#28311)
Signed-off-by: default avatarRandall Smith <ransmith@amd.com>
Co-authored-by: default avatarRandall Smith <ransmith@amd.com>
parent 15ae8e07
...@@ -677,9 +677,14 @@ def test_structured_output_with_reasoning_matrices( ...@@ -677,9 +677,14 @@ def test_structured_output_with_reasoning_matrices(
reasoning, content = run_reasoning_extraction(reasoner, [generated_text]) reasoning, content = run_reasoning_extraction(reasoner, [generated_text])
print(f"Prompt: {prompt!r}\nReasoning: {reasoning!r}\nContent: {content!r}") print(f"Prompt: {prompt!r}\nReasoning: {reasoning!r}\nContent: {content!r}")
assert content is not None and reasoning is not None if "Qwen3" in model_name:
output_json = json.loads(content) assert content is not None
jsonschema.validate(instance=output_json, schema=reasoning_schema)
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 @pytest.mark.skip_global_cleanup
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment