File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
model_repository/sample_optional Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -80,14 +80,11 @@ if __name__ == "__main__":
80
80
### With Triton
81
81
82
82
``` bash
83
- docker run --rm \
84
- -v ${PWD} :/models \
85
- nvcr.io/nvidia/tritonserver:22.01-pyt-python-py3 \
86
- tritonserver --model-repo=/models
83
+ ./bin/run_triton_tritony_sample.sh
87
84
```
88
85
89
86
``` bash
90
- pytest -m -s tests/test_tritony.py
87
+ pytest -s --cov-report term-missing --cov=tritony tests/
91
88
```
92
89
93
90
### Example with image_client.py
Original file line number Diff line number Diff line change @@ -20,6 +20,12 @@ input [
20
20
data_type: TYPE_FP32
21
21
optional: true
22
22
dims: [ -1 ]
23
+ },
24
+ {
25
+ name: " optional_model_string"
26
+ data_type: TYPE_STRING
27
+ optional: true
28
+ dims: [ -1 ]
23
29
}
24
30
]
25
31
Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ def test_basics(protocol_and_port):
25
25
26
26
sample = np .random .rand (1 , 100 ).astype (np .float32 )
27
27
result = client (sample )
28
- print ( f"Result: { np .isclose (result , sample ).all () } " )
28
+ assert np .isclose (result , sample ).all ()
29
29
30
30
result = client ({"model_in" : sample })
31
- print ( f"Dict Result: { np .isclose (result , sample ).all () } " )
31
+ assert np .isclose (result , sample ).all ()
32
32
33
33
34
34
def test_batching (protocol_and_port ):
@@ -40,7 +40,7 @@ def test_batching(protocol_and_port):
40
40
sample = np .random .rand (100 , 100 ).astype (np .float32 )
41
41
# client automatically makes sub batches with (50, 2, 100)
42
42
result = client (sample )
43
- print ( f"Result: { np .isclose (result , sample ).all () } " )
43
+ assert np .isclose (result , sample ).all ()
44
44
45
45
46
46
def test_exception (protocol_and_port ):
You can’t perform that action at this time.
0 commit comments