-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ort CIs (slow, gpu, train) #2024
Merged
+1,550
−1,478
Merged
Changes from 54 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
17bc171
update ort CIs
IlyasMoutawwakil fbaa980
fix train ci
IlyasMoutawwakil 90aa85d
fix gpu ci
IlyasMoutawwakil 87c9f3e
gpus all
IlyasMoutawwakil 0c1c6bd
devel
IlyasMoutawwakil 430260e
enable trt
IlyasMoutawwakil 00e51c7
fix
IlyasMoutawwakil 3fc5486
fix
IlyasMoutawwakil 8044232
fix
IlyasMoutawwakil 2fd4d47
test
IlyasMoutawwakil 1f322fc
rename
IlyasMoutawwakil 6f7c599
change instance
IlyasMoutawwakil 806faca
test
IlyasMoutawwakil 3eecee6
use available
IlyasMoutawwakil ab62319
Merge branch 'main' into enable-ort-gpu-tests
IlyasMoutawwakil 1b7e652
Merge branch 'main' into enable-ort-gpu-tests
IlyasMoutawwakil cebe6bf
update
IlyasMoutawwakil d0f62b0
shorter labels as well
IlyasMoutawwakil d001b9b
add onnxruntime-traning
IlyasMoutawwakil d271637
Merge branch 'main' into enable-ort-gpu-tests
IlyasMoutawwakil a318c0a
fix onnxruntime package checking
IlyasMoutawwakil 7597692
Merge branch 'enable-ort-gpu-tests' of https://github.com/huggingface…
IlyasMoutawwakil a6b3a8e
fix typo
IlyasMoutawwakil a5c76c4
fix typo
IlyasMoutawwakil 745ad8d
remove torch version
IlyasMoutawwakil bb48c4d
fix trainer
IlyasMoutawwakil 0518dfd
fixed trt ep by using trt docker image (the only way to make sure eve…
IlyasMoutawwakil 9635ec4
latest trt version
IlyasMoutawwakil cb9cb7f
remove pkv speedup timing since never used
IlyasMoutawwakil eb25460
trust remote code for training datasets
IlyasMoutawwakil 0a7a23d
remove rocm from diffusers tests
IlyasMoutawwakil 64e9c86
move ort training tests to onnxruntime-training
IlyasMoutawwakil bbed6bc
fix ort training
IlyasMoutawwakil 1334200
fix
IlyasMoutawwakil 84bf7ee
style
IlyasMoutawwakil be10d26
always assert closenes and not equality
IlyasMoutawwakil 7ba72a6
fixed perceiver
IlyasMoutawwakil eceba5b
fixed missing position ids when attn mask is given
IlyasMoutawwakil 9150e05
remove num_labels from output shapes as it's not a dynamic axis
IlyasMoutawwakil 198ce06
raise error on missing mandatory inputs
IlyasMoutawwakil 930103f
added atol and rtol as part of the ORTModelTestMixin class
IlyasMoutawwakil 49cfdc0
fix segformer image segmentation
IlyasMoutawwakil 5b8efd4
style
IlyasMoutawwakil 941484a
fix vision encoder io binding
IlyasMoutawwakil 18e887d
hot fix io binding, remove its dependency to the order of inputs and …
IlyasMoutawwakil 88a7e8b
fix
IlyasMoutawwakil e9abe6a
typo
IlyasMoutawwakil c9b45ee
unify io binding api with non io binding
IlyasMoutawwakil aad9aaf
force evaluated shape to int
IlyasMoutawwakil a29706e
mark pix2struct io binding tests
IlyasMoutawwakil 821c997
force contiguity in forward pass
IlyasMoutawwakil cc2e124
fixed cryptic contiguity problems
IlyasMoutawwakil 3a2bcee
fix some
IlyasMoutawwakil f0ea288
fix vision2seq modeling and testing
IlyasMoutawwakil 7e122c0
Merge branch 'main' into enable-ort-gpu-tests
IlyasMoutawwakil dc2361d
Update setup.py
IlyasMoutawwakil 4eb95f1
update import utils
IlyasMoutawwakil 7f1fc40
Update optimum/onnxruntime/modeling_ort.py
IlyasMoutawwakil 696cc95
fix vision encoder decoder io binding
IlyasMoutawwakil 1827450
enable bigbird and bigbirg pegasus and seperate timm slow tests to un…
IlyasMoutawwakil 41abf7f
use bigger machine for slow tests
IlyasMoutawwakil 6f3084a
lower atol and rtol for image classification logits
IlyasMoutawwakil 010030e
fix
IlyasMoutawwakil 445b291
large
IlyasMoutawwakil 04c8904
enable more Longformer and MCTCT
IlyasMoutawwakil 18e1844
enable commented models in export as well
IlyasMoutawwakil 4487c74
uncomment timm slow models, big bird optimization and marian pkv comp…
IlyasMoutawwakil 24d682e
Merge branch 'main' into enable-ort-gpu-tests
IlyasMoutawwakil def5fdb
Merge branch 'main' into enable-ort-gpu-tests
IlyasMoutawwakil 458355d
fix whisper/speech_to_text test and make convolution deterministic
IlyasMoutawwakil 881015c
pin torch for ort training
IlyasMoutawwakil 7c8c56f
ctc and speech also uses convolution so has to be deterministic
IlyasMoutawwakil 3a4bac9
revert vison2seq atol
IlyasMoutawwakil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,54 @@ | ||
name: ONNX Runtime / Test GPU | ||
name: ONNX Runtime GPU / Python - Test | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 1 */3 * * # at 1am every 3 days | ||
- cron: 0 7 * * * # every day at 7am UTC | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled] | ||
# uncomment to enable on PR merge on main branch: | ||
#push: | ||
# branches: | ||
# - main | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- labeled | ||
- reopened | ||
- unlabeled | ||
- synchronize | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
do-the-job: | ||
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') || contains( github.event.pull_request.labels.*.name, 'gpu-test') }} | ||
name: Start self-hosted EC2 runner | ||
build: | ||
if: ${{ | ||
(github.event_name == 'push') || | ||
(github.event_name == 'workflow_dispatch') || | ||
contains(github.event.pull_request.labels.*.name, 'gpu') || | ||
contains(github.event.pull_request.labels.*.name, 'onnxruntime-gpu') | ||
}} | ||
|
||
runs-on: | ||
group: aws-g6-4xlarge-plus | ||
env: | ||
AWS_REGION: us-east-1 | ||
|
||
container: | ||
image: nvcr.io/nvidia/tensorrt:24.12-py3 | ||
options: --gpus all | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build image | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install dependencies | ||
run: | | ||
docker build -f tests/onnxruntime/docker/Dockerfile_onnxruntime_gpu -t onnxruntime-gpu . | ||
- name: Test with unittest within docker container | ||
pip install --upgrade pip | ||
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 | ||
pip install .[tests,onnxruntime-gpu,diffusers] | ||
- name: Test with pytest | ||
run: | | ||
docker run --rm --gpus all -v /mnt/cache/.cache/huggingface:/root/.cache/huggingface --workdir=/workspace/optimum/tests onnxruntime-gpu:latest | ||
pytest tests/onnxruntime -m "cuda_ep_test or trt_ep_test" --durations=0 -vvvv -s -n auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,49 @@ | ||
name: ONNX Runtime slow / Python - Test | ||
name: ONNX Runtime Slow / Python - Test | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 7 * * * # every day at 7am | ||
- cron: 0 7 * * * # every day at 7am UTC | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- labeled | ||
- reopened | ||
- unlabeled | ||
- synchronize | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
os: [ubuntu-20.04] | ||
if: ${{ | ||
(github.event_name == 'push') || | ||
(github.event_name == 'workflow_dispatch') || | ||
contains(github.event.pull_request.labels.*.name, 'slow') || | ||
contains(github.event.pull_request.labels.*.name, 'onnxruntime-slow') | ||
}} | ||
|
||
runs-on: ubuntu-20.04 | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies for export | ||
run: | | ||
pip install .[tests,onnxruntime,diffusers] | ||
- name: Test with unittest | ||
working-directory: tests | ||
run: | | ||
RUN_SLOW=1 pytest onnxruntime -s -m "run_slow" --durations=0 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | ||
pip install .[tests,onnxruntime,diffusers] | ||
- name: Test with pytest | ||
run: | | ||
RUN_SLOW=1 pytest tests/onnxruntime -m "run_slow" --durations=0 -s -vvvv -n auto |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: ONNX Runtime Training / Python - Test | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 7 * * * # every day at 7am UTC | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- labeled | ||
- reopened | ||
- unlabeled | ||
- synchronize | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
if: ${{ | ||
(github.event_name == 'push') || | ||
(github.event_name == 'workflow_dispatch') || | ||
contains( github.event.pull_request.labels.*.name, 'training') || | ||
contains( github.event.pull_request.labels.*.name, 'onnxruntime-training') | ||
}} | ||
|
||
runs-on: | ||
group: aws-g6-4xlarge-plus | ||
|
||
container: | ||
image: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 | ||
options: --gpus all | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install dependencies | ||
env: | ||
TORCH_CUDA_ARCH_LIST: "5.0 6.0 7.0 7.5 8.0 8.6 9.0+PTX" | ||
run: | | ||
pip install --upgrade pip | ||
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 | ||
pip install --no-cache-dir torch-ort onnxruntime-training && python -m torch_ort.configure | ||
pip install --no-cache-dir evaluate absl-py rouge_score seqeval sacrebleu nltk scikit-learn | ||
pip install .[tests,onnxruntime-training] | ||
- name: Test with pytest (trainer) | ||
run: | | ||
RUN_SLOW=1 pytest tests/onnxruntime-training/test_trainer.py --durations=0 -s -vvvv | ||
env: | ||
HF_DATASETS_TRUST_REMOTE_CODE: 1 | ||
|
||
- name: Test with pytest (examples) | ||
run: | | ||
RUN_SLOW=1 pytest tests/onnxruntime-training/test_examples.py --durations=0 -s -vvvv | ||
env: | ||
HF_DATASETS_TRUST_REMOTE_CODE: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also cc @JingyaHuang who took care of the ort training integrations