Notebooks and runtimes
A notebook is an ordinary .ipynb file in your workspace. Open one from the
Files page (or create one with New Notebook), and the notebook editor
loads with a runtime bar at the top. The bar is where you pick a machine,
start it, and stop it. Nothing runs until you do.
The runtime bar
Stopped. The bar shows a summary of the current settings and a Start Runtime button. Click the summary to open Runtime settings; Start is disabled, with a hint, when your account is at its concurrent-runtime limit.
Starting. The bar shows Finding a machine… while the cloud allocates an instance and Setting up machine… while the runtime boots and mounts your workspace. Cancel abandons the launch. You are charged from the moment the cloud starts billing the machine, usually when it starts booting; time spent finding a machine is never charged. A launch that takes more than 10 minutes (25 on Lambda Cloud) is abandoned and reported.
Running. The bar shows the connection state, the time left when a duration is set, a resource gauge, and three controls:
-
The gauge shows CPU, memory and GPU use, updated every 5 seconds. Click it for each GPU's memory, the disks and the kernel's own memory, and for Runtime logs: what the kernel servers printed, including messages from below Python such as CUDA errors and crashes (editors and owners).
-
Connect opens a popover with Web Ports (every port the runtime is listening on, plus a field to type one) and SSH Access (the
sshcommand and config block for this runtime). On a runtime with bucket folders it also has Buckets: each bucket visible in the workspace with its size, whether this workspace can only read it, and its read-only folder at~/buckets/<bucket>with a copy button (or why there is none: the folder failed, or the runtime already holds its 16 folders). When the environment is older than bucket folders it says to rebuild the environment. See Web apps on runtime ports, SSH and Bucket folders on a runtime. -
Restart restarts the kernel in place (shortcut
0 0). The machine, the image, the workspace mount and anything you installed survive. -
Stop terminates the machine. If you installed packages outside the image during the session, Stop first asks Save installed packages? with Save as Environment or Stop anyway.
While a runtime is running, every setting is locked except Duration, which can be extended, and Idle stop.
Running, not connected in this tab. A runtime keeps running whether or not a tab is connected to it. When you reload a page or a connection drops, the bar shows Connecting to runtime… while the tab opens its connection. If it cannot, the bar shows Runtime running, not connected and the reason: your account already holds its 20 runtime connections (close another tab), the connection was lost, or you have view access to the workspace. The tab connects by itself once it can; Reconnect tries at once, and Stop still stops the runtime. See Limits.
Runtime settings
| Row | What you choose |
|---|---|
| Provider | The cloud. The GPU classes on offer differ per cloud, and each class launches in a fixed region of that cloud. |
| Pricing | On-Demand, or Spot where the provider sells it. Spot is cheaper and can be reclaimed by the cloud, so keep checkpoints in your workspace. |
| Machine | CPU Only with a vCPU count, or a GPU class, how many GPUs, and, where the family sells more than one shape, the vCPU/RAM/NVMe size. |
| Cost | The credit burn rate of the configuration, in credits per hour ($1 = 100 credits). |
| Environment | The container image the runtime boots from: a template or one of your own. Where the selected cloud offers it, Provider default environment runs the cloud's stock image with no environment at all (see Environments). Manage environments… opens the Environments page. See Environments. |
| Workspace files | Mount workspace filesystem, on by default. Switch it off to start a runtime with nothing of the workspace on it: the files here are not visible to it, package installs do not persist, and kernels and shells start in the home directory. The bar shows No workspace mount while such a runtime runs. |
| Duration | A hard stop: 30 minutes, 1, 2, 4, 8, 12 or 24 hours, or Infinite (shown as ∞ in the bar). The picker preselects 30 minutes. While a runtime runs, the same row extends it: +1, +2, +4, +8 or +24 hours, or No time limit, counted from when the cloud started billing the machine. Options past your account's limit are not shown. |
| Idle stop | 15, 30, 60, 120 or 240 minutes, or Never. The default is 120 minutes. A runtime is idle only when there is no user interaction and no cell is executing. |
Each machine row carries an availability badge with the time it was last checked. A stale badge may warn you; it never promises capacity.
Menus
- File: Save (⌘S), Rename, Notebook info, Share…, Save
a copy as Environment (bakes the session's installed packages into a new
environment), Download as
.ipynb,.pyor.html, and Print… (⌘P). Print opens your browser's print dialog on a clean copy of the notebook; choose Save as PDF there to get a PDF. Where offered, Download > PDF… makes the PDF on our side instead: choose A4 or Letter, landscape, and Hide code for a report with outputs only. Interactive charts appear as their static image. Viewers can download a PDF too, from the button at the top of the read-only notebook. - Edit: Undo (Z) and Redo (Shift+Z) for cell operations; Cut, Copy, Paste below / above, Delete, Insert above / below, Duplicate (Shift+D), Split cell at cursor (⌘⇧- while editing), Merge, Move up / down (Alt+↑ / Alt+↓), change to code, markdown or raw (Y, M, R), Select all, Clear outputs, and Find and replace (⌘F).
- View: Show terminal (⌃`), Show selections panel (named groups of cells you can re-run together), Show table of contents (⌘⇧O), Show variables, collapse or expand all inputs or outputs, Notify when runs finish, and Show DataFrames as plain HTML (or as interactive tables).
- Run: Run cell (⌘Enter), Run and select below (Shift+Enter), Run and insert below (Alt+Enter), Run selected cells, Run this cell and all above / below, Run all cells, and Restart kernel and run all.
- Runtime: Interrupt execution (I I), Restart kernel (0 0), Restart runtime (new VM), Disconnect.
Single-key shortcuts work in command mode, with no cell being edited. Cell commands act on the checked cells when any are checked, otherwise on the active cell. Check cells with the checkbox, Shift+click, Shift+↑ / Shift+↓, or ⌘A. Undo covers inserting, deleting, moving, merging, splitting, pasting, changing type, clearing outputs and Replace all; typing inside a cell has the editor's own undo (⌘Z while editing).
Command palette: ⌘⇧P (Ctrl+Shift+P) lists every command with its shortcut. Type a few words to filter, then Enter.
Text cells
A text cell holds Markdown. Click it (or select it and press Enter) to edit: a toolbar appears above the text and a live preview appears beside it, or below it when the cell is narrow. The preview updates as you type and shows exactly what the finished cell will look like.
- Toolbar. The buttons are, in order: Heading, Bold, Italic, Code, Link, Image, Quote, Numbered list, Bulleted list, Task list, Table, Divider, Math and Emoji. Select some text and click a button to format it; click the same button again to take the formatting off. Heading steps through three heading sizes and back to plain text. Table and Divider insert a starter table or a horizontal line on their own lines. Code and Math make a block when you have selected several lines. Emoji opens a picker: search or scroll, then click an emoji (or press Enter) to insert it where your cursor is.
- Shortcuts. ⌘B bold, ⌘I italic, ⌘K link, ⌘E code (Ctrl+B, Ctrl+I, Ctrl+K and Ctrl+E on Windows and Linux). Alt+F10 moves to the toolbar, the arrow keys move along it, and Esc returns to the text.
- Lists. Press Enter in a list item, a checklist item or a quote and the next line starts the same way; press Enter on an empty item to end the list. Tab indents the list items you have selected under the item above, and Shift+Tab moves them back.
- Links. Select some words and paste a link: the words become a link to
it. A link to a heading, written as in Jupyter with dashes for spaces
(
[Data cleaning](#Data-cleaning)), takes you to that heading. - Images. Paste an image (a screenshot, or an image copied from another page), drag an image file onto the cell while you are editing it, or click Image to choose files. PNG, JPEG and WebP images are accepted, up to 10 at a time. Each image is shrunk to at most 2048 px on its longer side and compressed, which also removes hidden details such as where a photo was taken, and must end up at 1 MB or less; an image that is still larger is not added. Words you have selected become the image's description. The image is stored inside the notebook file, so it travels with the notebook when you share, download or copy it, and it shows in Jupyter, VS Code and Kaggle. Google Colab does not show images stored this way; the image stays in the file. When you remove an image's line from the text, the image leaves the file once you finish editing the cell.
- Math. Write LaTeX between
$…$or\(…\)for math inside a line, and between$$…$$or\[…\]for an equation on a line of its own. The forms Jupyter uses,\\(…\\)and\\[…\\], work too, as do environments such as\begin{align}…\end{align}written without dollars around them. A macro you define with\newcommandor\DeclareMathOperatorworks in the formulas after it, and chemistry such as\ce{H2O}renders. The math is drawn by KaTeX: packages it lacks, such asphysicsandsiunitx, are not available, andmultline,flalignandeqnarrayare drawn as close equivalents. Inside a table cell, write\vertinstead of|, which would end the cell. - Numbered equations. Equations written with
\begin{equation}or\begin{align}are numbered (1), (2), … through the notebook, one number per line of analign;\notagleaves a line out and\tag{A}shows (A) instead. Name an equation with\label{name}and write\eqref{name}(or\ref{name}without the parentheses) anywhere in a text cell: it shows the number and takes you to the equation when you click it. A macro defined in a text cell also works in every cell below it, outputs included. - Undo. ⌘Z undoes typing and formatting alike while you are editing.
- Finishing. Press Esc or Shift+Enter, or click anywhere outside the cell, to see the finished text. The cell is stored as plain Markdown, so the notebook opens the same way in Jupyter, VS Code, Colab and Kaggle.
Inside a fenced code or math block, Enter and Tab are plain keys, so code you paste or type there is never reformatted.
Running cells and saving
- Run a cell with Shift+Enter. Output streams into the cell as it is produced.
- Closing the tab does not kill a running cell. The runtime keeps each run's output itself. Come back while it runs and the cell shows everything it produced while you were away. Come back after the runtime stopped and the cell still gets that output, as long as the workspace files were mounted on that runtime; a cell the stop cut short says so. Very long output keeps its first and last part (about 1 MB of text per stream).
- When the kernel runs out of memory it is restarted and the cell says so, with the kernel's peak memory, instead of just stopping. The kernel is always what goes first, so the runtime stays reachable.
- Run-finished notifications. When a run of a minute or more (one cell, or Run all) ends while the notebook's tab is in the background, the browser shows a notification, "Run finished" or "Run failed at cell N", and the tab title gets a dot until you look. The first time a long run ends, a message offers Notify me; turn it on or off later under View. Notifications come from the open tab: with no Neural Studio tab open, nothing is sent.
- Autosave writes the notebook 2 seconds after you stop typing, and at least every 5 seconds while you keep typing; the bar shows Saving… and Saved. Leaving the page saves at once. ⌘S saves on demand.
- The kernel runs as an ordinary user in
/home/user/workspace, your durable workspace filesystem. Everything else on the machine is discarded when the runtime stops; see Packages in your runtime.
Widgets and interactive plots
ipywidgets (sliders, dropdowns, buttons, interact, tqdm.notebook progress
bars), Bokeh, Altair and Vega charts, folium maps and other outputs that run
JavaScript work in the notebook. Each one runs in its own sandboxed frame on a
separate site, so its code cannot see your account, the notebook or your
other outputs. It may load scripts, map tiles and data from any https
address, and its save or download buttons (Bokeh's save tool, Plotly's
camera, Vega's export menu) give you the file.
- Only outputs from a cell you ran in this tab are interactive. After a reload they show their saved form (often a text summary or an image) with Run the cell to make this interactive. Shared, public and exported notebooks, and viewers, always see the saved form; nothing in them runs.
- A widget keeps working after you reload the tab while its cell is still running, on runtimes started after this release. On an older runtime it comes back once the cell finishes.
- A message from a widget to the kernel is limited to 64 KB (the runtime
connection's limit), so a
FileUploadwidget cannot send larger files; upload them in Files instead. ipywidgets 8 is installed on every runtime. - Widget libraries with their own frontend code (ipyleaflet, bqplot, Plotly's
FigureWidget) load that code from jsDelivr, at one exact version: the one the library in your kernel reports, or, when it reports a range such as^0.20, the version jsDelivr picks inside that range. A library that reports anything vaguer (*,latest,>=1) shows a widget error. - Bokeh after a reload: run
output_notebook()again before a cell that shows a plot. Bokeh loads its library once per page, so a plot shown after a reload needs it loaded again.
Variables and DataFrames
Show variables in the View menu opens the Variables panel on the right: every variable in the kernel with its type, shape, dtype, device (for tensors), size and a short preview. It updates when a run finishes and when the kernel connects or restarts; it never runs anything of yours, and it waits while a cell is running. A DataFrame variable has a View button.
A pandas or polars DataFrame shown as a cell's output becomes an interactive table: click a column header to sort, type in Filter rows to keep the rows that contain the text, and Load more to page through the frame. While the frame is still in the kernel, sorting and filtering cover every row. After a restart, on a frame you deleted, or with no runtime, they cover the first 100 rows the output saved, and the table says so. Shared, public and exported notebooks show a plain table of the first rows. If you prefer the library's own table, choose View > Show DataFrames as plain HTML.
This needs no rebuild: the notebook sends a small helper to the kernel when it connects, on any image, and imports no library you have not imported.
Video, 3D and depth outputs
An ns.Video, ns.Object3D, ns.GaussianSplat or ns.DepthMap from the
Python SDK as a
cell's last expression shows in its viewer under the cell: a video player,
a 3D view you can turn, or a depth map with the distance under the cursor.
One output holds up to 8 MB; a larger one shows its size and asks you to log
it to a run with run.log, where the Experiments page shows it. Shared and
public notebooks show the same viewers; an exported HTML file shows the
preview picture, or a line saying to open the notebook in Neural Studio.
Files beside the notebook
The Files button in the notebook's top bar (or the Files tab next to Contents in the left panel) shows the workspace's folders. Click a file to open it in a tab next to the notebook: edit a script or a config while the notebook stays open and keeps running. Click the notebook's own tab to go back. Clicking another notebook opens that notebook instead.
File tabs save only when you ask (Cmd+S or Save), and a file that changed since you opened it is never overwritten without asking; see Editing a file. A dot on a tab means unsaved changes, and closing it asks first.
Comments
Workspace members can discuss a notebook's cells in comment threads. Each cell's label (Cell 3) shows how many open threads it has; click it, the Comments button in the top bar (it shows how many comments are new to you), or View > Show comments to open the comments in the right sidebar.
- Start a thread. Click the comment button next to a cell's label, write your comment (Markdown and math work), and press Comment (Cmd+Enter). The thread stays with the cell when you move it.
- Reply, resolve, reopen. Any editor or owner can reply to a thread and resolve it when it is settled; resolved threads move to the Resolved tab, where they can be reopened.
- Edit or delete. Only the person who wrote a comment can edit it. They can also delete it, even if they are now a viewer, and the workspace owner can delete any comment. A deleted comment that has replies shows as "This comment was deleted" so the replies keep their place.
- Deleted cells. A thread whose cell was deleted stays in the panel under On deleted cells, with the first line of the cell it was on.
- Who sees them. Owners and editors write comments; viewers read them. Comments never appear in shared links, public links, exports, printouts or PDFs. A comment is at most 10,000 characters.
- Updates. New comments from others appear within about 20 seconds while the notebook is open, and at once when you come back to the tab.
Deleting a notebook deletes its comments. When an account is deleted, the comments it wrote are removed; replies from others stay.
Version history
Neural Studio keeps earlier versions of each notebook. Open them with View > Show version history (the History tab of the right sidebar).
- Automatic versions. When you save and the last automatic version is more than 10 minutes old, the saved notebook is also kept as a version.
- Save version. Keeps the notebook as it is now, under a name you choose. Your latest edits are saved first.
- Preview and compare. Click a version to see it, and open Changes since to compare it with the notebook as it is now, cell by cell.
- Restore. Replaces the notebook with the version. Your edits are saved first and the content you replace is kept as a version (Before a restore), so a restore can always be undone. Anyone else with the notebook open is asked to reload before their next save. Wait for running cells to finish before you restore.
- Save as copy. Saves the version as a new notebook beside this one.
- Names. A named version is kept until someone deletes it; you can name any version, rename it or remove its name.
- How long versions are kept. Every version is kept for 24 hours, then one per hour for 7 days and one per day for 30 days. Named versions stay until deleted. A notebook keeps at most 200 versions (the oldest unnamed ones go first) and at most 200 named ones.
- Who can do what. Owners and editors save, restore, name and delete versions; viewers can look at them and compare.
- Storage. Versions are stored in your workspace and count toward its storage. Deleting a notebook deletes its versions within about an hour.
The terminal
Show terminal in the View menu, the terminal button in the bar, or
Ctrl+ (⌘ on a Mac) opens a shell at the bottom of the notebook. It runs on
the same machine, as the same user, starting in ~/workspace, and it is the
quickest way to pip install, inspect a GPU with nvidia-smi, or start a
web server to open from Web Ports.
The shell lives as long as the panel's connection. An open panel keeps it alive, even while the tab is in the background. Closing the tab ends the shell, and so does moving between the notebook and the other pages. Closing the panel only hides it, and a hidden shell with no output is closed after 30 minutes. A command running in the foreground ends with the shell. The panel stays open across reloads and page changes in the same tab; a new tab starts with it closed.
- Long jobs. Start a job that must outlive the panel detached from it:
nohup python train.py > train.log 2>&1 &, orsetsidin front of the command, or run it insidetmuxand reattach withtmux attachfrom a new shell (an environment built beforetmuxjoined the runtime needssudo apt-get install -y tmuxfirst). Follow a log withtail -f train.log. setsid nohup … &prints[1]+ Doneat once. That issetsidforking: the shell's job finishes immediately, and your program keeps running in the background. Check it withpgrep -af train.py.- Ctrl-C and the workspace filesystem. Ctrl-C cannot interrupt a
process that is waiting on a read from
~/workspace; the signal takes effect when the read returns. If the terminal seems stuck, runpkill -f <name>from a notebook cell (!pkill -f train.py).
Why a runtime stopped
When a runtime ends for a reason other than your Stop, the bar says which:
| Message | Meaning |
|---|---|
| Stopped after the idle timeout | No interaction, no running cell, and no CPU or GPU work (a job in the terminal counts) for the idle period. |
| Reached the session time limit | The Duration you chose ran out. |
| Your spot machine was reclaimed. | A spot machine was taken back. Relaunch on-demand, or try spot again. |
| Out of compute credits | Your balance reached zero. Add credits in Account settings. |
| Stopped: monthly spend cap reached | Your spend cap in Account settings was hit. |
| Stopped because a member was removed from the workspace | The owner removed a member who could reach this runtime. |
| Stopped because the Pro subscription of the account that launched it ended | The launcher's Pro lapsed. |
| Stopped because the workspace owner's account is suspended | The account that owns the workspace was suspended or is being deleted. No machine can start in the workspace until that ends; your files are kept. |
| Connection to the runtime was lost | The runtime's tunnel to the platform dropped and did not recover. |
| The cloud provider has no capacity for this machine right now. | The cloud you picked has no machine of this type free at the moment (on spot, no spot machine). Try again shortly or pick another machine. |
| Failed to connect. | The runtime could not be started or reached. Retry launches a fresh one; Report this problem sends the details to the team. |
| The runtime crashed, The runtime agent went offline | The machine failed. Retry launches a fresh one; Report this problem sends the details to the team. |
Two notices can appear while a runtime runs: a reminder that a secret your environment references is not defined in this workspace (with a link to Workspace settings, Secrets), and a warning when the machine's CUDA driver is older than your environment expects.
Viewers
A workspace viewer opens notebooks read-only: cells render with their saved outputs, and Start, the terminal and SSH are disabled with a hint. Viewers can still open a running runtime's web ports. Viewers can read the notebook's comments (the Comments button) but not write them, and look at its versions (the History button) but not restore them.
Related
- Quickstart: from sign-in to a first GPU cell.
- Environments: building the image a runtime boots from.
- Limits: runtime, idle and connection bounds.