Update documentation for Hunflair2 release #2130
Annotations
8 errors and 1 warning
Run tests:
flair/__init__.py#L1
mypy-status
mypy exited with status 1.
|
Run tests:
flair/embeddings/base.py#L342
ruff
pytest_ruff.RuffError: flair/embeddings/base.py:171:17: UP032 Use f-string instead of `format` call
|
169 | if len(tensors) != self.mixture_size:
170 | log.error(
171 | "{} tensors were passed, but the module was initialized to mix {} tensors.".format(
| _________________^
172 | | len(tensors), self.mixture_size
173 | | )
| |_________________^ UP032
174 | )
|
= help: Convert to f-string
|
Run tests:
flair/models/__init__.py#L342
ruff
pytest_ruff.RuffError: flair/models/__init__.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
1 | / from .clustering import ClusteringModel
2 | | from .entity_linker_model import SpanClassifier
3 | | from .entity_mention_linking import EntityMentionLinker
4 | | from .language_model import LanguageModel
5 | | from .lemmatizer_model import Lemmatizer
6 | | from .multitask_model import MultitaskModel
7 | | from .pairwise_classification_model import TextPairClassifier
8 | | from .pairwise_regression_model import TextPairRegressor
9 | | from .regexp_tagger import RegexpTagger
10 | | from .relation_classifier_model import RelationClassifier
11 | | from .relation_extractor_model import RelationExtractor
12 | | from .sequence_tagger_model import SequenceTagger
13 | | from .prefixed_tagger import PrefixedSequenceTagger # This import has to be after SequenceTagger!
14 | | from .tars_model import FewshotClassifier, TARSClassifier, TARSTagger
15 | | from .text_classification_model import TextClassifier
16 | | from .text_regression_model import TextRegressor
17 | | from .word_tagger_model import TokenClassifier, WordTagger
18 | |
19 | | __all__ = [
| |_^ I001
20 | "EntityMentionLinker",
21 | "SpanClassifier",
|
= help: Organize imports
|
Run tests:
flair/models/__init__.py#L1
Black format check
--- /home/runner/work/flair/flair/flair/models/__init__.py 2024-03-07 15:52:16.638660+00:00
+++ /home/runner/work/flair/flair/flair/models/__init__.py 2024-03-07 15:55:18.256985+00:00
@@ -8,11 +8,11 @@
from .pairwise_regression_model import TextPairRegressor
from .regexp_tagger import RegexpTagger
from .relation_classifier_model import RelationClassifier
from .relation_extractor_model import RelationExtractor
from .sequence_tagger_model import SequenceTagger
-from .prefixed_tagger import PrefixedSequenceTagger # This import has to be after SequenceTagger!
+from .prefixed_tagger import PrefixedSequenceTagger # This import has to be after SequenceTagger!
from .tars_model import FewshotClassifier, TARSClassifier, TARSTagger
from .text_classification_model import TextClassifier
from .text_regression_model import TextRegressor
from .word_tagger_model import TokenClassifier, WordTagger
|
Run tests:
flair/models/multitask_model.py#L1
flair/models/multitask_model.py
271: error: Incompatible types in assignment (expression has type "Path", variable has type "str") [assignment]
|
Run tests:
flair/models/pairwise_regression_model.py#L342
ruff
pytest_ruff.RuffError: flair/models/pairwise_regression_model.py:321:41: UP032 Use f-string instead of `format` call
|
319 | if out_path is not None:
320 | for pair, prediction, true_value in zip(batch, results, true_values):
321 | eval_line = "{}\t{}\t{}\t{}\n".format(
| _________________________________________^
322 | | pair.first.to_original_text(), pair.second.to_original_text(), true_value, prediction
323 | | )
| |_____________________________^ UP032
324 | out_file.write(eval_line)
|
= help: Convert to f-string
|
Run tests:
flair/training_utils.py#L342
ruff
pytest_ruff.RuffError: flair/training_utils.py:83:16: UP032 Use f-string instead of `format` call
|
82 | def __str__(self) -> str:
83 | line = "mean squared error: {:.4f} - mean absolute error: {:.4f} - pearson: {:.4f} - spearman: {:.4f}".format(
| ________________^
84 | | self.mean_squared_error(),
85 | | self.mean_absolute_error(),
86 | | self.pearsonr(),
87 | | self.spearmanr(),
88 | | )
| |_________^ UP032
89 | return line
|
= help: Convert to f-string
|
Run tests
Process completed with exit code 1.
|
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/.
|
Loading