Skip to content

Commit d87d9c6

Browse files
committed
fix a few things
1 parent e6e3643 commit d87d9c6

File tree

2 files changed

+14
-77
lines changed

2 files changed

+14
-77
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ on:
1010

1111
jobs:
1212
run:
13-
name: nightly-ci ${{ matrix.os }}-${{ matrix.python }}
13+
name: tr==${{ matrix.transformers }}-ci ${{ matrix.os }}-${{ matrix.python }}
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest]
1818
python: ['3.12']
19+
transformers: ['4.48', 'main']
1920

2021
steps:
2122
- uses: actions/checkout@v3
@@ -27,82 +28,18 @@ jobs:
2728
- name: Install pytorch
2829
run: python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
2930

30-
- name: Install transformers
31+
- name: Install transformers ${{ matrix.transformers }}
3132
run: |
32-
git clone https://github.com/huggingface/transformers.git
33-
cd transformers
34-
pip install -e .
35-
cd ..
36-
37-
- name: Install requirements
38-
run: python -m pip install -r requirements.txt
39-
40-
- name: Install requirements dev
41-
run: python -m pip install -r requirements-dev.txt
42-
43-
- name: Cache pip
44-
uses: actions/cache@v4
45-
with:
46-
path: ~/.cache/pip
47-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
48-
restore-keys: |
49-
${{ runner.os }}-pip-
50-
${{ runner.os }}-
51-
52-
- name: pip freeze
53-
run: python -m pip freeze
54-
55-
- name: tiny-llm torch.export.export
56-
run: |
57-
export PYTHONPATH=.
58-
python _unittests/ut_torch_models/test_llms.py
59-
60-
- name: tiny-llm onnx
61-
run: |
62-
export PYTHONPATH=.
63-
python _unittests/ut_torch_models/test_llms_onnx.py
64-
65-
- name: run tests
66-
run: |
67-
pip install pytest
68-
export PYTHONPATH=.
69-
UNITTEST_GOING=1 pytest --durations=10 _unittests --ignore _unittests/ut_reference/test_backend_extended_reference_evaluator.py --ignore _unittests/ut_reference/test_backend_onnxruntime_evaluator.py
70-
export PYTHONPATH=
71-
72-
- name: run backend tests python
73-
run: |
74-
pip install pytest
75-
export PYTHONPATH=.
76-
UNITTEST_GOING=1 pytest --durations=10 _unittests/ut_reference/test_backend_extended_reference_evaluator.py
77-
export PYTHONPATH=
78-
79-
- name: run backend tests onnxruntime
80-
run: |
81-
pip install pytest
82-
export PYTHONPATH=.
83-
UNITTEST_GOING=1 pytest --durations=10 _unittests/ut_reference/test_backend_onnxruntime_evaluator.py --maxfail=15
84-
export PYTHONPATH=
85-
86-
run:
87-
name: tr4.48-ci ${{ matrix.os }}-${{ matrix.python }}
88-
runs-on: ${{ matrix.os }}
89-
strategy:
90-
matrix:
91-
os: [ubuntu-latest]
92-
python: ['3.12']
93-
94-
steps:
95-
- uses: actions/checkout@v3
96-
97-
- uses: actions/setup-python@v4
98-
with:
99-
python-version: ${{ matrix.python }}
100-
101-
- name: Install pytorch
102-
run: python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
103-
104-
- name: Install transformers
105-
run: pip install transformers==4.48
33+
if [[ "${{ matrix.transformers }}" == "main" ]]; then
34+
echo "install transformers from github"
35+
git clone https://github.com/huggingface/transformers.git
36+
cd transformers
37+
pip install -e .
38+
cd ..
39+
else
40+
echo "install transformers==${{ matrix.transformers }}"
41+
pip install transformers==${{ matrix.transformers }}
42+
fi
10643
10744
- name: Install requirements
10845
run: python -m pip install -r requirements.txt

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sphinx-issues
2222
sphinx-runpython
2323
tabulate
2424
timm
25-
transformers>=4.49
25+
transformers>=4.45
2626
tqdm
2727
wheel
2828
xlsxwriter

0 commit comments

Comments
 (0)