File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
import pytest
2
2
from transformers .testing_utils import require_torch
3
+ import tenacity
3
4
4
5
from tests .integ .helpers import verify_task
5
6
6
7
7
8
class TestPytorchLocal :
8
-
9
+ @tenacity .retry (
10
+ stop = tenacity .stop_after_attempt (5 ),
11
+ reraise = True ,
12
+ )
9
13
@require_torch
10
14
@pytest .mark .parametrize (
11
15
"task" ,
@@ -43,6 +47,10 @@ def test_pt_container_local_model(
43
47
44
48
verify_task (task = task , port = local_container [1 ])
45
49
50
+ @tenacity .retry (
51
+ stop = tenacity .stop_after_attempt (5 ),
52
+ reraise = True ,
53
+ )
46
54
@require_torch
47
55
@pytest .mark .parametrize (
48
56
"repository_id" ,
@@ -61,6 +69,10 @@ def test_pt_container_custom_handler(
61
69
port = local_container [1 ],
62
70
)
63
71
72
+ @tenacity .retry (
73
+ stop = tenacity .stop_after_attempt (5 ),
74
+ reraise = True ,
75
+ )
64
76
@require_torch
65
77
@pytest .mark .parametrize (
66
78
"repository_id" ,
You can’t perform that action at this time.
0 commit comments