Skip to content

Commit

Permalink
Fix mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
sublee committed Jun 24, 2019
1 parent 984003c commit fe945da
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions stubs/torch/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ from .autograd import no_grad as no_grad, enable_grad as enable_grad, \
from . import cuda as cuda
from . import optim as optim

#MODIFIED BY TORCHGPIPE
from . import version
from . import backends
#END

class dtype: ...

class layout: ...
Expand Down
3 changes: 3 additions & 0 deletions stubs/torch/backends/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#MODIFIED BY TORCHGPIPE
from . import cudnn
#END
3 changes: 3 additions & 0 deletions stubs/torch/backends/cudnn.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#MODIFIED BY TORCHGPIPE
def version() -> int: ...
#END
3 changes: 0 additions & 3 deletions stubs/torch/nn/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ class Module:

def add_module(self, name: str, module: Module) -> None: ...

def buffers(self) -> Iterator[Tensor]: ...
def parameters(self) -> Iterator[Parameter]: ...

def state_dict(self, destination: Optional[str] = ..., prefix: str = ..., keep_vars: bool = ...) -> Dict[str, Tensor]: ...
def load_state_dict(self, state_dict: Dict[str, Tensor], strict: bool = ...) -> Tuple[List[str], List[str]]: ...

Expand Down
5 changes: 5 additions & 0 deletions stubs/torch/version.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#MODIFIED BY TORCHGPIPE
debug: bool = ...
cuda: str = ...
git_version: str = ...
#END

0 comments on commit fe945da

Please sign in to comment.