This guide explains how to share and/or fork Gradient Notebooks for others to run and how to guarantee reproducibility so that your collaborators always have a good experience.
Introduction to sharing and forking notebooks
Gradient Notebooks makes it easy to collaborate with teammates. Notebooks are shared at the team level and can take advantage of shared persistent storage at the team level. Notebooks can also be made public or private.
How to share a notebook
Share button in the notebook IDE provides a quick and easy way to generate a shareable link for a notebook.
If public access is granted, anyone with the link will be able to view the contents of the notebook.
How to fork a notebook
Forking is useful to clone a public notebook into our workspace or to duplicate a notebook that is already in our workspace. Forking a notebook creates a new history for the notebook.
Fork a notebook from within the notebook IDE by using the hamburger menu in the top left of the IDE:
Fork a notebook from the Gradient Notebooks console using the 3-dot menu:
The files copied to the notebook are those listed in the notebook include file, which is explained in the next section.
How to configure a notebook for forking
When a notebook is offline, some files are copied to the storage provider to enable offline viewing. By default, the list of files includes
.md files. Additionally, if the notebook was instantiated using a git repo as a workspace, Gradient will upload any files that are tracked by git.
It's possible to specify exactly which files should be available offline by providing a
.notebookinclude file in the
The file is similar to syntax found in a
.gitignore file, however in this case we will be including files instead of ignoring them. Negative patterns are supported.
.notebookinclude file looks like this:
# and all of the files from `git ls-files`
In the following example, we tell gradient to upload all
.png files to the storage provider while skipping dataset files:
*.png # include all png files
!datasets/**/*.png # exclude the ones in my datasets
Now we will use a negative example to exclude
Reference for operations within .notebookinclude file
|Comments out the line|
|Negates the pattern|
|Wildcard exactly one character|
|Range notation to match a character in the range|
|Match in all directories|
|Match all files within a directory|
|Match zero or more directories between |