towhee.serve.triton.builder.Builder¶
- class towhee.serve.triton.builder.Builder(dag: Dict, model_root: str)[source]¶
Bases:
object
Build triton models from towhee pipeline.
In V1, we only support a chain graph for we have not traced the input and output map.
- Parameters:
dag (dict) –
Output of dc.compile_dag()
- example: Only remain the info which is used in the TritonBuilder.
- {
- ‘start’: {
‘op_name’: ‘dummy_input’, ‘init_args’: None, ‘child_ids’: [‘cb2876f3’]
}, ‘cb2876f3’: {
’op_name’: ‘local/triton_py’, ‘init_args’: {}, ‘child_ids’: [‘fae9ba13’]
}, ‘fae9ba13’: {
’op_name’: ‘local/triton_nnop’, ‘init_args’: {‘model_name’: ‘test’},’child_ids’: [‘end’]
}, ‘end’: {
’op_name’: ‘end’, ‘init_args’: None, ‘call_args’: None, ‘child_ids’: []
}
}
model_root (str) – Triton models root.
Methods
build
load