-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ONNX] Improve docstrings and typing annotations #78231
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
[ONNX] Improve docstrings and typing annotations #78231
Conversation
🔗 Helpful links
✅ No Failures (0 Pending)As of commit fed901d (more details on the Dr. CI page): Expand to see more💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
A lot of CI failures, please take a look, maybe doc building is failing? |
…hu/onnx-docstrings
- Move definitions in `__init__` to internal classes and expose them by importing to init (prevent circular dependencies): https://github.com/pytorch/pytorch/wiki/torch.onnx-Namespacing - Context classes and enums are moved to `_exporter_states.py` - Exceptions are moved to `errors.py` - Define `__all__` for torch.onnx. https://github.com/pytorch/pytorch/wiki/Public-API-definition-and-documentation - Moved `utils.__IN_ONNX_EXPORT` to `GLOBALS.in_onnx_export` - Deprecated `torch.onnx._export` Precedes #78231 Using this as an aid for finding public functions: ```python list(filter(lambda x: not x.startswith("_"), torch.onnx.utils.__dict__.keys())) ``` Pull Request resolved: #78446 Approved by: https://github.com/BowenBao
@pytorchbot merge -g |
@pytorchbot successfully started a merge job. Check the current status here |
Summary: - Move definitions in `__init__` to internal classes and expose them by importing to init (prevent circular dependencies): https://github.com/pytorch/pytorch/wiki/torch.onnx-Namespacing - Context classes and enums are moved to `_exporter_states.py` - Exceptions are moved to `errors.py` - Define `__all__` for torch.onnx. https://github.com/pytorch/pytorch/wiki/Public-API-definition-and-documentation - Moved `utils.__IN_ONNX_EXPORT` to `GLOBALS.in_onnx_export` - Deprecated `torch.onnx._export` Precedes #78231 Using this as an aid for finding public functions: ```python list(filter(lambda x: not x.startswith("_"), torch.onnx.utils.__dict__.keys())) ``` Pull Request resolved: #78446 Approved by: https://github.com/BowenBao Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/d3ef5c3fa3ff677259a713b1b6533fa56e5f8ccc Reviewed By: malfet Differential Revision: D37156412 Pulled By: malfet fbshipit-source-id: 2d13f24c6a1e2c5d2636087c117fb77424500d78
Hey @justinchuby. |
Summary: - Remove wrappers in `__init__` around utils and instead expose those functions directly. Move the docstrings from `__init__` to corresponding functions in utils - Annotate `torch.onnx.export` types - Improve docstrings Pull Request resolved: #78231 Approved by: https://github.com/BowenBao Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/4b817f581640daf939fe9b195b1e8e7952c88203 Reviewed By: malfet Differential Revision: D37242157 Pulled By: malfet fbshipit-source-id: 24e8d55fc93a425a63f96deaa043963bad2e4984
- Move definitions in `__init__` to internal classes and expose them by importing to init (prevent circular dependencies): https://github.com/pytorch/pytorch/wiki/torch.onnx-Namespacing - Context classes and enums are moved to `_exporter_states.py` - Exceptions are moved to `errors.py` - Define `__all__` for torch.onnx. https://github.com/pytorch/pytorch/wiki/Public-API-definition-and-documentation - Moved `utils.__IN_ONNX_EXPORT` to `GLOBALS.in_onnx_export` - Deprecated `torch.onnx._export` Precedes pytorch#78231 Using this as an aid for finding public functions: ```python list(filter(lambda x: not x.startswith("_"), torch.onnx.utils.__dict__.keys())) ``` Pull Request resolved: pytorch#78446 Approved by: https://github.com/BowenBao
- Remove wrappers in `__init__` around utils and instead expose those functions directly. Move the docstrings from `__init__` to corresponding functions in utils - Annotate `torch.onnx.export` types - Improve docstrings Pull Request resolved: pytorch#78231 Approved by: https://github.com/BowenBao
__init__
around utils and instead expose those functions directly. Move the docstrings from__init__
to corresponding functions in utilstorch.onnx.export
types