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 的實用檔案