Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
baptistecolle committed Oct 14, 2024
1 parent f8ac631 commit f61ed47
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 25 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/test_cli_cuda_pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ jobs:
run: |
pip install -e .[testing,diffusers,timm,peft,bitsandbytes,autoawq,auto-gptq]
- name: Run tests
- name: Run cli tests
run: |
pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and not (dp or ddp or device_map or deepspeed)"
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and pytorch"
run_cli_cuda_pytorch_multi_gpu_tests:
if: ${{
(github.event_name == 'push') ||
Expand All @@ -77,14 +81,11 @@ jobs:
run: |
pip install -e .[testing,diffusers,timm,peft,deepspeed]
# - 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 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 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 test from example folder
- name: Run cli tests (sequential)
run: |
pytest tests/test_examples.py -x -s -k "cuda and pytorch"
FORCE_SEQUENTIAL=1 pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and (deepspeed_inference)"
23 changes: 12 additions & 11 deletions .github/workflows/test_cli_rocm_pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ jobs:
run: |
pip install -e .[testing,diffusers,timm,peft,autoawq,auto-gptq]
- name: Run tests
# - name: Run cli tests
# run: |
# pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and not (dp or ddp or device_map or deepspeed) and not bnb"

- name: Run tests from example folder
run: |
pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and not (dp or ddp or device_map or deepspeed) and not bnb"
pytest tests/test_examples.py -x -s -k "rocm and pytorch"
run_cli_rocm_pytorch_multi_gpu_tests:
if: ${{
Expand Down Expand Up @@ -84,14 +88,11 @@ jobs:
run: |
pip install -e .[testing,diffusers,timm,deepspeed,peft,autoawq,auto-gptq] "deepspeed<0.15"
# - 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 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 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 from example folder
- name: Run cli tests (sequential)
run: |
pytest tests/test_examples.py -x -s -k "cuda and pytorch"
FORCE_SEQUENTIAL=1 pytest tests/test_cli.py -x -s -k "cli and cuda and pytorch and (deepspeed_inference)"
4 changes: 0 additions & 4 deletions examples/tei_bge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ defaults:

name: tei_bert

launcher:
device_isolation: true
device_isolation_action: warn

backend:
device: cpu
model: BAAI/bge-base-en-v1.5
Expand Down
10 changes: 10 additions & 0 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,13 @@ def test_cuda_vllm_configs(config_name):
@pytest.mark.parametrize("script_name", CUDA_PYTORCH_SCRIPTS)
def test_cuda_pytorch_scripts(script_name):
execute_python_script(script_name)

ROCM_PYTORCH_CONFIGS = [config for config in CUDA_PYTORCH_CONFIGS if config != "energy_star.yaml"]

@pytest.mark.parametrize("config_name", ROCM_PYTORCH_CONFIGS)
def test_rocm_pytorch_configs(config_name):
test_yaml_config(config_name)

@pytest.mark.parametrize("script_name", CUDA_PYTORCH_SCRIPTS)
def test_rocm_pytorch_scripts(script_name):
execute_python_script(script_name)

0 comments on commit f61ed47

Please sign in to comment.