Global Imports
Imports done under each code block will work only inside it. Users can add a package or function to Global Imports section to make it available across all the blocks in the canvas.
Last updated
Imports done under each code block will work only inside it. Users can add a package or function to Global Imports section to make it available across all the blocks in the canvas.
Once a package is imported in Global Imports, it can be used in any block in the Notebook
For larger packages like pytorch - which are required to be run only on specific blocks - we can use block level imports.
As seen in the screenshot below, torch wasn't imported globally and at a block level. The first block imports torch and runs, but the second block gives an error as torch wasn't imported locally.

Last updated

