Skip to content

Commit

Permalink
chore: add filter for FutureWarning raised by huggingface-hub 0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed May 3, 2024
1 parent 35a8dd4 commit b12bde7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/torch/test_hybrid_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ def run_hybrid_llm_test(
assert file_name in module_dir_files


# Dependency 'huggingface-hub' raises a 'FutureWarning' from version 0.23.0 when calling the
# 'from_pretrained' method
@pytest.mark.filterwarnings("ignore::FutureWarning")
@pytest.mark.parametrize(
"list_or_str_private_modules_names, expected_accuracy",
[
Expand All @@ -124,6 +127,7 @@ def test_gpt2_hybrid_mlp(list_or_str_private_modules_names, expected_accuracy):
run_hybrid_llm_test(model, input_ids, list_or_str_private_modules_names, expected_accuracy)


@pytest.mark.filterwarnings("ignore::FutureWarning")
def test_hybrid_brevitas_qat_model():
"""Test GPT2 hybrid."""
n_bits = 3
Expand All @@ -145,6 +149,8 @@ def test_hybrid_brevitas_qat_model():
hybrid_model.compile_model(x=inputs)


# Dependency 'huggingface-hub' raises a 'FutureWarning' from version 0.23.0 when calling the
# 'from_pretrained' method
def test_gpt2_hybrid_mlp_module_not_found():
"""Test GPT2 hybrid."""

Expand Down

0 comments on commit b12bde7

Please sign in to comment.