Skip to content

Merge pull request #3397 from flairNLP/fix-splitter #2084

Merge pull request #3397 from flairNLP/fix-splitter

Merge pull request #3397 from flairNLP/fix-splitter #2084

Triggered via push January 30, 2024 10:51
Status Failure
Total duration 21m 52s
Artifacts

ci.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

8 errors and 1 warning
test: flair/data.py#L1
Black format check --- /home/runner/work/flair/flair/flair/data.py 2024-01-30 10:52:02.123217+00:00 +++ /home/runner/work/flair/flair/flair/data.py 2024-01-30 10:54:19.785884+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:
test: flair/file_utils.py#L1
Black format check --- /home/runner/work/flair/flair/flair/file_utils.py 2024-01-30 10:52:02.127217+00:00 +++ /home/runner/work/flair/flair/flair/file_utils.py 2024-01-30 10:54:26.987022+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
test: flair/models/entity_linker_model.py#L1
Black format check --- /home/runner/work/flair/flair/flair/models/entity_linker_model.py 2024-01-30 10:52:02.127217+00:00 +++ /home/runner/work/flair/flair/flair/models/entity_linker_model.py 2024-01-30 10:54:27.998571+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
test: flair/nn/distance/euclidean.py#L1
Black format check --- /home/runner/work/flair/flair/flair/nn/distance/euclidean.py 2024-01-30 10:52:02.131217+00:00 +++ /home/runner/work/flair/flair/flair/nn/distance/euclidean.py 2024-01-30 10:54:33.229187+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
test: flair/nn/model.py#L1
Black format check --- /home/runner/work/flair/flair/flair/nn/model.py 2024-01-30 10:52:02.131217+00:00 +++ /home/runner/work/flair/flair/flair/nn/model.py 2024-01-30 10:54:34.231948+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, )
test: tests/test_language_model.py#L28
test_train_language_model[False] UserWarning: The verbose parameter is deprecated. Please use get_last_lr() to access the learning rate.
test: tests/test_language_model.py#L61
test_train_resume_language_model[False] UserWarning: The verbose parameter is deprecated. Please use get_last_lr() to access the learning rate.
test
Process completed with exit code 1.
test
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/.