kineuroExperimental Neuroradiology Research
Karolinska Institutet

The Pipelines page

Watch jobs and read their logs, run a pipeline, a family or a workflow over a selection or over main scans, read what a run made and what its pack decided, follow a result's provenance, and choose the model that answers each task.

Pipelines has four pages in the side: Pipelines, Jobs, Logs and Models. The section opens on Pipelines, one page with the pipelines and families, the workflows, and the runs going and done. Since 1.0.0-beta.2 it has no tabs; the older Catalog and Runs pages and their addresses lead to it. The section opens for a person with see on Pipelines or on Models, and each page needs its own grant. Everything heavy runs as a job the engine queues: reading a dataset, pseudonymising, sorting, picking, making pictures, releases, backups and analyses. What runs is here as it runs; what ran stays.

Watch the jobs

  1. Open Jobs. Now lists what runs and what waits, live from the engine’s event stream where it serves one (updated every second), and read every few seconds otherwise.
  2. Each job is a card: what it is doing and to what, for whom, how far it is, and what it is waiting for. Steps queued after a job show as one dashed card under it.
  3. Under Now, every job the engine lists, filtered by all, running, queued, done or failed (failed holds the cancelled).
  4. A job that stopped says why in the words the verb itself printed. Press the command it offers to run it again, or Dismiss.
  5. A pipeline run’s or a workflow run’s job opens its run: click the card, or press Open run.

The engine’s standing workers show apart as one line, “Workers: 3 ready”, that opens to each worker’s kind and last heartbeat. A worker silent for two minutes shows as not answering.

Since desk 1.0.0-beta.7 with engine 1.0.0-beta.10 a pipeline run’s card says how far it is in the run’s own count where its image reports it (the body-part, post-contrast and System 1 images do: the stacks answered of the stacks given), with the part of a split run and how long it has run; where several parts go at once their counts are summed (“1,200 of 2,610 scans in parts 3 to 5 of 23”). A unit that says nothing is counted by its units over, as before.

Pictures have a queue of their own. When a sort ends, the pictures of the scans it judged, then their 3D views, are queued there as jobs of their own, below the rest, so they never hold up a read, a sort, a pick or a score. A large dataset’s pictures are made several scans at a time.

Cancel

Cancel (or Drop, for a job still queued) goes by the verb’s grant. The card keeps its button and says why when you lack the grant.

Job Cancelled with
a read, a pseudonymisation, a bring-in, a vaulting or purge of the originals, a map filed, a merge work on Data
a fingerprint, a sort, a pick, a session build, a picture build work on Pipelines
a release, a hand-over work on Release
a backup, a backup check work on Backups
a query run work on Query

A running job stops at its next heartbeat and what is written stays written. A queued job is dropped from the queue.

Chains

A job may carry the steps queued after it. Each starts when the one before it ends done, under the grants and detail of the person who queued the first. A step that person may not queue stops the chain, and the job’s result says which step and why. Read a dataset is such a chain; see the chain for the engine’s side.

Read a job’s log

  1. Open Logs. The jobs are listed newest first.
  2. Choose one. Its log shows its end first and follows it while the job runs. Press Earlier to read back.
  3. A job that ran a pipeline lists its run’s units under its log. Choose a unit to read its own log.

A log the engine will not show says why: none was kept, it is another host’s, it holds a sealed sample, or you lack the grant. A job’s log needs the work of the page its verb belongs to.

Run an analysis

Pipelines lists the pipelines the engine serves, each pinned by its image, with what it writes and its newest run. An engine seeds a starter catalog: N4, SynthStrip, SynthSeg, SAMSEG with lesions, segcsvd, MRIQC, FreeSurfer recon-all and recon-all-clinical, the registration family, and the two workflows flair-lesions and cortical. Their images are large and are pulled on a run’s first use. segcsvd reads each session’s SynthSeg label map, so run SynthSeg first, or run the flair-lesions workflow, which chains them. FreeSurfer reads the lab’s licence from the software place.

