pytorch
d3ef5c3f - [ONNX] Clean up `__init__` in torch.onnx (#78446)

Commit
2 years ago
[ONNX] Clean up `__init__` in torch.onnx (#78446) - 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: https://github.com/pytorch/pytorch/pull/78446 Approved by: https://github.com/BowenBao
Author
Committer
Parents
Loading