Adapter
model_navigator.pytriton.PyTritonAdapter
Provides model and configuration for PyTrtion deployment.
Initialize PyTritonAdapter.
Parameters:
-
package
(Package
) –A package object to be searched for best possible model.
-
strategies
(Optional[List[RuntimeSearchStrategy]]
, default:None
) –List of strategies for finding the best model. Strategies are selected in provided order. When first fails, next strategy from the list is used. When no strategies have been provided it defaults to [
MaxThroughputAndMinLatencyStrategy
,MinLatencyStrategy
] -
runner_return_type
(TensorType
, default:NUMPY
) –The type of the output tensor. Defaults to
TensorType.NUMPY
. If the return_type supports CUDA tensors (e.g. TensorType.TORCH) and the input tensors are on CUDA, there will be no additional data transfer between CPU and GPU.
Source code in model_navigator/pytriton/__init__.py
batching
property
Returns status of batching support by the runner.
Returns:
-
bool
–True if runner supports batching, False otherwise.
config
property
Returns config for pytriton.
Returns:
-
ModelConfig
–ModelConfig with configuration for PyTrtion bind method.