logo
client
repo-copy-icon

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

1.7 KiB

Remote Operator

author: shiyu


Desription

Remote triton server.


Code Example

Run with ops:

from towhee.dc2 import ops

c = ops.triton.client('<your-ip>:<your-port>')
res = c('<your-data>')

Run with pipeline:

from towhee.dc2 import ops, pipe

p = (pipe.input('data')
        .map('data', 'res', ops.triton.client('<your-ip>:<your-port>'))
        .output('res'))
        
p('<your-data>').get()


Factory Constructor

Create the operator via the following factory method:

towhee.remote(uri, mode='infer', model_name='pipeline', protocol='grpc')

Parameters:

url: str

IP address and port for the triton server, such as ':' and '127.0.0.1:8001'.

model_name: str

The name of the model to run inference, defaults to 'pipline'.


Interface

Parameters:

data:

The data to your triton server.

Returns:

Return the results in triton.

More Resources

1.7 KiB

Remote Operator

author: shiyu


Desription

Remote triton server.


Code Example

Run with ops:

from towhee.dc2 import ops

c = ops.triton.client('<your-ip>:<your-port>')
res = c('<your-data>')

Run with pipeline:

from towhee.dc2 import ops, pipe

p = (pipe.input('data')
        .map('data', 'res', ops.triton.client('<your-ip>:<your-port>'))
        .output('res'))
        
p('<your-data>').get()


Factory Constructor

Create the operator via the following factory method:

towhee.remote(uri, mode='infer', model_name='pipeline', protocol='grpc')

Parameters:

url: str

IP address and port for the triton server, such as ':' and '127.0.0.1:8001'.

model_name: str

The name of the model to run inference, defaults to 'pipline'.


Interface

Parameters:

data:

The data to your triton server.

Returns:

Return the results in triton.

More Resources