Skip to content

Support for NoisyNER dataset #2191

Support for NoisyNER dataset

Support for NoisyNER dataset #2191

Triggered via pull request May 30, 2024 16:30
Status Failure
Total duration 26m 42s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 1 warning
test: flair/__init__.py#L1
mypy-status mypy exited with status 1.
test: flair/datasets/sequence_labeling.py#L1
Black format check --- /home/runner/work/flair/flair/flair/datasets/sequence_labeling.py 2024-05-30 16:30:16.028214+00:00 +++ /home/runner/work/flair/flair/flair/datasets/sequence_labeling.py 2024-05-30 16:33:12.437254+00:00 @@ -4971,11 +4971,10 @@ for instance in data: out_file.write(column_separator.join(instance)) out_file.write("\n") - class MASAKHA_POS(MultiCorpus): def __init__( self, languages: Union[str, List[str]] = "bam", version: str = "v1",
test: flair/datasets/sequence_labeling.py#L341
ruff pytest_ruff.RuffError: flair/datasets/sequence_labeling.py:4853:9: D202 [*] No blank lines allowed after function docstring (found 1) | 4851 | **corpusargs, 4852 | ) -> None: 4853 | """ | _________^ 4854 | | :param version: Chooses the labelset for the data. 4855 | | v0 (default): clean labels 4856 | | v1 to v7: different kinds of noisy labelsets (details: https://ojs.aaai.org/index.php/AAAI/article/view/16938) 4857 | | :param base_path: Default is None, meaning the corpus gets automatically downloaded and saved. 4858 | | You can override this by passing a path to a directory containing the unprocessed files but typically this 4859 | | should not be necessary. 4860 | | :param in_memory: If True the dataset is kept in memory achieving speedups in training. 4861 | | """ | |___________^ D202 4862 | 4863 | if not (version in range(0, 8)): | = help: Remove blank line(s) after function docstring flair/datasets/sequence_labeling.py:4853:9: D205 1 blank line required between summary line and description | 4851 | **corpusargs, 4852 | ) -> None: 4853 | """ | _________^ 4854 | | :param version: Chooses the labelset for the data. 4855 | | v0 (default): clean labels 4856 | | v1 to v7: different kinds of noisy labelsets (details: https://ojs.aaai.org/index.php/AAAI/article/view/16938) 4857 | | :param base_path: Default is None, meaning the corpus gets automatically downloaded and saved. 4858 | | You can override this by passing a path to a directory containing the unprocessed files but typically this 4859 | | should not be necessary. 4860 | | :param in_memory: If True the dataset is kept in memory achieving speedups in training. 4861 | | """ | |___________^ D205 4862 | 4863 | if not (version in range(0, 8)): | = help: Insert single blank line flair/datasets/sequence_labeling.py:4853:9: D212 [*] Multi-line docstring summary should start at the first line | 4851 | **corpusargs, 4852 | ) -> None: 4853 | """ | _________^ 4854 | | :param version: Chooses the labelset for the data. 4855 | | v0 (default): clean labels 4856 | | v1 to v7: different kinds of noisy labelsets (details: https://ojs.aaai.org/index.php/AAAI/article/view/16938) 4857 | | :param base_path: Default is None, meaning the corpus gets automatically downloaded and saved. 4858 | | You can override this by passing a path to a directory containing the unprocessed files but typically this 4859 | | should not be necessary. 4860 | | :param in_memory: If True the dataset is kept in memory achieving speedups in training. 4861 | | """ | |___________^ D212 4862 | 4863 | if not (version in range(0, 8)): | = help: Remove whitespace after opening quotes flair/datasets/sequence_labeling.py:4863:17: E713 [*] Test for membership should be `not in` | 4861 | """ 4862 | 4863 | if not (version in range(0, 8)): | ^^^^^^^^^^^^^^^^^^^^^^ E713 4864 | raise Exception( 4865 | "Please choose a version (int) from 0 to 7. With v0 (default) you get the clean labelset for the data, while v1 to v7 provide different kinds of noisy labelsets. For details see https://ojs.aaai.org/index.php/AAAI/article/view/16938." | = help: Convert to `not in` flair/datasets/sequence_labeling.py:4863:34: PIE808 [*] Unnecessary `start` argument in `range` | 4861 | """ 4862 | 4863 | if not (version in range(0, 8)): | ^ PIE808 4864 | raise Exception( 4865 | "Please choose
test: flair/datasets/sequence_labeling.py#L1
flair/datasets/sequence_labeling.py 4912: error: Incompatible return value type (got "List[List[str]]", expected "List[str]") [return-value] 4917: error: Incompatible return value type (got "List[List[Any]]", expected "List[str]") [return-value] 4942: error: Argument 1 to "append" of "list" has incompatible type "List[Any]"; expected "str" [arg-type]
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/.