Skip to content
Closed

test #95

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
9383f8d
Set up CI with Azure Pipelines
WenjiaoYue Jul 22, 2022
2cff297
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 22, 2022
ca0d458
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 22, 2022
613af19
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 22, 2022
c8d063e
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 22, 2022
ddb386d
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 22, 2022
862cf8d
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 22, 2022
7a203be
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 22, 2022
296ea5b
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 22, 2022
ce79bcb
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
088be3a
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
023e8e1
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
6496a52
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
f2fe675
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
9af7fb6
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
d3e47c0
Set up CI with Azure Pipelines
WenjiaoYue Jul 23, 2022
47e04a8
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
93135f4
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
809764a
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
7320802
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
6a492fc
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
bf06edd
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
9ba34cb
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
8bb944c
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
ad78a8a
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
f8bac62
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
86a164d
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
f3ed8e2
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
fee7aa4
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
6f37c67
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
6d5f0d5
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
863342a
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
bd35e21
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
c0297af
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
cb6d3a0
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
87e3d78
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
34e8a38
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
4b3f1c6
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
129dce8
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
a55c570
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
c532043
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
632b8bd
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
81be3e9
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
b9d63d9
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
ff26aa3
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
014f5d8
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 23, 2022
e33f3ac
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
baa370b
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
6455748
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
c8fa485
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
b2d87ea
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
6ff39bc
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
681883e
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
89a7011
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
53ccc31
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
6b38435
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
e606798
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
6b0a531
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
8eecf2d
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
c10ff89
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
130fad2
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
85da54c
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
c570c0a
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
0defa90
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
d6f96b2
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
7474117
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
2de87ea
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
c3ac70e
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
10d18b9
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
7fc3c38
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
32755b8
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
a1c2d8a
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
390a1f1
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
3e01781
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
ef1787c
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
486d3ff
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
2d40115
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
b934350
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
f354828
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
f64e031
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
de6036d
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
5fb2c13
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
4c0709a
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
d1f9b92
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
5d9d54d
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
639072c
Update version.py
WenjiaoYue Jul 25, 2022
75cca3e
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
8958249
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
26c0aba
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 25, 2022
e643d06
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 26, 2022
df1fe7d
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 26, 2022
353b59f
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 26, 2022
93d21fd
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 26, 2022
a792176
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 26, 2022
0c05ca7
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 26, 2022
c2774f6
Update objective.py
WenjiaoYue Jul 26, 2022
65e8761
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 26, 2022
942756b
Update azure-pipelines.yml for Azure Pipelines
WenjiaoYue Jul 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

pr:
- main

pool: wenjiao-test

variables:
VAL_PATH: /home2/wenjiaoy/sxh/val/frameworks.ai.lpot.lpot-validation
target_path: "neural_compressor"

stages:
# - stage: pylint
# dependsOn: []
# jobs:
# - job: pylint_test
# steps:
# - task: Bash@3
# inputs:
# targetType: "inline"
# script: |
# pip install pylint==2.12.1
# pip install intel-tensorflow
# python -m pylint -f json --disable=R,C,W,E1129 --enable=line-too-long --max-line-length=120 --extension-pkg-whitelist=numpy --ignored-classes=TensorProto,NodeProto --ignored-modules=tensorflow,torch,torch.quantization,torch.tensor,torchvision,mxnet,onnx,onnxruntime ./neural_compressor #> $(Build.SourcesDirectory)/lpot-pylint.json
# exit_code=$?
# if [ ${exit_code} -ne 0 ] ; then
# echo "PyLint exited with non-zero exit code."; exit 1
# fi
# exit 0

# - stage: bandit
# dependsOn: []
# jobs:
# - job: bandit_test
# steps:
# - task: Bash@3
# inputs:
# targetType: "inline"
# script: |
# pip install bandit
# python -m bandit -r -lll -iii neural_compressor > $(Build.SourcesDirectory)/lpot-bandit.log
# exit_code=$?
# if [ ${exit_code} -ne 0 ] ; then
# echo "Bandit exited with non-zero exit code."; exit 1
# fi
# exit 0

# - stage: pyspelling
# dependsOn: []
# jobs:
# - job: pyspelling_test
# steps:
# - task: Bash@3
# inputs:
# targetType: "inline"
# script: |
# pip install pyspelling
# # Update paths to validation and lpot repositories
# LPOT_REPO=$(WORKSPACE)
# REPO_DIR=$(WORKSPACE)
# VAL_REPO=$(VAL_PATH)

# # sed -i "s|\${VAL_REPO}|$(VAL_REPO)|g" $(VAL_REPO)/neural_coder/pyspelling_conf.yaml
# # sed -i "s|\${LPOT_REPO}|$(REPO_DIR)|g" $(VAL_REPO)/neural_coder/pyspelling_conf.yaml
# sed -i "s|\${TEST_REPO}|$(VAL_PATH)|g" $(VAL_PATH)/neural_coder/pyspelling_conf.yaml
# sed -i "s|\${LPOT_REPO}|$(WORKSPACE)|g" $(VAL_PATH)/neural_coder/pyspelling_conf.yaml
# echo "Modified config:"
# cat $(VAL_PATH)/neural_coder/pyspelling_conf.yaml
# pyspelling -c $(VAL_PATH)/neural_coder/pyspelling_conf.yaml > $(Build.SourcesDirectory)/pyspelling_output.log
# exit_code=$?
# if [ ${exit_code} -ne 0 ] ; then
# echo "Pyspelling exited with non-zero exit code."; exit 1
# fi
# exit 0

- stage: copyright
dependsOn: []
jobs:
- job: copyright_check
steps:
- task: Bash@3
inputs:
targetType: "inline"
script: |
# echo $(System.PullRequest.SourceBranch)
# echo $(System.PullRequest.TargetBranch)
supported_extensions=(py, sh, yaml)

echo $(Build.SourcesDirectory)
echo $(Agent.BuildDirectory)
echo $(Pipeline.Workspace)
echo $(System.DefaultWorkingDirectory)
pwd

set -xe
git --no-pager diff --name-only $(git show-ref -s remotes/origin/$(System.PullRequest.TargetBranch)) ./$(target_path) > $(WORKSPACE)/diff.log
cat $(WORKSPACE)/diff.log
files=$(cat $(WORKSPACE)/diff.log | awk '!a[$0]++')

for file in ${files}
do
echo "hello world 1"
if [[ "${supported_extensions[@]}" =~ "${file##*.}" ]]; then
echo "hello world 2"
echo "Checking license in ${file}"

if [ $(grep -E -c "Copyright \\(c\\) ([0-9]{4})(-[0-9]{4})? Intel Corporation" ${file}) = 0 ]; then
echo "hello world 3"
echo ${files} >> $(Build.SourcesDirectory)/copyright_issue_summary.log
fi
else
echo "Skipping ${file}"
fi
done
- job: status_check
dependsOn: copyright_check
steps:
- task: Bash@3
inputs:
targetType: "inline"
script: |
ls $(Build.SourcesDirectory)/copyright_issue_summary.log
exit_code=$?
if [ ${exit_code} -ne 0 ] ; then
echo "------------------Check <copyright_issue_summary.log> for wrong file list !!!!!!!!!!!!!!!!!!!!!!!"; exit 1
fi
exit 0
1 change: 0 additions & 1 deletion neural_compressor/objective.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 0 additions & 1 deletion neural_compressor/version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down