src/notebook.tsx in your repo and pushes them to Auremi. You open the page in the console and run the cells in your browser.
Use a notebook to prototype an idea before you train on it, to look inside a trained model’s weights, to run inference on a few examples, or to chart a diagnostic. A new repo from auremi init starts with an example notebook.
Notebooks are TypeScript and TensorFlow.js only for now. PyTorch model repos can’t push a notebook yet.
Cells
A notebook is a list of cells. Each cell has a title and its own run button. There is no run-all button. There are two kinds of cell:- Browser cells run TypeScript in your browser tab. They can load a trained run’s weights, run the model with TensorFlow.js, and show the result as text, a table, JSON, an image, or any HTML you draw, such as a chart or an audio player. A browser cell can also pass data to the cells below it. Browser cells run again each time the page loads, unless a cell is set to run only when you click it.
- Job cells queue work on a training worker. A training cell starts a training run. An inference cell runs a finished run on an input you give it. Each job cell lists its runs.
src/notebook.tsx
summary, optional data for later cells, and a display list. A display item’s kind is text, json, table, html, canvas for raw pixels, or custom to draw into the page yourself.
To use TensorFlow.js in a browser cell, import it from a URL when the cell runs. auremi check rejects a plain import ... from "@tensorflow/tfjs" in notebook code, because the browser can’t resolve package names. A type-only import is fine.
Open a notebook
In the Auremi console, open your model and click the Notebook tab. The menu at the top picks which revision of the notebook you are looking at: Latest notebook, an older revision under Notebook revisions, or a commit under Git commits. Runs lists the runs started from that revision. Each cell’s results appear under Cell Output.Add or change cells
Ask your agent for the cell you want. It editssrc/notebook.tsx, checks it, and pushes a new revision. Changes in your repo don’t appear in the console until they are pushed. The open page updates by itself when a push lands.
Add a diagnostic cell
What the agent runs
What the agent runs
auremi notebook status shows the latest one, and auremi notebook open prints the link to the page.
Train from a notebook
A training cell trains the model code in the revision you are viewing, so push your changes first. Choose a Train dataset, a Mode (Quick or Full), where it runs under Compute, and the Epochs, Batch size, and Learning rate. Then click Run cell. To add a dataset first, see Datasets.Run inference
There are two ways to run a trained model from a notebook:- In a browser cell. The cell loads a run’s weights and runs the model in your tab. The result is immediate, which suits a few examples, a sweep of settings, or a diagnostic you want to rerun as you change the code.
- In an inference cell. Choose a finished run under Trained cell run, give it an input, and click Run cell. The job runs on a training worker, like any other job.
Try the model in the browser