Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Adapt quant lm head #6318

Adapt quant lm head

Adapt quant lm head #6318

Workflow file for this run

name: Format Scan
on:
pull_request:
branches: [main]
paths:
- intel_extension_for_transformers/**
- neural_chat/**
- workflows/**
- setup.py
- .github/workflows/format_scan.yml
- .github/workflows/script/formatScan/**
workflow_dispatch:
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
DOCKER_CONFIG_NAME: "commonDockerConfig"
REPO_NAME: "code-scan"
REPO_TAG: "1.0"
DOCKER_FILE_NAME: "codeScan"
CONTAINER_NAME: "codeScan"
permissions:
contents: read
jobs:
format-scan:
runs-on: itrex-node-spell
strategy:
matrix:
job_name: [
"pylint",
"bandit",
# "clangformat",
"cloc",
"cpplint",
# "pydocstyle",
#"pyspelling",
"hadolint"
]
fail-fast: false
steps:
- name: Docker Clean Up
run: |
docker ps -a
if [[ $(docker ps -a | grep -i '${{ env.CONTAINER_NAME }}-${{ runner.name }}'$) ]]; then
docker start ${{ env.CONTAINER_NAME }}-${{ runner.name }}
echo "remove left files through container ..."
docker exec ${{ env.CONTAINER_NAME }}-${{ runner.name }} bash -c "ls -a /intel-extension-for-transformers && rm -fr /intel-extension-for-transformers/* && rm -fr /intel-extension-for-transformers/.* || true"
fi
- name: Checkout out Repo
uses: actions/checkout@v4
- name: Docker Build
run: |
docker build -f ${{ github.workspace }}/.github/workflows/docker/${{ env.DOCKER_FILE_NAME }}.dockerfile -t ${{ env.REPO_NAME }}:${{ env.REPO_TAG }} .
- name: Docker Run
run: |
if [[ $(docker ps -a | grep -i '${{ env.CONTAINER_NAME }}-${{ runner.name }}'$) ]]; then
docker stop ${{ env.CONTAINER_NAME }}-${{ runner.name }}
docker rm -vf ${{ env.CONTAINER_NAME }}-${{ runner.name }} || true
fi
docker run -dit --memory="4g" --memory-reservation="1g" --disable-content-trust --privileged --name=${{ env.CONTAINER_NAME }}-${{ runner.name }} --shm-size="1g" \
-v ${{ github.workspace }}:/intel-extension-for-transformers \
${{ env.REPO_NAME }}:${{ env.REPO_TAG }}
- name: Code scan check
run: |
docker exec ${{ env.CONTAINER_NAME }}-${{ runner.name }} \
bash -c "bash /intel-extension-for-transformers/.github/workflows/script/formatScan/${{ matrix.job_name }}.sh"
- name: Publish pipeline artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.job_name }}
path: ${{ github.workspace }}/.github/workflows/script/formatScan/${{ matrix.job_name }}.*