update,
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
trigger: none
|
||||
|
||||
pr:
|
||||
autoCancel: true
|
||||
drafts: false
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- neural_compressor/common
|
||||
- neural_compressor/torch
|
||||
- examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/weight_only
|
||||
- setup.py
|
||||
- requirements_pt.txt
|
||||
- .azure-pipelines/scripts/models
|
||||
- .azure-pipelines/model-test-3x.yml
|
||||
- .azure-pipelines/template/docker-template.yml
|
||||
|
||||
variables:
|
||||
OUT_SCRIPT_PATH: $(Build.SourcesDirectory)/.azure-pipelines/scripts/models
|
||||
SCRIPT_PATH: /neural-compressor/.azure-pipelines/scripts
|
||||
|
||||
parameters:
|
||||
- name: PyTorch_Model_3X
|
||||
displayName: Run PyTorch models?
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
- name: PyTorchModelList
|
||||
type: object
|
||||
default:
|
||||
- opt_125m_woq_gptq_int4
|
||||
- opt_125m_woq_gptq_nf4_dq_bnb
|
||||
- opt_125m_woq_gptq_int4_dq_ggml
|
||||
|
||||
stages:
|
||||
- stage: PyTorchModels
|
||||
displayName: Run PyTorch Model
|
||||
pool: ICX-16C
|
||||
dependsOn: []
|
||||
condition: and(succeeded(), eq('${{ parameters.PyTorch_Model_3X }}', 'true'))
|
||||
jobs:
|
||||
- ${{ each model in parameters.PyTorchModelList }}:
|
||||
- job:
|
||||
displayName: ${{ model }}
|
||||
steps:
|
||||
- template: template/model-template.yml
|
||||
parameters:
|
||||
modelName: ${{ model }}
|
||||
framework: "pytorch"
|
||||
APIVersion: "3x"
|
||||
|
||||
- stage: GenerateLogs
|
||||
displayName: Generate Report
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
dependsOn: [PyTorchModels]
|
||||
jobs:
|
||||
- job: GenerateReport
|
||||
steps:
|
||||
- script: |
|
||||
echo ${BUILD_SOURCESDIRECTORY}
|
||||
rm -fr ${BUILD_SOURCESDIRECTORY} || sudo rm -fr ${BUILD_SOURCESDIRECTORY} || true
|
||||
echo y | docker system prune --all
|
||||
displayName: "Clean workspace"
|
||||
- checkout: self
|
||||
clean: true
|
||||
displayName: "Checkout out Repo"
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact:
|
||||
patterns: "**/*_summary.log"
|
||||
path: $(OUT_SCRIPT_PATH)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact:
|
||||
patterns: "**/*_tuning_info.log"
|
||||
path: $(OUT_SCRIPT_PATH)
|
||||
- task: UsePythonVersion@0
|
||||
displayName: "Use Python 3.10"
|
||||
inputs:
|
||||
versionSpec: "3.10"
|
||||
- script: |
|
||||
cd ${OUT_SCRIPT_PATH}
|
||||
mkdir generated
|
||||
mkdir last_generated
|
||||
pip install requests
|
||||
python -u collect_log_all.py --logs_dir $(OUT_SCRIPT_PATH) --output_dir generated --build_id=$(Build.BuildId)
|
||||
displayName: "Collect all logs"
|
||||
- task: DownloadPipelineArtifact@2
|
||||
continueOnError: true
|
||||
inputs:
|
||||
source: "specific"
|
||||
artifact: "FinalReport"
|
||||
patterns: "**.log"
|
||||
path: $(OUT_SCRIPT_PATH)/last_generated
|
||||
project: $(System.TeamProject)
|
||||
pipeline: "Model-Test"
|
||||
runVersion: "specific"
|
||||
runId: $(refer_buildId)
|
||||
displayName: "Download last logs"
|
||||
- script: |
|
||||
echo "------ Generating final report.html ------"
|
||||
cd ${OUT_SCRIPT_PATH}
|
||||
/usr/bin/bash generate_report.sh --WORKSPACE generated --output_dir generated --last_logt_dir last_generated
|
||||
displayName: "Generate report"
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(OUT_SCRIPT_PATH)/generated
|
||||
artifact: FinalReport
|
||||
publishLocation: "pipeline"
|
||||
displayName: "Publish report"
|
||||
- script: |
|
||||
if [ $(is_perf_reg) == 'true' ]; then
|
||||
echo "Some benchmark regression occurred or the reference data need to be updated, please check artifacts and reports."
|
||||
exit 1
|
||||
fi
|
||||
displayName: "Specify regression"
|
Reference in New Issue
Block a user