creating a doc page with autodocs and everything #1959
Triggered via pull request
September 11, 2023 08:29
Status
Failure
Total duration
32m 35s
Artifacts
–
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
6 errors
test:
flair/datasets/entity_linking.py#L341
ruff
pytest_ruff.RuffError: flair/datasets/entity_linking.py:949:24: PIE808 [*] Unnecessary `start` argument in `range`
|
947 | outfile: file, to which the output is written
948 | """
949 | for i in range(0, len(sentence)):
| ^ PIE808
950 | # If there are annotated entity mentions for given post title or a comment thread
951 | if links:
|
= help: Remove `start` argument
|
test:
flair/datasets/sequence_labeling.py#L341
ruff
pytest_ruff.RuffError: flair/datasets/sequence_labeling.py:1181:13: UP028 [*] Replace `yield` over `for` loop with `yield from`
|
1179 | """An iterator over the sentences in an individual CONLL formatted file."""
1180 | for document in cls.dataset_document_iterator(file_path):
1181 | for sentence in document:
| _____________^
1182 | | yield sentence
| |______________________________^ UP028
|
= help: Replace with `yield from`
flair/datasets/sequence_labeling.py:2493:28: PIE808 [*] Unnecessary `start` argument in `range`
|
2492 | def add_I_prefix(current_line: List[str], ner: int, tag: str):
2493 | for i in range(0, len(current_line)):
| ^ PIE808
2494 | if i == 0:
2495 | f.write(line_list[i])
|
= help: Remove `start` argument
flair/datasets/sequence_labeling.py:2511:40: PIE808 [*] Unnecessary `start` argument in `range`
|
2509 | ner_tag = line_list[ner_column]
2510 | if ner_tag in ["0", "O"]: # no chunk
2511 | for i in range(0, len(line_list)):
| ^ PIE808
2512 | if i == 0:
2513 | f.write(line_list[i])
|
= help: Remove `start` argument
|
test:
flair/models/sequence_tagger_utils/viterbi.py#L341
ruff
pytest_ruff.RuffError: flair/models/sequence_tagger_utils/viterbi.py:122:68: PIE808 [*] Unnecessary `start` argument in `range`
|
120 | matrix_indices = [
121 | [self.tag_dictionary.get_idx_for_item(START_TAG) + (s[0] * self.tagset_size)]
122 | + [s[i] + (s[i + 1] * self.tagset_size) for i in range(0, len(s) - 1)]
| ^ PIE808
123 | for s in targets_per_sentence
124 | ]
|
= help: Remove `start` argument
|
test:
flair/trainers/trainer.py#L341
ruff
pytest_ruff.RuffError: flair/trainers/trainer.py:290:9: D417 Missing argument descriptions in the docstring for `train_custom`: `max_grad_norm`, `use_amp`
|
288 | )
289 |
290 | def train_custom(
| ^^^^^^^^^^^^ D417
291 | self,
292 | base_path: Union[Path, str],
|
|
test:
flair/trainers/plugins/functional/linear_scheduler.py#L341
ruff
pytest_ruff.RuffError: flair/trainers/plugins/functional/linear_scheduler.py:54:9: D202 [*] No blank lines allowed after function docstring (found 1)
|
52 | @TrainerPlugin.hook
53 | def after_training_batch(self, optimizer_was_run: bool, **kw):
54 | """Do the scheduler step if one-cycle or linear decay."""
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ D202
55 |
56 | # skip if no optimization has happened.
|
= help: Remove blank line(s) after function docstring
|
test
Process completed with exit code 1.
|