Description
When using the Google Colab extension in VS Code, the remote Colab runtime cannot access local files.
Even when the notebook is stored locally and opened in VS Code, selecting the Colab kernel prevents file reads such as pd.read_csv("localfile.csv").
The Files pane does not reliably upload files, and local paths cannot be resolved.
This makes it unclear how (or if) local file access is supposed to work with Colab kernels in VS Code.
Environment
- VS Code version: **1.106.0 **
- Colab extension version: 0.0.x
- Jupyter extension version: 2024.x.x
- OS (Linux | Mac | Windows): Mac
Repro Steps
-
Open a local folder in VS Code.
-
Open a local .ipynb file.
-
Switch the kernel to Colab › Connect to a hosted runtime.
-
Attempt to read any local file, e.g.:
-
Or attempt to upload a file via the Files sidebar.
Expected Behaviour
Actual Behaviour
- Local file paths are not found.
- Upload button in the Files sidebar sometimes does nothing or silently fails.
- No clear instructions are given on how to access local data.
- The behaviour is inconsistent with the blog post announcement, which implies local notebooks can interact with Colab runtimes.
Additional context
This issue makes it challenging to work with local datasets while using Colab GPU runtimes through VS Code.
The documentation does not explain the limitations of local file access when using the remote runtime.
Logs
Colab Output Panel
# Paste your Colab logs here
# e.g. FileNotFoundError, connection messages, etc.
Jupyter Output Panel
# Paste your Jupyter logs here
Description
When using the Google Colab extension in VS Code, the remote Colab runtime cannot access local files.
Even when the notebook is stored locally and opened in VS Code, selecting the Colab kernel prevents file reads such as
pd.read_csv("localfile.csv").The Files pane does not reliably upload files, and local paths cannot be resolved.
This makes it unclear how (or if) local file access is supposed to work with Colab kernels in VS Code.
Environment
Repro Steps
Open a local folder in VS Code.
Open a local
.ipynbfile.Switch the kernel to Colab › Connect to a hosted runtime.
Attempt to read any local file, e.g.:
Or attempt to upload a file via the Files sidebar.
Expected Behaviour
The extension should either:
File uploads should appear consistently under
/content/.Actual Behaviour
Additional context
This issue makes it challenging to work with local datasets while using Colab GPU runtimes through VS Code.
The documentation does not explain the limitations of local file access when using the remote runtime.
Logs
Colab Output Panel
Jupyter Output Panel
# Paste your Jupyter logs here