transformers
copied
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions
20 lines
387 B
20 lines
387 B
from towhee import triton_client
|
|
import sys
|
|
import time
|
|
|
|
num = int(sys.argv[-1])
|
|
data = 'Hello, world.'
|
|
client = triton_client.Client('localhost:8000')
|
|
|
|
# warm up
|
|
client.batch([data])
|
|
print('client: ok')
|
|
|
|
time.sleep(5)
|
|
|
|
print('test...')
|
|
start = time.time()
|
|
client.batch([data] * num, batch_size=8)
|
|
end = time.time()
|
|
print(f'duration: {end - start}')
|
|
print(f'qps: {num / (end - start)}')
|