Skip to content

Commit

Permalink
simple
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Nov 3, 2024
1 parent ce4aa07 commit be2a53c
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_pr_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:

jobs:
build_documentation:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/dockerfile_sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@ on:
branches:
- main
paths:
- 'docker/Dockerfile.intel'
- "docker/Dockerfile.intel"

pull_request:
branches:
- main
paths:
- 'docker/Dockerfile.intel'
- "docker/Dockerfile.intel"

jobs:
build_and_run:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and Run Docker Image
run: |
IMAGE_NAME="intel_image:latest"
docker build -f docker/Dockerfile.intel -t $IMAGE_NAME .
if [ $? -ne 0 ]; then
echo "Docker image build failed."
exit 1
fi
CONTAINER_ID=$(docker run -d $IMAGE_NAME tail -f /dev/null)
if docker inspect -f '{{.State.Running}}' $CONTAINER_ID 2>/dev/null | grep -q 'true'; then
echo "Container is running."
else
echo "Container failed to start."
docker logs $CONTAINER_ID 2>/dev/null || echo "No container ID found."
exit 1
fi
docker stop $CONTAINER_ID
docker rm $CONTAINER_ID
- name: Build and Run Docker Image
run: |
IMAGE_NAME="intel_image:latest"
docker build -f docker/Dockerfile.intel -t $IMAGE_NAME .
if [ $? -ne 0 ]; then
echo "Docker image build failed."
exit 1
fi
CONTAINER_ID=$(docker run -d $IMAGE_NAME tail -f /dev/null)
if docker inspect -f '{{.State.Running}}' $CONTAINER_ID 2>/dev/null | grep -q 'true'; then
echo "Container is running."
else
echo "Container failed to start."
docker logs $CONTAINER_ID 2>/dev/null || echo "No container ID found."
exit 1
fi
docker stop $CONTAINER_ID
docker rm $CONTAINER_ID
14 changes: 5 additions & 9 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- main

- v*-release
pull_request:
branches:
- main
Expand All @@ -14,25 +14,21 @@ concurrency:

jobs:
quality:
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
os: [ubuntu-latest]
runs-on: ubuntu-22.04

runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.9

- name: Install dependencies
run: |
pip install --upgrade pip
# .[quality] installs too many dependencies
# TODO: we should remove the the version pinning at some point
pip install "black~=23.1" "ruff==0.4.4"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ permissions:
jobs:
secrets:
runs-on: ubuntu-latest

steps:
- shell: bash
run: |
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/test_generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@ concurrency:

jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.12"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.9

- name: Install dependencies
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test_inc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,17 @@ jobs:
fail-fast: false
matrix:
torch-version: ["2.2.0", "2.3.*", "2.4.*"]
python-version: ["3.9", "3.11"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.9

- name: Install dependencies
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test_ipex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@ jobs:
matrix:
torch-version: ["2.2.0", "2.3.*", "2.4.*"]
transformers-version: ["4.39.0", "4.44.*"]
python-version: ["3.9"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.9

- name: Install dependencies
run: |
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/test_offline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,16 @@ concurrency:

jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
os: [ubuntu-latest]
runs-on: ubuntu-22.04

runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.9

- name: Install dependencies
run: |
Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/test_openvino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,28 @@ jobs:
"*training*",
"*export*",
]
transformers-version: ["4.36.0", "latest"]
python-version: ["3.9"]
os: [ubuntu-latest]
transformers-version: ["4.36.0", "4.46.*"]

runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install lowest compatible transformers version
if: ${{ matrix.transformers-version != 'latest' }}
run: pip install transformers==${{ matrix.transformers-version }} accelerate==0.*
python-version: 3.9

- name: Install dependencies
run: |
pip install --upgrade pip
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install .[openvino,openvino-tokenizers,diffusers,tests] transformers[testing]
- if: ${{ matrix.transformers-version != 'latest' }}
name: Downgrade dependencies
run: pip install transformers==${{ matrix.transformers-version }} accelerate==0.*
- name: Assert versions
run: |
python -c "import transformers; print(transformers.__version__); assert transformers.__version__.startswith('${{ matrix.transformers-version }}'.replace('.*', ''))"
- if: ${{ matrix.test-pattern == '*modeling*' }}
name: Uninstall NNCF
Expand Down

0 comments on commit be2a53c

Please sign in to comment.