Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] Make test_pipeline_call_is_async less problematic. #1251

Merged
merged 9 commits into from
Sep 18, 2023
4 changes: 3 additions & 1 deletion tests/deepsparse/pipelines/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import numpy

import flaky
import pytest
from deepsparse.base_pipeline import BasePipeline
from deepsparse.pipeline import (
Expand Down Expand Up @@ -124,6 +125,7 @@ def test_pipeline_executor_num_workers():
assert executor._max_workers >= 1


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

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