Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Feb 16, 2024
1 parent a98dfc4 commit 0016da8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test_cli_rocm_pytorch:
--entrypoint /bin/bash \
--volume $(PWD):/workspace \
--workdir /workspace \
opt-bench-rocm:5.6.1 -c "pip install -e .[testing,diffusers,timm,deepspeed] && pytest tests/ -k 'cli and cuda and pytorch' -x"
opt-bench-rocm:5.6.1 -c "pip install -e .[testing,diffusers,timm,deepspeed,peft] && pytest tests/ -k 'cli and cuda and pytorch' -x"

test_cli_cuda_pytorch:
docker run \
Expand All @@ -72,7 +72,7 @@ test_cli_cuda_pytorch:
--entrypoint /bin/bash \
--volume $(PWD):/workspace \
--workdir /workspace \
opt-bench-cuda:11.8.0 -c "pip install -e .[testing,diffusers,timm,deepspeed] && pytest tests/ -k 'cli and cuda and pytorch' -x"
opt-bench-cuda:11.8.0 -c "pip install -e .[testing,diffusers,timm,deepspeed,peft] && pytest tests/ -k 'cli and cuda and pytorch' -x"

test_api_cpu:
docker run \
Expand Down
8 changes: 7 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ def test_api_dataset_generator(library, task, model):
def test_api_launch(benchmark_config, launcher_config, device):
if launcher_config.name == "torchrun" and device == "cuda":
device_ids = ",".join(str(i) for i in range(torch.cuda.device_count()))
elif device == "cuda":
device_ids = "0"
else:
device_ids = None

Expand All @@ -180,4 +182,8 @@ def test_api_launch(benchmark_config, launcher_config, device):
launcher=launcher_config,
backend=backend_config,
)
_ = launch(experiment_config)
benchmark_report = launch(experiment_config)

# TODO: test push to hub
experiment_config.to_json("experiment_config.json")
benchmark_report.to_json("benchmark_report.json")

0 comments on commit 0016da8

Please sign in to comment.