Skip to content

Commit

Permalink
handle removed DatasetFilter class (#65)
Browse files Browse the repository at this point in the history
* handle removed DatasetFilter class

* Run formatting

---------

Co-authored-by: Tom Aarsen <[email protected]>
  • Loading branch information
logan-markewich and tomaarsen authored Dec 5, 2024
1 parent 507740d commit f7d161d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [
"evaluate",
"seqeval",
"jinja2",
"huggingface_hub"
"huggingface_hub>=0.24.0"
]
dynamic = ["version"]

Expand Down
3 changes: 1 addition & 2 deletions span_marker/model_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from datasets import Dataset
from huggingface_hub import (
CardData,
DatasetFilter,
ModelCard,
dataset_info,
list_datasets,
Expand Down Expand Up @@ -366,7 +365,7 @@ def normalize(dataset_id: str) -> str:
# Make sure the normalized dataset IDs match
dataset_list = [
dataset
for dataset in list_datasets(filter=DatasetFilter(author=author, dataset_name=dataset_name))
for dataset in list_datasets(author=author, dataset_name=dataset_name)
if normalize(dataset.id) == normalize(cache_dataset_name)
]
# If there's only one match, get the ID from it
Expand Down
1 change: 1 addition & 0 deletions tests/test_spacy_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def test_span_marker_as_spacy_pipeline_component():
("Paris", "LOC"),
]


def test_span_marker_as_spacy_pipeline_component_pipe():
nlp = spacy.load("en_core_web_sm", disable=["ner"])
batch_size = 2
Expand Down

0 comments on commit f7d161d

Please sign in to comment.