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

Commit

Permalink
add prettier
Browse files Browse the repository at this point in the history
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
  • Loading branch information
XuehaoSun committed Apr 2, 2024
1 parent 3e4ce7e commit 8fa8edb
Show file tree
Hide file tree
Showing 159 changed files with 107,160 additions and 90,675 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/build-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
password: ${{ secrets.REGISTRY_TOKEN }}
runs-on: [aia-devops] # Runner Label
steps:
- uses: actions/checkout@v4
with:
# fetch-depth: 0
# submodules: recursive
set-safe-directory: true
- name: Build Container
run: docker compose build
working-directory: ./docker
- uses: actions/checkout@v4
with:
# fetch-depth: 0
# submodules: recursive
set-safe-directory: true
- name: Build Container
run: docker compose build
working-directory: ./docker
push:
needs: [build]
strategy:
Expand All @@ -41,12 +41,12 @@ jobs:
password: ${{ secrets.REGISTRY_TOKEN }}
runs-on: [aia-devops]
steps:
- uses: docker/login-action@v2
with: # CAAS Registry Creds
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Push Container # tlt-<num>-<container>
run: |
docker tag intel/ai-tools:itrex-${{ matrix.container }}-latest ${{ secrets.REGISTRY }}/aiops/mlops-ci:itrex-ww$(date +"%U")-${{ matrix.container }}
docker push ${{ secrets.REGISTRY }}/aiops/mlops-ci:itrex-ww$(date +"%U")-${{ matrix.container }}
- uses: docker/login-action@v2
with: # CAAS Registry Creds
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Push Container # tlt-<num>-<container>
run: |
docker tag intel/ai-tools:itrex-${{ matrix.container }}-latest ${{ secrets.REGISTRY }}/aiops/mlops-ci:itrex-ww$(date +"%U")-${{ matrix.container }}
docker push ${{ secrets.REGISTRY }}/aiops/mlops-ci:itrex-ww$(date +"%U")-${{ matrix.container }}
6 changes: 2 additions & 4 deletions .github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ jobs:
submodules: "recursive"

- name: Load environment variables
run:
cat ~/itrex-actions-runner/.env >> $GITHUB_ENV
run: cat ~/itrex-actions-runner/.env >> $GITHUB_ENV

- name: Build Docker Image
run:
docker build --no-cache ./ --target hpu --build-arg REPO=${{ github.server_url }}/${{ github.event.pull_request.head.repo.full_name }}.git --build-arg REPO_PATH="." --build-arg http_proxy="${{ env.HTTP_PROXY_IMAGE_BUILD }}" --build-arg https_proxy="${{ env.HTTPS_PROXY_IMAGE_BUILD }}" -f intel_extension_for_transformers/neural_chat/docker/Dockerfile -t chatbotfinetune-hpu:latest && yes | docker container prune && yes | docker image prune
run: docker build --no-cache ./ --target hpu --build-arg REPO=${{ github.server_url }}/${{ github.event.pull_request.head.repo.full_name }}.git --build-arg REPO_PATH="." --build-arg http_proxy="${{ env.HTTP_PROXY_IMAGE_BUILD }}" --build-arg https_proxy="${{ env.HTTPS_PROXY_IMAGE_BUILD }}" -f intel_extension_for_transformers/neural_chat/docker/Dockerfile -t chatbotfinetune-hpu:latest && yes | docker container prune && yes | docker image prune

- name: Start Docker Container
id: master_container
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/chatbot-finetune-mpt-7b-chat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ jobs:
uses: actions/checkout@v4

