Commit bf4b03e
committed
Set the 'colab' renderer only for Colab web notebooks
The current implementation detects if the `google.colab` module is available. This has a couple problems:
1. Anyone can install that library, outside of Colab.
2. The recently launched [Colab VS Code extension](https://marketplace.visualstudio.com/items?itemName=Google.colab) does not work with that web-based renderer.
Snapping to the conventions used for the other notebooks/renderers (e.g. Kaggle, Azure), this change now looks for the presence of the `COLAB_NOTEBOOK_ID` environment variable. I'm an engineer on Colab and have verified that we set this on kernel init for all notebooks accessed through our web app (https://colab.research.google.com/).
More context in #5471.1 parent 10c7c56 commit bf4b03e
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | 491 | | |
495 | | - | |
496 | | - | |
497 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
498 | 495 | | |
499 | 496 | | |
500 | 497 | | |
| |||
0 commit comments