Colab SyncRun on Colab. Work locally. Stay synchronized. Colab Sync keeps a local VS Code workspace synchronized with the project files used by a Google Colab notebook. Work with your research or data science project locally in VS Code while the notebook runs on Colab. Features
Before you startInstall these VS Code extensions:
Sign in to Google Colab through the official Google Colab extension before using Colab Sync. Recommended setup1. Open your projectOpen the local folder you want to synchronize in VS Code. For example:
Colab Sync automatically uses the project folder name for the Colab project:
You do not need to enter the remote 2. Open your notebookOpen the 3. Select the Colab kernelIn the notebook toolbar, select the Colab kernel and choose the runtime you want. Colab Sync supports Python and R Colab kernels only. When VS Code asks for Jupyter kernel access, allow Colab Sync. You can also use Jupyter: Manage Access to Jupyter Kernels. 4. Connect Colab SyncOpen the Command Palette and run: Colab Sync: Connect Colab Sync automatically prepares the selected Colab kernel for the connection. You do not need to run one of your own notebook cells just to establish the connection. On the first connection, your local project is used to initialize the Colab project. After that, synchronization works in both directions. Python and RColab Sync supports both Python and R Colab kernels. For example, a Python notebook can use:
An R notebook can use:
Project-relative paths are resolved from the synchronized project root. Notebook behaviorNotebook files are handled separately because running a notebook can change outputs and execution information. Local notebook edits do not show the conflict danger notification. During normal synchronization, the local notebook is used when both sides have changed. Use Colab Sync: Pull Remote Changes when you intentionally want the remote notebook version. Empty foldersEmpty directories are synchronized too. For example:
creates the matching project directory in Colab. Commands
Settings
TroubleshootingColab Sync says no active notebook kernel is available
R notebook gives a Python syntax errorMake sure the notebook is using the R Colab kernel. Files are not appearing immediatelyRemote changes are checked every 10 seconds by default. You can also run Colab Sync: Sync Now. CreatorSujit Kumar LicenseApache-2.0 |