- name: Load environment variables
run:
cat ~/itrex-actions-runner/.env >> $GITHUB_ENV
run: cat ~/itrex-actions-runner/.env >> $GITHUB_ENV
- name: Prepare Cache
run: cp ${{ env.CACHE }}/torch/* ./

- name: Build Docker Image
run:
if [[ $(docker images | grep chatbotfinetune-mpi | wc -l) == 0 ]]; then
docker build ./ --target cpu --build-arg REPO=${{ github.server_url }}/${{ github.repository }}.git --build-arg REPO_PATH="." --build-arg http_proxy="${{ env.HTTP_PROXY_IMAGE_BUILD }}" --build-arg https_proxy="${{ env.HTTPS_PROXY_IMAGE_BUILD }}" -f intel_extension_for_transformers/neural_chat/docker/Dockerfile -t chatbotfinetune-mpi:latest && yes | docker container prune && yes | docker image prune;
run: if [[ $(docker images | grep chatbotfinetune-mpi | wc -l) == 0 ]]; then
docker build ./ --target cpu --build-arg REPO=${{ github.server_url }}/${{ github.repository }}.git --build-arg REPO_PATH="." --build-arg http_proxy="${{ env.HTTP_PROXY_IMAGE_BUILD }}" --build-arg https_proxy="${{ env.HTTPS_PROXY_IMAGE_BUILD }}" -f intel_extension_for_transformers/neural_chat/docker/Dockerfile -t chatbotfinetune-mpi:latest && yes | docker container prune && yes | docker image prune;
fi

- name: Start Docker Container on socket 0
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ jobs:
run: cat ~/actions-runner/.env >> $GITHUB_ENV

- name: Build Docker Image
run:
if [ $(docker images | grep chatbotinfer-1-gha | wc -l) == 0 ]; then
docker build --no-cache ./ --target cpu --build-arg REPO=${{ github.server_url }}/${{ github.repository }}.git --build-arg REPO_PATH="." --build-arg http_proxy="${{ env.HTTP_PROXY_IMAGE_BUILD }}" --build-arg https_proxy="${{ env.HTTPS_PROXY_IMAGE_BUILD }}" -f intel_extension_for_transformers/neural_chat/docker/Dockerfile -t chatbotinfer-1-gha:latest && yes | docker container prune && yes | docker image prune;
run: if [ $(docker images | grep chatbotinfer-1-gha | wc -l) == 0 ]; then
docker build --no-cache ./ --target cpu --build-arg REPO=${{ github.server_url }}/${{ github.repository }}.git --build-arg REPO_PATH="." --build-arg http_proxy="${{ env.HTTP_PROXY_IMAGE_BUILD }}" --build-arg https_proxy="${{ env.HTTPS_PROXY_IMAGE_BUILD }}" -f intel_extension_for_transformers/neural_chat/docker/Dockerfile -t chatbotinfer-1-gha:latest && yes | docker container prune && yes | docker image prune;
fi

- name: Start Docker Container
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/chatbot-inference-mpt-7b-chat-hpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
submodules: "recursive"

- name: Load environment variables
run:
cat ~/itrex-actions-runner/.env >> $GITHUB_ENV
run: cat ~/itrex-actions-runner/.env >> $GITHUB_ENV

- name: Build Docker Image
run: docker build --no-cache ./ --target hpu --build-arg REPO=${{ github.server_url }}/${{ github.event.pull_request.head.repo.full_name }}.git --build-arg REPO_PATH="." --build-arg http_proxy="${{ env.HTTP_PROXY_IMAGE_BUILD }}" --build-arg https_proxy="${{ env.HTTPS_PROXY_IMAGE_BUILD }}" -f intel_extension_for_transformers/neural_chat/docker/Dockerfile -t chatbotinfer-hpu:latest && yes | docker container prune && yes | docker image prune
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/chatbot-inference-mpt-7b-chat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ jobs:
uses: actions/checkout@v4

- name: Load environment variables
run:
cat ~/actions-runner/.env >> $GITHUB_ENV
run: cat ~/actions-runner/.env >> $GITHUB_ENV

- name: Build Docker Image
run:
if [ $(docker images | grep chatbotinfer-1-gha | wc -l) == 0 ]; then
docker build --no-cache ./ --target cpu --build-arg REPO=${{ github.server_url }}/${{ github.repository }}.git --build-arg REPO_PATH="." --build-arg http_proxy="${{ env.HTTP_PROXY_IMAGE_BUILD }}" --build-arg https_proxy="${{ env.HTTPS_PROXY_IMAGE_BUILD }}" -f intel_extension_for_transformers/neural_chat/docker/Dockerfile -t chatbotinfer-1-gha:latest && yes | docker container prune && yes | docker image prune;
run: if [ $(docker images | grep chatbotinfer-1-gha | wc -l) == 0 ]; then
docker build --no-cache ./ --target cpu --build-arg REPO=${{ github.server_url }}/${{ github.repository }}.git --build-arg REPO_PATH="." --build-arg http_proxy="${{ env.HTTP_PROXY_IMAGE_BUILD }}" --build-arg https_proxy="${{ env.HTTPS_PROXY_IMAGE_BUILD }}" -f intel_extension_for_transformers/neural_chat/docker/Dockerfile -t chatbotinfer-1-gha:latest && yes | docker container prune && yes | docker image prune;
fi

- name: Start Docker Container
Expand Down
43 changes: 20 additions & 23 deletions .github/workflows/chatbot-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ on:
branches:
- main
paths:
- '.github/workflows/chatbot-test.yml'
- '.github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml'
- '.github/workflows/chatbot-inference-mpt-7b-chat.yml'
- '.github/workflows/chatbot-finetune-mpt-7b-chat.yml'
- '.github/workflows/chatbot-inference-llama-2-7b-chat-hf-hpu.yml'
- '.github/workflows/chatbot-inference-mpt-7b-chat-hpu.yml'
- '.github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml'
- '.github/workflows/script/chatbot/**'
- '.github/workflows/sample_data/**'
- 'intel_extension_for_transformers/neural_chat/**'
- 'intel_extension_for_transformers/transformers/llm/finetuning/**'
- 'intel_extension_for_transformers/transformers/llm/quantization/**'
- 'intel_extension_for_transformers/transformers/**'
- 'workflows/chatbot/inference/**'
- 'workflows/chatbot/fine_tuning/**'
- '!intel_extension_for_transformers/neural_chat/docs/**'
- '!intel_extension_for_transformers/neural_chat/tests/ci/**'
- '!intel_extension_for_transformers/neural_chat/examples/**'
- '!intel_extension_for_transformers/neural_chat/assets/**'
- '!intel_extension_for_transformers/neural_chat/README.md'
- ".github/workflows/chatbot-test.yml"
- ".github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml"
- ".github/workflows/chatbot-inference-mpt-7b-chat.yml"
- ".github/workflows/chatbot-finetune-mpt-7b-chat.yml"
- ".github/workflows/chatbot-inference-llama-2-7b-chat-hf-hpu.yml"
- ".github/workflows/chatbot-inference-mpt-7b-chat-hpu.yml"
- ".github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml"
- ".github/workflows/script/chatbot/**"
- ".github/workflows/sample_data/**"
- "intel_extension_for_transformers/neural_chat/**"
- "intel_extension_for_transformers/transformers/llm/finetuning/**"
- "intel_extension_for_transformers/transformers/llm/quantization/**"
- "intel_extension_for_transformers/transformers/**"
- "workflows/chatbot/inference/**"
- "workflows/chatbot/fine_tuning/**"
- "!intel_extension_for_transformers/neural_chat/docs/**"
- "!intel_extension_for_transformers/neural_chat/tests/ci/**"
- "!intel_extension_for_transformers/neural_chat/examples/**"
- "!intel_extension_for_transformers/neural_chat/assets/**"
- "!intel_extension_for_transformers/neural_chat/README.md"

workflow_dispatch:

Expand All @@ -34,14 +34,11 @@ concurrency:
cancel-in-progress: true

jobs:

call-inference-llama-2-7b-chat-hf:
uses: ./.github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml

call-inference-mpt-7b-chat:
uses: ./.github/workflows/chatbot-inference-mpt-7b-chat.yml


# call-inference-llama-2-7b-chat-hf-hpu:
# uses: ./.github/workflows/chatbot-inference-llama-2-7b_70b-chat-hf-hpu.yml
#
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cpp-graph-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ on:
workflow_dispatch:
inputs:
compiler_version:
description: 'compiler_version'
description: "compiler_version"
required: false
type: string
default: '13.1.0'
default: "13.1.0"
models:
description: 'models (in json)'
description: "models (in json)"
required: false
type: string
default: '["llama-2-7b-chat", "gptj-6b"]'
runner:
description: 'runner'
description: "runner"
required: false
type: string
default: 'spr'
default: "spr"

# If there is a new commit, the previous jobs will be canceled
concurrency:
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/llm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
pull_request:
branches: [main]
paths:
- '.github/workflows/llm-test.yml'
- '.github/workflows/script/models/run_llm.sh'
- "intel_extension_for_transformers/transformers/runtime/**"
- "!intel_extension_for_transformers/transformers/runtime/kernels/**"
- "!intel_extension_for_transformers/transformers/llm/runtime/neural_speed/**"
- "!intel_extension_for_transformers/transformers/runtime/test/**"
- "!intel_extension_for_transformers/transformers/runtime/third_party/**"
- "!intel_extension_for_transformers/transformers/runtime/docs/**"
- ".github/workflows/llm-test.yml"
- ".github/workflows/script/models/run_llm.sh"
- "intel_extension_for_transformers/transformers/runtime/**"
- "!intel_extension_for_transformers/transformers/runtime/kernels/**"
- "!intel_extension_for_transformers/transformers/llm/runtime/neural_speed/**"
- "!intel_extension_for_transformers/transformers/runtime/test/**"
- "!intel_extension_for_transformers/transformers/runtime/third_party/**"
- "!intel_extension_for_transformers/transformers/runtime/docs/**"
workflow_dispatch:

# If there is a new commit, the previous jobs will be canceled
Expand All @@ -25,7 +25,6 @@ env:
WORKING_DIR: ${{ github.workspace }}
EXTRA_CONTAINER_NAME: "codeScan"


jobs:
LLM-Workflow:
runs-on: spr
Expand Down Expand Up @@ -73,7 +72,6 @@ jobs:
cd ${{ github.workspace }}/.github/workflows/script/models
bash run_llm.sh --model=${{ matrix.modelName }} --framework=${{ matrix.framework }} --mode=${{ matrix.mode }} --conda_env_name=llm-test --precision=fp8
- name: Publish pipeline artifact
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
Expand Down
46 changes: 22 additions & 24 deletions .github/workflows/optimize-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ env:
EXTRA_CONTAINER_NAME: "utTest"
EXTRA_CONTAINER_NAME2: "codeScan"


jobs:
Optimize-Workflow:
runs-on: itrex-node
Expand Down Expand Up @@ -53,7 +52,7 @@ jobs:
with:
submodules: "recursive"
fetch-tags: true
# We need this because GitHub needs to clone the branch to pipeline
# We need this because GitHub needs to clone the branch to pipeline
- name: Docker Build
run: |
docker build -f ${{ github.workspace }}/.github/workflows/docker/${{ env.DOCKER_FILE_NAME }}.dockerfile -t ${{ env.REPO_NAME }}:${{ env.REPO_TAG }} .
Expand Down Expand Up @@ -96,32 +95,32 @@ jobs:

- name: Tuning
run: |
docker exec ${{ env.CONTAINER_NAME }} \
bash -c "cd /intel-extension-for-transformers/.github/workflows/script/models \
&& bash run_optimize.sh --model=${{ matrix.modelName }} --framework=${{ matrix.framework }} --mode='tuning'"
docker exec ${{ env.CONTAINER_NAME }} \
bash -c "cd /intel-extension-for-transformers/.github/workflows/script/models \
&& bash run_optimize.sh --model=${{ matrix.modelName }} --framework=${{ matrix.framework }} --mode='tuning'"
- name: INT8 Benchmark
run: |
docker exec ${{ env.CONTAINER_NAME }} \
bash -c "cd /intel-extension-for-transformers/.github/workflows/script/models \
&& bash run_optimize.sh --model=${{ matrix.modelName }} --framework=${{ matrix.framework }} --mode=${{ matrix.mode }} --precision=int8 --PERF_STABLE_CHECK=${{ vars.PERF_STABLE_CHECK }}"
docker exec ${{ env.CONTAINER_NAME }} \
bash -c "cd /intel-extension-for-transformers/.github/workflows/script/models \
&& bash run_optimize.sh --model=${{ matrix.modelName }} --framework=${{ matrix.framework }} --mode=${{ matrix.mode }} --precision=int8 --PERF_STABLE_CHECK=${{ vars.PERF_STABLE_CHECK }}"
- name: FP32 Benchmark
run: |
docker exec ${{ env.CONTAINER_NAME }} \
bash -c "cd /intel-extension-for-transformers/.github/workflows/script/models \
&& bash run_optimize.sh --model=${{ matrix.modelName }} --framework=${{ matrix.framework }} --mode=${{ matrix.mode }} --precision=fp32 --PERF_STABLE_CHECK=${{ vars.PERF_STABLE_CHECK }}"
docker exec ${{ env.CONTAINER_NAME }} \
bash -c "cd /intel-extension-for-transformers/.github/workflows/script/models \
&& bash run_optimize.sh --model=${{ matrix.modelName }} --framework=${{ matrix.framework }} --mode=${{ matrix.mode }} --precision=fp32 --PERF_STABLE_CHECK=${{ vars.PERF_STABLE_CHECK }}"
- name: Collect Log
run: |
docker exec ${{ env.CONTAINER_NAME }} \
bash -c "cd /intel-extension-for-transformers/.github/workflows/script/models \
&& python collect_model_log.py --model=${{ matrix.modelName }} \
--framework=${{ matrix.framework }} \
--logs_dir=/intel-extension-for-transformers/${{matrix.framework}}_${{matrix.modelName}} \
--output_dir=/intel-extension-for-transformers/${{matrix.framework}}_${{matrix.modelName}} \
--build_id=${{ github.run_id }} \
--model_test_type=optimize"
docker exec ${{ env.CONTAINER_NAME }} \
bash -c "cd /intel-extension-for-transformers/.github/workflows/script/models \
&& python collect_model_log.py --model=${{ matrix.modelName }} \
--framework=${{ matrix.framework }} \
--logs_dir=/intel-extension-for-transformers/${{matrix.framework}}_${{matrix.modelName}} \
--output_dir=/intel-extension-for-transformers/${{matrix.framework}}_${{matrix.modelName}} \
--build_id=${{ github.run_id }} \
--model_test_type=optimize"
- name: Publish pipeline artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -154,10 +153,10 @@ jobs:

- name: Analysis Summary
run: |
cd ${{ env.OUT_SCRIPT_PATH }}
mkdir generated
pip install requests
python summary.py --logs_dir ${{ env.OUT_SCRIPT_PATH }}/log --output_dir=generated
cd ${{ env.OUT_SCRIPT_PATH }}
mkdir generated
pip install requests
python summary.py --logs_dir ${{ env.OUT_SCRIPT_PATH }}/log --output_dir=generated
- name: Download Reference Artifact
id: download-artifact
Expand Down Expand Up @@ -189,7 +188,6 @@ jobs:
MR_source_branch: ${{ github.head_ref }}
ghprbActualCommit: ${{ github.event.pull_request.head.sha }}


- name: Publish Report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build Online Document
run: |
git config --local --get remote.origin.url
cd docs/build_docs
bash build.sh latest
- uses: actions/checkout@v4
- name: Build Online Document
run: |
git config --local --get remote.origin.url
cd docs/build_docs
bash build.sh latest
- name: Push to github
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build_tmp/gh-pages
publish_branch: gh-pages
- name: Push to github
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build_tmp/gh-pages
publish_branch: gh-pages
2 changes: 1 addition & 1 deletion .github/workflows/sample_data/alpaca_data_sample_45.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@
"input": "",
"output": "The value of x is 2. To find the value, simplify the equation by subtracting 2y from both sides, giving 4x = 10; dividing both sides by 4, giving x = 2/4, which is equal to 2."
}
]
]
Loading

0 comments on commit 8fa8edb

Please sign in to comment.