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.
-
strategy
(Optional[RuntimeSearchStrategy]
, default:None
) –Strategy for finding the best model. Defaults to
MaxThroughputAndMinLatencyStrategy
-
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.