Skip to content

Commit

Permalink
Merge pull request #3526 from flairNLP/future_warning
Browse files Browse the repository at this point in the history
Ignore FutureWarning
  • Loading branch information
alanakbik authored Aug 9, 2024
2 parents 66cd3bd + cdfa0ee commit a4988ca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ filterwarnings = [
'ignore:distutils Version classes are deprecated.', # faiss uses deprecated distutils.
'ignore:`resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.', # transformers calls deprecated hf_hub
"ignore:`torch.cuda.amp.GradScaler", # GradScaler changes in torch 2.3.0 but we want to be backwards compatible.
"ignore:`clean_up_tokenization_spaces` was not set", # Default behavior changes in transformers v4.45, raising irrelevant FutureWarning for serialized models.
]
markers = [
"integration",
Expand Down
16 changes: 9 additions & 7 deletions tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def test_load_universal_dependencies_conllu_corpus(tasks_base_path):
_assert_universal_dependencies_conllu_dataset(corpus.train)


@pytest.mark.integration()
@pytest.mark.skip()
def test_hipe_2022_corpus(tasks_base_path):
# This test covers the complete HIPE 2022 dataset.
# https://github.com/hipe-eval/HIPE-2022-data
Expand Down Expand Up @@ -682,7 +682,7 @@ def test_hipe_2022(dataset_version="v2.1", add_document_separator=True):
test_hipe_2022(dataset_version="v2.1", add_document_separator=False)


@pytest.mark.integration()
@pytest.mark.skip()
def test_icdar_europeana_corpus(tasks_base_path):
# This test covers the complete ICDAR Europeana corpus:
# https://github.com/stefan-it/historic-domain-adaptation-icdar
Expand All @@ -700,7 +700,7 @@ def check_number_sentences(reference: int, actual: int, split_name: str):
check_number_sentences(len(corpus.test), gold_stats[language]["test"], "test")


@pytest.mark.integration()
@pytest.mark.skip()
def test_masakhane_corpus(tasks_base_path):
# This test covers the complete MasakhaNER dataset, including support for v1 and v2.
supported_versions = ["v1", "v2"]
Expand Down Expand Up @@ -784,7 +784,7 @@ def check_number_sentences(reference: int, actual: int, split_name: str, languag
check_number_sentences(len(corpus.test), gold_stats["test"], "test", language, version)


@pytest.mark.integration()
@pytest.mark.skip()
def test_nermud_corpus(tasks_base_path):
# This test covers the NERMuD dataset. Official stats can be found here:
# https://github.com/dhfbk/KIND/tree/main/evalita-2023
Expand All @@ -803,6 +803,7 @@ def check_number_sentences(reference: int, actual: int, split_name: str):
check_number_sentences(len(corpus.dev), stats["dev"], "dev")


@pytest.mark.skip()
def test_german_ler_corpus(tasks_base_path):
corpus = flair.datasets.NER_GERMAN_LEGAL()

Expand All @@ -812,7 +813,7 @@ def test_german_ler_corpus(tasks_base_path):
assert len(corpus.test) == 6673, "Mismatch in number of sentences for test split"


@pytest.mark.integration()
@pytest.mark.skip()
def test_masakha_pos_corpus(tasks_base_path):
# This test covers the complete MasakhaPOS dataset.
supported_versions = ["v1"]
Expand Down Expand Up @@ -881,7 +882,7 @@ def check_number_sentences(reference: int, actual: int, split_name: str, languag
check_number_sentences(len(corpus.test), gold_stats["test"], "test", language, version)


@pytest.mark.integration()
@pytest.mark.skip()
def test_german_mobie(tasks_base_path):
corpus = flair.datasets.NER_GERMAN_MOBIE()

Expand Down Expand Up @@ -966,14 +967,15 @@ def test_jsonl_corpus_loads_metadata(tasks_base_path):
assert dataset.sentences[2].get_metadata("from") == 125


@pytest.mark.integration()
@pytest.mark.skip()
def test_ontonotes_download():
from urllib.parse import urlparse

res = urlparse(ONTONOTES.archive_url)
assert all([res.scheme, res.netloc])


@pytest.mark.skip()
def test_ontonotes_extraction(tasks_base_path):
import os
import tempfile
Expand Down

0 comments on commit a4988ca

Please sign in to comment.