Tensorflow code throws error in local server, but works in remote
See original GitHub issueEnvironment data
-
VS Code version: Version: 1.53.2 Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4 Date: 2021-02-11T11:45:54.515Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Darwin x64 19.6.0
-
Jupyter Extension version (available under the Extensions sidebar): Id: ms-toolsai.jupyter Version: 2021.2.576440691
-
Python Extension version (available under the Extensions sidebar): Id: ms-python.python Version: 2021.3.633143540-dev
-
OS (Windows | Mac | Linux distro) and version: MacOS 10.15.7 and Ubuntu 18.04.1
-
Python and/or Anaconda version: Python 3.8.6
-
Type of virtual environment used: pyenv virtualenv
-
Jupyter server running: Local
Expected behaviour
I expect code that runs on jupyter notebooks outside of vs code to run correctly inside vs code as well.
Actual behaviour
Some (possibly all?) Apache Beam PTransform
s fail when running jupyter server locally.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- Create new virtualenv and install tensorflow 2.4 and tfx 0.27
pip install tensorflow==2.4.1 tfx==0.27.0
-
Start jupyter server locally using that virtualenv (
Jupyter: Create Interactive Window
) -
Rename the attached file to
.py
and open in vs code
- Run file (
Jupyter: Run Current File in Interactive Window
)
Logs
Additional Notes
I tried this with two different set ups: local development on macOS and using the remote extension server to run it in an Ubuntu remote host. In both cases the code will crash if vs code tries to manage the jupyter server and will run successfully if you manually start a server and connect vs code to it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Thanks for the issue @bguisard. I’m also able to follow your steps and get the same result. We’ll discuss it in our next triage meeting.
Closing this issue as this is caused by a Python package thats beyond the control of this exension. I.e. the Jupyter extension doesn’t have any control over how the packages work, I believe the issue might have something to do with how the package is installed locally vs remote, or differences in the version of the package or differences in the Python environments.