cannot find reference of remote pytorch

Answered

Pycharm cannot find torch.* from remote environment(conda or pipenv), but no problem happend with local interprerter. I have reinstalled the remote environment and changed from `conda install` to `pip install`. The same problem happens.

 

0
4 comments

Hi,

So the import statement is not resolved or the code fails to run?

If second, how does it work when you run it directly on the remote host? E.g., ssh to the remote host and run the same script with that interpreter.

0

Only "cannot find reference" warning. The code can run with no problem. And I use "python console" tools to import torch, pycharm could offer auto-complete function.

0

Looks like a known issue with code insight for pytorch https://youtrack.jetbrains.com/issue/PY-33519
Please vote for the ticket and follow it for updates.

0

Pycharm(2019.1) as well as pytorch(1.1.0) are up to date. The github issue has said that pytorch 1.0.1  post2 hos resolved this problem. But I got the warning still. 

The most confusing thing is that with a local intepreter, it could auto-complete,but with remote one, it fills. And with the python console tool, also could autocomplete.

Run torch.sum() in python console, and you can see the autocomplete.

But in the editor, no any auto-complete.

 

0

Please sign in to leave a comment.