ts.utils package¶
Submodules¶
ts.utils.timeit_decorator module¶
timeit decorator
ts.utils.util module¶
Utility functions for TorchServe
- class ts.utils.util.PT2Backend(value)[source]¶
-
An enumeration.
- AOT_CUDAGRAPHS = 'aot_cudagraphs'¶
- AOT_EAGER = 'aot_eager'¶
- AOT_NVFUSER = 'aot_nvfuser'¶
- EAGER = 'eager'¶
- FX2TRT = 'fx2trt'¶
- HPU_BACKEND = 'hpu_backend'¶
- INDUCTOR = 'inductor'¶
- IPEX = 'ipex'¶
- NVFUSER = 'nvfuser'¶
- OFI = 'ofi'¶
- ONNXRT = 'onnxrt'¶
- OPENVINO = 'openvino'¶
- TENSORRT = 'tensorrt'¶
- TORCHXLA_TRACE_ONCE = 'torchxla_trace_once'¶
- ts.utils.util.deprecated(version, replacement='', klass=<class 'PendingDeprecationWarning'>)[source]¶
This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used.
- Parameters:
version – The version in which the function will be removed.
replacement – The replacement function, if any.
klass – The category of warning
- ts.utils.util.list_classes_from_module(module, parent_class=None)[source]¶
Parse user defined module to get all model service classes in it.
- Parameters:
module –
parent_class –
- Returns:
List of model service class definitions
Module contents¶
Util files for TorchServe