Skip to content

Commit ad20cf1

Browse files
authored
add fp8 block example test (#1697)
SUMMARY: [INFERENG-1291](https://issues.redhat.com/browse/INFERENG-1291) makes a simple request to include the tests/examples/test_quantization_w8a8_fp8.py script in our existing examples test cases. TEST PLAN: Verified by running the Custom Test Run workflow requesting the "examples" tests. the [new test passes](https://github.com/neuralmagic/llm-compressor-testing/actions/runs/16653093155/job/47147130847#step:12:92): tests/examples/test_quantization_w8a8_fp8.py::TestQuantizationW8A8_FP8::test_example_scripts[gemma2_example.py] PASSED [ 50%] tests/examples/test_quantization_w8a8_fp8.py::TestQuantizationW8A8_FP8::test_example_scripts[fp8_block_example.py] PASSED [ 57%] Signed-off-by: Derek Kozikowski <[email protected]>
1 parent aeb4b79 commit ad20cf1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

tests/examples/test_quantization_w8a8_fp8.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,16 @@ def test_doc_example_command(self, example_dir: str, tmp_path: Path):
3939

4040
assert result.returncode == 0, gen_cmd_fail_message(command, result)
4141

42-
def test_gemma2_example_script(self, example_dir: str, tmp_path: Path):
42+
@pytest.mark.parametrize(
43+
"script_file",
44+
[
45+
"gemma2_example.py",
46+
"fp8_block_example.py",
47+
],
48+
)
49+
def test_example_scripts(self, example_dir: str, tmp_path: Path, script_file: str):
4350
"""
44-
Test for the "gemma2_example.py" script in the folder.
51+
Test for example scripts in the folder.
4552
"""
46-
script_filename = "gemma2_example.py"
47-
command, result = copy_and_run_script(tmp_path, example_dir, script_filename)
48-
53+
command, result = copy_and_run_script(tmp_path, example_dir, script_file)
4954
assert result.returncode == 0, gen_cmd_fail_message(command, result)

0 commit comments

Comments
 (0)