Skip to content

Commit 71ed9a7

Browse files
authored
[Test] Make test_pipeline_call_is_async less problematic. (#1251)
* initial commit * initial commit * quality * make flaky * increase the error bands * cleanup * add flaky after all...
1 parent 5a158ee commit 71ed9a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: tests/deepsparse/pipelines/test_pipeline.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import numpy
2020

21+
import flaky
2122
import pytest
2223
from deepsparse.base_pipeline import BasePipeline
2324
from deepsparse.pipeline import (
@@ -124,6 +125,7 @@ def test_pipeline_executor_num_workers():
124125
assert executor._max_workers >= 1
125126

126127

128+
@flaky.flaky(max_runs=2, min_passes=1)
127129
@mock_engine(rng_seed=0)
128130
def test_pipeline_call_is_async(engine_mock):
129131
# attempts to verify that pipeline calls to engine are async
@@ -158,4 +160,4 @@ def sleep_then_engine_forward(xs, context):
158160

159161
# instead of doing a hard comparison of timing for each separate
160162
# duration, do relative comparison of timing
161-
assert numpy.allclose(dur_1_worker / dur_2_worker, 2, atol=0.1)
163+
assert numpy.allclose(dur_1_worker / dur_2_worker, 2, atol=0.15)

0 commit comments

Comments
 (0)