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 的公用程式檔案