-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Troubleshooting TensorBoard integration in VS Code
There are several known issues that you may encounter when trying to use TensorBoard inside VS Code. If your scenario is not covered below, please file a bug.
If:
- You are using VS Code Jupyter notebooks via the Python and Jupyter extensions and
- You are using the TensorBoard nbextension to start TensorBoard inline in a Jupyter notebook and
- The cell output from running
%tensorboard --logdir logs/fit
is blank
This may be due to an incompatible version of TensorBoard being installed. The fix would be to install TensorBoard >=2.4.1 to get TensorBoard to load in VS Code Jupyter notebooks.
If:
- You are on Windows and
- You are launching TensorBoard using our Python: Launch TensorBoard command and
- The webview consistently comes up blank and
- When you open the developer console (Cmd/Ctrl + Shift + P to bring up the command palette, then execute Toggle Developer Tools), you see an error which says
[Embedded Page] Refused to execute script from 'http://localhost:6006/index.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
This may be due to a MIME type misconfiguration and is also tracked as https://github.com/tensorflow/tensorboard/issues/3077. You can verify if this is your problem by running the following code in a shell:
python -c "import mimetypes; print(list(mimetypes.guess_type('index.js')))"
If the output is anything other than application/javascript
, the most common cause is that some other application has added an incorrect mimetype to the Windows registry as part of its installation process. The fix in this case would be to look for and delete the "Content Type" key with value "text/plain" under the Computer\HKEY_CLASSES_ROOT.js registry hive.