Skip to content

Commit b8c953a

Browse files
Remove tflite (#2340)
* remove tflite * rm exporters-tf * Update setup.py * Update setup.py * Update .github/ISSUE_TEMPLATE/bug-report.yml * use rm-tflite branch * fix command registration * use a model that has safetensors to avoid macos-13 ci failing * remove some onnx/onnxruntime stuff * fix * fix * test * test non docker intel doc build
1 parent 4f500d2 commit b8c953a

40 files changed

+109
-2849
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ body:
2121
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
2222
Please tag fewer than 3 people.
2323
24-
- Pipelines: `@philschmid`
25-
- Export of transformers model to ONNX/TFLite: `@michaelbenayoun`
26-
- ONNX Runtime: `@JingyaHuang`, `@echarlaix`
27-
- Intel Neural Compressor: `@echarlaix`
24+
- ONNX/ONNX Runtime: `@echarlaix`, `@IlyasMoutawwakil`
25+
- OpenVINO/NNCF: `@echarlaix`, `@IlyasMoutawwakil`
26+
- Neuron: `@michaelbenayoun`, `@JingyaHuang`
2827
- Habana: `@regisss`
2928
3029
placeholder: "@Username ..."

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ Fixes # (issue)
2424

2525
<!--
2626
For faster review, we strongly recommend you to ping the following people:
27-
- Exporters (ONNX/TFLite) : @echarlaix, @JingyaHuang, @michaelbenayoun, @IlyasMoutawwakil
27+
- Exporters (ONNX/OpenVINO) : @echarlaix, @JingyaHuang, @michaelbenayoun, @IlyasMoutawwakil
2828
- GPTQ, quantization: @SunMarc, @IlyasMoutawwakil
2929
-->

.github/workflows/build_main_documentation.yml

Lines changed: 25 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -8,77 +8,45 @@ on:
88
- v*-release
99
workflow_dispatch:
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
1418

1519
steps:
16-
- uses: actions/checkout@v2
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: "18"
23+
cache-dependency-path: "kit/package-lock.json"
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v4
1727
with:
18-
repository: 'huggingface/doc-builder'
19-
path: doc-builder
28+
python-version: "3.11"
2029

2130
- uses: actions/checkout@v2
2231
with:
23-
repository: 'huggingface/optimum'
32+
repository: "huggingface/optimum"
2433
path: optimum
2534

2635
- uses: actions/checkout@v2
2736
with:
28-
repository: 'huggingface/optimum-habana'
37+
repository: "huggingface/optimum-habana"
2938
path: optimum-habana
3039

3140
- uses: actions/checkout@v2
3241
with:
33-
repository: 'huggingface/optimum-intel'
42+
repository: "huggingface/optimum-intel"
3443
path: optimum-intel
3544

3645
- uses: actions/checkout@v2
3746
with:
38-
repository: 'huggingface/optimum-amd'
47+
repository: "huggingface/optimum-amd"
3948
path: optimum-amd
4049

41-
- name: Free disk space
42-
run: |
43-
df -h
44-
sudo apt-get update
45-
sudo apt-get purge -y '^apache.*'
46-
sudo apt-get purge -y '^imagemagick.*'
47-
sudo apt-get purge -y '^dotnet.*'
48-
sudo apt-get purge -y '^aspnetcore.*'
49-
sudo apt-get purge -y 'php.*'
50-
sudo apt-get purge -y '^temurin.*'
51-
sudo apt-get purge -y '^mysql.*'
52-
sudo apt-get purge -y '^java.*'
53-
sudo apt-get purge -y '^openjdk.*'
54-
sudo apt-get purge -y microsoft-edge-stable azure-cli google-chrome-stable firefox mono-devel
55-
df -h
56-
sudo apt-get autoremove -y >/dev/null 2>&1
57-
sudo apt-get clean
58-
df -h
59-
echo "https://github.com/actions/virtual-environments/issues/709"
60-
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
61-
df -h
62-
echo "remove big /usr/local"
63-
sudo rm -rf "/usr/local/share/boost"
64-
sudo rm -rf /usr/local/lib/android >/dev/null 2>&1
65-
df -h
66-
echo "remove /usr/share leftovers"
67-
sudo rm -rf /usr/share/dotnet/sdk > /dev/null 2>&1
68-
sudo rm -rf /usr/share/dotnet/shared > /dev/null 2>&1
69-
sudo rm -rf /usr/share/swift > /dev/null 2>&1
70-
df -h
71-
echo "remove other leftovers"
72-
sudo rm -rf /var/lib/mysql > /dev/null 2>&1
73-
sudo rm -rf /home/runner/.dotnet > /dev/null 2>&1
74-
sudo rm -rf /home/runneradmin/.dotnet > /dev/null 2>&1
75-
sudo rm -rf /etc/skel/.dotnet > /dev/null 2>&1
76-
sudo rm -rf /usr/local/.ghcup > /dev/null 2>&1
77-
sudo rm -rf /usr/local/aws-cli > /dev/null 2>&1
78-
sudo rm -rf /usr/lib/heroku > /dev/null 2>&1
79-
sudo rm -rf /usr/local/share/chromium > /dev/null 2>&1
80-
df -h
81-
8250
- name: Set environment variables
8351
run: |
8452
cd optimum
@@ -95,13 +63,15 @@ jobs:
9563
9664
- name: Setup environment
9765
run: |
98-
python -m venv venv-doc
99-
source venv-doc/bin/activate
100-
pip uninstall -y doc-builder
101-
cd doc-builder
102-
git pull origin main
103-
pip install .
104-
pip install black
66+
pip install --upgrade pip uv
67+
uv pip install git+https://github.com/huggingface/doc-builder
68+
69+
- name: Make Intel documentation
70+
run: |
71+
cd optimum-intel
72+
uv pip install . nncf openvino neural-compressor[pt]>3.4 diffusers accelerate
73+
make doc BUILD_DIR=intel-doc-build VERSION=${{ env.VERSION }}
74+
sudo mv intel-doc-build ../optimum
10575
cd ..
10676
10777
- name: Make Habana documentation
@@ -112,14 +82,6 @@ jobs:
11282
sudo mv habana-doc-build ../optimum
11383
cd ..
11484
115-
- name: Make Intel documentation
116-
run: |
117-
sudo docker system prune -a -f
118-
cd optimum-intel
119-
make doc BUILD_DIR=intel-doc-build VERSION=${{ env.VERSION }}
120-
sudo mv intel-doc-build ../optimum
121-
cd ..
122-
12385
- name: Make AMD documentation
12486
run: |
12587
sudo docker system prune -a -f

.github/workflows/build_pr_documentation.yml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build PR documentation
33
on:
44
workflow_dispatch:
55
pull_request:
6-
branches: [ main ]
6+
branches: [main]
77
paths:
88
- "optimum/**.py"
99
- "docs/**.mdx"
@@ -14,6 +14,10 @@ concurrency:
1414
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1515
cancel-in-progress: true
1616

17+
env:
18+
UV_SYSTEM_PYTHON: 1
19+
UV_TORCH_BACKEND: auto
20+
1721
jobs:
1822
build_documentation:
1923
runs-on: ubuntu-22.04
@@ -24,40 +28,47 @@ jobs:
2428
PR_CLONE_URL: ${{ github.event.pull_request.head.repo.clone_url }}
2529

2630
steps:
27-
- uses: actions/checkout@v2
31+
- uses: actions/setup-node@v4
2832
with:
29-
repository: 'huggingface/doc-builder'
30-
path: doc-builder
33+
node-version: "18"
34+
cache-dependency-path: "kit/package-lock.json"
35+
36+
- name: Set up Python
37+
uses: actions/setup-python@v4
38+
with:
39+
python-version: "3.11"
3140

3241
- uses: actions/checkout@v2
3342
with:
34-
repository: 'huggingface/optimum'
43+
repository: "huggingface/optimum"
3544
path: optimum
3645

3746
- uses: actions/checkout@v2
3847
with:
39-
repository: 'huggingface/optimum-habana'
48+
repository: "huggingface/optimum-habana"
4049
path: optimum-habana
4150

4251
- uses: actions/checkout@v2
4352
with:
44-
repository: 'huggingface/optimum-intel'
53+
repository: "huggingface/optimum-intel"
4554
path: optimum-intel
4655

4756
- uses: actions/checkout@v2
4857
with:
49-
repository: 'huggingface/optimum-amd'
58+
repository: "huggingface/optimum-amd"
5059
path: optimum-amd
5160

5261
- name: Setup environment
5362
run: |
54-
python -m venv venv-doc
55-
source venv-doc/bin/activate
56-
pip uninstall -y doc-builder
57-
cd doc-builder
58-
git pull origin main
59-
pip install .
60-
pip install black
63+
pip install --upgrade pip uv
64+
uv pip install git+https://github.com/huggingface/doc-builder
65+
66+
- name: Make Intel documentation
67+
run: |
68+
cd optimum-intel
69+
uv pip install . nncf openvino neural-compressor[pt]>3.4 diffusers accelerate
70+
make doc BUILD_DIR=intel-doc-build VERSION=pr_$PR_NUMBER
71+
sudo mv intel-doc-build ../optimum
6172
cd ..
6273
6374
- name: Make Habana documentation
@@ -68,14 +79,6 @@ jobs:
6879
sudo mv habana-doc-build ../optimum
6980
cd ..
7081
71-
- name: Make Intel documentation
72-
run: |
73-
sudo docker system prune -a -f
74-
cd optimum-intel
75-
make doc BUILD_DIR=intel-doc-build VERSION=pr_$PR_NUMBER
76-
sudo mv intel-doc-build ../optimum
77-
cd ..
78-
7982
- name: Make AMD documentation
8083
run: |
8184
sudo docker system prune -a -f

.github/workflows/test_cli.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python-version: [3.9]
22-
runs-on: [ubuntu-22.04, macos-13, windows-2022]
21+
os: [ubuntu-22.04, macos-13, windows-2022]
22+
python-version: ["3.9"]
2323

2424
runs-on: ${{ matrix.runs-on }}
2525

@@ -36,7 +36,7 @@ jobs:
3636
run: |
3737
pip install --upgrade pip
3838
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
39-
pip install .[tests,exporters-tf]
39+
pip install .[tests,exporters]
4040
4141
- name: Test with pytest
4242
run: |

.github/workflows/test_exporters_common.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
- name: Install dependencies
3636
run: |
3737
pip install --upgrade pip
38-
pip install --no-cache-dir torch==2.1.2 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
39-
pip install .[tests,exporters-tf]
38+
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
39+
pip install .[tests,exporters]
4040
4141
- name: Test with pytest
4242
run: |

.github/workflows/test_exporters_tflite.yml

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

.github/workflows/test_exporters_tflite_cli.yml

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

0 commit comments

Comments
 (0)