快捷方式

⚠️ 注意:維護受限

本專案不再積極維護。現有版本仍然可用,但沒有計劃的更新、錯誤修復、新功能或安全補丁。使用者應注意,漏洞可能不會得到解決。

程式碼覆蓋率

要檢查分支穩定性,請按如下方式執行完整性檢查套件

  • 安裝依賴項(如果尚未安裝) 對於 CPU

    python ts_scripts/install_dependencies.py --environment=dev
    

    對於 GPU

    • 安裝依賴項(如果尚未安裝)

    python ts_scripts/install_dependencies.py --environment=dev --cuda=cu121
    

    支援的 cuda 版本有 cu121, cu118, cu117, cu116, cu113, cu111, cu102, cu101, cu92

  • 執行完整性檢查套件

    python ./torchserve_sanity.py
    

要執行前端構建套件,請執行以下命令

frontend/gradlew -p frontend clean build

TorchServe 前端構建套件包括

  • checkstyle

  • findbugs

  • PMD

  • UT

報告生成在以下路徑:frontend/server/build/reports

要執行後端 pytest 套件,請執行以下命令

python -m pytest --cov-report html:htmlcov --cov=ts/ ts/tests/unit_tests/

報告生成在以下路徑:htmlcov/

要對 ts 包執行 python linting,請執行以下命令

pylint -rn --rcfile=./ts/tests/pylintrc ts/.

要在 model-archiver 上執行 pytest 套件,請執行以下命令

cd model-archiver
python -m pytest --cov-report html:htmlcov_ut --cov=model_archiver/ model_archiver/tests/unit_tests/

報告生成在以下路徑:model-archiver/htmlcov_ut/

要在 model-archiver 上執行 IT 套件,請執行以下命令

cd model-archiver
pip install .
python -m pytest --cov-report html:htmlcov_it --cov=model_archiver/ model_archiver/tests/integ_tests/

報告生成在以下路徑:model-archiver/htmlcov_it/

注意:所有上述命令都需要在 serve 主目錄下執行

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

獲取針對初學者和高階開發者的深入教程

檢視教程

資源

查詢開發資源並獲得解答

檢視資源