Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address current CI blocker #12883

Closed
carmocca opened this issue Apr 26, 2022 · 0 comments · Fixed by #12884
Closed

Address current CI blocker #12883

carmocca opened this issue Apr 26, 2022 · 0 comments · Fixed by #12884
Assignees
Labels
ci Continuous Integration priority: 0 High priority task
Milestone

Comments

@carmocca
Copy link
Contributor

carmocca commented Apr 26, 2022

Updating fairscale triggered the following error:

____________________ test_registries_register_automatically ____________________

    def test_registries_register_automatically():
        assert "SaveConfigCallback" not in CALLBACK_REGISTRY
        with mock.patch("sys.argv", ["any.py"]):
>           LightningCLI(BoringModel, run=False, auto_registry=True)

/__w/pytorch-lightning/pytorch-lightning/tests/utilities/test_cli.py:956: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/__w/pytorch-lightning/pytorch-lightning/pytorch_lightning/utilities/cli.py:551: in __init__
    self.setup_parser(run, main_kwargs, subparser_kwargs)
/__w/pytorch-lightning/pytorch-lightning/pytorch_lightning/utilities/cli.py:590: in setup_parser
    self._add_arguments(self.parser)
/__w/pytorch-lightning/pytorch-lightning/pytorch_lightning/utilities/cli.py:630: in _add_arguments
    parser.add_optimizer_args(OPTIMIZER_REGISTRY.classes)
/__w/pytorch-lightning/pytorch-lightning/pytorch_lightning/utilities/cli.py:223: in add_optimizer_args
    self.add_subclass_arguments(optimizer_class, nested_key, **kwargs)
/root/miniconda3/envs/lightning/lib/python3.8/site-packages/jsonargparse/signatures.py:481: in add_subclass_arguments
    doc_group = self._gather_docstrings(baseclass, get_class_init_and_base_docstrings)[0]
/root/miniconda3/envs/lightning/lib/python3.8/site-packages/jsonargparse/signatures.py:527: in _gather_docstrings
    docstring = docstring_parse(doc)
/root/miniconda3/envs/lightning/lib/python3.8/site-packages/docstring_parser/parser.py:42: in parse
    raise exc
/root/miniconda3/envs/lightning/lib/python3.8/site-packages/docstring_parser/parser.py:35: in parse
    ret = module.parse(text)
/root/miniconda3/envs/lightning/lib/python3.8/site-packages/docstring_parser/google.py:295: in parse
    return GoogleParser().parse(text)
/root/miniconda3/envs/lightning/lib/python3.8/site-packages/docstring_parser/google.py:285: in parse
    ret.meta.append(self._build_meta(part, title))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <docstring_parser.google.GoogleParser object at 0x7fa7b0350220>
text = 'The rest params are in-sync with the `AdaScale` class above.'
title = 'Args'

    def _build_meta(self, text: str, title: str) -> DocstringMeta:
        """Build docstring element.
    
        :param text: docstring element text
        :param title: title of section containing element
        :return:
        """
    
        section = self.sections[title]
    
        if (
            section.type == SectionType.SINGULAR_OR_MULTIPLE
            and not MULTIPLE_PATTERN.match(text)
        ) or section.type == SectionType.SINGULAR:
            return self._build_single_meta(section, text)
    
        if ":" not in text:
>           raise ParseError(f"Expected a colon in {text!r}.")
E           docstring_parser.common.ParseError: Expected a colon in 'The rest params are in-sync with the `AdaScale` class above.'.

There are 3 issues here:

  1. https://github.com/facebookresearch/fairscale/blob/e65833a0e4a3d5b0fad6128032746a03a733d275/fairscale/optim/adascale.py#L639 should be unintended.
  2. docstring-parse==0.14 started raising this error.
  3. jsonargparse should be resilient to these kinds of errors and fallback to something cc @mauvilsa

For now, we can pin docstring-parse==0.13.

cc @tchaton @rohitgr7 @carmocca @akihironitta @Borda

@carmocca carmocca added priority: 0 High priority task ci Continuous Integration labels Apr 26, 2022
@carmocca carmocca added this to the 1.6.x milestone Apr 26, 2022
@carmocca carmocca assigned rohitgr7 and carmocca and unassigned rohitgr7 Apr 26, 2022
@carmocca carmocca moved this to In Review in Frameworks Planning Apr 26, 2022
Repository owner moved this from In Review to Done in Frameworks Planning Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration priority: 0 High priority task
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants