Added support for biomedical datasets with multiple entity types #2080
Annotations
10 errors and 1 warning
Run tests:
flair/__init__.py#L1
mypy-status
mypy exited with status 1.
|
Run tests:
flair/data.py#L1
flair/data.py
1730: error: Argument 1 to "len" has incompatible type "Dataset[Any]"; expected "Sized" [arg-type]
|
Run tests:
flair/data.py#L1
Black format check
--- /home/runner/work/flair/flair/flair/data.py 2024-01-26 14:36:36.326452+00:00
+++ /home/runner/work/flair/flair/flair/data.py 2024-01-26 14:38:48.068685+00:00
@@ -985,16 +985,14 @@
def get_span(self, start: int, stop: int):
span_slice = slice(start, stop)
return self[span_slice]
@typing.overload
- def __getitem__(self, idx: int) -> Token:
- ...
+ def __getitem__(self, idx: int) -> Token: ...
@typing.overload
- def __getitem__(self, s: slice) -> Span:
- ...
+ def __getitem__(self, s: slice) -> Span: ...
def __getitem__(self, subscript):
if isinstance(subscript, slice):
return Span(self.tokens[subscript])
else:
|
Run tests:
flair/file_utils.py#L1
Black format check
--- /home/runner/work/flair/flair/flair/file_utils.py 2024-01-26 14:36:36.330452+00:00
+++ /home/runner/work/flair/flair/flair/file_utils.py 2024-01-26 14:38:48.555897+00:00
@@ -1,6 +1,7 @@
"""Utilities for working with the local dataset cache. Copied from AllenNLP."""
+
import base64
import functools
import io
import logging
import mmap
|
Run tests:
flair/models/entity_linker_model.py#L1
Black format check
--- /home/runner/work/flair/flair/flair/models/entity_linker_model.py 2024-01-26 14:36:36.330452+00:00
+++ /home/runner/work/flair/flair/flair/models/entity_linker_model.py 2024-01-26 14:38:57.948881+00:00
@@ -106,13 +106,13 @@
**classifierargs: The arguments propagated to :meth:`flair.nn.DefaultClassifier.__init__`
"""
super().__init__(
embeddings=embeddings,
label_dictionary=label_dictionary,
- final_embedding_size=embeddings.embedding_length * 2
- if pooling_operation == "first_last"
- else embeddings.embedding_length,
+ final_embedding_size=(
+ embeddings.embedding_length * 2 if pooling_operation == "first_last" else embeddings.embedding_length
+ ),
**classifierargs,
)
self.pooling_operation = pooling_operation
self._label_type = label_type
|
Run tests:
flair/nn/model.py#L1
Black format check
--- /home/runner/work/flair/flair/flair/nn/model.py 2024-01-26 14:36:36.330452+00:00
+++ /home/runner/work/flair/flair/flair/nn/model.py 2024-01-26 14:39:03.450959+00:00
@@ -698,13 +698,15 @@
device=flair.device,
)
else:
return torch.tensor(
[
- self.label_dictionary.get_idx_for_item(label[0])
- if len(label) > 0
- else self.label_dictionary.get_idx_for_item("O")
+ (
+ self.label_dictionary.get_idx_for_item(label[0])
+ if len(label) > 0
+ else self.label_dictionary.get_idx_for_item("O")
+ )
for label in labels
],
dtype=torch.long,
device=flair.device,
)
|
Run tests:
flair/nn/distance/euclidean.py#L1
Black format check
--- /home/runner/work/flair/flair/flair/nn/distance/euclidean.py 2024-01-26 14:36:36.330452+00:00
+++ /home/runner/work/flair/flair/flair/nn/distance/euclidean.py 2024-01-26 14:39:04.602118+00:00
@@ -14,11 +14,10 @@
It was published under MIT License:
https://github.com/asappresearch/dynamic-classification/blob/master/LICENSE.md
Source: https://github.com/asappresearch/dynamic-classification/blob/55beb5a48406c187674bea40487c011e8fa45aab/distance/euclidean.py
"""
-
import torch
from torch import Tensor, nn
|
Run tests:
tests/test_tars.py#L51
test_train_tars[False]
OSError: Unable to load weights from pytorch checkpoint file for './cache/transformers/hub/models--sshleifer--tiny-distilroberta-base/snapshots/d305c58110158c865cb6746c62d4511d4148a934/pytorch_model.bin' at './cache/transformers/hub/models--sshleifer--tiny-distilroberta-base/snapshots/d305c58110158c865cb6746c62d4511d4148a934/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
|
Run tests:
tests/embeddings/test_transformer_word_embeddings.py#L149
TestTransformerWordEmbeddings.test_layoutlm_embeddings[False]
OSError: Unable to load weights from pytorch checkpoint file for './cache/transformers/hub/models--microsoft--layoutlm-base-uncased/snapshots/8290fe08a848303616911d513e66ec192840ffbd/pytorch_model.bin' at './cache/transformers/hub/models--microsoft--layoutlm-base-uncased/snapshots/8290fe08a848303616911d513e66ec192840ffbd/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
|
Run tests:
tests/embeddings/test_transformer_word_embeddings.py#L182
TestTransformerWordEmbeddings.test_layoutlmv3_embeddings[False]
OSError: Unable to load weights from pytorch checkpoint file for './cache/transformers/hub/models--microsoft--layoutlmv3-base/snapshots/ba7716c277fb9b49bba6c3c4cad84123b689acf2/pytorch_model.bin' at './cache/transformers/hub/models--microsoft--layoutlmv3-base/snapshots/ba7716c277fb9b49bba6c3c4cad84123b689acf2/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-python@v4, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The logs for this run have expired and are no longer available.
Loading