Added support for biomedical datasets with multiple entity types #2076
Annotations
5 errors
test:
flair/__init__.py#L1
mypy-status
mypy exited with status 1.
|
test:
flair/data.py#L1
flair/data.py
1730: error: Argument 1 to "len" has incompatible type "Dataset[Any]"; expected "Sized" [arg-type]
|
test:
flair/models/sequence_tagger_model.py#L341
ruff
pytest_ruff.RuffError: flair/models/sequence_tagger_model.py:22:28: F401 [*] `flair.nn.model.get_non_abstract_subclasses` imported but unused
|
20 | from flair.models.sequence_tagger_utils.crf import CRF
21 | from flair.models.sequence_tagger_utils.viterbi import ViterbiDecoder, ViterbiLoss
22 | from flair.nn.model import get_non_abstract_subclasses
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ F401
23 | from flair.training_utils import store_embeddings
|
= help: Remove unused import: `flair.nn.model.get_non_abstract_subclasses`
|
test:
flair/models/sequence_tagger_model.py#L1
Black format check
--- /home/runner/work/flair/flair/flair/models/sequence_tagger_model.py 2024-01-18 17:59:35.841082+00:00
+++ /home/runner/work/flair/flair/flair/models/sequence_tagger_model.py 2024-01-18 18:02:10.544842+00:00
@@ -1181,11 +1181,13 @@
label_span = augmented_sentence[
len_task_prompt + label.data_point.idx - 1 : len_task_prompt + label.data_point.idx
]
else:
label_span = augmented_sentence[
- len_task_prompt + label.data_point.tokens[0].idx - 1 : len_task_prompt
+ len_task_prompt
+ + label.data_point.tokens[0].idx
+ - 1 : len_task_prompt
+ label.data_point.tokens[-1].idx
]
label_span.add_label(layer, label.value, label.score)
|
test
Process completed with exit code 1.
|