Skip to content

Merge pull request #3302 from flairNLP/add_onnx_session_config #1966

Merge pull request #3302 from flairNLP/add_onnx_session_config

Merge pull request #3302 from flairNLP/add_onnx_session_config #1966

Triggered via push September 18, 2023 12:38
Status Failure
Total duration 27m 48s
Artifacts

ci.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

4 errors
test: flair/datasets/entity_linking.py#L341
ruff pytest_ruff.RuffError: flair/datasets/entity_linking.py:948:24: PIE808 [*] Unnecessary `start` argument in `range` | 946 | :param outfile: file, to which the output is written 947 | """ 948 | for i in range(0, len(sentence)): | ^ PIE808 949 | # If there are annotated entity mentions for given post title or a comment thread 950 | if links: | = help: Remove `start` argument
test: flair/datasets/sequence_labeling.py#L341
ruff pytest_ruff.RuffError: flair/datasets/sequence_labeling.py:1150:22: C416 [*] Unnecessary `list` comprehension (rewrite using `list()`) | 1149 | named_entities = span_labels[0] 1150 | srl_frames = [(predicate, labels) for predicate, labels in zip(verbal_predicates, span_labels[1:])] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C416 1151 | 1152 | # this would not be reached if parse_pieces contained None, hence the cast | = help: Rewrite using `list()` flair/datasets/sequence_labeling.py:1203:13: UP028 [*] Replace `yield` over `for` loop with `yield from` | 1201 | """An iterator over the sentences in an individual CONLL formatted file.""" 1202 | for document in cls.dataset_document_iterator(file_path): 1203 | for sentence in document: | _____________^ 1204 | | yield sentence | |______________________________^ UP028 | = help: Replace with `yield from` flair/datasets/sequence_labeling.py:2525:28: PIE808 [*] Unnecessary `start` argument in `range` | 2524 | def add_I_prefix(current_line: List[str], ner: int, tag: str): 2525 | for i in range(0, len(current_line)): | ^ PIE808 2526 | if i == 0: 2527 | f.write(line_list[i]) | = help: Remove `start` argument flair/datasets/sequence_labeling.py:2543:40: PIE808 [*] Unnecessary `start` argument in `range` | 2541 | ner_tag = line_list[ner_column] 2542 | if ner_tag in ["0", "O"]: # no chunk 2543 | for i in range(0, len(line_list)): | ^ PIE808 2544 | if i == 0: 2545 | 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:117:68: PIE808 [*] Unnecessary `start` argument in `range` | 115 | matrix_indices = [ 116 | [self.tag_dictionary.get_idx_for_item(START_TAG) + (s[0] * self.tagset_size)] 117 | + [s[i] + (s[i + 1] * self.tagset_size) for i in range(0, len(s) - 1)] | ^ PIE808 118 | for s in targets_per_sentence 119 | ] | = help: Remove `start` argument
test
Process completed with exit code 1.