ts.utils 包¶
子模块¶
ts.utils.timeit_decorator 模块¶
timeit 装饰器
ts.utils.util 模块¶
TorchServe 的实用函数
- class ts.utils.util.PT2Backend(value)[源码]¶
-
一个枚举。
- 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'>)[源码]¶
此装饰器可用于标记函数为已弃用。当使用该函数时,将发出警告。
- 参数:
version – 函数将被移除的版本。
replacement – 替换函数(如果存在)。
klass – 警告的类别
- ts.utils.util.list_classes_from_module(module, parent_class=None)[源码]¶
解析用户定义的模块以获取其中的所有模型服务类。
- 参数:
module –
parent_class –
- 返回:
模型服务类定义的列表
模块内容¶
TorchServe 的实用文件