Skip to content

Commit

Permalink
fix and test
Browse files Browse the repository at this point in the history
  • Loading branch information
plusbang committed Jul 1, 2024
1 parent cf8eb7b commit 284e884
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 33 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/llm_performance_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
schedule:
- cron: "30 16 * * *" # GMT time, 16:30 GMT == 00:30 China
# please uncomment it for PR tests
# pull_request:
pull_request:
# branches: [main]
# paths:
# - ".github/workflows/llm_performance_tests.yml"
Expand Down Expand Up @@ -45,8 +45,8 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# llm-cpp-build: # please uncomment it for PR tests
# uses: ./.github/workflows/llm-binary-build.yml
llm-cpp-build: # please uncomment it for PR tests
uses: ./.github/workflows/llm-binary-build.yml

llm-performance-test-on-arc:
if: ${{ github.event.schedule || ( github.event_name == 'workflow_dispatch' && inputs.arc ) || github.event.inputs.artifact == 'llm-performance-test-on-arc' || github.event.inputs.artifact == 'all' }} # please comment it for PR tests
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
llm-performance-test-on-spr:
if: ${{ github.event.schedule || ( github.event_name == 'workflow_dispatch' && inputs.spr ) || github.event.inputs.artifact == 'llm-performance-test-on-spr' || github.event.inputs.artifact == 'all' }} # please comment it for PR tests
# if: ${{ github.event.schedule || ( github.event_name == 'workflow_dispatch' && inputs.spr ) || github.event.inputs.artifact == 'llm-performance-test-on-spr' || github.event.inputs.artifact == 'all' }} # please comment it for PR tests
# needs: llm-cpp-build # please uncomment it for PR tests
strategy:
fail-fast: false
Expand Down Expand Up @@ -342,21 +342,21 @@ jobs:
python -m pip install --upgrade transformers_stream_generator
# please uncomment it and comment the "Install IPEX-LLM from Pypi" part for PR tests
# - name: Download llm binary
# uses: ./.github/actions/llm/download-llm-binary
- name: Download llm binary
uses: ./.github/actions/llm/download-llm-binary

# - name: Run LLM install (all) test
# uses: ./.github/actions/llm/setup-llm-env
- name: Run LLM install (all) test
uses: ./.github/actions/llm/setup-llm-env

- name: Install IPEX-LLM from Pypi
shell: bash
run: |
pip install --pre --upgrade ipex-llm[all] --extra-index-url https://download.pytorch.org/whl/cpu
test_version_date=`date -d 'yesterday' '+%Y%m%d'`
if ! pip show ipex-llm | grep $test_version_date; then
echo "Did not install ipex-llm with excepted version $test_version_date"
exit 1
fi
# - name: Install IPEX-LLM from Pypi
# shell: bash
# run: |
# pip install --pre --upgrade ipex-llm[all] --extra-index-url https://download.pytorch.org/whl/cpu
# test_version_date=`date -d 'yesterday' '+%Y%m%d'`
# if ! pip show ipex-llm | grep $test_version_date; then
# echo "Did not install ipex-llm with excepted version $test_version_date"
# exit 1
# fi

- name: Test on cpu
shell: bash
Expand All @@ -383,8 +383,8 @@ jobs:
done
llm-performance-test-on-core:
if: ${{ github.event.schedule || ( github.event_name == 'workflow_dispatch' && inputs.core ) || github.event.inputs.artifact == 'llm-performance-test-on-core' || github.event.inputs.artifact == 'all' }} # please comment it for PR tests
# needs: llm-cpp-build # please uncomment it for PR tests
# if: ${{ github.event.schedule || ( github.event_name == 'workflow_dispatch' && inputs.core ) || github.event.inputs.artifact == 'llm-performance-test-on-core' || github.event.inputs.artifact == 'all' }} # please comment it for PR tests
needs: llm-cpp-build # please uncomment it for PR tests
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -416,21 +416,21 @@ jobs:
python -m pip install --upgrade tiktoken einops transformers_stream_generator
# please uncomment it and comment the "Install IPEX-LLM from Pypi" part for PR tests
# - name: Download llm binary
# uses: ./.github/actions/llm/download-llm-binary
- name: Download llm binary
uses: ./.github/actions/llm/download-llm-binary

# - name: Run LLM install (all) test
# uses: ./.github/actions/llm/setup-llm-env
- name: Run LLM install (all) test
uses: ./.github/actions/llm/setup-llm-env

- name: Install IPEX-LLM from Pypi
shell: bash
run: |
pip install --pre --upgrade ipex-llm[all]
test_version_date=`date -d 'yesterday' '+%Y%m%d'`
if ! pip show ipex-llm | grep $test_version_date; then
echo "Did not install ipex-llm with excepted version $test_version_date"
exit 1
fi
# - name: Install IPEX-LLM from Pypi
# shell: bash
# run: |
# pip install --pre --upgrade ipex-llm[all]
# test_version_date=`date -d 'yesterday' '+%Y%m%d'`
# if ! pip show ipex-llm | grep $test_version_date; then
# echo "Did not install ipex-llm with excepted version $test_version_date"
# exit 1
# fi


- name: Test on core ${{ matrix.platform }}
Expand Down
6 changes: 5 additions & 1 deletion python/llm/src/ipex_llm/transformers/pipeline_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@
import asyncio
import uuid
import threading
from pydantic import BaseModel
try:
from pydantic import BaseModel
except ImportError:
from abc import ABCMeta
BaseModel = ABCMeta

# patch GenerationMixin.generate
from transformers import GenerationMixin
Expand Down

0 comments on commit 284e884

Please sign in to comment.