Every pipeline carries a pack beside its descriptor: the needs a session must meet, what each knob does and whether it breaks comparability, the ordered rules that choose knob values per session from the registry’s facts and your goal, and the checks. A family is one row that opens to its members, each with its version select and its last run; the family’s rules choose the member per unit. Registration is the first family, with three members.

  1. Open Pipelines. A row is one name. Its select offers the versions a new run may take, newest first. A version a later one replaces because it fixes it is not offered.
  2. Press Run on a selection.
  3. Over: type to find a saved selection by its name and words (“t1 3d” finds t1-3d-stacks). Each entry says its newest version, its size, who made it and when. Or choose a dataset or an open cohort, shown as “study-a · main T1w”: the run goes over its main scans by role, and a pipeline that needs several roles takes every one of them. Exact text such as selection:x@2 is taken as typed and checked by the engine.
  4. Choose the goal, filled in with the pack’s default, and the pack’s switches (lesions on or off, a family’s task). A switch the pack gives no default for stands empty until you pick, and a chip pressed again clears it. Then set the parameters. Each shows the range its descriptor allows; a knob a rule sets or the pack fixes is shown without a field, with who sets it.
  5. Read the pre-flight before anything runs:
    • how many units run, and how many each need skips, in the pack’s words (“2 sessions cannot run: no FLAIR picked”), or “All 4 sessions can run.”; for a family, where its units are routed;
    • the units the registry cannot tell about, on a line of their own, with the offer to run them anyway, recorded as your choice;
    • the stacks left out, the estimated time, the card, and the lane’s budget; since engine 1.0.0-beta.9 a pipeline may declare the memory a unit takes for each core it is given, and the engine sizes a unit to the cores it takes, so one descriptor fits a laptop and a large server, and the container is held to the sized memory;
    • what the run needs of this machine (the converter, the runtime, the image, memory, the card, disk, the licence), each held or not in the engine’s words.
  6. Press Run. It waits while the engine names a blocker. With no container runtime the page says why and offers no Run. The run’s command carries --goal, --switch and --let-run where you chose them, and Run again keeps them.

A run takes a selection of any size. For a very large one, --chunk runs it in parts of at most N stacks, in stack order, each part a run of its own, one after another. A handle splits the same way:

nils run <pipeline> --select selection:NAME@V --chunk 20000
nils run <pipeline> --handle <id> --chunk 20000

Under a worker the parts are one job, which stays running until the last part ends; a stop asked between two parts stops there. Taking a part up again (nils run --resume <run>, or nils jobs resume) ends that part and goes on with the parts after it that no run holds yet. System 1’s score at arrival runs a large batch in parts the same way. Where a part’s units run together in one container on the CPU, as System 1’s do, several parts go at once, as many as the lane’s budget holds; --parts-at-once N caps it, and 1 runs them one after another. A run queued at the jobs door takes --chunk N as the keyboard does, a whole number of stacks above 0.

Runs whose stacks do not meet go on side by side and share the lane’s one budget. A run that would take a stack a running run holds is refused before it starts, and the refusal names that run and its job.

An admin adds a pipeline (Add a pipeline, from its nils.job.yml) or a workflow (its nils.workflow.yml, pasted or uploaded), sets where pipelines run, and sets or unsets the secret files a pipeline declares, whose contents never show. These need work on the install. A tool’s terms and its licence file are on Settings > Software. The models’ pipelines come from the engine’s release: nils pipeline add --release NAME; a pipeline with its pack, or a family, is added at the keyboard, as the engine’s page says.

Two lines on the page say how pipelines run, for a person with see on Pipelines:

  • Runtime: what runs pipelines and which runtime is chosen. Change chooses the runtime, and how Apptainer keeps an image: one sif file, or a sandbox folder where the machine has no /dev/fuse.
  • Starters: whether the engine seeds its starter catalog when it starts, and how many of the starters it holds. Seed now adds the ones lacking; the seeding at start is turned off or on beside it.

Changing either is work on the install, and every change is audited.

To have the assistant plan a run, open the Assistant and start a conversation with Plan a pipeline run; the run opens filled in here, for you to start.

Run a workflow

A workflow chains pipelines: steps, each a pipeline or a family at a version, and links, an output of one step wired to an input of a later one. The engine ships two: flair-lesions (the registration family, then SAMSEG with lesions, SynthSeg, then segcsvd over it) and cortical (SynthStrip, then recon-all). A workflow is one row on Pipelines, with its version select.

  1. Open the workflow. Its page shows its steps and links as the document says them.

  2. Choose the scope as a run takes it: a selection, or a dataset’s or a cohort’s main scans. Choose the goal, and the knobs the document lets you set, per step.

  3. Read the plan. The desk asks the engine before anything runs, and draws each link with its verdict and words:

    Verdict It means
    satisfied the link meets a need of the step after it: the registration’s aligned FLAIR meets SAMSEG’s need for a FLAIR registered to the T1w
    missing a need no step meets: SAMSEG with lesions and no registration step is accepted only with its header-alignment check on, and the plan says so
    redundant a step the next one does itself: N4 before SAMSEG or recon-all, which correct bias themselves; N4 before a FLAIR lesion model is marked possibly harmful
    refused an output whose type does not meet the input, both types named, or a pipeline or family the catalog does not hold
    fed a typed input the step before fills: SynthSeg before segcsvd, naming which SynthSeg the segcsvd key carries

    Each step shows its pre-flight: its units, the inputs a link feeds, the steps it waits for whole, a family’s routing, and its blockers.

  4. Start is offered when the plan says the workflow is runnable. It posts the run and opens its page.

A workflow run’s page lists its steps with their status and unit counts (total, made, failed, skipped, reused), each step’s pipeline run linked, the sum line, and Cancel while the job is open. A session’s next step starts when its previous step is done, without waiting for the whole selection; a unit skipped or failed at one step is skipped downstream with the same reason. A step whose result key matches a kept result is not run again: the unit says which run it was reused from. A result a person rejected in a check, one whose pipeline a newer version replaces, or one whose files fail their sha256 is never reused.

An admin adds a workflow by pasting or uploading its nils.workflow.yml, under work on the install. The engine’s side is packs, families and workflows.

Read a run

  1. On Pipelines, the runs going and done are listed under the catalog, pipeline and workflow runs together, newest first. A row opens its run wherever it is clicked; Open run on a job does the same.
  2. The table says what the run made, never a bare done: “4 of 4 made”, “3 of 4 made” or “nothing made”, and under it the rest (“4 of 4 skipped: no FLAIR picked”). A workflow run’s line sums its steps’ units.
  3. The run’s page shows its units by state, each in the pack’s words: made, failed, skipped with the need it lacks (“the T1 is 2D with 5 mm slices; recon-all needs 3D at 1.5 mm or finer”), routed to a family’s member with the rule and the reason, flagged with the check, its value and its threshold (the result is kept), or dropped. A failed run says why in one line, with the cause counted by kind.
  4. Each unit says what its pack decided: each knob’s value and who chose it (you by name, a rule with its words on hover, the default, or fixed, and where the assistant proposed it), the caveats its soft needs left, the cohort checks (“not yet: 12 of 30 sessions” below their stratum), and the comparability key, short, with the whole key on hover. A unit of a workflow run also says the run a kept result was reused from (linked), why nothing was reused, the inputs a link fed nothing for, and the judgement made as the unit started where it differs from the one at the run’s start.
  5. Each result carries its curation state: current; stale, in the caution colour, where the rules version on an input changed since; or unknown, for a unit from before the state was recorded.
  6. Cancel while it runs; Resume once it stopped, which keeps what it finished. Since engine 1.0.0-beta.10 a cancel of a run building its image stops the build at once; a run whose process was killed by hand or by the system while its engine kept running is marked interrupted and says nils jobs resume <job> takes it up, which queues it for the worker; and nils run --resume of a run that failed after its containers ended says instead which later runs did its units, how many of its review items each retired, and the exact command for a new run over the same stacks.
  7. The page also has the table of measures as the ask reads it (one row per scan at the identifying details level; below that, totals over groups, and the engine withholds a group of fewer than five scans), the run’s declared checks with their breaches linked to review items, and the files it made. The table asks only for the columns the run made. Where a run holds results under several comparability keys, its numbers are shown per key, with the words every door says, never one number across them.
  8. A unit with a mask offers View: the scan the mask’s grid is on opens with the mask drawn over it, read only, with one chip a part set (Lesions 8, Structures 36). Check results starts a check.
  9. A run that suggested scans to curate says so under Suggested to curate: the values by axis, and Save as a selection, which a campaign starts from. A scan of a sample sealed now is left out, and counted.

Provenance

Provenance on a run’s unit, on a scan in the dataset viewer and on its session opens a panel of the steps that ran on it: each with its keys, its results (files and measures) and each result’s curation state. The state is recorded when the unit runs: the rules version that classified its inputs, the label set, System 1’s answers with the model’s version, and the axes a person overrode. A change of the rules version on an input marks the result stale, in the same words at every door. Steps the engine withholds, of a stack in a sealed sample, are counted plainly, and below detail quasi the engine names no unit. At the keyboard the same is nils provenance, by subject code, session or stack; see the engine’s page.

When a run fails

  1. Read the reason under the row. Where the engine names the failure it gives the kind (dependency, resource, input or pipeline), the cause, and one sentence of what to do.
  2. A refusal, or a pre-flight check, that the software place mends (the converter missing, an install whose verification failed, terms not accepted, a licence file not placed) links to Settings > Software for a person who may open it, with one note. Anyone else reads “Ask an admin to install dcm2niix.”
  3. Run again on a failed run opens its pre-flight first, keeps the goal, the switches and let-run of the command it takes up, and takes the run up again where it stopped.

Since engine 1.0.0-beta.10 a run’s failures retire once a later run of the same pipeline does those units: the review items its failed units left are closed as superseded by that run, nothing is deleted and the old run keeps its record, and the run’s summary says how many retired; a refused file, a check’s breach and an item a campaign holds stay open. A container killed for memory while held to a cap says the cap’s size (“killed at its memory cap of 16 GB”) and advice for a cap, instead of asking for more memory for the lane.

Before 1.0.0-beta.2 the converter was installed beside the reason, with Install dcm2niix and Install from a file; both are on Settings > Software now.

On the command line

The engine runs the same from the keyboard, and records the same per unit as the page shows.

nils run <pipeline> --select selection:NAME@V --goal standard --switch lesions=on --preflight
nils run <pipeline> --select selection:NAME@V --goal standard --switch lesions=on --let-run
nils run <family> --select main@dataset:NAME --switch task=within_session
nils workflow plan <workflow> --select main@dataset:NAME
nils workflow run <workflow> --select main@dataset:NAME --goal standard
nils provenance session <code>@<label>

--goal and --switch name=value are the pack’s goal and switches, and --let-run runs the units the registry cannot tell about, as your choice. A knob the pack marks as set by a rule or fixed refuses a --param of yours. The commands that add a pipeline, a family or a workflow are on install the engine.

Choose the model that answers a task

Models shows each task and slot with its models side by side, as cards. One model answers each task: the one chosen there.

A card says
tested on what it was tested on, with the evidence run
speed on the CPU and on a card, and what it needs of a card
equivalence its CPU and card answers, stated and measured
trained on the label set
complete or what it lacks
certified the graded run or the sealed sample that certified it, with its numbers, or that none names it

The chosen model is marked by its border, with why it answers: chosen by a person, a certificate, the one promoted last, or the newest admitted.

  1. To change the model of a task, press Choose on the card of another admitted or promoted model, as an admin. A panel says what changes; give a why, which the audit keeps. Back to default, beside the task’s name once a person has chosen, opens a panel; press Use the default. Then the certified model answers, else the one promoted last, else the newest admitted.
  2. To add a model, press Register, paste its card and press Register the card (models:work). The engine refuses in its own words, shown as they are. A card registered without some of its claims (the label set it was trained on, its tested claims, its speed) gains them at the keyboard with nils model add-claims MODEL --claims FILE: additions only, each checked as registration checks it, and a claim the card states already is refused.
  3. Admit a registered model by a check, Promote it, or Retire it. Promoting retires nothing: several promoted models stay in a task and the site chooses. A retired model can be run again by name to reproduce a result.
  4. A model’s own page (#pipelines/models/<id>) keeps its card, its encoders, its label set, each tested claim and its history. Record a certificate cites the graded run that measured the model: the run, the sha256 of its manifest, the commit that registered the plan, the bar, how many stacks it graded and how many were wrong. It is your own act under your sign-in and unseals nothing, so no second person is needed. The engine works the bound out again from the counts.

What a model proposes waits in Review, Proposals, waiting to be confirmed until a person commits it.

Updated 28 October 2026