Skip to content

Commit

Permalink
Fix README.md with 23.08
Browse files Browse the repository at this point in the history
  • Loading branch information
kimdwkimdw committed Aug 31, 2023
1 parent d82974e commit bfea3e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,11 @@ if __name__ == "__main__":
### With Triton

```bash
docker run --rm \
-v ${PWD}:/models \
nvcr.io/nvidia/tritonserver:22.01-pyt-python-py3 \
tritonserver --model-repo=/models
./bin/run_triton_tritony_sample.sh
```

```bash
pytest -m -s tests/test_tritony.py
pytest -s --cov-report term-missing --cov=tritony tests/
```

### Example with image_client.py
Expand Down
6 changes: 6 additions & 0 deletions model_repository/sample_optional/config.pbtxt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ input [
data_type: TYPE_FP32
optional: true
dims: [ -1 ]
},
{
name: "optional_model_string"
data_type: TYPE_STRING
optional: true
dims: [ -1 ]
}
]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ def test_basics(protocol_and_port):

sample = np.random.rand(1, 100).astype(np.float32)
result = client(sample)
print(f"Result: {np.isclose(result, sample).all()}")
assert np.isclose(result, sample).all()

result = client({"model_in": sample})
print(f"Dict Result: {np.isclose(result, sample).all()}")
assert np.isclose(result, sample).all()


def test_batching(protocol_and_port):
Expand All @@ -40,7 +40,7 @@ def test_batching(protocol_and_port):
sample = np.random.rand(100, 100).astype(np.float32)
# client automatically makes sub batches with (50, 2, 100)
result = client(sample)
print(f"Result: {np.isclose(result, sample).all()}")
assert np.isclose(result, sample).all()


def test_exception(protocol_and_port):
Expand Down

0 comments on commit bfea3e9

Please sign in to comment.