Clusydocs
Core concepts

Branches

Fork a notebook at any cell, keeping your loaded data and fitted models, to try ideas in parallel.

A Clusy branch is not a Git branch. It's an experiment branch inside a notebook, and the thing that makes it useful is that forking keeps your kernel state.

The problem it solves

You're partway through a notebook. You've loaded some data, cleaned it, built features, a chunk of compute now sitting in memory. Now you want to compare two models. In a plain notebook you'd duplicate a pile of cells and hope they don't drift, or comment things in and out and lose track of which result came from which setup.

Branching handles this. You fork from the cell where the two ideas split. Clusy checkpoints the kernel at that point (your loaded data, cleaned frames, fitted objects) and the new branch starts from there. You don't recompute anything, and the original branch is untouched.

How a fork works

Pick the cell where your approaches diverge and fork from it.

Clusy checkpoints the kernel state at that cell, so the new branch inherits everything you'd already computed.

You get a new branch. The cells up to the fork point are shared, and from there it's yours to change.

Because the snapshot is taken at the fork point, forking is quick even when there's a lot in memory.

The notebook becomes a graph

Once you've branched, the notebook isn't a straight list anymore. Branches share their early cells and then diverge. You can look at it two ways:

  • a linear view for reading one branch top to bottom, and
  • a tree (DAG) view that draws the branch graph, with a minimap you can click to navigate.

Switch the active branch from the branch picker.

Branch status

Each branch carries a status so you can keep track of it:

StatusMeaning
activeYou're working on it
dormantSet aside for now
completedDone, kept for the record
deletedRemoved

Bringing branches back together

When you've decided which approach won, you converge. There are three modes:

  • Winner takes one branch forward, carrying its kernel state into the cells downstream.
  • Comparison keeps the branches side by side, for a report or a decision you haven't made yet.
  • Manual lets you stitch the pieces together yourself.

A convergence point is where branches that split earlier rejoin into one downstream cell, a diamond in the graph. It's how you branch at cell 3 and come back together at cell 8.

Branches vs. Git

Clusy branches hold live kernel state and exist only in Clusy, so use them to explore. Git versions the notebook files, so use it to keep history. They work together: branch freely, then commit what's worth keeping.

The Branching experiments guide walks through a full comparison.

On this page