Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mbforbes/2d9e13f0602ee261fd49796622622f29 to your computer and use it in GitHub Desktop.
Save mbforbes/2d9e13f0602ee261fd49796622622f29 to your computer and use it in GitHub Desktop.
Running `stubgen --recursive torch`, some manual fixes, then trying `stubgen --recursive numpy`. More failures and it also can't figure out what `--recursive` is anymore.
out/numpy/__init__.pyi:6: error: No library stub file for module 'numpy.lib'
out/numpy/__init__.pyi:6: note: (Stub files are from https://github.com/python/typeshed)
out/numpy/__init__.pyi:7: error: No library stub file for module 'numpy.matrixlib'
out/numpy/_import_tools.pyi:23: error: Cannot assign to a type
out/numpy/__init__.pyi:12: error: No library stub file for module 'numpy.version'
out/numpy/__init__.pyi:13: error: Cannot find module named '__builtin__'
out/numpy/__init__.pyi:13: note: (Perhaps setting MYPYPATH or using the "--ignore-missing-imports" flag would help)
dataio.py:17: error: Cannot find module named 'tqdm'
out/numpy/ctypeslib.pyi:5: error: No library stub file for standard library module 'ctypes'
viewer.py:16: error: Cannot find module named 'visdom'
out/numpy/core/getlimits.pyi:28: error: Name 'min' already defined
out/numpy/core/getlimits.pyi:30: error: Name 'max' already defined
out/numpy/_import_tools.pyi:23: error: Cannot assign to a type
out/numpy/_import_tools.pyi:23: error: Cannot assign multiple types to name "PackageLoader" without an explicit "Type[...]" annotation
viewer.py:30: error: Name 'torch.Tensor' is not defined
viewer.py:45: error: Module has no attribute "Tensor"
viewer.py:107: error: Module has no attribute "Tensor"
out/numpy/compat/py3k.pyi:12: error: Cannot determine type of 'bytes'
out/numpy/compat/py3k.pyi:23: error: Cannot assign to a type
out/numpy/compat/py3k.pyi:23: error: Cannot assign multiple types to name "long" without an explicit "Type[...]" annotation
out/numpy/compat/py3k.pyi:24: error: Cannot assign to a type
out/numpy/compat/py3k.pyi:24: error: Cannot assign multiple types to name "basestring" without an explicit "Type[...]" annotation
out/numpy/compat/py3k.pyi:25: error: Cannot assign to a type
out/numpy/compat/py3k.pyi:25: error: Cannot assign multiple types to name "unicode" without an explicit "Type[...]" annotation
dataio.py:34: error: Name 'torch.Tensor' is not defined
dataio.py:43: error: Name 'torch.Tensor' is not defined
dataio.py:49: error: Module has no attribute "Tensor"
dataio.py:61: error: Name 'torch.Tensor' is not defined
dataio.py:71: error: Name 'torch.Tensor' is not defined
dataio.py:80: error: Name 'torch.Tensor' is not defined
dataio.py:99: error: Name 'torch.Tensor' is not defined
out/numpy/core/_internal.pyi:6: error: Module 'numpy.core.numerictypes' has no attribute 'object_'
out/numpy/core/records.pyi:20: error: Name 'ndarray' is not defined
out/numpy/core/numeric.pyi:11: error: Module 'numpy.core.numerictypes' has no attribute 'bool_'
out/numpy/core/numeric.pyi:11: error: Module 'numpy.core.numerictypes' has no attribute 'complex_'
out/numpy/core/numeric.pyi:11: error: Module 'numpy.core.numerictypes' has no attribute 'float_'
out/numpy/core/numeric.pyi:11: error: Module 'numpy.core.numerictypes' has no attribute 'int_'
out/numpy/core/numeric.pyi:11: error: Module 'numpy.core.numerictypes' has no attribute 'intc'
out/numpy/core/numeric.pyi:11: error: Module 'numpy.core.numerictypes' has no attribute 'longlong'
out/numpy/core/defchararray.pyi:10: error: Cannot assign to a type
out/numpy/core/defchararray.pyi:10: error: Name 'unicode' is not defined
out/numpy/core/defchararray.pyi:11: error: Cannot assign to a type
out/numpy/core/defchararray.pyi:11: error: Cannot assign multiple types to name "_bytes" without an explicit "Type[...]" annotation
out/numpy/core/defchararray.pyi:11: error: Incompatible types in assignment (expression has type "Type[str]", variable has type "Type[bytes]")
out/numpy/core/defchararray.pyi:80: error: Signature of "argsort" incompatible with supertype "ndarray"
out/numpy/core/memmap.pyi:18: error: Signature of "__array_wrap__" incompatible with supertype "ndarray"
out/numpy/core/__init__.pyi:8: error: Name 'memmap' already defined
out/numpy/__init__.pyi:8: error: Module 'numpy' has no attribute 'fft'
out/numpy/__init__.pyi:8: error: Module 'numpy' has no attribute 'linalg'
out/numpy/__init__.pyi:8: error: Module 'numpy' has no attribute 'ma'
out/numpy/__init__.pyi:8: error: Module 'numpy' has no attribute 'random'
out/numpy/ctypeslib.pyi:6: error: Module 'numpy' has no attribute 'intp'
out/numpy/ctypeslib.pyi:9: error: Name '_dummy' is not defined
out/numpy/ctypeslib.pyi:10: error: Name '_dummy' is not defined
out/numpy/ctypeslib.pyi:11: error: Name '_dummy' is not defined
out/numpy/ctypeslib.pyi:12: error: Name '_dummy' is not defined
regression.py:38: error: Name 'torch.cuda.FloatTensor' is not defined
regression.py:50: error: "IntTensor" has no attribute "type"
regression.py:103: error: Argument 1 to "len" has incompatible type "FloatTensor"; expected "Sized"
regression.py:104: error: Argument 1 to "len" has incompatible type "FloatTensor"; expected "Sized"
regression.py:105: error: Module has no attribute "cuda"
regression.py:125: error: Name 'torch.cuda.FloatTensor' is not defined
regression.py:125: error: Name 'torch.cuda.IntTensor' is not defined
regression.py:139: error: Name 'torch.cuda.FloatTensor' is not defined
regression.py:139: error: Module has no attribute "cuda"
regression.py:170: error: Name 'torch.cuda.FloatTensor' is not defined
regression.py:171: error: Name 'torch.cuda.IntTensor' is not defined
regression.py:182: error: Module has no attribute "cuda"
regression.py:185: error: Module has no attribute "cuda"
regression.py:191: error: Name 'torch.cuda.FloatTensor' is not defined
regression.py:191: error: Name 'torch.cuda.IntTensor' is not defined
regression.py:206: error: Name 'torch.cuda.IntTensor' is not defined
regression.py:206: error: "IntTensor" has no attribute "cuda"
regression.py:207: error: Name 'torch.cuda.FloatTensor' is not defined
regression.py:207: error: "FloatTensor" has no attribute "cuda"
regression.py:208: error: Name 'torch.cuda.IntTensor' is not defined
regression.py:208: error: "IntTensor" has no attribute "cuda"
regression.py:209: error: Name 'torch.cuda.FloatTensor' is not defined
regression.py:209: error: "FloatTensor" has no attribute "cuda"
regression.py:212: error: Argument 1 to "least_squares" has incompatible type "int"; expected "FloatTensor"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment