Skip to content

Commit

Permalink
skip certain tests for G1 with empty param list (huggingface#1613)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubramony authored and Liangyx2 committed Jan 20, 2025
1 parent 66e7418 commit 0745cf1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/test_text_generation_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ def test_text_generation_bf16_1x(
check_output=check_output,
)


@pytest.mark.skipif(condition=not bool(int(os.environ.get("GAUDI2_CI", "0"))),
reason="Skipping test for G1")
@pytest.mark.parametrize(
"model_name, world_size, batch_size, reuse_cache, input_len, output_len, baseline", MODELS_TO_TEST["fp8"]
)
Expand Down Expand Up @@ -412,6 +413,8 @@ def test_text_generation_fp8(
)


@pytest.mark.skipif(condition=not bool(int(os.environ.get("GAUDI2_CI", "0"))),
reason="Skipping test for G1")
@pytest.mark.parametrize(
"model_name, world_size, batch_size, reuse_cache, input_len, output_len, baseline",
MODELS_TO_TEST["load_quantized_model_with_autogptq"],
Expand Down Expand Up @@ -447,17 +450,23 @@ def test_text_generation_deepspeed(model_name: str, baseline: float, world_size:
_test_text_generation(model_name, baseline, token, deepspeed=True, world_size=world_size, batch_size=batch_size)


@pytest.mark.skipif(condition=not bool(int(os.environ.get("GAUDI2_CI", "0"))),
reason="Skipping test for G1")
@pytest.mark.parametrize("model_name, baseline", MODELS_TO_TEST["torch_compile"])
def test_text_generation_torch_compile(model_name: str, baseline: float, token: str):
_test_text_generation(model_name, baseline, token, torch_compile=True)


@pytest.mark.skipif(condition=not bool(int(os.environ.get("GAUDI2_CI", "0"))),
reason="Skipping test for G1")
@pytest.mark.parametrize("model_name, baseline", MODELS_TO_TEST["torch_compile_distributed"])
def test_text_generation_torch_compile_distributed(model_name: str, baseline: float, token: str):
world_size = 8
_test_text_generation(model_name, baseline, token, deepspeed=True, world_size=world_size, torch_compile=True)


@pytest.mark.skipif(condition=not bool(int(os.environ.get("GAUDI2_CI", "0"))),
reason="Skipping test for G1")
@pytest.mark.parametrize("model_name, baseline", MODELS_TO_TEST["distributed_tp"])
def test_text_generation_distributed_tp(model_name: str, baseline: float, token: str):
world_size = 8
Expand All @@ -480,6 +489,8 @@ def test_text_generation_contrastive_search(
_test_text_generation(model_name, baseline, token, batch_size, reuse_cache, contrastive_search=True)


@pytest.mark.skipif(condition=not bool(int(os.environ.get("GAUDI2_CI", "0"))),
reason="Skipping test for G1")
@pytest.mark.parametrize("model_name, batch_size, reuse_cache, baseline", MODELS_TO_TEST["beam_search"])
def test_text_generation_beam_search(model_name: str, baseline: float, batch_size: int, reuse_cache: bool, token: str):
_test_text_generation(model_name, baseline, token, batch_size, reuse_cache, num_beams=3)
Expand Down

0 comments on commit 0745cf1

Please sign in to comment.