Skip to content

Commit

Permalink
forked
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Jul 17, 2024
1 parent d113c2a commit d73afa0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ pytest-mock==3.12.0
pytest-dependency==0.6.0
pytest-ordering==0.6
pytest-xdist==3.5.0
pytest-forked==1.6.0
1 change: 1 addition & 0 deletions tests/post_training/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ onnx
onnxruntime
openvino
pytest
pytest-forked

librosa==0.10.0
memory-profiler==0.61.0
Expand Down
11 changes: 9 additions & 2 deletions tests/post_training/test_quantize_conformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def fixture_wc_reference_data():


@pytest.fixture(scope="session", name="ptq_result_data")
def fixture_ptq_report_data(output_dir, run_benchmark_app):
def fixture_ptq_report_data(output_dir, run_benchmark_app, pytestconfig):
data: Dict[str, RunInfo] = {}

yield data
Expand All @@ -126,7 +126,14 @@ def fixture_ptq_report_data(output_dir, run_benchmark_app):
df = df.drop(columns=["FPS"])

output_dir.mkdir(parents=True, exist_ok=True)
df.to_csv(output_dir / "results.csv", index=False)
output_file = output_dir / "results.csv"

if pytestconfig.getoption("forked") and output_file.exists():
# When run test with --forked to run test in separate process
# Used in post_training_performance jobs
df.to_csv(output_file, index=False, mode="a", header=False)
else:
df.to_csv(output_file, index=False)


@pytest.fixture(scope="session", name="wc_result_data")
Expand Down

0 comments on commit d73afa0

Please sign in to comment.