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

[codemod] Add type: ignore comments everywhere #57995

Closed
wants to merge 3 commits into from

Conversation

driazati
Copy link
Contributor

@driazati driazati commented May 10, 2021

Stack from ghstack:

Differential Revision: D28349279

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented May 10, 2021

💊 CI failures summary and remediations

As of commit aec77ed (more details on the Dr. CI page):


  • 4/4 failures possibly* introduced in this PR
    • 1/4 non-scanned failure(s)

🕵️ 2 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_linux_xenial_py3_clang7_onnx_ort_test2 (1/2)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

May 11 08:51:31 E RuntimeError: Return type l.....) -> ...' not found on multiline type annotation
May 11 08:51:31 /opt/conda/lib/python3.6/site-packages/caffe2/python/workspace_test.py:704: in <module>
May 11 08:51:31     class MyModule(torch.jit.ScriptModule):
May 11 08:51:31 /opt/conda/lib/python3.6/site-packages/caffe2/python/workspace_test.py:717: in MyModule
May 11 08:51:31     @torch.jit.script_method
May 11 08:51:31 /opt/conda/lib/python3.6/site-packages/torch/jit/_script.py:325: in script_method
May 11 08:51:31     ast = get_jit_def(fn, fn.__name__, self_name="ScriptModule")
May 11 08:51:31 /opt/conda/lib/python3.6/site-packages/torch/jit/frontend.py:269: in get_jit_def
May 11 08:51:31     type_line = torch.jit.annotations.get_type_line(source)
May 11 08:51:31 /opt/conda/lib/python3.6/site-packages/torch/jit/annotations.py:215: in get_type_line
May 11 08:51:31     "\n(See PEP 484 https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code)")
May 11 08:51:31 E   RuntimeError: Return type line '# type: (...) -> ...' not found on multiline type annotation
May 11 08:51:31 E   for type lines:
May 11 08:51:31 E       def multi_input_tensor_list(self, tensor_list):  # pyre-ignore: PT type annotations  # type: ignore[name-defined, name-defined, name-defined]
May 11 08:51:31 E           # type: (List[Tensor]) -> Tensor
May 11 08:51:31 E   (See PEP 484 https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code)
May 11 08:51:31 - generated xml file: /var/lib/jenkins/workspace/test/test-reports/python/result.xml -
May 11 08:51:31 =========================== short test summary info ============================
May 11 08:51:31 ERROR ../../../../opt/conda/lib/python3.6/site-packages/caffe2/python/workspace_test.py
May 11 08:51:31 !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
May 11 08:51:31 ========================= 2 warnings, 1 error in 2.26s =========================

See CircleCI build pytorch_linux_xenial_py3_clang7_onnx_ort_test1 (2/2)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

May 11 08:53:14 E RuntimeError: Return type l.....) -> ...' not found on multiline type annotation
May 11 08:53:14 /opt/conda/lib/python3.6/site-packages/caffe2/python/workspace_test.py:704: in <module>
May 11 08:53:14     class MyModule(torch.jit.ScriptModule):
May 11 08:53:14 /opt/conda/lib/python3.6/site-packages/caffe2/python/workspace_test.py:717: in MyModule
May 11 08:53:14     @torch.jit.script_method
May 11 08:53:14 /opt/conda/lib/python3.6/site-packages/torch/jit/_script.py:325: in script_method
May 11 08:53:14     ast = get_jit_def(fn, fn.__name__, self_name="ScriptModule")
May 11 08:53:14 /opt/conda/lib/python3.6/site-packages/torch/jit/frontend.py:269: in get_jit_def
May 11 08:53:14     type_line = torch.jit.annotations.get_type_line(source)
May 11 08:53:14 /opt/conda/lib/python3.6/site-packages/torch/jit/annotations.py:215: in get_type_line
May 11 08:53:14     "\n(See PEP 484 https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code)")
May 11 08:53:14 E   RuntimeError: Return type line '# type: (...) -> ...' not found on multiline type annotation
May 11 08:53:14 E   for type lines:
May 11 08:53:14 E       def multi_input_tensor_list(self, tensor_list):  # pyre-ignore: PT type annotations  # type: ignore[name-defined, name-defined, name-defined]
May 11 08:53:14 E           # type: (List[Tensor]) -> Tensor
May 11 08:53:14 E   (See PEP 484 https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code)
May 11 08:53:14 - generated xml file: /var/lib/jenkins/workspace/test/test-reports/python/result.xml -
May 11 08:53:14 =========================== short test summary info ============================
May 11 08:53:14 ERROR ../../../../opt/conda/lib/python3.6/site-packages/caffe2/python/workspace_test.py
May 11 08:53:14 !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
May 11 08:53:14 ========================= 2 warnings, 1 error in 2.42s =========================


1 failure not recognized by patterns:

Job Step Action
GitHub Actions flake8-py3 Fail if there were any warnings 🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added the oncall: distributed Add this issue/PR to distributed oncall triage queue label May 10, 2021
@driazati
Copy link
Contributor Author

@driazati has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

dgl-intel pushed a commit to dgl-intel/pytorch that referenced this pull request May 11, 2021
ghstack-source-id: 7a55ad1e8187a1fc55954fdab088b5ce5cdb4c1d
Pull Request resolved: pytorch#57995
@github-actions
Copy link

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
Stale pull requests will automatically be closed 30 days after being marked Stale

@github-actions github-actions bot added the Stale label Jul 10, 2021
@driazati driazati closed this Nov 8, 2021
@facebook-github-bot facebook-github-bot deleted the gh/driazati/21/head branch December 9, 2021 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed oncall: distributed Add this issue/PR to distributed oncall triage queue oncall: jit Add this issue/PR to JIT oncall triage queue Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants