Skip to content

Commit c2f6618

Browse files
tenacity
1 parent 356c813 commit c2f6618

File tree

5 files changed

+5
-169
lines changed

5 files changed

+5
-169
lines changed

.github/workflows/gpu-integ-new.yaml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/gpu-integ-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v2
23-
- name: Set up Python 3.9
23+
- name: Set up Python 3.11
2424
uses: actions/setup-python@v2
2525
with:
26-
python-version: 3.9
26+
python-version: 3.11
2727
- name: Install Python dependencies
2828
run: pip install -e .[test,dev,torch]
2929
- name: Build Docker

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"mock==2.0.0",
5151
"docker",
5252
"requests",
53+
"tenacity"
5354
]
5455
extras["quality"] = [
5556
"black",

tests/integ/test_container.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from huggingface_inference_toolkit.utils import _is_gpu_available, _load_repository_from_hf
1010
from integ.config import task2input, task2model, task2output, task2validation
1111
from transformers.testing_utils import require_torch, slow, require_tf, _run_slow_tests
12+
from tenacity import retry
1213

1314
IS_GPU = _run_slow_tests
1415
DEVICE = "gpu" if IS_GPU else "cpu"
@@ -39,7 +40,7 @@ def wait_for_container_to_be_ready(base_url):
3940
time.sleep(2)
4041
return True
4142

42-
43+
@retry
4344
def verify_task(container: DockerClient, task: str, port: int = 5000, framework: str = "pytorch"):
4445
BASE_URL = f"http://localhost:{port}"
4546
input = task2input[task]

tests/integ/test_container_new.py

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)