pytorch/torch/_C/_onnx.pyi
Edward Yang 7e9af67ca1 Add minimal skeleton for _C type stubs, delete torch.autograd stub (#38080)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38080

Originally, my plan was to just delete the torch.autograd stub, but
this triggered a bunch of downstream errors relating to non-existent
to _C modules, and so instead of ignoring those files, I decided to
add a minimal _C type stubs, where it was easy (cases which were
codegened I ignored).

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Test Plan: Imported from OSS

Differential Revision: D21487841

Pulled By: ezyang

fbshipit-source-id: cfcc467ff1c146d242cb9ff33a46ba26b33b8213
2020-05-08 22:33:21 -07:00

37 lines
633 B
Python

# Defined in torch/csrc/onnx/init.cpp
from enum import Enum
PYTORCH_ONNX_CAFFE2_BUNDLE: bool
IR_VERSION: int
PRODUCER_VERSION: str
class TensorProtoDataType(Enum):
UNDEFINED = ...
FLOAT = ...
UINT8 = ...
INT8 = ...
UINT16 = ...
INT16 = ...
INT32 = ...
INT64 = ...
STRING = ...
BOOL = ...
FLOAT16 = ...
DOUBLE = ...
UINT32 = ...
UINT64 = ...
COMPLEX64 = ...
COMPLEX128 = ...
class OperatorExportTypes(Enum):
ONNX = ...
ONNX_ATEN = ...
ONNX_ATEN_FALLBACK = ...
RAW = ...
class TrainingMode(Enum):
EVAL = ...
PRESERVE = ...
TRAINING = ...