Skip to content

Commit

Permalink
refactor to decrease number of workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
baptistecolle committed Oct 14, 2024
1 parent c19915b commit b273a08
Show file tree
Hide file tree
Showing 17 changed files with 120 additions and 89 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test_cli_cpu_ipex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ jobs:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install -e .[testing,ipex,diffusers,timm]
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -s -k "cli and cpu and ipex"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "cpu and ipex"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
3 changes: 2 additions & 1 deletion .github/workflows/test_cli_cpu_llama_cpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ jobs:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install -e .[testing,llama-cpp]
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -s -k "llama_cpp"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "cpu and llama_cpp"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
3 changes: 2 additions & 1 deletion .github/workflows/test_cli_cpu_neural_compressor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ jobs:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install -e .[testing,neural-compressor,diffusers,timm]
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -s -k "cli and cpu and neural_compressor"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "cpu and neural_compressor"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
3 changes: 2 additions & 1 deletion .github/workflows/test_cli_cpu_onnxruntime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ jobs:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install -e .[testing,onnxruntime,diffusers,timm]
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -s -k "cli and cpu and onnxruntime"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "cpu and onnxruntime"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
3 changes: 2 additions & 1 deletion .github/workflows/test_cli_cpu_openvino.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ jobs:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install -e .[testing,openvino,diffusers,timm]
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -s -k "cli and cpu and openvino"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "cpu and openvino"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
3 changes: 2 additions & 1 deletion .github/workflows/test_cli_cpu_py_txi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ jobs:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install -e .[testing,py-txi]
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -s -k "cli and cpu and py_txi"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "examples and cpu and py_txi"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
4 changes: 3 additions & 1 deletion .github/workflows/test_cli_cpu_pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ jobs:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install -e .[testing,diffusers,timm,peft]
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -s -k "cli and cpu and pytorch"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "cpu and pytorch"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}


3 changes: 2 additions & 1 deletion .github/workflows/test_cli_cuda_onnxruntime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ jobs:
run: |
pip install -e .[testing,onnxruntime-gpu,diffusers,timm]
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -x -s -k "cli and cuda and onnxruntime"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and onnxruntime"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
3 changes: 2 additions & 1 deletion .github/workflows/test_cli_cuda_py_txi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ jobs:
pip install --upgrade pip
pip install -e .[testing,py-txi]
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -x -s -k "cli and cuda and py_txi"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and py_txi"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}

5 changes: 3 additions & 2 deletions .github/workflows/test_cli_cuda_pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ jobs:
run: |
pip install -e .[testing,diffusers,timm,peft,deepspeed]
# - name: Run tests (parallel)
# - name: Run cli tests (parallel)
# run: |
# pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and (dp or ddp or device_map)"

# - name: Run tests (sequential)
# - name: Run cli tests (sequential)
# run: |
# FORCE_SEQUENTIAL=1 pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and (deepspeed_inference)"

- name: Run test from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and pytorch"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
3 changes: 2 additions & 1 deletion .github/workflows/test_cli_cuda_tensorrt_llm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ jobs:
run: |
pip install -e .[testing]
# - name: Run tests (sequential)
# - name: Run cli tests (sequential)
# run: |
# FORCE_SEQUENTIAL=1 pytest tests/test_cli.py -x -s -k "cli and cuda and tensorrt_llm and (tp or pp)"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and tensorrt_llm"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
3 changes: 2 additions & 1 deletion .github/workflows/test_cli_cuda_torch_ort.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ jobs:
pip install -e .[testing,torch-ort,peft]
pip install optimum@git+https://github.com/huggingface/optimum.git
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -x -s -k "cli and cuda and torch_ort and (dp or ddp or device_map)"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and torch_ort"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
3 changes: 2 additions & 1 deletion .github/workflows/test_cli_cuda_vllm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ jobs:
run: |
pip install -e .[testing]
# - name: Run tests (sequential)
# - name: Run cli tests (sequential)
# run: |
# FORCE_SEQUENTIAL=1 pytest tests/test_cli.py -x -s -k "cli and cuda and vllm and (tp or pp)"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and vllm"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
4 changes: 3 additions & 1 deletion .github/workflows/test_cli_misc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ jobs:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install -e .[testing]
# - name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -s -k "cli and not (cpu or cuda or rocm or mps)"

- name: Run tests from example folder
run: |
pytest tests/test_examples_folder.py -s -k "examples and not (cpu or cuda or rocm or mps)"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
5 changes: 3 additions & 2 deletions .github/workflows/test_cli_rocm_pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ jobs:
run: |
pip install -e .[testing,diffusers,timm,deepspeed,peft,autoawq,auto-gptq] "deepspeed<0.15"
# - name: Run tests (parallel)
# - name: Run cli tests (parallel)
# run: |
# pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and (dp or ddp or device_map)"

# - name: Run tests (sequential)
# - name: Run cli tests (sequential)
# run: |
# FORCE_SEQUENTIAL=1 pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and (deepspeed_inference)"

- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and pytorch"
continue-on-error: ${{ failure() && steps.run.outcome == 'failure' && steps.run.exit_code == 5 }}
2 changes: 1 addition & 1 deletion examples/pytorch_bert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defaults:
- _base_
- _self_

name: pytorch_bert
name: pytorch_bert_YE&(@!&)

launcher:
device_isolation: true
Expand Down
Loading

0 comments on commit b273a08

Please sign in to comment.