Skip to content

Commit

Permalink
make test more memory efficient by only loading the smallest model
Browse files Browse the repository at this point in the history
  • Loading branch information
helpmefindaname committed Feb 6, 2024
1 parent 44c1413 commit d7fa7dd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_biomedical_entity_linking.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ def test_biomedical_entity_linking():
tagger = Classifier.load("hunflair")
tagger.predict(sentence)

for entity_type in ["disease", "chemical", "gene", "species"]:
linker = EntityMentionLinker.load(f"{entity_type}-linker")
linker.predict(sentence)
linker = EntityMentionLinker.load("disease-linker")
linker.predict(sentence)

for span in sentence.get_spans():
print(span)
Expand Down

0 comments on commit d7fa7dd

Please sign in to comment.