Not working with Pytorch
See original GitHub issueDescribe the bug
Whenever a file imports pytorch, it produces an error.
Traceback (most recent call last):
line 3, in <module>
File "/home/ayb/.local/anaconda3/envs/deep-learning/lib/python3.8/site-packages/torch/__init__.py", line 447, in <module>
from .tensor import Tensor
File "/home/ayb/.local/anaconda3/envs/deep-learning/lib/python3.8/site-packages/torch/tensor.py", line 13, in <module>
from torch.overrides import (
File "/home/ayb/.local/anaconda3/envs/deep-learning/lib/python3.8/site-packages/torch/overrides.py", line 1212, in <module>
has_torch_function = _add_docstr(
RuntimeError: function '_has_torch_function' already has a docstring
To Reproduce Open AREPL with a file imports pytorch with
import torch
Screenshots If applicable, add screenshots to help explain your problem.
Other Information (please complete the following information):
- OS: Ubuntu 20.04
- Python Version: 3.8.4 (conda)
- PyTorch version: 1.8.1
It actually works for the first time it runs, then produces this error.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Import torch not working - PyTorch Forums
Hi, I'm an artist, not a programmer, and I'm trying to install pytorch to install a neural network style transfer software, following this...
Read more >CUDA 11.4 and torch version 1.11.0 not working - PyTorch Live
Hi there, I have CUDA 11.4 and I've installed pytorch 1.11.0. I thought these versions where compatible but I get this error when...
Read more >PyTorch pip installation not working - windows
Trying to install PyTorch with the given command from the homepage with Stable, Windows, Pip, Python and Cuda 11.3. The command I get...
Read more >2. Troubleshooting Guide - PyTorch
Refer to this section for common issues faced while deploying your Pytorch models using Torchserve and their corresponding troubleshooting steps.
Read more >Issue with pip installation of PyTorch
A few months ago, I installed chemprop via Visual Studio Code, Windows 10 64 bit). The installation instructions say:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Unfortunately doesn’t look like there’s a easy solution to this… the docstring gets added in C code, and I’m not a C expert. See https://github.com/pytorch/pytorch/blob/059a717c9e1e08485f5ef3f13738d1f3e5a33d9e/torch/csrc/Module.cpp
Possibly related: https://github.com/pytorch/pytorch/issues/6998
Good workaround. When the library is in there AREPL starts completely fresh each time.
On Mon, Mar 14, 2022, 7:54 AM Jaideep Singh Heer @.***> wrote: