Skip to content

Commit 6974a3e

Browse files
rebase
2 parents 81f69be + 7843977 commit 6974a3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3524
-3095
lines changed

.github/workflows/build_documentation.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
- doc-builder*
99
- v*-release
1010

11+
env:
12+
UV_SYSTEM_PYTHON: 1
13+
UV_TORCH_BACKEND: auto
14+
1115
jobs:
1216
build_documentation:
1317
runs-on: ubuntu-22.04
@@ -21,13 +25,13 @@ jobs:
2125
- uses: actions/checkout@v4
2226
- uses: actions/setup-node@v4
2327
with:
24-
node-version: '18'
28+
node-version: "18"
2529
cache-dependency-path: "kit/package-lock.json"
2630

2731
- name: Set up Python
2832
uses: actions/setup-python@v4
2933
with:
30-
python-version: '3.11'
34+
python-version: "3.11"
3135

3236
- name: Set environment variables
3337
run: |
@@ -45,22 +49,17 @@ jobs:
4549
4650
- name: Setup environment
4751
run: |
48-
python -m pip install --upgrade pip
49-
python -m pip install --upgrade setuptools
50-
python -m pip install git+https://github.com/huggingface/doc-builder
51-
python -m pip install .[quality]
52-
python -m pip install openvino nncf neural-compressor[pt] diffusers accelerate
52+
pip install --upgrade pip uv
53+
uv pip install git+https://github.com/huggingface/doc-builder
54+
uv pip install .[quality] nncf openvino neural-compressor[pt]>3.4 diffusers accelerate
5355
5456
- name: Make documentation
5557
shell: bash
5658
run: |
57-
doc-builder build optimum.intel docs/source/ \
58-
--repo_name optimum-intel \
59-
--build_dir intel-doc-build/ \
60-
--version ${{ env.VERSION }} \
61-
--version_tag_suffix "" \
62-
--html \
63-
--clean
64-
cd intel-doc-build
65-
mv optimum.intel optimum-intel
66-
doc-builder push optimum-intel --doc_build_repo_id "hf-doc-build/doc-build" --token "${{ secrets.HF_DOC_BUILD_PUSH }}" --commit_msg "Updated with commit $COMMIT_SHA See: https://github.com/huggingface/optimum-intel/commit/$COMMIT_SHA" --n_retries 5
59+
make doc BUILD_DIR=./doc-build VERSION=${{ env.VERSION }}
60+
mv ./doc-build/optimum.intel optimum-intel
61+
doc-builder push optimum-intel \
62+
--doc_build_repo_id "hf-doc-build/doc-build" \
63+
--commit_msg "Updated with commit $COMMIT_SHA See: https://github.com/huggingface/optimum-intel/commit/$COMMIT_SHA" \
64+
--token "${{ secrets.HF_DOC_BUILD_PUSH }}" \
65+
--n_retries 5

.github/workflows/build_pr_documentation.yml

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1010
cancel-in-progress: true
1111

12+
env:
13+
UV_SYSTEM_PYTHON: 1
14+
UV_TORCH_BACKEND: auto
15+
1216
jobs:
1317
build_documentation:
1418
runs-on: ubuntu-22.04
15-
1619
env:
1720
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
1821
PR_NUMBER: ${{ github.event.number }}
@@ -21,46 +24,31 @@ jobs:
2124

2225
steps:
2326
- uses: actions/checkout@v4
27+
- uses: actions/setup-node@v4
2428
with:
25-
repository: "huggingface/doc-builder"
26-
path: doc-builder
29+
node-version: "18"
30+
cache-dependency-path: "kit/package-lock.json"
2731

28-
- uses: actions/checkout@v4
32+
- name: Set up Python
33+
uses: actions/setup-python@v4
2934
with:
30-
repository: "huggingface/optimum-intel"
31-
path: optimum-intel
32-
33-
- name: Setup Python
34-
uses: actions/setup-python@v5
35-
with:
36-
python-version: 3.9
35+
python-version: "3.11"
3736

3837
- name: Setup environment
3938
run: |
40-
pip install --upgrade pip
41-
pip uninstall -y doc-builder
42-
cd doc-builder
43-
git pull origin main
44-
pip install .
45-
pip install black
46-
cd ..
39+
pip install --upgrade pip uv
40+
uv pip install git+https://github.com/huggingface/doc-builder
41+
uv pip install .[quality] nncf openvino neural-compressor[pt]>3.4 diffusers accelerate
4742
4843
- name: Make documentation
44+
shell: bash
4945
run: |
50-
cd optimum-intel
51-
make doc BUILD_DIR=intel-doc-build VERSION=pr_$PR_NUMBER COMMIT_SHA_SUBPACKAGE=$COMMIT_SHA CLONE_URL=$PR_CLONE_URL
52-
cd ..
53-
54-
- name: Save commit_sha & pr_number
55-
run: |
56-
cd optimum-intel
57-
sudo chmod -R ugo+rwx intel-doc-build
58-
cd intel-doc-build
59-
sudo mv optimum.intel optimum-intel
46+
make doc BUILD_DIR=./doc-build VERSION=pr_${{ env.PR_NUMBER }}
47+
mv ./doc-build/optimum.intel optimum-intel
6048
echo ${{ env.COMMIT_SHA }} > ./commit_sha
6149
echo ${{ env.PR_NUMBER }} > ./pr_number
6250
6351
- uses: actions/upload-artifact@v4
6452
with:
6553
name: doc-build-artifact
66-
path: optimum-intel/intel-doc-build/
54+
path: optimum-intel

.github/workflows/test_inc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ concurrency:
1515

1616
env:
1717
TRANSFORMERS_IS_CI: true
18+
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
1819

1920
jobs:
2021
build:
@@ -48,5 +49,4 @@ jobs:
4849
- name: Test with Pytest
4950
run: |
5051
pytest tests/neural_compressor
51-
env:
52-
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
52+

.github/workflows/test_ipex.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ concurrency:
1515

1616
env:
1717
TRANSFORMERS_IS_CI: true
18+
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
1819

1920
jobs:
2021
build:

.github/workflows/test_openvino.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,30 @@ concurrency:
1414
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1515
cancel-in-progress: true
1616

17+
permissions:
18+
contents: read
19+
1720
env:
21+
UV_TORCH_BACKEND: cpu
22+
UV_SYSTEM_PYTHON: true
1823
TRANSFORMERS_IS_CI: true
24+
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
1925

2026
jobs:
2127
build:
2228
strategy:
2329
fail-fast: false
2430
matrix:
2531
test-pattern:
26-
["*modeling*", "*diffusion*", "*quantization*", "*export*"]
27-
transformers-version: ["4.36.0", "latest"]
32+
[
33+
"*export*",
34+
"*decoder*",
35+
"*seq2seq*",
36+
"*modeling*",
37+
"*diffusion*",
38+
"*quantization*",
39+
]
40+
transformers-version: ["4.45.0", "latest"]
2841

2942
runs-on: ubuntu-22.04
3043

@@ -39,39 +52,29 @@ jobs:
3952

4053
- name: Install dependencies
4154
run: |
42-
pip install --upgrade pip
43-
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
44-
pip install .[openvino,diffusers,tests]
55+
pip install --upgrade pip uv
56+
uv pip install .[openvino,diffusers,tests]
4557
4658
- if: ${{ matrix.transformers-version != 'latest' }}
4759
name: Install specific dependencies and versions required for older transformers
4860
run: |
49-
pip install transformers==${{ matrix.transformers-version }} accelerate==0.* peft==0.13.* diffusers==0.30.* transformers_stream_generator
61+
uv pip install transformers==${{ matrix.transformers-version }} accelerate==0.* peft==0.13.* diffusers==0.32.* transformers_stream_generator
5062
51-
- if: ${{ matrix.transformers-version == 'latest' && matrix.test-pattern == '*modeling*'}}
63+
- if: ${{ matrix.transformers-version == 'latest' && matrix.test-pattern == '*decoder*'}}
5264
name: Install auto-gptq, autoawq
5365
run: |
54-
pip install auto-gptq "autoawq<0.2.8" --extra-index-url https://download.pytorch.org/whl/cpu
55-
56-
- if: ${{ matrix.test-pattern == '*modeling*' }}
57-
name: Uninstall NNCF
58-
run: |
59-
pip uninstall -y nncf
66+
uv pip install auto-gptq "autoawq<0.2.8"
6067
6168
- name: Test with Pytest
6269
run: |
6370
pytest tests/openvino/${{ matrix.test-pattern }} --durations=0
64-
env:
65-
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
6671
6772
- if: ${{ matrix.test-pattern == '*modeling*' }}
68-
name: Install dependencies (nightly)
73+
name: Install Nightly OpenVINO
6974
run: |
70-
pip install --upgrade --pre openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
75+
uv pip install --upgrade --pre openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
7176
7277
- if: ${{ matrix.test-pattern == '*modeling*' }}
73-
name: Test with Pytest (nightly)
78+
name: Test with Pytest - Nightly OpenVINO
7479
run: |
75-
pytest tests/openvino/test_modeling_basic.py --durations=0
76-
env:
77-
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
80+
pytest tests/openvino/test_modeling_basic.py --durations=0

.github/workflows/test_openvino_full.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)