PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
Fix UT coverage report (#180)
Sun, Xuehao8d08400f0917
diff --git a/.azure-pipelines/scripts/ut/.coverage b/.azure-pipelines/scripts/ut/.coverageindex 86487a1ba..659652406 100644--- a/.azure-pipelines/scripts/ut/.coverage+++ b/.azure-pipelines/scripts/ut/.coverage@@ -9,7 +9,5 @@ exclude_lines =pragma: no coverraise NotImplementedErrorraise TypeError- if self.device == "gpu":- if device == "gpu":except ImportError:except Exception as e:\ No newline at end of filediff --git a/.azure-pipelines/scripts/ut/collect_log.sh b/.azure-pipelines/scripts/ut/collect_log.shindex 8d93dd835..2bb74ea1c 100644--- a/.azure-pipelines/scripts/ut/collect_log.sh+++ b/.azure-pipelines/scripts/ut/collect_log.sh@@ -26,7 +26,7 @@ git fetchgit checkout mainrm -rf build dist *egg-infoecho y | pip uninstall auto_round-pip install -r requirements.txt && python setup.py install+python setup.py bdist_wheel && rm -rf build && pip install dist/auto_round*.whlcoverage erasecd /auto-round/log_dirdiff --git a/.azure-pipelines/scripts/ut/run_ut.sh b/.azure-pipelines/scripts/ut/run_ut.shindex 9f66b8f8a..3641b7d3d 100644--- a/.azure-pipelines/scripts/ut/run_ut.sh+++ b/.azure-pipelines/scripts/ut/run_ut.sh@@ -18,6 +18,7 @@ mkdir -p ${LOG_DIR}ut_log_name=${LOG_DIR}/ut.logfind . -name "test*.py" | sed "s,\.\/,python -m pytest --cov=\"${auto_round_path}\" --cov-report term --html=report.html --self-contained-html --cov-report xml:coverage.xml --cov-append -vs --disable-warnings ,g" > run.sh+cat run.shbash run.sh 2>&1 | tee ${ut_log_name}cp report.html ${LOG_DIR}/diff --git a/.azure-pipelines/template/ut-template.yml b/.azure-pipelines/template/ut-template.ymlindex 6a03a3a41..46addafa8 100644--- a/.azure-pipelines/template/ut-template.yml+++ b/.azure-pipelines/template/ut-template.yml@@ -45,7 +45,7 @@ steps:condition: succeededOrFailed()inputs:targetPath: ${{ parameters.uploadPath }}- artifact: $(System.JobAttempt)_${{ parameters.utArtifact }}_coverage+ artifact: ${{ parameters.utArtifact }}_coveragepublishLocation: "pipeline"- task: Bash@3diff --git a/.azure-pipelines/unit-test.yml b/.azure-pipelines/unit-test.ymlindex 9c6098c68..eff997208 100644--- a/.azure-pipelines/unit-test.yml+++ b/.azure-pipelines/unit-test.yml@@ -38,8 +38,7 @@ stages:dockerConfigName: "commonDockerConfig"utScriptFileName: "run_ut"uploadPath: $(UPLOAD_PATH)- utArtifact: "unit-test"-+ utArtifact: "ut"- stage: Unit_test_baselinedisplayName: Unit Test Baseline@@ -53,7 +52,7 @@ stages:dockerConfigName: "gitCloneDockerConfig"utScriptFileName: "run_ut"uploadPath: $(UPLOAD_PATH)- utArtifact: "unit-test-baseline"+ utArtifact: "ut_baseline"repo: $(REPO)- stage: Coverage@@ -78,7 +77,7 @@ stages:- task: DownloadPipelineArtifact@2inputs:artifact:- patterns: '*_coverage/.coverage'+ patterns: "*_coverage/.coverage"path: $(DOWNLOAD_PATH)- script: |@@ -87,8 +86,13 @@ stages:echo "--- docker ps ---"docker psecho "--- collect logs ---"+ docker exec collectLogs bash -c "cd /auto-round \+ && pip install -r requirements.txt \+ && python setup.py bdist_wheel && rm -rf build \+ && pip install dist/auto_round*.whl \+ && pip list"docker exec collectLogs /bin/bash +x -c "cd /auto-round/.azure-pipelines/scripts \- && bash ut/collect_log.sh"+ && bash ut/collect_log.sh"displayName: "Collect UT Coverage"- task: PublishPipelineArtifact@1