mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/55294 Some static checkers like pyre have difficulties with types like `builtings.type`, so we strip the `builtins` prefix from autogened proto type stubs. Test Plan: Let CI run. Reviewed By: d4l3k Differential Revision: D27477699 fbshipit-source-id: 45e19835974200a030817d37aec785e3ecb23e8b
219 lines
9.8 KiB
Python
219 lines
9.8 KiB
Python
"""
|
|
@generated by mypy-protobuf. Do not edit manually!
|
|
isort:skip_file
|
|
"""
|
|
import builtins
|
|
import caffe2.proto.caffe2_pb2
|
|
import google.protobuf.descriptor
|
|
import google.protobuf.internal.containers
|
|
import google.protobuf.internal.enum_type_wrapper
|
|
import google.protobuf.message
|
|
import typing
|
|
import typing_extensions
|
|
|
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...
|
|
|
|
global___ProtoVersion = ProtoVersion
|
|
class _ProtoVersion(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ProtoVersion], type):
|
|
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
|
|
PROTO_VERSION_NEWEST = ProtoVersion.V(6)
|
|
class ProtoVersion(metaclass=_ProtoVersion):
|
|
V = typing.NewType('V', int)
|
|
PROTO_VERSION_NEWEST = ProtoVersion.V(6)
|
|
|
|
class RecordRef(google.protobuf.message.Message):
|
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
|
|
KEY_FIELD_NUMBER: int
|
|
key: typing.Text = ...
|
|
|
|
def __init__(self,
|
|
*,
|
|
key : typing.Optional[typing.Text] = ...,
|
|
) -> None: ...
|
|
def HasField(self, field_name: typing_extensions.Literal[u"key",b"key"]) -> bool: ...
|
|
def ClearField(self, field_name: typing_extensions.Literal[u"key",b"key"]) -> None: ...
|
|
global___RecordRef = RecordRef
|
|
|
|
class TensorDef(google.protobuf.message.Message):
|
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
|
|
DIMS_FIELD_NUMBER: int
|
|
OFFSET_FIELD_NUMBER: int
|
|
STRIDES_FIELD_NUMBER: int
|
|
REQUIRES_GRAD_FIELD_NUMBER: int
|
|
DATA_TYPE_FIELD_NUMBER: int
|
|
DATA_FIELD_NUMBER: int
|
|
DEVICE_FIELD_NUMBER: int
|
|
IS_QUANTIZED_FIELD_NUMBER: int
|
|
SCALE_FIELD_NUMBER: int
|
|
ZERO_POINT_FIELD_NUMBER: int
|
|
dims: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int] = ...
|
|
offset: int = ...
|
|
strides: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int] = ...
|
|
requires_grad: bool = ...
|
|
data_type: caffe2.proto.caffe2_pb2.TensorProto.DataType = ...
|
|
device: typing.Text = ...
|
|
is_quantized: bool = ...
|
|
scale: float = ...
|
|
zero_point: int = ...
|
|
|
|
@property
|
|
def data(self) -> global___RecordRef: ...
|
|
|
|
def __init__(self,
|
|
*,
|
|
dims : typing.Optional[typing.Iterable[int]] = ...,
|
|
offset : typing.Optional[int] = ...,
|
|
strides : typing.Optional[typing.Iterable[int]] = ...,
|
|
requires_grad : typing.Optional[bool] = ...,
|
|
data_type : typing.Optional[caffe2.proto.caffe2_pb2.TensorProto.DataType] = ...,
|
|
data : typing.Optional[global___RecordRef] = ...,
|
|
device : typing.Optional[typing.Text] = ...,
|
|
is_quantized : typing.Optional[bool] = ...,
|
|
scale : typing.Optional[float] = ...,
|
|
zero_point : typing.Optional[int] = ...,
|
|
) -> None: ...
|
|
def HasField(self, field_name: typing_extensions.Literal[u"data",b"data",u"data_type",b"data_type",u"device",b"device",u"is_quantized",b"is_quantized",u"offset",b"offset",u"requires_grad",b"requires_grad",u"scale",b"scale",u"zero_point",b"zero_point"]) -> bool: ...
|
|
def ClearField(self, field_name: typing_extensions.Literal[u"data",b"data",u"data_type",b"data_type",u"device",b"device",u"dims",b"dims",u"is_quantized",b"is_quantized",u"offset",b"offset",u"requires_grad",b"requires_grad",u"scale",b"scale",u"strides",b"strides",u"zero_point",b"zero_point"]) -> None: ...
|
|
global___TensorDef = TensorDef
|
|
|
|
class AttributeDef(google.protobuf.message.Message):
|
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
|
|
TYPE_FIELD_NUMBER: int
|
|
NAME_FIELD_NUMBER: int
|
|
ID_FIELD_NUMBER: int
|
|
type: typing.Text = ...
|
|
name: typing.Text = ...
|
|
id: int = ...
|
|
|
|
def __init__(self,
|
|
*,
|
|
type : typing.Optional[typing.Text] = ...,
|
|
name : typing.Optional[typing.Text] = ...,
|
|
id : typing.Optional[int] = ...,
|
|
) -> None: ...
|
|
def HasField(self, field_name: typing_extensions.Literal[u"id",b"id",u"name",b"name",u"type",b"type"]) -> bool: ...
|
|
def ClearField(self, field_name: typing_extensions.Literal[u"id",b"id",u"name",b"name",u"type",b"type"]) -> None: ...
|
|
global___AttributeDef = AttributeDef
|
|
|
|
class ParameterDef(google.protobuf.message.Message):
|
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
|
|
IS_BUFFER_FIELD_NUMBER: int
|
|
TENSOR_ID_FIELD_NUMBER: int
|
|
NAME_FIELD_NUMBER: int
|
|
is_buffer: bool = ...
|
|
tensor_id: int = ...
|
|
name: typing.Text = ...
|
|
|
|
def __init__(self,
|
|
*,
|
|
is_buffer : typing.Optional[bool] = ...,
|
|
tensor_id : typing.Optional[int] = ...,
|
|
name : typing.Optional[typing.Text] = ...,
|
|
) -> None: ...
|
|
def HasField(self, field_name: typing_extensions.Literal[u"is_buffer",b"is_buffer",u"name",b"name",u"tensor_id",b"tensor_id"]) -> bool: ...
|
|
def ClearField(self, field_name: typing_extensions.Literal[u"is_buffer",b"is_buffer",u"name",b"name",u"tensor_id",b"tensor_id"]) -> None: ...
|
|
global___ParameterDef = ParameterDef
|
|
|
|
class ModuleDef(google.protobuf.message.Message):
|
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
|
|
SUBMODULES_FIELD_NUMBER: int
|
|
TORCHSCRIPT_ARENA_FIELD_NUMBER: int
|
|
CAFFE2_NETS_FIELD_NUMBER: int
|
|
PICKLE_ARENA_FIELD_NUMBER: int
|
|
CPP_ARENA_FIELD_NUMBER: int
|
|
PARAMETERS_FIELD_NUMBER: int
|
|
NAME_FIELD_NUMBER: int
|
|
OPTIMIZE_FIELD_NUMBER: int
|
|
ATTRIBUTES_FIELD_NUMBER: int
|
|
GET_STATE_ATTRIBUTE_ID_FIELD_NUMBER: int
|
|
TORCHSCRIPT_DEBUG_ARENA_FIELD_NUMBER: int
|
|
name: typing.Text = ...
|
|
optimize: bool = ...
|
|
get_state_attribute_id: int = ...
|
|
|
|
@property
|
|
def submodules(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ModuleDef]: ...
|
|
|
|
@property
|
|
def torchscript_arena(self) -> global___RecordRef: ...
|
|
|
|
@property
|
|
def caffe2_nets(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caffe2.proto.caffe2_pb2.NetDef]: ...
|
|
|
|
@property
|
|
def pickle_arena(self) -> global___RecordRef: ...
|
|
|
|
@property
|
|
def cpp_arena(self) -> global___RecordRef: ...
|
|
|
|
@property
|
|
def parameters(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ParameterDef]: ...
|
|
|
|
@property
|
|
def attributes(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___AttributeDef]: ...
|
|
|
|
@property
|
|
def torchscript_debug_arena(self) -> global___RecordRef: ...
|
|
|
|
def __init__(self,
|
|
*,
|
|
submodules : typing.Optional[typing.Iterable[global___ModuleDef]] = ...,
|
|
torchscript_arena : typing.Optional[global___RecordRef] = ...,
|
|
caffe2_nets : typing.Optional[typing.Iterable[caffe2.proto.caffe2_pb2.NetDef]] = ...,
|
|
pickle_arena : typing.Optional[global___RecordRef] = ...,
|
|
cpp_arena : typing.Optional[global___RecordRef] = ...,
|
|
parameters : typing.Optional[typing.Iterable[global___ParameterDef]] = ...,
|
|
name : typing.Optional[typing.Text] = ...,
|
|
optimize : typing.Optional[bool] = ...,
|
|
attributes : typing.Optional[typing.Iterable[global___AttributeDef]] = ...,
|
|
get_state_attribute_id : typing.Optional[int] = ...,
|
|
torchscript_debug_arena : typing.Optional[global___RecordRef] = ...,
|
|
) -> None: ...
|
|
def HasField(self, field_name: typing_extensions.Literal[u"cpp_arena",b"cpp_arena",u"get_state_attribute_id",b"get_state_attribute_id",u"name",b"name",u"optimize",b"optimize",u"pickle_arena",b"pickle_arena",u"torchscript_arena",b"torchscript_arena",u"torchscript_debug_arena",b"torchscript_debug_arena"]) -> bool: ...
|
|
def ClearField(self, field_name: typing_extensions.Literal[u"attributes",b"attributes",u"caffe2_nets",b"caffe2_nets",u"cpp_arena",b"cpp_arena",u"get_state_attribute_id",b"get_state_attribute_id",u"name",b"name",u"optimize",b"optimize",u"parameters",b"parameters",u"pickle_arena",b"pickle_arena",u"submodules",b"submodules",u"torchscript_arena",b"torchscript_arena",u"torchscript_debug_arena",b"torchscript_debug_arena"]) -> None: ...
|
|
global___ModuleDef = ModuleDef
|
|
|
|
class LibDef(google.protobuf.message.Message):
|
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
|
|
TORCHSCRIPT_ARENA_FIELD_NUMBER: int
|
|
|
|
@property
|
|
def torchscript_arena(self) -> global___RecordRef: ...
|
|
|
|
def __init__(self,
|
|
*,
|
|
torchscript_arena : typing.Optional[global___RecordRef] = ...,
|
|
) -> None: ...
|
|
def HasField(self, field_name: typing_extensions.Literal[u"torchscript_arena",b"torchscript_arena"]) -> bool: ...
|
|
def ClearField(self, field_name: typing_extensions.Literal[u"torchscript_arena",b"torchscript_arena"]) -> None: ...
|
|
global___LibDef = LibDef
|
|
|
|
class ModelDef(google.protobuf.message.Message):
|
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
|
|
PROTO_VERSION_FIELD_NUMBER: int
|
|
MAIN_MODULE_FIELD_NUMBER: int
|
|
PRODUCER_NAME_FIELD_NUMBER: int
|
|
PRODUCER_VERSION_FIELD_NUMBER: int
|
|
TENSORS_FIELD_NUMBER: int
|
|
proto_version: int = ...
|
|
producer_name: typing.Text = ...
|
|
producer_version: typing.Text = ...
|
|
|
|
@property
|
|
def main_module(self) -> global___ModuleDef: ...
|
|
|
|
@property
|
|
def tensors(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TensorDef]: ...
|
|
|
|
def __init__(self,
|
|
*,
|
|
proto_version : typing.Optional[int] = ...,
|
|
main_module : typing.Optional[global___ModuleDef] = ...,
|
|
producer_name : typing.Optional[typing.Text] = ...,
|
|
producer_version : typing.Optional[typing.Text] = ...,
|
|
tensors : typing.Optional[typing.Iterable[global___TensorDef]] = ...,
|
|
) -> None: ...
|
|
def HasField(self, field_name: typing_extensions.Literal[u"main_module",b"main_module",u"producer_name",b"producer_name",u"producer_version",b"producer_version",u"proto_version",b"proto_version"]) -> bool: ...
|
|
def ClearField(self, field_name: typing_extensions.Literal[u"main_module",b"main_module",u"producer_name",b"producer_name",u"producer_version",b"producer_version",u"proto_version",b"proto_version",u"tensors",b"tensors"]) -> None: ...
|
|
global___ModelDef = ModelDef
|