diff --git a/.azure-pipelines/scripts/ut/run_basic_others.sh b/.azure-pipelines/scripts/ut/run_basic_others.sh index 78b07e2cb79..9a4db7d6aef 100644 --- a/.azure-pipelines/scripts/ut/run_basic_others.sh +++ b/.azure-pipelines/scripts/ut/run_basic_others.sh @@ -16,9 +16,9 @@ sed -i '/ ux\//d' run.sh sed -i '/ neural_coder\//d' run.sh sed -i '/ ipex\//d' run.sh sed -i '/ itex\//d' run.sh -sed -i '/ pruning\//d' run.sh -sed -i '/ pruning_v1\//d' run.sh +sed -i '/ pruning/d' run.sh sed -i '/ scheduler\//d' run.sh +sed -i '/ nas\//d' run.sh echo "copy model for dynas..." mkdir -p .torch/ofa_nets || true diff --git a/.azure-pipelines/scripts/ut/run_basic_pruning.sh b/.azure-pipelines/scripts/ut/run_basic_pruning.sh index a13face7745..db07c70f01b 100644 --- a/.azure-pipelines/scripts/ut/run_basic_pruning.sh +++ b/.azure-pipelines/scripts/ut/run_basic_pruning.sh @@ -9,9 +9,9 @@ echo "set up UT env..." bash /neural-compressor/.azure-pipelines/scripts/ut/env_setup.sh lpot_path=$(python -c 'import neural_compressor; import os; print(os.path.dirname(neural_compressor.__file__))') cd /neural-compressor/test || exit 1 -find ./pruning -name "test*.py" | sed 's,\.\/,coverage run --source='"${lpot_path}"' --append ,g' | sed 's/$/ --verbose/'> run.sh -find ./pruning_v1 -name "test*.py" | sed 's,\.\/,coverage run --source='"${lpot_path}"' --append ,g' | sed 's/$/ --verbose/'>> run.sh +find ./pruning* -name "test*.py" | sed 's,\.\/,coverage run --source='"${lpot_path}"' --append ,g' | sed 's/$/ --verbose/'> run.sh find ./scheduler -name "test*.py" | sed 's,\.\/,coverage run --source='"${lpot_path}"' --append ,g' | sed 's/$/ --verbose/'>> run.sh +find ./nas -name "test*.py" | sed 's,\.\/,coverage run --source='"${lpot_path}"' --append ,g' | sed 's/$/ --verbose/'>> run.sh LOG_DIR=/neural-compressor/log_dir mkdir -p ${LOG_DIR} diff --git a/.azure-pipelines/template/docker-template.yml b/.azure-pipelines/template/docker-template.yml index 85ebfe2df00..33b921fabca 100644 --- a/.azure-pipelines/template/docker-template.yml +++ b/.azure-pipelines/template/docker-template.yml @@ -23,8 +23,8 @@ steps: targetType: "inline" script: | docker ps -a - docker start $(docker ps -aq) if [[ $(docker ps -a | grep -i '${{ parameters.containerName }}'$) ]]; then + docker start $(docker ps -aq) echo "remove left files through container ..." docker exec ${{ parameters.containerName }} bash -c "ls -a /neural-compressor && rm -fr /neural-compressor/* && rm -fr /neural-compressor/.* && ls -a /neural-compressor || true" fi diff --git a/.azure-pipelines/ut-basic.yml b/.azure-pipelines/ut-basic.yml index 549f67aed85..c329809c236 100644 --- a/.azure-pipelines/ut-basic.yml +++ b/.azure-pipelines/ut-basic.yml @@ -198,13 +198,16 @@ stages: jobs: - job: CollectDatafiles steps: - - template: template/docker-template.yml - parameters: - dockerConfigName: "commonDockerConfig" - repoName: "neural-compressor" - repoTag: "py38" - dockerFileName: "Dockerfile" - containerName: "" + - script: | + if [[ ! $(docker images | grep -i ${IMAGE_NAME}:${IMAGE_TAG}) ]]; then + docker build -f ${BUILD_SOURCESDIRECTORY}/.azure-pipelines/docker/Dockerfile.devel -t ${IMAGE_NAME}:${IMAGE_TAG} . + fi + docker images | grep -i ${IMAGE_NAME} + if [[ $? -ne 0 ]]; then + echo "NO Such Repo" + exit 1 + fi + displayName: "Build develop docker image" - task: DownloadPipelineArtifact@2 inputs: